Sandbox
To access the Private Orders API, you must authenticate by obtaining a bearer token. Use the following endpoint to generate the token.
Authentication
Request URL
--request POST 'https://api.sandbox.gett.com/v1/oauth/token'
Query params
Name | Type | Description |
---|---|---|
client_secret | string | The client secret provided to you by Gett. |
client_id | string | The client ID provided to you by Gett. |
scope | string | The scope of access. Use demand_partner . |
grant_type | string | Use client_credentials as the grant type. |
Note: The bearer token returned in the response should be used in the header of all subsequent API requests.
Create Private Order
Request URL
--request POST 'https://api.sandbox.gett.com/v1/private/orders/create'
Name | is mandatory | Type | Description |
---|---|---|---|
scheduled_at | optional | string | Pickup time of the order, for an on-demand order, the scheduled_at should be removed from the request body The 'schedule_at' time in format ISO8601: yyyy-mm-ddThh:mm:ss+Z (example: 2017-12-05T18:59:23+03:00). |
lc | optional | string | Language code, e.g., 'en' for English. will be used by Gett for comms, in case of unsupported language, it will fallback to en |
user_accepted_terms_and_privacy | mandatory | boolean | Indicates if the user accepted the terms and privacy policy. if the user didn't agree, the order won't be created |
category | mandatory | string | Order category, e.g., 'transportation', 'delivery' |
partner_id | mandatory | string | Your partner ID. that was obtained from Gett |
product_id | mandatory | string | Product ID for the ride. thats obtained from Gett or from Gett products request |
stops | mandatory | array | Array of stop objects defining the route. Stops should include at least 2 stops 'origin' and 'destination' to indicate stop point additional stop is required from type 'on_going' |
stops[x].type | mandatory | string | Represents the type of the stops. possible values: 'origin', 'on_going', 'destination' |
stops[x].actions | mandatory | array | Array of action objects contains the users info and their actions in the stop e.g. 'pick_up' or 'drop_off' |
stops[x].actions.type | mandatory | string | Represents the type of the action to be performed in the stops for the specified user. possible values: 'pick_up', 'stop_by', 'drop_off' |
stops[x].actions.user | mandatory | object | an object containing the the passenger name and phone number |
stops[x].actions.user. name | mandatory | string | user name |
stops[x].actions.user. phone | mandatory | string | The phone number of the user. The phone numbers must be passed in the international format (without "+" sign) as specified in RFC3966. |
stops[x].location | mandatory | object | an object contains the location details |
stops[x].location.lat | mandatory | float | location latitude |
stops[x].location.lng | mandatory | float | location longitude |
stops[x].location.full_address (optional) | optional | string | the address title |
stops[x].location.address (optional) | optional | object | an object contains the address breakdown |
stops[x].location.address.address_place (optional) | optional | object | an object contains the address provider details. supported providers: 'GOOGLE' and 'POSTCODE' (postcode anywhere / loquate) |
stops[x].location.address.address_place.id(optional) | optional | string | location id from providers |
stops[x].location.address.address_place.provider(optional) | optional | string | location provider. possible values: 'GOOGLE', 'POSTCODE' |
stops[x].location.address.postcode (optional) | optional | string | postal code |
stops[x].location.address.house (optional) | optional | string | house number |
stops[x].location.address.street (optional) | optional | string | street name |
stops[x].location.address.city (optional) | optional | string | city name |
stops[x].location.address.state (optional) | optional | string | state name |
stops[x].location.address.country (optional) | optional | string | country name |
stops[x].location.address.notes (optional) | optional | string | special note for the address, will be present to driver/courier |
payment.payment_type | mandatory | string | Payment type, e.g., 'cash'. as partner you are not allowed to use the end user payment methods and allowed to book only with cash option. the indicate rider will be able to switch payment in the Gett app |
preferences.num_of_passengers | optional | integer | Number of passengers to pickup |
preferences.num_of_suitcases | optional | integer | Number of suitcases |
Sample Request Body
{
"lc": "en",
"partner_id": "UUID",
"user_accepted_terms_and_privacy": true,
"category": "transportation",
"scheduled_at": "2024-10-01T13:50:00+03:00",
"product_id": "UUID",
"stops": [
{
"type": "origin",
"actions": [
{
"type": "pick_up",
"user": {
"name": "user_name",
"phone": "user_phone"
}
}
],
"location": {
"lat": 32.1150727624063,
"lng": 34.823377732703754,
"address": {
"full_address": "",
"city": "",
"house": "",
"state": "",
"street": "",
"country": "",
"postcode": "",
"address_place": {
"provider": "",
"id": ""
}
}
}
},
{
"type": "destination",
"actions": [
{
"type": "drop_off",
"user": {
"name": "user_name",
"phone": "user_phone"
}
}
],
"location": {
"lat": 31.4511111,
"lng": 34.8698603,
"address": {
"full_address": "",
"city": "",
"house": "",
"state": "",
"street": "",
"country": "",
"postcode": "",
"address_place": {
"provider": "",
"id": ""
}
}
}
}
],
"payment": {
"payment_type": "cash"
},
"preferences" : {
"num_of_passengers" : 1,
"num_of_suitcases": 1
}
}
Response Example
{
"ride_request_id": "91610c77-78c3-4156-8284-8b645ebdf227",
"status": "success",
"order": {
"id": "500475"
}
}
Note: Ensure that the
partner_id
andproduct_id
are correctly provided for the specific order.
Cancel Private Order
Request URL
--request POST 'http://api.sandbox.gett.com/v1/private/orders/cancel/500467?partner_id=UUID'
Name | Type | Description |
---|---|---|
order_id | string | The ID of the order you want to cancel. |
partner_id | string | Your partner ID. |
Updated 16 days ago