Update Booking

Gett Business API allows you to edit orders

🚧

Updates are allowed by the following conditions

  • The order is a Pre-book order
  • "edit_future_order_enabled" is true
  • The update is performed before the min time to edit according to "edit_before_scheduled_at_min"
  • Any change in the Stops object requires passing the whole object, not only the specific field

Request

NameValue
methodPatch
URL/v1/orders/<order_id>?businessId={{businessid}}URL for "Update order" request
orderIdstringOrder ID obtained from Order request "creation" response
businessIdUUIDCompany UUID identificator obtained from Gett in registration process

Fields description see in Order request

❗️

Please note

Active orders can't be edited by the customer on any platform

curl --location --request patch 'https://business-api.gett.com/v1/orders/<orderId>?businessId=<companyUUID>' \
--header 'Authorization: Bearer <access token>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data-raw '{
    "product_id": "df49c6e9-e15d-4e8d-af4c-80bd90d2c7d7",
    "stops": [
        {
            "type": "origin",
            "actions": [
                {
                    "type": "pick_up",
                    "user": {
                        "name": "Guest",
                        "phone": "447999999999"
                    }
                }
            ],
            "location": {
                "lat": 51.5195735,
                "lng": -0.1491631,
                "address": {
                    "full_address": "52 Wimpole St, Marylebone, London W1G 8YQ, UK",
                    "city": "London",
                    "house": "52",
                    "street": "Wimpole Street",
                    "country": "UK",
                    "postcode": "W1G 8YQ",
                    "address_place": {
                        "provider": "google",
                        "id": "ChIJQTg-0NMadkgRwJR_8HVZ7Ac"
                    }
                }
            }
        },
        {
            "type": "destination",
            "actions": [
                {
                    "type": "drop_off",
                    "user": {
                        "name": "Guest",
                        "phone": "447999999999"
                    }
                }
            ],
            "location": {
                "lat": 51.5130972,
                "lng": -0.1204665,
                "address": {
                    "full_address": "42 Russell St, West End, London WC2B 5HH, UK",
                    "city": "London",
                    "house": "42",
                    "street": "Russell Street",
                    "country": "UK",
                    "postcode": "WC2B 5HH",
                    "address_place": {
                        "provider": "google",
                        "id": "ChIJ91RtHcsEdkgRCJ5CMjHlkMk"
                    }
                }
            }
        }
    ],
    "note_to_driver": "Please call on arrival"
}'

Response

Response format see in Create order response body.

{
    "id": 500220,
    "status": "Reserved",
    "business_uuid": "5416eeea-aa27-4219-a11b-3b1c3445c562",
    "category": "transportation",
    "product_id": "df49c6e9-e15d-4e8d-af4c-80bd90d2c7d7",
    "scheduled_at": "2021-03-03T12:23:00+00:00",
    "quote_id": "",
    "stops": [
        {
            "type": "origin",
            "actions": [
                {
                    "type": "pick_up",
                    "user": {
                        "name": "Guest",
                        "phone": "447999999999"
                    }
                }
            ],
            "location": {
                "lat": 51.5195735,
                "lng": -0.1491631,
                "address": {
                    "full_address": "52 Wimpole St, Marylebone, London W1G 8YQ, UK",
                    "city": "London",
                    "house": "52",
                    "street": "Wimpole Street",
                    "country": "UK",
                    "postcode": "W1G 8YQ",
                    "address_place": {
                        "provider": "google",
                        "id": "ChIJQTg-0NMadkgRwJR_8HVZ7Ac"
                    }
                }
            }
        },
        {
            "type": "destination",
            "actions": [
                {
                    "type": "drop_off",
                    "user": {
                        "name": "Guest",
                        "phone": "447999999999"
                    }
                }
            ],
            "location": {
                "lat": 51.5130972,
                "lng": -0.1204665,
                "address": {
                    "full_address": "42 Russell St, West End, London WC2B 5HH, UK",
                    "city": "London",
                    "house": "42",
                    "street": "Russell Street",
                    "country": "UK",
                    "postcode": "WC2B 5HH",
                    "address_place": {
                        "provider": "google",
                        "id": "ChIJ91RtHcsEdkgRCJ5CMjHlkMk"
                    }
                }
            }
        }
    ],
    "payment_type": "account",
    "note_to_driver": "Please call on arrival",
    "requested_at": "2021-02-03T12:26:51+00:00"
}