Delivery
Orders, zones, drivers, and KPIs
Authorization
ApiKeyAuth X-Api-Key<token>
API key obtained from the CMS dashboard.
In: header
Path Parameters
siteId*string
Query Parameters
status?string
Value in
"received" | "preparing" | "ready" | "picked_up" | "in_transit" | "delivered" | "cancelled"driverId?string
dateFrom?string
Format
datedateTo?string
Format
datelimit?integer
Default
25Range
value <= 100cursor?string
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/sites/string/delivery/orders"{
"data": [
{
"id": "string",
"orderId": "string",
"status": "received",
"customerName": "string",
"customerPhone": "string",
"customerAddress": {
"line1": "string",
"city": "string",
"postalCode": "string"
},
"driverId": "string",
"deliveryCost": 0,
"currency": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"deliveredAt": "2019-08-24T14:15:22Z"
}
],
"hasMore": true,
"nextCursor": "string",
"meta": {
"requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6",
"timestamp": "2019-08-24T14:15:22Z"
}
}{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6",
"timestamp": "2019-08-24T14:15:22Z"
}
}Authorization
ApiKeyAuth X-Api-Key<token>
API key obtained from the CMS dashboard.
In: header
Path Parameters
siteId*string
orderId*string
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/sites/string/delivery/orders/string"{
"data": {
"id": "string",
"orderId": "string",
"status": "received",
"customerName": "string",
"customerPhone": "string",
"customerAddress": {
"line1": "string",
"city": "string",
"postalCode": "string"
},
"driverId": "string",
"deliveryCost": 0,
"currency": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"deliveredAt": "2019-08-24T14:15:22Z"
},
"meta": {
"requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6",
"timestamp": "2019-08-24T14:15:22Z"
}
}{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6",
"timestamp": "2019-08-24T14:15:22Z"
}
}Authorization
ApiKeyAuth X-Api-Key<token>
API key obtained from the CMS dashboard.
In: header
Path Parameters
siteId*string
orderId*string
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PATCH "https://example.com/v1/sites/string/delivery/orders/string/status" \ -H "Content-Type: application/json" \ -d '{ "status": "received" }'{
"data": {
"id": "string",
"status": "string"
},
"meta": {
"requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6",
"timestamp": "2019-08-24T14:15:22Z"
}
}{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6",
"timestamp": "2019-08-24T14:15:22Z"
}
}Authorization
ApiKeyAuth X-Api-Key<token>
API key obtained from the CMS dashboard.
In: header
Path Parameters
siteId*string
Response Body
application/json
curl -X GET "https://example.com/v1/sites/string/delivery/zones"{
"data": [
{
"id": "string",
"name": "string",
"active": true
}
],
"meta": {
"requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6",
"timestamp": "2019-08-24T14:15:22Z"
}
}Authorization
ApiKeyAuth X-Api-Key<token>
API key obtained from the CMS dashboard.
In: header
Path Parameters
siteId*string
Response Body
application/json
curl -X GET "https://example.com/v1/sites/string/delivery/drivers"{
"data": [
{
"id": "string",
"name": "string",
"phone": "string",
"vehicle": "string"
}
],
"meta": {
"requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6",
"timestamp": "2019-08-24T14:15:22Z"
}
}Authorization
ApiKeyAuth X-Api-Key<token>
API key obtained from the CMS dashboard.
In: header
Path Parameters
siteId*string
Response Body
application/json
curl -X GET "https://example.com/v1/sites/string/delivery/kpis"{
"data": {
"totalOrders": 0,
"todayOrders": 0,
"avgDeliveryMinutes": 0,
"activeDrivers": 0
},
"meta": {
"requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6",
"timestamp": "2019-08-24T14:15:22Z"
}
}