Look for a taxi
Curl
anonymous
curl -X GET -H "Accept: application/json" -H "X-VERSION: 2" -H "X-API-KEY: token" "dev.api.taxi/taxis/?lon=2.3&lat=48.8"
Free a taxi
Make sure you change the taxi_id in the url
Curl
anonymous
curl -X PUT -H "Accept: application/json" -H "X-VERSION: 2" -H "Content-Type: application/json" -H "X-API-KEY: token" -d '{"data": [{"status": "free"}]}' "dev.api.taxi/taxis/taxi_id/"
Post a hail
Make sure you change the taxi_id and the operator in the body
Curl
anonymous
curl -X POST -H "Accept: application/json" -H "X-VERSION: 2" -H "Content-Type: application/json" -H "X-API-KEY: token" -d '{"data": [{"customer_address": "customer address", "customer_id": "0656435678", "customer_lat": 48.8, "customer_lon": 2.3, "customer_phone_number": "0656435678", "operateur": "operator", "taxi_id": "taxi_id"}]}' "dev.api.taxi/hails/hail_id/"
Set status hail to received_by_taxi
Make sure you change the hail_id in the url
Curl
anonymous
curl -X PUT -H "Accept: application/json" -H "X-VERSION: 2" -H "Content-Type: application/json" -H "X-API-KEY: token" -d '{"data": [{"status": "received_by_taxi"}]}' "dev.api.taxi/hails/hail_id/"
Set status hail to accepted_by_taxi
Make sure you change the hail_id in the url
Curl
anonymous
curl -X PUT -H "Accept: application/json" -H "X-VERSION: 2" -H "Content-Type: application/json" -H "X-API-KEY: token" -d '{"data": [{"status": "accepted_by_taxi", "taxi_phone_number": "0676545373"}]}' "dev.api.taxi/hails/hail_id/"
Set status hail to accepted_by_customer
Make sure you change the hail_id in the url
Curl
anonymous
curl -X PUT -H "Accept: application/json" -H "X-VERSION: 2" -H "Content-Type: application/json" -H "X-API-KEY: token" -d '{"data": [{"status": "accepted_by_customer"}]}' "dev.api.taxi/hails/hail_id/"