Skip to main content

Logistic Hubs API

The Logistic Hubs API allows you to create, retrieve, update, and delete logistic hubs within your organization. Each hub represents a logistics facility (warehouse, terminal, transshipment point) and can optionally be linked to a Facility for emissions tracking.
New API: This endpoint is part of the new API architecture with improved design and maintainability.

Key Features

  • Hub Management: Create and manage logistic hubs in your organization
  • Owned & Subcontracted: Support for both owned hubs (linked to facilities) and subcontracted hubs
  • CO2e Tracking: Automatic emissions enrichment from linked facilities
  • Category Support: Classify hubs by type (transshipment, warehouse, terminal, etc.)
  • Pagination Support: Efficiently retrieve large lists of hubs

Authentication

All endpoints require authentication using either:
  • API Key: Include in x-api-key header
  • JWT Token: Include in Authorization header as Bearer {JWT_TOKEN}

Headers

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

Available Endpoints

List Logistic Hubs

Retrieve all logistic hubs with filtering and pagination

Get Logistic Hub

Retrieve a single logistic hub by ID

Create Logistic Hub

Add a new logistic hub to your organization

Update Logistic Hub

Modify logistic hub details

Delete Logistic Hub

Remove a logistic hub from your organization

Logistic Hub Attributes

Core Information

  • name (string, required): Name of the logistic hub
  • type (string, required): Hub type — owned (linked to a facility) or subcontracted
  • category (string, optional): Hub category (e.g., transshipment_ambient, warehouse_mixed, maritime_container_terminals_ambient)
  • address (string, optional): Physical address of the hub
  • country (string, read-only): ISO country code, geocoded from address

Configuration

  • supercharger (boolean, optional): Whether this hub is a supercharger (default false)
  • facility_id (uuid, conditional): Linked facility ID — required when type is owned, ignored for subcontracted

Computed Data

  • co2e (float, read-only): CO2 equivalent emissions from the linked facility
  • status (string): Current status: active or archived

Response Format

Logistic Hub Object

{
  "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"
}

Hub Categories

Available hub categories:
  • 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

Error Handling

Common HTTP Status Codes

StatusMeaningSolution
200Success-
201Created-
204No Content (delete successful)-
401UnauthorizedVerify API key or JWT token
403ForbiddenHub doesn’t belong to organization
404Not FoundCheck resource ID
409ConflictName already exists or hub is in use
422Validation ErrorReview error details in response

Facilities API

Manage facilities linked to owned hubs

Logistics API

Manage logistic requests and shipments