Skip to main content
GET
/
v1
/
logistic-hubs
List Logistic Hubs
const options = {
  method: 'GET',
  headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};

fetch('https://api.dcycle.io/v1/logistic-hubs', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "items": {
    "id": "<string>",
    "name": "<string>",
    "address": {},
    "country": {},
    "type": "<string>",
    "category": {},
    "status": "<string>",
    "supercharger": true,
    "facility_id": {},
    "co2e": {},
    "created_at": {},
    "updated_at": {}
  },
  "total": 123,
  "page": 123,
  "size": 123,
  "pages": 123
}

List Logistic Hubs

Retrieve a paginated list of logistic hubs in your organization with support for filtering by name, category, type, and status.

Request

Headers

x-api-key
string
required
Your API key for authentication
x-organization-id
string
required
Your organization UUID

Query Parameters

name
string
Filter hubs by name (partial match, case-insensitive)Example: "Madrid"
category
string
Filter by hub categoryExample: "warehouse_ambient"
type
string
Filter by hub typeAvailable values: owned, subcontracted
status[]
array[string]
Filter by hub statusAvailable values: active, archivedExample: status[]=active
page
integer
default:"1"
Page number for pagination
size
integer
default:"10"
Number of items per page (max 100)

Response

items
array[object]
Array of logistic hub objects
total
integer
Total number of hubs matching the filter
page
integer
Current page number
size
integer
Number of items per page
pages
integer
Total number of pages

Example

curl -X GET "https://api.dcycle.io/v1/logistic-hubs?page=1&size=50&status[]=active" \
  -H "x-api-key: ${DCYCLE_API_KEY}" \
  -H "x-organization-id: ${DCYCLE_ORG_ID}"

Successful Response

{
  "items": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Madrid Warehouse",
      "type": "owned",
      "category": "warehouse_ambient",
      "address": "Calle Industrial 5, Madrid",
      "country": "ES",
      "status": "active",
      "supercharger": false,
      "facility_id": "660e8400-e29b-41d4-a716-446655440000",
      "co2e": 1250.5,
      "created_at": "2024-11-24T10:30:00Z",
      "updated_at": "2024-11-24T10:30:00Z"
    }
  ],
  "total": 8,
  "page": 1,
  "size": 50,
  "pages": 1
}