Skip to main content
GET
https://api.dcycle.io
/
v1
/
logistics
/
summary
Get Logistics Summary
const options = {
  method: 'GET',
  headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};

fetch('https://api.dcycle.io/v1/logistics/summary', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "requests": {
    "count": 123,
    "last_updated": {}
  },
  "recharges": {
    "count": 123,
    "last_updated": {}
  },
  "hubs": {
    "count": 123,
    "last_updated": {}
  }
}

Get Logistics Summary

Retrieve summary statistics including counts and last updated timestamps for each logistics entity type (requests, recharges, hubs).
New API: This endpoint is part of the new API architecture with improved design and maintainability.

Request

Headers

x-api-key
string
required
Your API key for authenticationExample: sk_live_1234567890abcdef
x-organization-id
string
required
Your organization UUIDExample: a8315ef3-dd50-43f8-b7ce-d839e68d51fa

Query Parameters

project_id
string
Filter by project UUID to get project-scoped summaryExample: a8315ef3-dd50-43f8-b7ce-d839e68d51fa

Response

requests
object
Summary for logistics requests (shipments)
recharges
object
Summary for logistics recharges (fuel consumptions)
hubs
object
Summary for logistics hubs

Example

curl -X GET "https://api.dcycle.io/v1/logistics/summary" \
  -H "x-api-key: ${DCYCLE_API_KEY}" \
  -H "x-organization-id: ${DCYCLE_ORG_ID}"

Successful Response

{
  "requests": {
    "count": 1250,
    "last_updated": "2024-11-24T15:30:00Z"
  },
  "recharges": {
    "count": 456,
    "last_updated": "2024-11-23T10:15:00Z"
  },
  "hubs": {
    "count": 12,
    "last_updated": "2024-11-20T09:00:00Z"
  }
}