Skip to content

Instantly share code, notes, and snippets.

@cankemik cankemik/hepsiexpress.md
Last active Apr 6, 2017

Embed
What would you like to do?

curl --user hepsiexpress:561f48031fe9c0fc75c87bc8939be7e5 -i -X POST -H "Content-Type: application/json" -d '{"city":"AFYONKARAHİSAR"}' https://re-cms.com/api/hepsiexpress

Hepsiexpress Applicant Form RESTful API

Works with cURL Basic Authentication. Only accepted HTTP method is POST and the POST request's content type should be JSON.

Auth Example

curl --user username:password https://re-cms.com/api/hepsiexpress

Basic JSON POST Example:

curl --user username:password -i -X POST -H "Content-Type: application/json" -d '{"city":"İstanbul","state":"Beyoğlu"}' https://re-cms.com/api/hepsiexpress

The fields in JSON data will be fetch as in 'and' query. Applicants collection will be searched which city and state fields matches the given post fields.

Return Example

status Integer : Status code. (If lower than 0 can be used as error code, if equals or greater than 0 it is a success code)

msg String: Information about request process

data [Array]: Fetched applicants in application collection.

Available Fields

name String

surname String

phone String

address String

company_name String

company_title String

company_city String

company_state String

billing_address String

vehicle_model String

vehicle_age Integer

about String

city String

state String

education String : İlk Okul, Orta Okul, Lise, Üniversite, Yüksek Lisans/Doktora

reference String : Sosyal Medya, Gazete İlanı, Kariyer Siteleri, Diğer

foundation_date Date Object (ISODATE)

experience Boolean

Custom Query

Hepsiexpress is built on mongoDB. Api will likely support all official mongoDB query and projection operators.

Custom Query Example

For fetching vehicle_age field equal or greater than 20:

curl --user username:password -i -X POST -H "Content-Type: application/json" -d '{"vehicle_age":{"$gte": 20}}' https://re-cms.com/api/hepsiexpress

More info

TODO

Sort, Pagination, Aggregation etc

License

Studio Recode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.