Assign Order to Driver
GET {{base_url}}/orders/{orderId}/assign?driverId
Description
This API endpoint is used to assign an order to a driver.
API Request
Headers:
| Name | Description |
|---|---|
| countryCode | A string representing the country code. |
| tenantId | A string identifying the tenant. |
| Path Parameters: |
| Name | Description |
|---|---|
| orderId | The unique identifier of the order. |
| driverId | The unique identifier of the driver. |
| Responses: |
- 200 OK:
{
"status": true,
"statusCode": 0,
"message": "Order assigned to driver successfully.",
"data": {},
"errors": []
}
- 400 Bad Request:
{
"status": false,
"statusCode": 400,
"message": "Invalid reference supplied.",
"errors": [
{
"message": "Invalid reference supplied.",
"descriptiveMessage": "The provided reference is not valid. Please ensure correct values are supplied."
}
]
}
- 404 Not Found:
{
"status": false,
"statusCode": 404,
"message": "Order not assigned to driver.",
"errors": [
{
"message": "Order not assigned to driver.",
"descriptiveMessage": "The specified order is not assigned to the provided driver."
}
]
}
Query Params
| Param | value |
|---|---|
| driverId | null |
LANGUAGE
CURL REQUEST
curl --request GET \
--url /orders/{orderId}/assign?driverId \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!