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

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

Get Logistics Hubs

Retrieve a paginated list of logistics hubs for your organization. Hubs represent physical locations (warehouses, transshipment points, etc.) used as origins in logistics shipments.

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

name
string
Filter hubs by name (partial match, case-insensitive)Example: "Madrid"
type
string
Filter by hub typeAvailable values: owned, subcontracted
category
string
Filter by hub categoryAvailable values: transshipment_ambient, transshipment_mixed, storage_transhipment_ambient, storage_transhipment_mixed, warehouse_ambient, warehouse_mixed, liquid_bulk_terminals_ambient, liquid_bulk_terminals_mixed, maritime_container_terminals_ambient, maritime_container_terminals_temperature_controlled
page
integer
default:"1"
Page number for pagination
size
integer
default:"10"
Number of items per page (max 100)

Response

items
array
Array of hub objects
total
integer
Total number of hubs matching the filter
page
integer
Current page number
size
integer
Number of items per page

Example

curl -X GET "https://api.dcycle.io/v1/logistics/hubs?page=1&size=10" \
  -H "x-api-key: ${DCYCLE_API_KEY}" \
  -H "x-organization-id: ${DCYCLE_ORG_ID}"

Successful Response

{
  "items": [
    {
      "id": "b3d2e1f0-1234-5678-abcd-ef0123456789",
      "name": "HUB-MAD-001",
      "address": "Calle Ejemplo 1, Madrid, Spain",
      "country": "ES",
      "type": "owned",
      "category": "warehouse_ambient",
      "status": "active",
      "supercharger": false,
      "facility_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
      "co2e": 1240.5,
      "created_at": "2024-10-01T09:00:00Z",
      "updated_at": "2024-11-15T14:30:00Z"
    },
    {
      "id": "c4e5f6a7-2345-6789-bcde-f01234567890",
      "name": "HUB-BCN-SUB",
      "address": "Av. Diagonal 100, Barcelona, Spain",
      "country": "ES",
      "type": "subcontracted",
      "category": "transshipment_ambient",
      "status": "active",
      "supercharger": false,
      "facility_id": null,
      "co2e": null,
      "created_at": "2024-11-01T11:00:00Z",
      "updated_at": null
    }
  ],
  "total": 2,
  "page": 1,
  "size": 10
}

Get Logistics Requests

Retrieve requests — each includes a hub_id reference

Create Logistics Request

Create a shipment leg referencing a hub

Logistic Hubs (full CRUD)

Full hub management: create, update, delete