Get all drivers
GET {{base_url}}/delivery-orders/drivers
Description
This API endpoint is used to find drivers based on various criteria.
Request
Headers:
| Name | Description |
|---|---|
| tenantId | A string identifying the tenant. |
| countryCode | A string representing the country code. |
Query Parameters:
| Name | Type | Description |
|---|---|---|
| userByLocations | string | Filter drivers by locations. |
| fieldNames | string | Specify the fields to include in the response. |
| userId | array | Filter drivers by user IDs. |
| userDateRange | string | Filter drivers by date range. |
| userByTypes | string | Filter drivers by types. |
| userByRoles | string | Filter drivers by roles. |
| userSearch | string | Perform a search for drivers. |
| orderBy | string | Specify the field to order the results by. |
| limit | string | Limit the number of results returned. |
Responses:
- 200 OK:
{
"status": true,
"statusCode": 0,
"message": "Drivers found.",
"data": {},
"errors": []
}
- 400 Bad Request:
{
"status": false,
"statusCode": 400,
"message": "Invalid request.",
"errors": [
{
"message": "Invalid request.",
"descriptiveMessage": "The request is invalid. Please check the provided data."
}
]
}
- 404 Not Found:
{
"status": false,
"statusCode": 404,
"message": "Drivers not found.",
"errors": [
{
"message": "Drivers not found.",
"descriptiveMessage": "No drivers were found matching the specified criteria."
}
]
}
LANGUAGE
CURL REQUEST
curl --request GET \
--url /delivery-orders/drivers \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!