Skip to main content

Get all drivers

GET {{base_url}}/delivery-orders/drivers

Description

This API endpoint is used to find drivers based on various criteria.

Request

Headers:

NameDescription
tenantIdA string identifying the tenant.
countryCodeA string representing the country code.

Query Parameters:

NameTypeDescription
userByLocationsstringFilter drivers by locations.
fieldNamesstringSpecify the fields to include in the response.
userIdarrayFilter drivers by user IDs.
userDateRangestringFilter drivers by date range.
userByTypesstringFilter drivers by types.
userByRolesstringFilter drivers by roles.
userSearchstringPerform a search for drivers.
orderBystringSpecify the field to order the results by.
limitstringLimit 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

AUTHORIZATION

Bearer

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!