Look for a taxi

Curl

anonymous
curl -X GET -H "Accept: application/json" -H "X-VERSION: 2" -H "X-API-KEY: token" "api.taxi/taxis/?lat=48.8&lon=2.3"

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"}]}' "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"}]}' "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"}]}' "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"}]}' "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"}]}' "api.taxi/hails/hail_id/"