API

Driver

The driver assigned to an order: assign or unassign one.

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
DELETE /v1/stores/{storeId}/orders/{id}/driver remove No Content
PUT /v1/stores/{storeId}/orders/{id}/driver update OK

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

updated, err := client.Driver(nil).Update(map[string]any{"order_id": "example", "store_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(updated)
removed, err := client.Driver(nil).Remove(map[string]any{"order_id": "example", "store_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(removed)

Lua

Construct client as shown in the Lua setup, then call the operations:

local updated, err = client:Driver():update({ order_id = "example", store_id = "example" })
local removed, err = client:Driver():remove({ order_id = "example", store_id = "example" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$updated = $client->Driver()->update(["order_id" => "example", "store_id" => "example"]);
$client->Driver()->remove(["order_id" => "example", "store_id" => "example"]);

Python

Construct client as shown in the Python setup, then call the operations:

updated = client.Driver().update({"order_id": "example", "store_id": "example"})
client.Driver().remove({"order_id": "example", "store_id": "example"})

Ruby

Construct client as shown in the Ruby setup, then call the operations:

updated = client.Driver.update({ "order_id" => "example", "store_id" => "example" })
client.Driver.remove({ "order_id" => "example", "store_id" => "example" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const updated = await client.Driver().update({ order_id: "example", store_id: "example" })
await client.Driver().remove({ order_id: "example", store_id: "example" })

Fields

Field Type Required Description
external_driver_id string Yes Identifier that uniquely identifies the driver
first_name string Yes First Name of the driver
last_name string No Last Name of the driver
lat number No Current Latitude of the driver location
long number No Current Longitude of the driver location
phone string Yes Phone Number of the driver
status string No When a driver is assigned for the first time, the system sets the 'ASSIGNED' status automatically.

remove

DELETE /v1/stores/{storeId}/orders/{id}/driver

Operation ID: DELETE/v1/stores/{storeId}/orders/{id}/driver.

Authentication: oauth2 (AccessToken).

Parameters

Parameter In Type Required Description
storeId path string Yes Store Identifier
id path string Yes

Responses

204: No Content
400: Bad Request

application/json

Property Type Required Description
error string Yes 400 Bad Request is the status code that indicates the server cannot or will not process the request due to something that is perceived to be a client error
401: Unauthorized

application/json

Property Type Required Description
error string Yes 401 Unauthorized is the status code to return when the client provides no credentials or invalid credentials.
403: Forbidden

application/json

Property Type Required Description
error string Yes 403 Forbidden is the status code to return when a client has valid credentials but not enough privileges to perform an action on a resource.
404: Not Found

application/json

Property Type Required Description
error string Yes 404 Not Found is the status code that indicates a server could not find a client-requested webpage
429: Too Many Requests

application/json

Property Type Required Description
error string Yes 429 Too Many Requests is the status code that indicates the client application has surpassed its rate limit, or number of requests they can send in a given period of time

update

PUT /v1/stores/{storeId}/orders/{id}/driver

Operation ID: PUT/v1/stores/{storeId}/orders/{id}/driver.

Authentication: oauth2 (AccessToken).

Parameters

Parameter In Type Required Description
storeId path string Yes Store Identifier
id path string Yes

Request body

application/json

Property Type Required Description
external_driver_id string Yes Identifier that uniquely identifies the driver
first_name string Yes First Name of the driver
last_name string No Last Name of the driver
lat number No Current Latitude of the driver location
long number No Current Longitude of the driver location
phone string Yes Phone Number of the driver
status enum: ENROUTE_TO_PICKUP, PICKUP_ARRIVED, PICKUP_COMPLETE, ENROUTE_TO_DROPOFF, DROPOFF_ARRIVED, DROPOFF_COMPLETE No When a driver is assigned for the first time, the system sets the 'ASSIGNED' status automatically. Subsequent real-time driver updates can be provided as needed.

Responses

200: OK

application/json

Property Type Required Description
data object No Driver Location Entity
data.external_driver_id string Yes Identifier that uniquely identifies the driver
data.first_name string Yes First Name of the driver
data.last_name string No Last Name of the driver
data.lat number No Current Latitude of the driver location
data.long number No Current Longitude of the driver location
data.phone string Yes Phone Number of the driver
data.status enum: ENROUTE_TO_PICKUP, PICKUP_ARRIVED, PICKUP_COMPLETE, ENROUTE_TO_DROPOFF, DROPOFF_ARRIVED, DROPOFF_COMPLETE No When a driver is assigned for the first time, the system sets the 'ASSIGNED' status automatically. Subsequent real-time driver updates can be provided as needed.
400: Bad Request

application/json

Property Type Required Description
error string Yes 400 Bad Request is the status code that indicates the server cannot or will not process the request due to something that is perceived to be a client error
401: Unauthorized

application/json

Property Type Required Description
error string Yes 401 Unauthorized is the status code to return when the client provides no credentials or invalid credentials.
403: Forbidden

application/json

Property Type Required Description
error string Yes 403 Forbidden is the status code to return when a client has valid credentials but not enough privileges to perform an action on a resource.
404: Not Found

application/json

Property Type Required Description
error string Yes 404 Not Found is the status code that indicates a server could not find a client-requested webpage
409: 409 response

application/json

Property Type Required Description
error string Yes 409 Conflict is the status code that indicates a request could not be completed due to a conflict with the current state of the resource
429: Too Many Requests

application/json

Property Type Required Description
error string Yes 429 Too Many Requests is the status code that indicates the client application has surpassed its rate limit, or number of requests they can send in a given period of time