Order Update

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"

📘

Access token

The Access token should be requested with order scope

Request

Name

Value

method

PUT

URL

https://business-api.gett.com/v1/orders/<orderId>?businessId=<companyUUID>;

URL for "Update order" request

orderId

string

Order ID obtained from Order request "creation" response

businessId

UUID

Company 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 PUT '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 '{
    "category": "transportation",
    "product_id": "df49c6e9-e15d-4e8d-af4c-80bd90d2c7d7",
    "stops": [
        {
            "type": "origin",
            "actions": [
                {
                    "type": "pick_up",
                    "user": {
                        "name": "Guest",
                        "phone": "447467660999"
                    }
                }
            ],
            "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": "447467660999"
                    }
                }
            ],
            "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": "don'\''t call me"
}'

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": "447467660999"
                    }
                }
            ],
            "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": "447467660999"
                    }
                }
            ],
            "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": "don't call me",
    "requested_at": "2021-02-03T12:26:51+00:00",
    "supplier": {
        "name": ""
    }
}

What’s Next
Did this page help you?