Skip to main content

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:

NameDescription
countryCodeA string representing the country code.
tenantIdA string identifying the tenant.
Path Parameters:
NameDescription
orderIdThe unique identifier of the order.
driverIdThe 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

Paramvalue
driverIdnull

LANGUAGE

AUTHORIZATION

Bearer

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!