Get Order Metrics
GET /tms/delivery-orders/metrics
Description
This endpoint is used to retrieve order metrics. Metrics can be filtered and grouped by various parameters to get specific insights.
Parameters
- tenantId (
string, header, required): The ID of the tenant. - countryCode (
string, header, required): The country code. - from (
string, query, optional): The start date for the metrics. - to (
string, query, optional): The end date for the metrics. - groupBy (
array[string], query, optional): The fields by which to group the metrics. Available values areTENANT_ID,ORDER_REF,DRIVER_USER_ID,CLIENT_ID,STATUS,COUNTRY_CODE,USER_ID,IS_ACTIVE,IS_ASSIGNED. - filterByOrderRef (
array[string], query, optional): Filter metrics by order reference. - filterByTenantId (
array[string], query, optional): Filter metrics by tenant ID. - filterByDriverUserId (
array[string], query, optional): Filter metrics by driver user ID. - filterByStatus (
array[string], query, optional): Filter metrics by status. - filterByProductType (
array[string], query, optional): Filter metrics by product type. - filterByClientId (
array[string], query, optional): Filter metrics by client ID. - filterByIsActive (
array[string], query, optional): Filter metrics by active status. - filterByIsAssigned (
array[string], query, optional): Filter metrics by assigned status. - filterByCountryCode (
array[string], query, optional): Filter metrics by country code.
Responses
200 Order metrics returned successfully
- Media Type: Controls Accept header.
Example Value
{
"status": true,
"statusCode": 0,
"message": "string",
"data": {},
"errors": [
{
"message": "string",
"descriptiveMessage": "string"
}
]
}
400 Invalid order
404 Resource not found
LANGUAGE
CURL REQUEST
curl --request GET \
--url /tms/delivery-orders/metrics \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!