Skip to content

Instantly share code, notes, and snippets.

@cankemik
Last active April 6, 2017 11:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cankemik/2243007264e7fb85c3995a1e10f5dcff to your computer and use it in GitHub Desktop.
Save cankemik/2243007264e7fb85c3995a1e10f5dcff to your computer and use it in GitHub Desktop.

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