Taxi Supplier API

References

Testing Booking Management

There are 24 test bookings available in total, and these are cached for 1 hour. When calling the /v1/bookings endpoint, you may find that not all 24 of these bookings are returned. This is because CANCELLED and COMPLETE status bookings are filtered out, to mirror production behaviour. You may return these types of rides via a GET request to made to /v1/bookings/:customerReference/:bookingReference

After 1 hour, the test bookings are refreshed with new ones, and you can filter the results by both status (i.e. NEW, ACCEPTED, PENDING_AMENDMENT, etc.) and pickup date (i.e. pickUpDateFrom and pickUpDateTo).

More information along with example requests and responses can be found in the Booking Management section.

Testing Driver Management/Tracking

Once a booking has been acknowledged, driver management and tracking may be performed against Sandbox rides. You will then need to either create a driver and use the given driver_id in subsequent requests or include the driver’s first_name, last_name and telephone_number. You must also assign a driver before you may send driver events, and they must be sent in sequential order, I.e.:

DRIVER_DEPARTED_TO_PICKUP
DRIVER_ARRIVED_AT_PICKUP
DRIVER_DEPARTED_TO_DROPOFF
DRIVER_ARRIVED_AT_DROPOFF

At 5 minute intervals between each other event you may also send DRIVER_LIVE_LOCATION updates containing real-time GPS coordinates for the driver. This will enrich the experience offered to the customer as they’re able to track their driver’s arrival.

In the event the customer is a no-show you may send DRIVER_SUBMITTED_CUSTOMER_NO_SHOW to let us know that the driver was there, but the customer was a no-show. Including GPS coordinates in these requests will make it easier for us to resolve any complaints from the customer. More information on driver management and tracking can be found in the Driver Management section.

Once the v2/search-results endpoint is set up on your side, you can test it using our Search Webhook Validation Endpoint.

Calling this endpoint will trigger a search to be performed against your system which we will then run an automated test against. This test will return you a SUCCESS or FAIL response with error messaging that will tell you of any formatting errors that need to be resolved in order for it to function properly.

When performing a search you can either leave the body blank, which will trigger a “dummy” search with values preset by us. Alternatively, to check functionality for a specific location, car type, etc., you may enter your own search parameters which will then be used in the subsequent call to your system.

Search webhook validation

In order to validate your search webhook implementation, you can call the following endpoint:

[POST] /v2/searchResults

Alternatively you can leave the body of the request empty and pre-determined search request body will be used instead.

Request

Headers

These headers are mandatory.

Note

OAuth client id and client secret must be generated by supplier.

Header Description Example
Oauth-Client-Id Oauth client id example-client-id
Oauth-Client-Secret Oauth client secret example-client-secret
Supplier-URL Base URL for the supplier's OAuth and search endpoints http://example-url.com

Payload Fields

Parameter Type Description
latitude Float The origin or destination latitude.
longitude Float The origin or destination longitude.
name String|null The full address of the origin or destination location.
This field will not be available for all requests.
city String|null The origin or destination city.
This field will not be available for all requests.
country String|null The origin or destination country (ISO 3166 alpha-2).
This field will not be available for all requests.
postcode String|null The origin or destination postcode.
This field will not be available for all requests.
iata String|null The origin or destination IATA, only populated for airport locations.
This field will not be available for all requests.
passengers Integer The number of passengers travelling.
pickupDateTime Datetime The pickup timestamp in UTC (ISO 8601).
pickupTimezone String The pickup timezone in IANA format.
drivingDistanceInKm Float|null The distance between the origin & destination locations.
This field will not be available for all requests.
genius.level One of the following values:

GENIUS_ONE
GENIUS_TWO
GENIUS_THREE
NON_GENIUS
The Genius level of the customer.

Sample Payload

{
    "origin": {
        "latitude": 48.8735513,
        "longitude": 2.3426615,
        "name": "29 Rue du Faubourg Montmartre, 75009 Paris, France",
        "city": "Paris",
        "country": "FR",
        "postcode": "75009",
        "iata": null
    },
    "destination": {
        "latitude": 48.8564826,
        "longitude": 2.3524135,
        "name": "Hotel de Ville, FR, Place de l'H\\u00f4tel de Ville, 75004 Paris, France",
        "city": "Paris",
        "country": "FR",
        "postcode": "75004",
        "iata": null
    },
    "passengers": 1,
    "pickupDateTime": "2020-10-23T12:00:00Z",
    "pickupTimezone": "Europe/Paris",
    "drivingDistanceInKm": 3.51,
    "genius": {
        "level": "GENIUS_ONE"
    }
}

Response

Response Fields

Parameter Type Description
oauthStatusCode Integer Indicates whether authentication was successful.
oauthValidationErrors Array Count of validation errors in the response.
searchResultStatusCode Integer Indicates whether the search was successful. Note - does not mean search was usable. If there were formatting errors it may still fail validation.
searchResultValidationErrors Array List of any validation errors relating to the search response.
searchResults Array The response received to the search.
errorMessage String Any errors encountered when performing the validation

Sample Response Body

{
   "oauthStatusCode": 200,
   "oauthValidationErrors": [],
   "searchResultStatusCode": 200,
   "searchResultValidationErrors": [],
   "searchResults": [
       {
           "searchResultId": "c4c7c90b-a6bf-451a-a3e5-90fed6a9c8d3",
           "transportCategory": "STANDARD",
           "price": {
               "salePriceMin": 8.81,
               "salePriceMax": 8.81,
               "currency": "USD"
           },
           "minPassengers": 1,
           "maxPassengers": 3,
           "provider": {
               "name": "Local Taxi (Robot Fleet US)",
               "phoneNumber": "+12014810000"
           },
           "features": [
               {
                   "name": "noOfBags",
                   "value": "1"
               }
           ],
           "genius": {
                "benefitType": "PERCENTAGE",
                "percentageDiscount": 5
           }
       }
   ]
}

Sample Response Validation Failures

{
   "oauthStatusCode": 200,
   "searchResultStatusCode": 200,
   "searchResultValidationErrors": [
       "results[1].minPassengers: must not be null",
       "results[0].searchResultId: must not be null",
       "results[0].transportCategory: PEOPLECARRIE is not a valid enum value",
       "results[0].genius.percentageDiscount: must be between 5 and 10"
   ],
   "searchResults": [
       {
           "searchResultId": null,
           "transportCategory": "PEOPLECARRIE",
           "transportType": null,
           "price": {
               "salePriceMin": 64.27,
               "salePriceMax": 64.27,
               "currency": "EUR"
           }
       }
   ]
}
{
   "oauthStatusCode": null,
   "searchResultStatusCode": null,
   "errorMessage": "Connection timed out"
}