📘

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

NameTypeDescription
client_secretstringThe client secret provided to you by Gett.
client_idstringThe client ID provided to you by Gett.
scopestringThe scope of access. Use demand_partner.
grant_typestringUse 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'
Nameis mandatoryTypeDescription
scheduled_atoptionalstringPickup 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).
lcoptionalstringLanguage 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_privacymandatorybooleanIndicates if the user accepted the terms and privacy policy. if the user didn't agree, the order won't be created
categorymandatorystringOrder category, e.g., 'transportation', 'delivery'
partner_idmandatorystringYour partner ID. that was obtained from Gett
product_idmandatorystringProduct ID for the ride. thats obtained from Gett or from Gett products request
stopsmandatoryarrayArray 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].typemandatorystringRepresents the type of the stops.
possible values: 'origin', 'on_going', 'destination'
stops[x].actionsmandatoryarrayArray of action objects contains the users info and their actions in the stop e.g. 'pick_up' or 'drop_off'
stops[x].actions.typemandatorystringRepresents 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.usermandatoryobjectan object containing the the passenger name and phone number
stops[x].actions.user. namemandatorystringuser name
stops[x].actions.user. phonemandatorystringThe phone number of the user.
The phone numbers must be passed in the international format (without "+" sign) as specified in RFC3966.
stops[x].locationmandatoryobjectan object contains the location details
stops[x].location.latmandatoryfloatlocation latitude
stops[x].location.lngmandatoryfloatlocation longitude
stops[x].location.full_address (optional)optionalstringthe address title
stops[x].location.address (optional)optionalobjectan object contains the address breakdown
stops[x].location.address.address_place (optional)optionalobjectan object contains the address provider details.
supported providers: 'GOOGLE' and 'POSTCODE' (postcode anywhere / loquate)
stops[x].location.address.address_place.id(optional)optionalstringlocation id from providers
stops[x].location.address.address_place.provider(optional)optionalstringlocation provider.
possible values: 'GOOGLE', 'POSTCODE'
stops[x].location.address.postcode (optional)optionalstringpostal code
stops[x].location.address.house (optional)optionalstringhouse number
stops[x].location.address.street (optional)optionalstringstreet name
stops[x].location.address.city (optional)optionalstringcity name
stops[x].location.address.state (optional)optionalstringstate name
stops[x].location.address.country (optional)optionalstringcountry name
stops[x].location.address.notes (optional)optionalstringspecial note for the address, will be present to driver/courier
payment.payment_typemandatorystringPayment 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_passengersoptionalintegerNumber of passengers to pickup
preferences.num_of_suitcasesoptionalintegerNumber 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 and product_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'
NameTypeDescription
order_idstringThe ID of the order you want to cancel.
partner_idstringYour partner ID.