Download OpenAPI specification:Download
The SmartRoutes Open API allows you to use the power of the SmartRoutes Routing Engine directly from within your own software application.
To use the API, you will need to generate an API Access Key for your SmartRoutes account. To generate, login to your SmartRoutes account and navigate to Settings > Integrations > SmartRoutes Open API and click 'Generate API Key'. For more details on SmartRoutes integrations, click here.
This access key can be used to connect to the API.
Configure a webhook receiver URL in your depot settings and SmartRoutes will deliver event notifications as they happen. Seven event types are emitted:
| Event | Type ID | Fires when | data payload |
|---|---|---|---|
ORDERS_STATUS | 2 | An order's status changes (line-item or order-level transition) | { "order_id": <int>, "order_number": <string>, "status": <OrderStatus> } |
PLANS_CREATED | 4 | A Plan row is persisted (after POST /plans/optimise/orders or /orders-for-ids). Fires before optimisation completes — see the optimise endpoint description. | { "id": <int> } — plan id |
PLANS_DISPATCHED | 5 | A Plan is dispatched (routes published to drivers). | { "id": <int> } — plan id |
ROUTES_EDITED | 6 | A dispatched route is edited (re-ordering stops, etc.) | { "id": <int> } — route id |
ROUTES_DELETED | 7 | One or more dispatched routes are deleted (typically as part of solution replacement) | { "id": <int> } — route id |
ROUTES_COMPLETED | 8 | A dispatched route is completed by the driver. | { "id": <int> } — route id |
PLANS_DELETED | 9 | A Plan row is destroyed | { "id": <int> } — plan id |
Each event is delivered as an HTTP POST to the receiver URL configured in your depot settings. The request body is always a JSON object of shape:
{ "type": <event type string from the table above>, "data": <payload object from the table above> }
The data field is the payload object for a single event — NOT an array. Bulk operations (e.g. order-status changes from a route delete) fan out into one POST per event, each with its own data object.
Outgoing requests carry Content-Type: application/json and an HTTP Basic Authorization header derived from the username/password you supplied when configuring the webhook. No HMAC signature header is sent; treat the basic-auth credentials as the integrity check and rotate them if compromised.
Each delivery has a server-side request timeout of 3 seconds. On failure (HTTP error, timeout, or connection error) the delivery is retried up to 3 times total; after the third failure the task is marked permanently ERROR and not retried again. Your receiver should respond 2xx quickly — slow receivers will be treated as failures.
The delivery envelope and per-event payloads are also defined under #/components/schemas/: WebhookDelivery, WebhookOrdersStatusPayload, WebhookPlanIdPayload, WebhookRouteIdPayload. Reference these from your own integration's tests / contract tools to catch shape drift early.
All requests expect the API Access key to be provided in a header x-access-key:YOUR_ACCESS_KEY
Every endpoint has a per-minute limit, and most also have a short burst limit. Requests are rejected as soon as either limit is hit.
Most endpoints fall into one of these tiers:
| Tier | Rate limit | Description |
|---|---|---|
| Standard | 60 / min (max 5 / sec) | Single-resource reads and writes (e.g. GET /orders/{id}, PUT /orders/{id}) |
| Listing | 30 / min (max 5 / sec) | Paginated lists (e.g. /customers, /plans, /routes) |
| Reference | 60 / min (max 1 / sec) | Reference data (e.g. depots, capacities, custom fields, vehicles, zone groups) |
| Bulk | 30 / min (max 1 per 2 sec) | Bulk creates and heavy deletes |
| Upload | 15 / min (max 1 / sec) | File uploads (e.g. POST /orders/{id}/attachments) |
The following endpoints have a stricter limit of 5 / min (max 2 per 15 sec):
POST /plans/optimise/orders, POST /plans/optimise/orders-for-idsPOST /booking/availability, POST /booking/available-dates, POST /booking/available-slotsPOST /routes/{id}/reverseWhen a limit is hit, the API returns HTTP 403 with a Retry-After header and details.retry_after_seconds in the body — both give the seconds until the limit resets.
We may temporarily reduce these limits to protect platform stability. We aim to keep such reductions brief and rare. However, your application should be built to handle rate limits gracefully.
State-changing POST endpoints accept an optional idempotency-key request header. The mechanism is Stripe-style: send the same key with a retry of the same request and the server returns the original response without re-executing the underlying operation.
Header: idempotency-key: <opaque string, 1–255 characters>. The key can be any client-chosen identifier — a UUID is recommended. Keys are scoped per (api-key, endpoint), so the same key on two different endpoints is treated as two distinct operations.
Retention: 24 hours from the time the original request was received.
Behaviour:
idempotency-replay: true indicates the response is a cached replay. The underlying operation is not re-executed. Replays do not consume rate-limit or data-row quota.422 IDEMPOTENCY_KEY_REUSED_WITH_DIFFERENT_BODY.409 IDEMPOTENCY_REQUEST_IN_PROGRESS with a Retry-After header. Retry after the period given.400 IDEMPOTENCY_INVALID_KEY.Supporting endpoints (Phase 1):
POST /ordersPOST /depots/{id}/ordersPOST /plans/optimise/ordersPOST /plans/optimise/orders-for-idsPOST /customers/POST /vehicles/POST /notifications/schedule/ordersOther POST endpoints ignore the header. Multipart uploads (POST /orders/{id}/attachments) are excluded from idempotency in this phase.
Make an initial request to the API endpoint with the desired query parameters. The API response includes the requested data and a Link header for the next page. Use the URL provided in the Link header to make subsequent requests for the next page.
Example: "<https://api.smartroutes.io/v2/orders?page_info=PAGE_INFO_STRING&limit=100>; rel=next"
limit: Specifies the maximum number of items per page. Limited to a maximum of 100
Example: limit=50
updated_at_min: Filters results based on the minimum update timestamp in the format YYYY-MM-DD hh:mm:ss or YYYY-MM-DDTHH:mm:ss.SSSZ.
Example: updated_at_min=2023-01-01 12:00:00 OR updated_at_min=2023-01-01T12:00:00.000Z
status: Filters results based on the order status.
Example: status=Pending
Errors are classified into specific types, each identified by a unique name and accompanied by an appropriate HTTP statusCode. The error responses include a brief description of the error, and additional details that provide more context about the specific issue.
INVALID_INPUT
{ validationErrors: An array of Zod errors specifying validation issues in the submitted data. } containing additional details about the error. For processing validation errors, refer to Zod Documentation .GEOCODING_FAILED
Endpoint to check whether an order can be booked on a specified day
| date required | string <date> Requested date for order collection/delivery. |
required | object Location and other routing information for booking availability check. |
| vehicles | Array of arrays Array of vehicles to attempt to route the order with. If no vehicles provided, active vehicles will be used. |
[- {
- "date": "2025-01-01",
- "order": {
- "type": "delivery",
- "delivery_address": "5 Main Street, London, UK",
- "delivery_postcode": "HS2 3DE4",
- "delivery_country_code": "IE",
- "delivery_duration": 30,
- "capacities": [
- {
- "id": 1,
- "capacity": 100
}
]
}, - "vehicles": [
- {
- "id": 123
}, - {
- "id": 456
}, - {
- "id": 789
}
]
}
]{- "booking": {
- "available": true
}
}Endpoint to retrieve a page of customers.
| page_info | string Information about the page for pagination. Generated by the OpenAPI |
| updated_at_min | string <date-time> Minimum updated date and time for filtering. |
| limit | integer Default: 100 Maximum number of customers to retrieve per page. |
{- "customers": [
- {
- "id": 123,
- "name": "John Doe",
- "account": "NO123",
- "address": "123 Main St 12345",
- "email": "john@doe.com",
- "postcode": "12345",
- "lat": 12.345,
- "lng": -67.89,
- "phone": "+1234567890",
- "duration": 30,
- "notes": "Leave at the doorstep",
- "created": "2022-04-29T16:12:08.000Z",
- "updated": "2022-09-29T10:11:06.000Z"
}
]
}Creates multiple customers in a single request (max 100). All referenced tags, skills, and capacities must already exist. custom_fields can be matched by id or name.
| idempotency-key | string [ 1 .. 255 ] characters Optional idempotency key for safe retries. See the Idempotency section of the API description for behaviour. 1–255 characters; UUID recommended. |
| name | string <= 100 characters Full name of the customer |
| account required | string <= 100 characters Unique account reference (required) |
| address | string <= 255 characters |
| postcode | string <= 20 characters |
| phone | string <= 30 characters |
string <email> | |
| lat | number Latitude coordinate |
| lng | number Longitude coordinate |
| duration | number [ 1 .. 9999 ] Visit duration in minutes |
| notes | string <= 40000 characters |
Array of objects List of predefined capacity types by ID | |
| skills | Array of strings List of skill names (must already exist) |
| tags | Array of strings List of tag names (must already exist) |
Array of objects <= 2 items Up to two delivery/pickup time windows per customer | |
Array of objects Custom field values. Use |
[- {
- "name": "John Doe",
- "account": "12345678",
- "address": "Cork, Ireland",
- "phone": "+353877777777",
- "email": "john@doe.com",
- "lat": 51.8985,
- "lng": -8.4756,
- "notes": "Customer notes",
- "duration": 10,
- "tags": [
- "Spring Route",
- "Priority"
], - "skills": [
- "Manual Handling"
], - "capacities": [
- {
- "id": 145,
- "capacity": 12
}
], - "time_windows": [
- {
- "from": "10:00",
- "to": "19:30"
}
], - "custom_fields": [
- {
- "name": "Colour",
- "value": "Red"
}, - {
- "id": 261,
- "value": "10"
}
]
}
]{- "customers": [
- {
- "id": 381321,
- "account": "12345678"
}, - {
- "id": 381322,
- "account": "12345678"
}
], - "errors": [ ]
}Retrieve a customer based on ID.
| id required | string ID of the customer to retrieve. |
{- "id": 123,
- "name": "John Doe",
- "account": "NO123",
- "address": "123 Main St 12345",
- "postcode": "12345",
- "lat": 12.345,
- "lng": -67.89,
- "phone": "+1234567890",
- "email": "john@doe.com",
- "duration": 30,
- "notes": "Leave at the doorstep",
- "created": "2022-04-29T16:12:08.000Z",
- "updated": "2022-09-29T10:11:06.000Z",
- "capacities": [
- {
- "id": 201,
- "type": "WEIGHT",
- "capacity": 500
}, - {
- "id": 202,
- "type": "VOLUME",
- "capacity": 1000
}
], - "time_windows": [
- {
- "from": "08:00",
- "to": "12:00"
}, - {
- "from": "14:00",
- "to": "18:00"
}
], - "skills": [
- "Skill A",
- "Skill B"
], - "tags": [
- "Tag A",
- "Tag B"
], - "custom_fields": [
- {
- "value": "My Value",
- "custom_field_type": {
- "name": "My Custom Field",
- "type": "TEXT",
- "id": 123
}
}
]
}Update a customer based on ID.
| id required | string ID of the customer to update. |
| name | string Name of the customer. |
| account | string Account number of the customer. |
| address | string Address of the customer. |
| postcode | string Postcode for the customer address. |
| lat | number Latitude of the customer location. |
| lng | number Longitude of the customer location. |
| phone | string Contact number of the customer. |
string <email> Email of the customer. | |
| duration | number Duration for customer interaction in minutes. |
| notes | string Notes for customer interaction. |
Array of objects List of time windows for the customer. | |
| skills | Array of strings List of required skills for the customer. |
| tags | Array of strings List of tags for the customer |
Array of objects List of capacities for the customer. | |
Array of objects List custom fields for the customer |
{- "name": "string",
- "account": "string",
- "address": "string",
- "postcode": "string",
- "lat": 0,
- "lng": 0,
- "phone": "string",
- "email": "user@example.com",
- "duration": 0,
- "notes": "string",
- "time_windows": [
- {
- "from": "14:15:22Z",
- "to": "14:15:22Z"
}
], - "skills": [
- "string"
], - "tags": [
- "string"
], - "capacities": [
- {
- "id": 0,
- "capacity": 0.1
}
], - "custom_fields": [
- {
- "id": 0,
- "value": "string"
}
]
}{- "id": 123,
- "name": "John Doe",
- "account": "NO123",
- "address": "123 Main St 12345",
- "postcode": "12345",
- "lat": 12.345,
- "lng": -67.89,
- "phone": "+1234567890",
- "email": "john@doe.com",
- "duration": 30,
- "notes": "Leave at the doorstep",
- "capacities": [
- {
- "id": 201,
- "type": "WEIGHT",
- "capacity": 500
}, - {
- "id": 202,
- "type": "VOLUME",
- "capacity": 1000
}
], - "time_windows": [
- {
- "from": "08:00",
- "to": "12:00"
}, - {
- "from": "14:00",
- "to": "18:00"
}
], - "skills": [
- "Skill A",
- "Skill B"
], - "tags": [
- "Tag A",
- "Tag B"
], - "custom_fields": [
- {
- "id": 123,
- "value": "My Value",
- "name": "My Custom Field"
}
]
}Endpoint to bulk add orders to a depot.
| id required | number ID of the depot to which bulk orders are added. |
| idempotency-key | string [ 1 .. 255 ] characters Optional idempotency key for safe retries. See the Idempotency section of the API description for behaviour. 1–255 characters; UUID recommended. |
| order_number required | string |
| type required | string Enum: "delivery" "pickup" "shipment" |
id (object) or account (object) Optional. When omitted, the order is created without a customer association ( | |
| delivery_contact_name | string |
| delivery_contact_number | string |
| delivery_contact_email | string <email> |
| delivery_address | string |
| delivery_postcode | string |
| delivery_lat | number |
| delivery_lng | number |
| delivery_notes | string |
Array of objects List of time windows for order delivery. | |
| delivery_date | string <date> |
| delivery_available_days | Array of strings Items Enum: "MONDAY" "TUESDAY" "WEDNESDAY" "THURSDAY" "FRIDAY" "SATURDAY" "SUNDAY" List of available delivery days for the order. |
| pickup_address | string |
| pickup_postcode | string |
| pickup_duration | number |
| pickup_lat | number |
| pickup_lng | number |
| pickup_notes | string |
Array of objects List of time windows for order pickup. | |
| pickup_contact_name | string |
| pickup_contact_number | string |
| pickup_contact_email | string <email> |
| pickup_available_days | Array of strings Items Enum: "MONDAY" "TUESDAY" "WEDNESDAY" "THURSDAY" "FRIDAY" "SATURDAY" "SUNDAY" List of available pickup days for the order. |
| parts | number |
Array of objects | |
| skills | Array of strings |
Array of objects | |
Array of objects List of capacities for the order. Either id or type is required. |
[- {
- "order_number": "ORD123",
- "delivery_contact_name": "John Doe",
- "delivery_contact_number": "+123456789",
- "delivery_contact_email": "john@doe.com",
- "delivery_address": "123 Main St",
- "delivery_postcode": "12345",
- "delivery_lat": 40.7128,
- "delivery_lng": -74.006,
- "delivery_notes": "Leave at the doorstep",
- "delivery_time_windows": [
- {
- "from": "10:00",
- "to": "11:00"
}
], - "delivery_date": "2023-12-31",
- "delivery_available_days": [
- "MONDAY",
- "WEDNESDAY",
- "SUNDAY"
], - "pickup_address": "456 Oak St",
- "pickup_postcode": "54321",
- "pickup_duration": 30,
- "pickup_lat": 40.73061,
- "pickup_lng": -73.935242,
- "pickup_notes": "Call upon arrival",
- "pickup_time_windows": [
- {
- "from": "08:00",
- "to": "09:00"
}
], - "pickup_contact_name": "Jane Smith",
- "pickup_contact_number": "+987654321",
- "pickup_contact_email": "jane@example.com",
- "pickup_available_days": [
- "MONDAY",
- "WEDNESDAY",
- "SUNDAY"
], - "type": "delivery",
- "parts": 2,
- "customer": {
- "id": 123,
- "account": "NO123"
}, - "line_items": [
- {
- "product_code": "P001",
- "product_name": "Product 1",
- "product_quantity": 2
}, - {
- "product_code": "P002",
- "product_name": "Product 2",
- "product_quantity": 1
}
], - "skills": [
- "skill1",
- "skill2"
], - "custom_fields": [
- {
- "id": 123,
- "value": "Value 1"
}, - {
- "id": 234,
- "value": "Value 2"
}
], - "capacities": [
- {
- "id": 1,
- "capacity": 100
}, - {
- "id": 2,
- "capacity": 50
}
]
}
]{- "orders": [
- {
- "id": "123",
- "order_number": "ORD123"
}, - {
- "id": "124",
- "order_number": "ORD456"
}
], - "errors": [
- {
- "name": "GEOCODING_FAILED",
- "description": "We've failed to geocode the provided location.",
- "details": {
- "id": 124,
- "order_number": "ORD456",
- "is_created": true
}
}
]
}| id required | integer Driver Questionnaire Submission ID |
{- "driver_questionnaire_submission": {
- "id": 1266,
- "route_id": 101838,
- "visit_id": null,
- "driver_questionnaire": {
- "type": "ROUTE_VEHICLE_CHECKIN",
- "title": "Route Questionnaire"
}, - "driver_questionnaire_answers": [
- {
- "id": 4028,
- "type": "CHECKBOX",
- "data": "1",
- "driver_questionnaire_question": {
- "type": "CHECKBOX",
- "question": "Checkbox Question?"
}, - "images": [ ]
}, - {
- "id": 4029,
- "type": "TEXT",
- "data": "Depot",
- "driver_questionnaire_question": {
- "type": "TEXT",
- "question": "What is the starting location?"
}, - "images": [ ]
}, - {
- "id": 4030,
- "type": "SELECT",
- "data": "1",
- "driver_questionnaire_question": {
- "type": "SELECT",
- "question": "Select an option?"
}, - "images": [ ]
}, - {
- "id": 4031,
- "type": "MULTI_SELECT",
- "data": "1",
- "driver_questionnaire_question": {
- "type": "MULTI_SELECT",
- "question": "Select all that applies?"
}, - "images": [ ]
}, - {
- "id": 4032,
- "type": "MULTI_SELECT",
- "data": "3",
- "driver_questionnaire_question": {
- "type": "MULTI_SELECT",
- "question": "Select all that applies?"
}, - "images": [ ]
}, - {
- "id": 4033,
- "type": "MULTI_SELECT",
- "data": "2",
- "driver_questionnaire_question": {
- "type": "MULTI_SELECT",
- "question": "Select all that applies?"
}, - "images": [ ]
}, - {
- "id": 4034,
- "type": "SIGNATURE",
- "data": "90e4486d-dfcf-4007-90d7-7a169b5c89c0",
- "driver_questionnaire_question": {
- "type": "SIGNATURE",
- "question": "Did you get a signature?"
},
}, - {
- "id": 4035,
- "type": "PHOTO",
- "data": "f6c356a0-4622-468c-a6c0-78f11446fd09",
- "driver_questionnaire_question": {
- "type": "PHOTO",
- "question": "Uploaded the photo? "
},
}
]
}
}Endpoint to retrieve a page of notification tasks.
| page_info | string Pagination cursor generated by the API. Pass this value to retrieve the next page of results. |
| limit | integer Default: 100 Maximum number of notification tasks to retrieve per page. Max 100. |
| updated_at_min | string <date-time> Filter tasks modified at or after this datetime. Format: YYYY-MM-DD hh:mm:ss or YYYY-MM-DDTHH:mm:ss.SSSZ. |
| status | string Filter notification tasks by status. |
| type | string Enum: "SMS" "EMAIL" Filter notification tasks by type. Accepted values: SMS, EMAIL (case-insensitive). |
{- "notification_tasks": [
- {
- "id": 4616,
- "template": {
- "id": 197
}, - "visit": {
- "id": 599910
}, - "order": null,
- "scheduled_date": "2026-02-24T14:48:00.000Z",
- "sent_date": null,
- "to": "test@smartroutes.io",
- "subject": "Delivery is on the way",
- "message": "Hello, your delivery is scheduled.",
- "status": "Scheduled"
}, - {
- "id": 4615,
- "template": {
- "id": 198
}, - "visit": {
- "id": 599910
}, - "order": null,
- "scheduled_date": "2026-02-24T14:48:00.000Z",
- "sent_date": null,
- "to": "353892373003",
- "subject": "",
- "message": "Hello, your delivery is scheduled.",
- "status": "Scheduled"
}, - {
- "id": 4614,
- "template": {
- "id": 198
}, - "visit": null,
- "order": {
- "id": 458457,
- "order_number": "183"
}, - "scheduled_date": "2026-02-28T14:42:00.000Z",
- "sent_date": null,
- "to": "353892373003",
- "subject": "",
- "message": "Hello, your delivery is scheduled.",
- "status": "Scheduled"
}
]
}Schedule notification dispatches for a set of orders.
| idempotency-key | string [ 1 .. 255 ] characters Optional idempotency key for safe retries. See the Idempotency section of the API description for behaviour. 1–255 characters; UUID recommended. |
| orders required | Array of arrays Array of order IDs to create notifications for |
| templates required | Array of arrays Array of template IDs to generate notifications for |
| send_time_utc | string UTC Timestamp at which to send the notifications, defaults to current time if not provided. |
{- "orders": [
- 123,
- 124
], - "templates": [
- 999
], - "send_time_utc": "2024-12-25 12:00:00"
}{- "notifications": [
- {
- "order_id": 123
}
], - "errors": [
- {
- "name": "INVALID_INPUT",
- "description": "Couldn't create notification. No phone number provided",
- "statusCode": 400,
- "isOperational": true,
- "sendAlert": false,
- "sourceError": null,
- "details": {
- "id": null,
- "order_id": 124,
- "visit_orders": [
- {
- "order_id": 124,
- "order_number": "ORD124"
}
], - "phone": null,
- "email": "johndoe@test.com",
- "country": null,
- "name": "John Doe",
- "reference_id": "ORD124",
- "visit_custom_fields": [ ],
- "address": "Cork City, Cork"
}, - "timestamp": "2024-12-30T00:00:00.000Z"
}
]
}Endpoint to bulk add orders.
| idempotency-key | string [ 1 .. 255 ] characters Optional idempotency key for safe retries. See the Idempotency section of the API description for behaviour. 1–255 characters; UUID recommended. |
| order_number required | string Order number. |
id (object) or account (object) Optional. When omitted, the order is created without a customer association ( | |
| type required | string Enum: "delivery" "pickup" "shipment" Type of the order (delivery, pickup, or shipment). |
| priority | string Priority of the order (Accepts 'P1', 'P2', 'P3'). |
| delivery_contact_name | string Name of the contact person. |
| delivery_contact_number | string Contact number of the person. |
| delivery_contact_email | string <email> Email of the contact person. |
| delivery_address | string Delivery address. |
| delivery_country_code | string Two letter country code, e.g. 'IE' |
| delivery_postcode | string Postcode for delivery address. |
| delivery_lat | number Latitude of the delivery location. |
| delivery_lng | number Longitude of the delivery location. |
| delivery_duration | number Duration for order delivery in minutes. |
| delivery_notes | string Notes for delivery instructions. |
Array of objects List of time windows for order delivery. | |
| delivery_date | string <date> Date for order delivery. |
| delivery_available_days | Array of strings Items Enum: "MONDAY" "TUESDAY" "WEDNESDAY" "THURSDAY" "FRIDAY" "SATURDAY" "SUNDAY" List of available delivery days for the order. |
| pickup_address | string Address for order pickup. |
| pickup_country_code | string Two letter country code, e.g. 'IE' |
| pickup_postcode | string Postcode for pickup address. |
| pickup_duration | number Duration for order pickup in minutes. |
| pickup_lat | number Latitude of the pickup location. |
| pickup_lng | number Longitude of the pickup location. |
| pickup_notes | string Notes for pickup instructions. |
Array of objects List of time windows for order pickup. | |
| pickup_contact_name | string Name of the contact person for pickup. |
| pickup_contact_number | string Contact number of the person for pickup. |
| pickup_contact_email | string <email> Email of the contact person for pickup. |
| pickup_available_days | Array of strings Items Enum: "MONDAY" "TUESDAY" "WEDNESDAY" "THURSDAY" "FRIDAY" "SATURDAY" "SUNDAY" List of available pickup days for the order. |
| parts | number Number of parts in the order. |
object | |
Array of objects | |
object Third party object | |
Array of objects List of line items in the order. | |
| skills | Array of strings List of required skills for the order. |
Array of objects List of custom fields for the order. | |
Array of objects List of capacities for the order. Either id or type is required. | |
| tags | Array of strings List of tag names (must already exist) |
[- {
- "order_number": "ORD123",
- "delivery_contact_name": "John Doe",
- "delivery_contact_number": "+123456789",
- "delivery_contact_email": "john@doe.com",
- "delivery_address": "123 Main St",
- "delivery_country_code": "IE",
- "delivery_postcode": "12345",
- "delivery_lat": 40.7128,
- "delivery_lng": -74.006,
- "delivery_notes": "Leave at the doorstep",
- "delivery_time_windows": [
- {
- "from": "10:00",
- "to": "11:00"
}
], - "delivery_date": "2023-12-31",
- "delivery_available_days": [
- "MONDAY",
- "WEDNESDAY",
- "SUNDAY"
], - "pickup_address": "456 Oak St",
- "pickup_country_code": "IE",
- "pickup_postcode": "54321",
- "pickup_duration": 30,
- "pickup_lat": 40.73061,
- "pickup_lng": -73.935242,
- "pickup_notes": "Call upon arrival",
- "pickup_time_windows": [
- {
- "from": "08:00",
- "to": "09:00"
}
], - "pickup_contact_name": "Jane Smith",
- "pickup_contact_number": "+987654321",
- "pickup_contact_email": "jane@example.com",
- "pickup_available_days": [
- "MONDAY",
- "WEDNESDAY",
- "SUNDAY"
], - "priority": "P1",
- "type": "delivery",
- "parts": 2,
- "vehicle_assignment": {
- "vehicle_id": 1958
}, - "emails": [
- {
- "email": "example@email.com"
}, - {
- "email": "example2@email.com"
}
], - "customer": {
- "id": 123,
- "account": "NO123"
}, - "line_items": [
- {
- "product_code": "P001",
- "product_name": "Product 1",
- "product_quantity": 2,
- "date": "2024-07-12",
- "custom_fields": [
- {
- "id": 123,
- "value": "Value 1"
}
]
}, - {
- "product_code": "P002",
- "product_name": "Product 2",
- "product_quantity": 1,
- "date": "2024-07-12",
- "custom_fields": [
- {
- "id": 321,
- "value": "Value 1"
}
]
}
], - "skills": [
- "skill1",
- "skill2"
], - "custom_fields": [
- {
- "id": 123,
- "value": "Value 1"
}, - {
- "id": 234,
- "value": "Value 2"
}
], - "capacities": [
- {
- "id": 1,
- "capacity": 100
}, - {
- "id": 2,
- "capacity": 50
}
], - "tags": [
- "tag1",
- "tag2"
]
}
]{- "orders": [
- {
- "id": "123",
- "order_number": "ORD123"
}, - {
- "id": "124",
- "order_number": "ORD456"
}
], - "errors": [
- {
- "name": "GEOCODING_FAILED",
- "description": "We've failed to geocode the provided location.",
- "details": {
- "id": 124,
- "order_number": "ORD456",
- "is_created": true
}
}
]
}Endpoint to retrieve a page of orders.
| page_info | string Information about the page for pagination. Generated by the OpenAPI |
| status | string Status of the orders to filter. |
| customer_id | integer Filter orders by the customer they belong to. |
| order_number | string Filter orders by a specific order number |
| updated_at_min | string <date-time> Minimum updated date and time for filtering. |
| limit | integer Default: 100 Maximum number of orders to retrieve per page. |
{- "orders": [
- {
- "id": 1,
- "order_number": "ABC123",
- "status": "DELIVERED",
- "type": "delivery",
- "stops": [
- {
- "id": 101,
- "route_id": 123,
- "address": "Dublin Road, Portlaoise, Ireland",
- "postcode": "R32 XD32",
- "phone": "+353 215 12320",
- "lat": 53.52145,
- "lng": -7.58954,
- "planned_distance": 1278.2,
- "arrival_date": "2024-03-04",
- "departure_date": "2024-03-04",
- "estimated_arrival_time": "14:17",
- "estimated_departure_time": "14:27",
- "actual_completed_ts": "2024-03-04T14:04:51.000Z",
- "actual_completed_lat": 12.345,
- "actual_completed_lng": -45.678,
- "delivery_notes": null,
- "driver_notes": null,
- "actual_arrival_time": null,
- "actual_duration": null,
- "signature_lat": 12.345,
- "signature_lng": -45.678,
- "signed_by": "James Murphy",
- "tracking_link": null,
- "vehicle_assignment": null,
- "directions": [
- {
- "instruction": "Turn left onto Sample Road"
}, - {
- "instruction": "At the roundabout, take the 3rd exit onto Baker Street"
}
], - "driver_questionnaire_submissions": [
- {
- "id": 1269,
- "driver_questionnaire": {
- "type": "VISIT",
- "title": "Stop Questionaire"
}
}
], - "failed_reason": {
- "reason": "Wrong Parcel"
}, - "route": {
- "id": 201,
- "date": "2024-03-04",
- "started_ts": "2024-03-04T15:09:34.000Z"
}
}, - {
- "id": 102,
- "route_id": 456,
- "address": "Dublin Road, Portlaoise, Ireland",
- "postcode": "R32 XD32",
- "phone": "+353 215 12320",
- "lat": 53.52145,
- "lng": -7.58954,
- "planned_distance": 1234.5,
- "arrival_date": "2024-03-05",
- "departure_date": "2024-03-05",
- "estimated_arrival_time": "13:27",
- "estimated_departure_time": "13:37",
- "actual_completed_ts": "2024-03-05T13:28:51.000Z",
- "actual_completed_lat": 12.345,
- "actual_completed_lng": -45.678,
- "delivery_notes": null,
- "driver_notes": null,
- "actual_arrival_time": null,
- "actual_duration": null,
- "signature_lat": 12.345,
- "signature_lng": -45.678,
- "signed_by": "James Murphy",
- "photos": null,
- "tracking_link": null,
- "vehicle_assignment": null,
- "directions": [
- {
- "instruction": "Turn right onto Example Road"
}, - {
- "instruction": "At the roundabout, take the 2nd exit onto Cook Street"
}
], - "driver_questionnaire_submissions": [
- {
- "id": 1270,
- "driver_questionnaire": {
- "type": "VISIT",
- "title": "Stop Questionaire"
}
}
], - "failed_reason": {
- "reason": "Wrong Parcel"
}, - "route": {
- "id": 202,
- "date": "2024-03-05",
- "started_ts": "2024-03-05T15:09:34.000Z"
}
}
], - "customer": {
- "id": 123,
- "account": "NO123"
}, - "created": "2022-04-29T16:12:08.000Z",
- "updated": "2022-09-29T10:11:06.000Z"
}, - {
- "id": 2,
- "order_number": "XYZ456",
- "status": "OPEN",
- "type": "delivery",
- "stops": [
- {
- "id": 103,
- "route": {
- "id": 203,
- "date": "2023-01-04",
- "started_ts": "2023-01-04T15:09:34.000Z"
}
}
], - "customer": {
- "id": 124,
- "account": "NO124"
}, - "created": "2022-04-29T16:12:08.000Z",
- "updated": "2022-09-29T10:11:06.000Z"
}
]
}Retrieve an order based on ID.
| id required | string ID of the order to retrieve. |
{- "order_number": "ABC123",
- "priority": "P1",
- "customer_id": 101,
- "delivery_contact_name": "John Doe",
- "delivery_contact_number": "+1234567890",
- "delivery_contact_email": "john.doe@example.com",
- "delivery_address": "123 Main St 12345",
- "delivery_lat": 12.345,
- "delivery_lng": -67.89,
- "delivery_notes": "Leave at the doorstep",
- "delivery_date": "2023-01-01",
- "delivery_duration": 30,
- "delivery_available_days": [
- "MONDAY",
- "SUNDAY"
], - "pickup_address": "456 Oak Ave 67890",
- "pickup_lat": 12.678,
- "pickup_lng": -67.432,
- "pickup_notes": "Collect from reception",
- "pickup_contact_name": "Jane Smith",
- "pickup_contact_number": "+0987654321",
- "pickup_contact_email": "jane.smith@example.com",
- "pickup_available_days": [
- "TUESDAY",
- "WEDNESDAY"
], - "pickup_duration": 15,
- "status": "OPEN",
- "type": "delivery",
- "parts": 2,
- "created": "2022-04-29T16:12:08.000Z",
- "updated": "2022-09-29T10:11:06.000Z",
- "vehicle_assignment": {
- "vehicle_id": 67
}, - "emails": [
- {
- "email": "example@email.com"
}, - {
- "email": "example2@email.com"
}
], - "customer": {
- "id": 123,
- "account": "NO123"
}, - "third_party": {
- "id": 135
}, - "tags": [
- "Tag1",
- "Tag2"
], - "line_items": [
- {
- "product_name": "Widget A",
- "product_code": "WID-A",
- "product_quantity": 3,
- "status": "DELIVERED",
- "date": "2024-01-01",
- "custom_fields": [
- {
- "id": 123,
- "value": "Value 1",
- "name": "Custom Field 1"
}
]
}, - {
- "product_name": "Gadget B",
- "product_code": "GAD-B",
- "product_quantity": 2,
- "capacities": [
- {
- "id": 201,
- "type": "WEIGHT",
- "capacity": 100
}
], - "status": "DELIVERED",
- "date": "2024-01-01",
- "custom_fields": [
- {
- "id": 321,
- "value": "Value 1",
- "name": "Custom Field 2"
}
]
}
], - "capacities": [
- {
- "id": 201,
- "type": "WEIGHT",
- "capacity": 500
}, - {
- "id": 202,
- "type": "VOLUME",
- "capacity": 1000
}
], - "custom_fields": [
- {
- "id": 201,
- "name": "Cash due on Collection",
- "value": "Yes"
}
], - "time_windows": [
- {
- "from": "08:00",
- "to": "12:00",
- "type": "pickup"
}, - {
- "from": "14:00",
- "to": "18:00",
- "type": "delivery"
}
], - "skills": [
- "Skill A",
- "Skill B"
], - "stops": [
- {
- "id": 123,
- "route_id": 456,
- "address": "123 Main St",
- "postcode": "D01 AB12",
- "phone": "555-1234",
- "lat": 12.345,
- "lng": -45.678,
- "planned_distance": 1234.5,
- "arrival_date": "2023-12-31",
- "departure_date": "2023-12-31",
- "delivery_notes": "Leave at the doorstep",
- "driver_notes": "Customer not available initially",
- "estimated_arrival_time": "09:00",
- "estimated_departure_time": "10:00",
- "actual_completed_ts": "2023-12-31T10:15:00",
- "actual_arrival_time": "2023-12-31T09:15:00",
- "actual_completed_lat": 12.345,
- "actual_completed_lng": -45.678,
- "actual_duration": 60,
- "signature_lat": 12.345,
- "signature_lng": -45.678,
- "signed_by": "John",
- "vehicle_assignment": null,
- "directions": [
- {
- "instruction": "Turn right onto Example Road"
}, - {
- "instruction": "At the roundabout, take the 2nd exit onto Cook Street"
}
], - "driver_questionnaire_submissions": [
- {
- "id": 1270,
- "driver_questionnaire": {
- "type": "VISIT",
- "title": "Stop Questionaire"
}
}
], - "failed_reason": {
- "reason": "Wrong Parcel"
}, - "tags": [
- "Fragile",
- "Priority"
], - "available_days": [ ],
- "emails": [
- "test@example.com"
], - "route": {
- "id": 456,
- "date": "2023-12-31"
}
}
], - "attachments": [
- {
- "id": 35,
- "name": "OrderFile1.pdf"
}, - {
- "id": 36,
- "name": "OrderFile2.png"
}
]
}Update an order based on ID.
| id required | string ID of the order to update. |
{- "order_number": "ABC123",
- "priority": "P1",
- "customer_id": 101,
- "delivery_contact_name": "John Doe",
- "delivery_contact_number": "+1234567890",
- "delivery_contact_email": "john.doe@example.com",
- "delivery_address": "123 Main St 12345",
- "delivery_lat": 12.345,
- "delivery_lng": -67.89,
- "delivery_notes": "Leave at the doorstep",
- "delivery_time_windows": [
- {
- "from": "10:00",
- "to": "11:00"
}
], - "delivery_duration": 30,
- "delivery_date": "2023-01-01",
- "delivery_available_days": [
- "MONDAY",
- "TUESDAY",
- "THURSDAY"
], - "type": "delivery",
- "parts": 2,
- "vehicle_assignment": {
- "vehicle_id": 1958
}, - "emails": [
- {
- "email": "example@email.com"
}, - {
- "email": "example2@email.com"
}
], - "updated": "2023-01-04T08:45:00Z",
- "third_party": {
- "id": 134
}, - "tags": [
- "Tag1",
- "Tag2"
], - "line_items": [
- {
- "product_name": "Widget A",
- "product_code": "WID-A",
- "product_quantity": 3,
- "date": "2024-01-01",
- "custom_fields": [
- {
- "id": 123,
- "value": "Value 1"
}
]
}, - {
- "product_name": "Gadget B",
- "product_code": "GAD-B",
- "product_quantity": 2,
- "date": "2024-01-01",
- "custom_fields": [
- {
- "id": 321,
- "value": "Value 1"
}
]
}
], - "capacities": [
- {
- "id": 201,
- "type": "WEIGHT",
- "capacity": 500
}, - {
- "id": 202,
- "type": "VOLUME",
- "capacity": 1000
}
], - "skills": [
- "Skill A",
- "Skill B"
]
}{- "order": {
- "order_number": "ORD123",
- "type": "delivery",
- "delivery_contact_name": "John Doe",
- "delivery_contact_number": "+123456789",
- "delivery_contact_email": "john.doe@example.com",
- "delivery_address": "123 Main St",
- "delivery_postcode": "12345",
- "delivery_lat": 40.7128,
- "delivery_lng": -74.006,
- "delivery_duration": 30,
- "delivery_notes": "Leave at the doorstep",
- "delivery_date": "2023-12-31",
- "delivery_available_days": [
- "MONDAY",
- "TUESDAY",
- "THURSDAY"
], - "pickup_address": "456 Oak St",
- "pickup_postcode": "54321",
- "pickup_duration": 30,
- "pickup_lat": 40.73061,
- "pickup_lng": -73.935242,
- "pickup_notes": "Call upon arrival",
- "pickup_contact_name": "Jane Smith",
- "pickup_contact_number": "+987654321",
- "pickup_contact_email": "jane@example.com",
- "pickup_available_days": [
- "MONDAY",
- "WEDNESDAY",
- "FRIDAY"
], - "parts": 2,
- "vehicle_assignment": {
- "vehicle_id": 1986
}, - "emails": [
- {
- "email": "example@email.com"
}, - {
- "email": "example2@email.com"
}
], - "third_party": {
- "id": 134
}, - "tags": [
- "Tag1",
- "Tag2"
], - "line_items": [
- {
- "product_code": "P001",
- "product_name": "Product 1",
- "product_quantity": 2,
- "status": "DELIVERED",
- "date": "2024-01-01",
- "custom_fields": [
- {
- "id": 123,
- "value": "Value 1",
- "name": "Custom Field 1"
}
]
}, - {
- "product_code": "P002",
- "product_name": "Product 2",
- "product_quantity": 1,
- "capacities": [
- {
- "id": 201,
- "type": "WEIGHT",
- "capacity": 100
}
], - "status": "DELIVERED",
- "date": "2024-01-01",
- "custom_fields": [
- {
- "id": 321,
- "value": "Value 1",
- "name": "Custom Field 2"
}
]
}
], - "time_windows": [
- {
- "from": "08:00",
- "to": "12:00",
- "type": "pickup"
}, - {
- "from": "14:00",
- "to": "18:00",
- "type": "delivery"
}
], - "skills": [
- "skill1",
- "skill2"
], - "custom_fields": [
- {
- "id": 123,
- "value": "Value 1"
}, - {
- "id": 234,
- "value": "Value 2"
}
], - "capacities": [
- {
- "id": 1,
- "capacity": 100
}, - {
- "id": 2,
- "capacity": 50
}
]
}, - "errors": [ ]
}Upload a single attachment file to the order. Only one file can be uploaded per request. Supported file types: pdf, png, jpg, jpeg. Maximum file size: 10MB. Maximum of 2 attachments are allowed per order overall.
| id required | string The ID of the order to attach the file to. |
| attachment required | string <binary> Upload a single file (allowed types: pdf, png, jpg, jpeg; max size 10MB). |
{- "id": 58,
- "order_id": "451020",
- "depot_id": 578,
- "name": "SmartRoutes-Orders1.pdf",
- "mime": "application/pdf",
- "ext": "pdf",
- "size": 473892,
- "is_compressed": false,
- "modified": "2025-09-01T14:02:02.922Z",
- "created": "2025-09-01T14:02:02.922Z"
}Async optimisation. Returns 200 immediately with a Plan id and an optimisation job id. The optimisation runs in the background; poll GET /plans/{id} to check progress.
Initial response: { "optimisation": { "id": "<uuid>", "in_progress": true }, "plan": { "id": <integer>, "dispatched": false } }
Polling — GET /plans/{id}:
plan.routes is non-empty (or plan.unserved is non-empty if no routes are viable). Either signals the optimisation has finished.plan.routes and plan.unserved are both empty.Recommended polling cadence:
Webhook coupling: the PLANS_CREATED webhook fires immediately after the Plan is persisted — before the optimisation job has completed. A webhook delivery does not imply the optimisation finished. Consumers receiving PLANS_CREATED should still poll GET /plans/{id} to learn the outcome.
Concurrency limits per depot (queue, not timeout): STANDARD 100, LONG 100, DIST 7, BOOKING_CHECK 1. No documented per-job timeout; typical jobs complete in 5–30 seconds.
Idempotency: Supports the idempotency-key request header for safe retries. See the Idempotency section in the API description.
| idempotency-key | string [ 1 .. 255 ] characters Optional idempotency key for safe retries. See the Idempotency section of the API description for behaviour. 1–255 characters; UUID recommended. |
| delivery_date required | string <date> The delivery date YYYY-MM-DD for optimizing orders. |
object | |
required | object |
Array of objects or null | |
| zone_group_id | integer The ID of the zone group for optimization. |
{- "delivery_date": "2023-12-31",
- "settings": {
- "active_vehicles": true,
- "auto_dispatch": true
}, - "zone_group_id": 123
}{- "optimisation": {
- "id": "123e4567-e89b-12d3-a456-426614174001",
- "in_progress": true
}, - "plan": {
- "id": 123,
- "dispatched": true
}
}Async optimisation for a specific set of order IDs. Same lifecycle and polling semantics as POST /plans/optimise/orders — see that endpoint's description for completion detection, polling cadence, and the failure-signal gap. Supports the idempotency-key request header for safe retries.
| idempotency-key | string [ 1 .. 255 ] characters Optional idempotency key for safe retries. See the Idempotency section of the API description for behaviour. 1–255 characters; UUID recommended. |
required | Array of objects |
object | |
required | object |
Array of objects or null | |
| zone_group_id | integer The ID of the zone group for optimization. |
{- "orders": [
- {
- "id": 456
}, - {
- "id": 789
}
], - "settings": {
- "active_vehicles": true,
- "auto_dispatch": true
}, - "zone_group_id": 123
}{- "optimisation": {
- "id": "123e4567-e89b-12d3-a456-426614174001",
- "in_progress": true
}, - "plan": {
- "id": 123,
- "dispatched": true
}
}Retrieve the status of a plan optimisation by UUID.
| id required | string ID of the current optimisation to retrieve. |
{- "optimisation": {
- "id": "123e4567-e89b-12d3-a456-426614174001",
- "in_progress": false
}, - "plan": {
- "id": 123,
- "dispatched": true
}
}Retrieve a Plan based on ID. When the plan was just created via the optimise endpoint and the optimisation job has not finished, routes and unserved are both empty arrays — see the async optimise endpoint description for polling guidance and failure-signal limitations.
| id required | number ID of the plan to retrieve. |
{- "plan": {
- "id": 123,
- "total_time": 120,
- "routes": [
- {
- "id": 1234,
- "name": "Route 1",
- "date": "2023-12-12",
- "start_time": "08:00",
- "started_ts": "2024-07-09T09:00:00.000Z",
- "end_time": "16:00",
- "completed_ts": "2024-07-09T17:18:40.000Z",
- "total_time": 120,
- "travel_time": 90,
- "planned_distance": 50,
- "actual_distance": 45,
- "vehicle": {
- "vehicle_id": "vehicle-1",
- "name": "Vehicle A",
- "driver": "John Doe"
}, - "stops": [
- {
- "id": 123,
- "route_id": 456,
- "address": "123 Main St",
- "phone": "555-1234",
- "lat": 12.345,
- "lng": -45.678,
- "planned_distance": 1234.5,
- "arrival_date": "2023-12-31",
- "departure_date": "2023-12-31",
- "delivery_notes": "Leave at the doorstep",
- "driver_notes": "Customer not available initially",
- "estimated_arrival_time": "09:00",
- "estimated_departure_time": "10:00",
- "actual_completed_ts": "2023-12-31T10:15:00",
- "actual_arrival_time": "2023-12-31T09:15:00",
- "actual_completed_lat": 12.345,
- "actual_completed_lng": -45.678,
- "actual_duration": 60,
- "signature_lat": 12.345,
- "signature_lng": -45.678,
- "signed_by": "John",
- "orders": [
- {
- "id": 123,
- "order_number": "ORD123",
- "custom_fields": {
- "id": 789,
- "value": "Example Value",
- "name": "Example Custom Field"
}, - "type": "delivery",
- "line_items": [
- {
- "id": 456,
- "product_code": "1",
- "product_name": "1",
- "quantity": 10,
- "status": "OPEN",
- "date": "2024-01-12",
- "custom_fields": [
- {
- "id": 123,
- "value": "Value 1",
- "name": "Custom Field 1"
}
]
}
]
}
], - "vehicle_assignment": {
- "vehicle_id": 45321
}, - "emails": [
- {
- "email": "example@email.com"
}, - {
- "email": "example2@email.com"
}
], - "driver_questionnaire_submissions": [
- {
- "id": 1267,
- "driver_questionnaire": {
- "type": "VISIT",
- "title": "Stop Questionaire"
}
}
], - "failed_reason": {
- "reason": "Wrong Parcel"
}, - "tags": [
- "Tag1",
- "Tag2"
], - "available_days": [
- "MONDAY",
- "THURSDAY"
]
}
]
}
], - "unserved": [
- {
- "id": 123,
- "address": "456 Oak St",
- "postcode": "67890",
- "phone": "555-5678",
- "lat": 40.5678,
- "lng": -75.1234,
- "delivery_notes": "Delivery notes for unserved visit",
- "available_days": [
- "MONDAY, THURSDAY"
]
}
], - "created": "2022-04-29T16:12:08.000Z",
- "updated": "2022-09-29T10:11:06.000Z",
- "driver_questionnaire_submissions": [
- {
- "id": 1266,
- "driver_questionnaire": {
- "type": "ROUTE_VEHICLE_CHECKIN",
- "title": "Route Start Questionnaire"
}
}, - {
- "id": 1268,
- "driver_questionnaire": {
- "type": "ROUTE_VEHICLE_CHECKIN",
- "title": "Completed Questionnaire"
}
}
]
}
}Endpoint to retrieve a page of plans.
| page_info | string Information about the page for pagination. Generated by the OpenAPI |
| updated_at_min | string <date-time> Minimum updated date and time for filtering. |
| limit | integer Default: 100 Maximum number of plans to retrieve per page. |
{- "plans": [
- {
- "id": 123,
- "dispatched": true,
- "created": "2024-07-08T17:33:37.000Z",
- "updated": "2024-07-08T17:33:37.000Z",
- "total_time": 120,
- "routes": [
- {
- "id": 1234,
- "name": "Route 1",
- "stops": 4,
- "dispatched": true,
- "started_ts": "2024-07-09T09:00:00.000Z",
- "completed_ts": "2024-07-09T17:18:40.000Z",
- "total_time": "595",
- "travel_time": "475",
- "operation_time": "120",
- "date": "2024-07-11",
- "distance": 100,
- "actual_distance": null,
- "created": "2024-07-08T17:18:40.000Z",
- "updated": "2024-07-08T17:18:40.000Z"
}
]
}, - {
- "id": 124,
- "dispatched": true,
- "created": "2024-07-08T17:33:37.000Z",
- "updated": "2024-07-08T17:33:37.000Z",
- "total_time": 120,
- "routes": [
- {
- "id": 1235,
- "name": "Route 2",
- "stops": 4,
- "dispatched": true,
- "started_ts": "2024-07-09T09:00:00.000Z",
- "completed_ts": "2024-07-09T17:18:40.000Z",
- "total_time": "595",
- "travel_time": "475",
- "operation_time": "120",
- "date": "2024-07-11",
- "distance": 100,
- "actual_distance": null,
- "created": "2024-07-08T17:18:40.000Z",
- "updated": "2024-07-08T17:18:40.000Z"
}
]
}
]
}Retrieve a proof-of-delivery photo by its ID. By default returns the raw image binary. Use the encoding query parameter to request a Base64-encoded JSON response instead.
| id required | integer The ID of the photo to retrieve. |
| encoding | string Value: "base64" Set to |
Retrieve a proof-of-delivery signature by its ID. By default returns the raw image binary. Use the encoding query parameter to request a Base64-encoded JSON response instead.
| id required | integer The ID of the signature to retrieve. |
| encoding | string Value: "base64" Set to |
Retrieve a route based on ID.
| id required | number ID of the route to retrieve. |
{- "id": 12345,
- "plan_id": 67,
- "name": "Route 1",
- "dispatched": true,
- "date": "2023-12-31",
- "start_time": "08:00",
- "started_ts": "2024-07-09T09:00:00.000Z",
- "end_time": "16:00",
- "completed_ts": "2024-07-09T17:18:40.000Z",
- "total_time": 480,
- "travel_time": 300,
- "planned_distance": 50,
- "actual_distance": 45,
- "vehicle": {
- "vehicle_id": "vehicle_456",
- "name": "Delivery Van",
- "driver": "John Doe"
}, - "stops": [
- {
- "id": 123,
- "route_id": 135,
- "address": "123 Main St",
- "phone": "555-1234",
- "lat": 12.345,
- "lng": -45.678,
- "planned_distance": 1234.5,
- "arrival_date": "2023-12-31",
- "departure_date": "2023-12-31",
- "delivery_notes": "Leave at the doorstep",
- "driver_notes": "Customer not available initially",
- "estimated_arrival_time": "09:00",
- "estimated_departure_time": "10:00",
- "actual_completed_ts": "2023-12-31T10:15:00",
- "actual_completed_lat": 12.345,
- "actual_completed_lng": -45.678,
- "actual_arrival_time": "2023-12-31T09:15:00",
- "actual_duration": 60,
- "signature_lat": 12.345,
- "signature_lng": -45.678,
- "signed_by": "John",
- "orders": [
- {
- "id": 123,
- "order_number": "ORD123",
- "type": "delivery",
- "line_items": [
- {
- "id": 456,
- "product_code": "1",
- "product_name": "1",
- "quantity": 10,
- "status": "OPEN",
- "date": "2024-01-12",
- "custom_fields": [
- {
- "id": 123,
- "value": "Value 1",
- "name": "Custom Field 1"
}
]
}
]
}
], - "vehicle_assignment": {
- "vehicle_id": 1958
}, - "emails": [
- {
- "email": "example@email.com"
}, - {
- "email": "example2@email.com"
}
], - "driver_questionnaire_submissions": [
- {
- "id": 1267,
- "driver_questionnaire": {
- "type": "VISIT",
- "title": "Stop Questionnaire"
}
}
], - "failed_reason": {
- "reason": "Wrong Parcel"
}, - "tags": [
- "Tag1",
- "Tag2"
], - "available_days": [
- "MONDAY",
- "WEDNESDAY",
- "THURSDAY"
]
}
], - "created": "2024-06-19T08:56:43.000Z",
- "updated": "2024-06-19T08:56:43.000Z",
- "driver_questionnaire_submissions": [
- {
- "id": 1266,
- "driver_questionnaire": {
- "type": "ROUTE_VEHICLE_CHECKIN",
- "title": "Route Start Questionnaire"
}
}, - {
- "id": 1268,
- "driver_questionnaire": {
- "type": "ROUTE_VEHICLE_CHECKIN",
- "title": "Completed Questionnaire"
}
}
]
}Reverse a route based on ID.
| id required | number ID of the route to reverse. |
{- "id": 12345,
- "plan_id": 67,
- "name": "Route 1",
- "date": "2023-12-31",
- "start_time": "08:00",
- "started_ts": "2024-07-09T09:00:00.000Z",
- "end_time": "16:00",
- "completed_ts": "2024-07-09T17:18:40.000Z",
- "total_time": 480,
- "travel_time": 300,
- "planned_distance": 50,
- "actual_distance": 45,
- "vehicle": {
- "vehicle_id": "vehicle_456",
- "name": "Delivery Van",
- "driver": "John Doe"
}, - "stops": [
- {
- "id": 123,
- "route_id": 456,
- "address": "123 Main St",
- "phone": "555-1234",
- "lat": 12.345,
- "lng": -45.678,
- "planned_distance": 1278.2,
- "arrival_date": "2023-12-31",
- "departure_date": "2023-12-31",
- "delivery_notes": "Leave at the doorstep",
- "driver_notes": "Customer not available initially",
- "estimated_arrival_time": "09:00",
- "estimated_departure_time": "10:00",
- "actual_completed_ts": "2023-12-31T10:15:00",
- "actual_arrival_time": "2023-12-31T09:15:00",
- "actual_completed_lat": 12.345,
- "actual_completed_lng": -45.678,
- "actual_duration": 60,
- "signature_lng": -45.678,
- "signature_lat": 12.345,
- "signed_by": "John",
- "orders": [
- {
- "id": 123,
- "order_number": "ORD123"
}
], - "vehicle_assignment": null,
- "driver_questionnaire_submissions": [
- {
- "id": 1270,
- "driver_questionnaire": {
- "type": "VISIT",
- "title": "Stop Questionaire"
}
}
], - "tags": [
- "Tag1",
- "Tag2"
]
}
]
}Endpoint to retrieve a page of routes.
| page_info | string Information about the page for pagination. Generated by the OpenAPI |
| updated_at_min | string <date-time> Minimum updated date and time for filtering. |
| limit | integer Default: 100 Maximum number of routes to retrieve per page. |
{- "routes": [
- {
- "id": 12345,
- "plan_id": 67,
- "name": "Route 1",
- "stops": 5,
- "dispatched": true,
- "started_ts": "2024-07-09T09:00:00.000Z",
- "completed_ts": "2024-07-09T17:18:40.000Z",
- "date": "2023-12-31",
- "start_time": "08:00",
- "end_time": "16:00",
- "total_time": 480,
- "travel_time": 300,
- "planned_distance": 50,
- "actual_distance": 45,
- "created": "2024-06-19T08:56:43.000Z",
- "updated": "2024-06-19T08:56:43.000Z"
}, - {
- "id": 12346,
- "plan_id": 89,
- "name": "Route 2",
- "stops": 5,
- "dispatched": true,
- "started_ts": "2024-07-09T09:00:00.000Z",
- "completed_ts": "2024-07-09T16:38:40.000Z",
- "date": "2023-12-31",
- "start_time": "08:00",
- "end_time": "16:00",
- "total_time": 480,
- "travel_time": 300,
- "planned_distance": 50,
- "actual_distance": 45,
- "created": "2024-06-19T08:56:43.000Z",
- "updated": "2024-06-19T08:56:43.000Z"
}
]
}Endpoint to add a vehicle.
| idempotency-key | string [ 1 .. 255 ] characters Optional idempotency key for safe retries. See the Idempotency section of the API description for behaviour. 1–255 characters; UUID recommended. |
| name | string Name of the vehicle. |
| availability required | string Enum: "shift" "full_day" "always" Availability status of the vehicle. |
| shift_start | string or null <time> Start time of the vehicle's shift (if availability is 'shift'). |
| shift_end | string or null <time> End time of the vehicle's shift (if availability is 'shift'). |
| start_location required | string Enum: "depot" "other" "app-location" Location type where the vehicle starts. |
| start_address | string or null Address where the vehicle starts (if location is 'other'). |
| start_lng | number or null Longitude of the starting location (if location is 'other'). |
| start_lat | number or null Latitude of the starting location (if location is 'other'). |
| end_location required | string Enum: "depot" "other" "none" Location type where the vehicle ends. |
| end_address | string or null Address where the vehicle ends (if location is 'other'). |
| end_lng | number or null Longitude of the ending location (if location is 'other'). |
| end_lat | number or null Latitude of the ending location (if location is 'other'). |
| break | boolean Flag indicating whether the vehicle has a break. |
| break_start | string or null <time> Start time of the vehicle's break (if it has a break). |
| break_end | string or null <time> End time of the vehicle's break (if it has a break). |
| break_duration | number or null Duration of the vehicle's break in minutes (if it has a break). |
| active | boolean Flag indicating whether the vehicle is active. |
| skills | Array of strings Array of skills associated with the vehicle. |
Array of objects Array of capacities associated with the vehicle. |
{- "name": "Vehicle Name",
- "availability": "shift",
- "shift_start": "08:00",
- "shift_end": "17:30",
- "start_location": "depot",
- "end_location": "none",
- "break": false,
- "capacities": [
- {
- "id": 1,
- "capacity": 500
}
]
}{- "vehicle": {
- "id": 123,
- "name": "Vehicle Name",
- "active": true,
- "capacities": [
- {
- "id": 1,
- "type": "Capacity Type 1",
- "capacity": 10
}, - {
- "id": 2,
- "type": "Capacity Type 2",
- "capacity": 15
}
], - "skills": [
- "Skill 1",
- "Skill 2"
], - "availability": "shift",
- "start_location": "other",
- "end_location": "other",
- "shift_start": "08:00",
- "shift_end": "17:00",
- "start_address": "Start Location Address",
- "start_lat": 12.345678,
- "start_lng": -23.456789,
- "end_address": "End Location Address",
- "end_lat": 34.56789,
- "end_lng": -45.678901,
- "break": true,
- "break_start": "12:00",
- "break_end": "12:30",
- "break_duration": 30
}
}{- "vehicles": [
- {
- "id": 123,
- "name": "Vehicle Name",
- "active": true,
- "capacities": [
- {
- "id": 1,
- "type": "Capacity Type 1",
- "capacity": 10
}, - {
- "id": 2,
- "type": "Capacity Type 2",
- "capacity": 15
}
], - "skills": [
- "Skill 1",
- "Skill 2"
], - "availability": "shift",
- "start_location": "other",
- "end_location": "other",
- "created": "2024-06-19T08:56:43.000Z",
- "updated": "2024-06-19T08:56:43.000Z",
- "shift_start": "08:00",
- "shift_end": "17:00",
- "start_address": "Start Location Address",
- "start_lat": 12.345678,
- "start_lng": -23.456789,
- "end_address": "End Location Address",
- "end_lat": 34.56789,
- "end_lng": -45.678901,
- "break": true,
- "break_start": "12:00",
- "break_end": "12:30",
- "break_duration": 30,
- "shift": {
- "enabled": true,
- "availability": "shift",
- "shift_start": "09:30",
- "shift_end": "17:30",
- "force_shift_start": false,
- "max_route_duration": 720,
- "day_of_week": "MONDAY",
- "breaks": [
- {
- "enabled": true,
- "break_start": "11:00",
- "break_end": "13:00",
- "break_duration": 45
}, - {
- "enabled": true,
- "break_start": "11:00",
- "break_end": "13:00",
- "break_duration": 50
}
]
}
}
]
}Update a vehicle based on ID.
| id required | number ID of the vehicle to update. |
| name | string Name of the vehicle. |
| availability required | string Enum: "shift" "full_day" "always" Availability status of the vehicle. |
| shift_start | string or null <time> Start time of the vehicle's shift (if availability is 'shift'). |
| shift_end | string or null <time> End time of the vehicle's shift (if availability is 'shift'). |
| start_location required | string Enum: "depot" "other" "app-location" Location type where the vehicle starts. |
| start_address | string or null Address where the vehicle starts (if location is 'other'). |
| start_lng | number or null Longitude of the starting location (if location is 'other'). |
| start_lat | number or null Latitude of the starting location (if location is 'other'). |
| end_location required | string Enum: "depot" "other" "none" Location type where the vehicle ends. |
| end_address | string or null Address where the vehicle ends (if location is 'other'). |
| end_lng | number or null Longitude of the ending location (if location is 'other'). |
| end_lat | number or null Latitude of the ending location (if location is 'other'). |
| break | boolean Flag indicating whether the vehicle has a break. |
| break_start | string or null <time> Start time of the vehicle's break (if it has a break). |
| break_end | string or null <time> End time of the vehicle's break (if it has a break). |
| break_duration | number or null Duration of the vehicle's break in minutes (if it has a break). |
| active | boolean Flag indicating whether the vehicle is active. |
| skills | Array of strings Array of skills associated with the vehicle. |
Array of objects Array of capacities associated with the vehicle. |
{- "name": "Vehicle Name",
- "availability": "shift",
- "shift_start": "08:00",
- "shift_end": "17:30",
- "start_location": "depot",
- "end_location": "none",
- "break": false,
- "capacities": [
- {
- "id": 1,
- "capacity": 500
}
]
}{- "vehicle": {
- "id": 123,
- "name": "Vehicle Name",
- "active": true,
- "capacities": [
- {
- "id": 1,
- "type": "Capacity Type 1",
- "capacity": 10
}, - {
- "id": 2,
- "type": "Capacity Type 2",
- "capacity": 15
}
], - "skills": [
- "Skill 1",
- "Skill 2"
], - "availability": "shift",
- "start_location": "other",
- "end_location": "other",
- "shift_start": "08:00",
- "shift_end": "17:00",
- "start_address": "Start Location Address",
- "start_lat": 12.345678,
- "start_lng": -23.456789,
- "end_address": "End Location Address",
- "end_lat": 34.56789,
- "end_lng": -45.678901,
- "break": true,
- "break_start": "12:00",
- "break_end": "12:30",
- "break_duration": 30,
- "shift": {
- "enabled": true,
- "availability": "shift",
- "shift_start": "09:30",
- "shift_end": "17:30",
- "force_shift_start": false,
- "max_route_duration": 720,
- "day_of_week": "MONDAY",
- "breaks": [
- {
- "enabled": true,
- "break_start": "11:00",
- "break_end": "13:00",
- "break_duration": 45
}, - {
- "id": 4,
- "vehicle_shift_id": 2533,
- "enabled": true,
- "break_start": "11:00",
- "break_end": "13:00",
- "break_duration": 50
}
]
}
}
}Retrieve a vehicle based on ID.
| id required | number ID of the vehicle to retrieve. |
{- "vehicle": {
- "id": 123,
- "name": "Vehicle Name",
- "active": true,
- "capacities": [
- {
- "id": 1,
- "type": "Capacity Type 1",
- "capacity": 10
}, - {
- "id": 2,
- "type": "Capacity Type 2",
- "capacity": 15
}
], - "skills": [
- "Skill 1",
- "Skill 2"
], - "availability": "shift",
- "start_location": "other",
- "end_location": "other",
- "created": "2024-06-19T08:56:43.000Z",
- "updated": "2024-06-19T08:56:43.000Z",
- "shift_start": "08:00",
- "shift_end": "17:00",
- "start_address": "Start Location Address",
- "start_lat": 12.345678,
- "start_lng": -23.456789,
- "end_address": "End Location Address",
- "end_lat": 34.56789,
- "end_lng": -45.678901,
- "break": true,
- "break_start": "12:00",
- "break_end": "12:30",
- "break_duration": 30
}
}{- "zone_groups": [
- {
- "id": 123,
- "name": "Zone Group 1",
- "created": "2024-06-19T08:56:43.000Z",
- "updated": "2024-06-19T08:56:43.000Z"
}, - {
- "id": 124,
- "name": "Zone Group 2",
- "created": "2024-06-19T08:56:43.000Z",
- "updated": "2024-06-19T08:56:43.000Z"
}, - {
- "id": 125,
- "name": "Zone Group 3",
- "created": "2024-06-19T08:56:43.000Z",
- "updated": "2024-06-19T08:56:43.000Z"
}
]
}Endpoint to return the zone name and zone ID for a given location within a specified zone group.
| id required | number ID of the zone group. |
required | object Location information for zone. If no lat, lng is provided, address or postcode is required. |
{- "location": {
- "lat": 0.1,
- "lng": 0.1,
- "address": "string",
- "postcode": "string",
- "country": "string"
}
}{- "zone": {
- "name": "Cork City",
- "id": 123,
- "zone_group": {
- "name": "Cork County",
- "id": 321
}
}
}