Download OpenAPI specification:
Logistics operations API for the 4klyft platform.
This API provides comprehensive endpoints for managing:
All API endpoints (except /api/docs and /api/v1/iam/auth/*) require JWT Bearer token authentication.
Include the token in the Authorization header:
Authorization: Bearer <your-jwt-token>
API requests are rate-limited to ensure fair usage. Standard limits are:
A depot — a first-class fleet base (hub, yard, cross-dock, parking site)
where fleet units are stationed and dispatched from. Optionally linked to a
co-located warehouse via the bare warehouseId.
Paginated list of depots. Filter by type or status.
| type | string Enum: "hub" "yard" "cross_dock" "parking_site" Filter by type |
| status | string Enum: "active" "inactive" Filter by status |
| page | integer >= 1 Default: 1 Page number |
| itemsPerPage | integer [ 1 .. 100 ] Default: 30 Items per page |
{- "totalItems": 0,
- "search": {
- "@type": "string",
- "template": "string",
- "variableRepresentation": "string",
- "mapping": [
- {
- "@type": "string",
- "variable": "string",
- "property": "string",
- "required": true
}
]
}, - "view": {
- "@id": "string",
- "@type": "string",
- "first": "string",
- "last": "string",
- "previous": "string",
- "next": "string"
}, - "member": [
- {
- "@context": "string",
- "@id": "string",
- "@type": "string",
- "id": "",
- "name": "",
- "code": "",
- "type": "hub",
- "status": "active",
- "address": {
- "street": "string",
- "streetLine2": "string",
- "city": "string",
- "postalCode": "string",
- "countryCode": "string",
- "province": "string",
- "coordinates": {
- "latitude": 0,
- "longitude": 0
}
}, - "warehouseId": "string",
- "createdAt": "",
- "updatedAt": ""
}
]
}Register a depot
The new Depot resource
| name required | string <= 255 characters |
| code required | string <= 64 characters |
| type required | string Enum: "hub" "yard" "cross_dock" "parking_site" |
required | object (DepotAddressInput) |
| warehouseId | string or null <= 512 characters |
{- "name": "string",
- "code": "string",
- "type": "hub",
- "address": {
- "street": "string",
- "streetLine2": "string",
- "city": "string",
- "postalCode": "string",
- "countryCode": "st",
- "province": "string",
- "coordinates": {
- "latitude": -90,
- "longitude": -180
}
}, - "warehouseId": "string"
}{- "@context": "string",
- "@id": "string",
- "@type": "string",
- "id": "",
- "name": "",
- "code": "",
- "type": "hub",
- "status": "active",
- "address": {
- "street": "string",
- "streetLine2": "string",
- "city": "string",
- "postalCode": "string",
- "countryCode": "string",
- "province": "string",
- "coordinates": {
- "latitude": 0,
- "longitude": 0
}
}, - "warehouseId": "string",
- "createdAt": "",
- "updatedAt": ""
}Get a depot
| id required | string Depot identifier |
{- "@context": "string",
- "@id": "string",
- "@type": "string",
- "id": "",
- "name": "",
- "code": "",
- "type": "hub",
- "status": "active",
- "address": {
- "street": "string",
- "streetLine2": "string",
- "city": "string",
- "postalCode": "string",
- "countryCode": "string",
- "province": "string",
- "coordinates": {
- "latitude": 0,
- "longitude": 0
}
}, - "warehouseId": "string",
- "createdAt": "",
- "updatedAt": ""
}Deactivate a depot
| id required | string Depot identifier |
{- "type": "/errors/validation-error",
- "title": "Validation Error",
- "status": 400,
- "detail": "The provided input is invalid",
- "violations": [
- {
- "propertyPath": "code",
- "message": "This value should not be blank."
}
], - "instance": "string"
}Update a depot
| id required | string Depot identifier |
The updated Depot resource
| name | string or null <= 255 characters |
| type | string or null Enum: "hub" "yard" "cross_dock" "parking_site" |
DepotAddressInput (object) or null | |
| warehouseId | string or null <= 512 characters |
{- "name": "string",
- "type": "hub",
- "address": {
- "street": "string",
- "streetLine2": "string",
- "city": "string",
- "postalCode": "string",
- "countryCode": "st",
- "province": "string",
- "coordinates": {
- "latitude": -90,
- "longitude": -180
}
}, - "warehouseId": "string"
}{- "@context": "string",
- "@id": "string",
- "@type": "string",
- "id": "",
- "name": "",
- "code": "",
- "type": "hub",
- "status": "active",
- "address": {
- "street": "string",
- "streetLine2": "string",
- "city": "string",
- "postalCode": "string",
- "countryCode": "string",
- "province": "string",
- "coordinates": {
- "latitude": 0,
- "longitude": 0
}
}, - "warehouseId": "string",
- "createdAt": "",
- "updatedAt": ""
}Represents a team organization that manages drivers and vehicles.
Crews are responsible for executing routes and deliveries. They have members (drivers), vehicles, and can be assigned routes.
Retrieve a paginated list of teams with optional filters.
| status | string Enum: "active" "disabled" Example: status=active Filter by team status |
| search | string Example: search=Express Search by name or code |
| page | integer >= 1 Default: 1 Example: page=1 Page number for pagination |
| itemsPerPage | integer [ 1 .. 100 ] Default: 30 Example: itemsPerPage=30 Number of items per page |
{- "totalItems": 0,
- "search": {
- "@type": "string",
- "template": "string",
- "variableRepresentation": "string",
- "mapping": [
- {
- "@type": "string",
- "variable": "string",
- "property": "string",
- "required": true
}
]
}, - "view": {
- "@id": "string",
- "@type": "string",
- "first": "string",
- "last": "string",
- "previous": "string",
- "next": "string"
}, - "member": [
- {
- "@context": "string",
- "@id": "string",
- "@type": "string",
- "id": "01912345-6789-7abc-def0-123456789abc",
- "code": "EXPRESS-01",
- "name": "Express Logistics Inc.",
- "type": "internal",
- "email": "dispatch@expresslogistics.com",
- "phone": "+1-555-123-4567",
- "status": "active",
- "partnerId": "01912345-6789-7abc-def0-123456789def",
- "partnerName": "string",
- "homeDepotId": "01912345-6789-7abc-def0-123456789aaa",
- "homeDepotName": "string",
- "workspaceTeamId": "01912345-6789-7abc-def0-1234567890ab",
- "createdAt": "2024-01-15T10:00:00+00:00",
- "updatedAt": "2024-06-15T14:30:00+00:00"
}
]
}Create a new team.
Crew creation data
| code required | string [ 2 .. 50 ] characters |
| name required | string [ 2 .. 255 ] characters |
| type | string Default: "internal" Enum: "internal" "external" |
string or null <email> | |
| phone | string or null <= 50 characters |
{- "code": "EXPRESS-01",
- "name": "Express Logistics Inc.",
- "type": "internal",
- "email": "user@example.com",
- "phone": "string"
}{- "@context": "string",
- "@id": "string",
- "@type": "string",
- "id": "01912345-6789-7abc-def0-123456789abc",
- "code": "EXPRESS-01",
- "name": "Express Logistics Inc.",
- "type": "internal",
- "email": "dispatch@expresslogistics.com",
- "phone": "+1-555-123-4567",
- "status": "active",
- "partnerId": "01912345-6789-7abc-def0-123456789def",
- "partnerName": "string",
- "homeDepotId": "01912345-6789-7abc-def0-123456789aaa",
- "homeDepotName": "string",
- "workspaceTeamId": "01912345-6789-7abc-def0-1234567890ab",
- "createdAt": "2024-01-15T10:00:00+00:00",
- "updatedAt": "2024-06-15T14:30:00+00:00"
}Retrieve a single team by its human-readable code.
| code required | string [ 2 .. 50 ] characters Example: EXPRESS-01 Crew code |
{- "@context": "string",
- "@id": "string",
- "@type": "string",
- "id": "01912345-6789-7abc-def0-123456789abc",
- "code": "EXPRESS-01",
- "name": "Express Logistics Inc.",
- "type": "internal",
- "email": "dispatch@expresslogistics.com",
- "phone": "+1-555-123-4567",
- "status": "active",
- "partnerId": "01912345-6789-7abc-def0-123456789def",
- "partnerName": "string",
- "homeDepotId": "01912345-6789-7abc-def0-123456789aaa",
- "homeDepotName": "string",
- "workspaceTeamId": "01912345-6789-7abc-def0-1234567890ab",
- "createdAt": "2024-01-15T10:00:00+00:00",
- "updatedAt": "2024-06-15T14:30:00+00:00"
}Retrieve a single team by its UUID.
| id required | string <uuid> Example: 01912345-6789-7abc-def0-123456789abc Crew UUID |
{- "@context": "string",
- "@id": "string",
- "@type": "string",
- "id": "01912345-6789-7abc-def0-123456789abc",
- "code": "EXPRESS-01",
- "name": "Express Logistics Inc.",
- "type": "internal",
- "email": "dispatch@expresslogistics.com",
- "phone": "+1-555-123-4567",
- "status": "active",
- "partnerId": "01912345-6789-7abc-def0-123456789def",
- "partnerName": "string",
- "homeDepotId": "01912345-6789-7abc-def0-123456789aaa",
- "homeDepotName": "string",
- "workspaceTeamId": "01912345-6789-7abc-def0-1234567890ab",
- "createdAt": "2024-01-15T10:00:00+00:00",
- "updatedAt": "2024-06-15T14:30:00+00:00"
}Update team details. Only provided fields will be updated.
| id required | string <uuid> Example: 01912345-6789-7abc-def0-123456789abc Crew UUID |
Crew update data (partial update supported)
| name | string [ 2 .. 255 ] characters |
string or null <email> | |
| phone | string or null <= 50 characters |
{- "name": "string",
- "email": "user@example.com",
- "phone": "string"
}{- "@context": "string",
- "@id": "string",
- "@type": "string",
- "id": "01912345-6789-7abc-def0-123456789abc",
- "code": "EXPRESS-01",
- "name": "Express Logistics Inc.",
- "type": "internal",
- "email": "dispatch@expresslogistics.com",
- "phone": "+1-555-123-4567",
- "status": "active",
- "partnerId": "01912345-6789-7abc-def0-123456789def",
- "partnerName": "string",
- "homeDepotId": "01912345-6789-7abc-def0-123456789aaa",
- "homeDepotName": "string",
- "workspaceTeamId": "01912345-6789-7abc-def0-1234567890ab",
- "createdAt": "2024-01-15T10:00:00+00:00",
- "updatedAt": "2024-06-15T14:30:00+00:00"
}Disable an active team.
| id required | string <uuid> Example: 01912345-6789-7abc-def0-123456789abc Crew UUID |
{- "@context": "string",
- "@id": "string",
- "@type": "string",
- "id": "01912345-6789-7abc-def0-123456789abc",
- "code": "EXPRESS-01",
- "name": "Express Logistics Inc.",
- "type": "internal",
- "email": "dispatch@expresslogistics.com",
- "phone": "+1-555-123-4567",
- "status": "active",
- "partnerId": "01912345-6789-7abc-def0-123456789def",
- "partnerName": "string",
- "homeDepotId": "01912345-6789-7abc-def0-123456789aaa",
- "homeDepotName": "string",
- "workspaceTeamId": "01912345-6789-7abc-def0-1234567890ab",
- "createdAt": "2024-01-15T10:00:00+00:00",
- "updatedAt": "2024-06-15T14:30:00+00:00"
}Enable a disabled team.
| id required | string <uuid> Example: 01912345-6789-7abc-def0-123456789abc Crew UUID |
{- "@context": "string",
- "@id": "string",
- "@type": "string",
- "id": "01912345-6789-7abc-def0-123456789abc",
- "code": "EXPRESS-01",
- "name": "Express Logistics Inc.",
- "type": "internal",
- "email": "dispatch@expresslogistics.com",
- "phone": "+1-555-123-4567",
- "status": "active",
- "partnerId": "01912345-6789-7abc-def0-123456789def",
- "partnerName": "string",
- "homeDepotId": "01912345-6789-7abc-def0-123456789aaa",
- "homeDepotName": "string",
- "workspaceTeamId": "01912345-6789-7abc-def0-1234567890ab",
- "createdAt": "2024-01-15T10:00:00+00:00",
- "updatedAt": "2024-06-15T14:30:00+00:00"
}Set or clear a team's home depot. Pass a depotId to assign, or null to clear.
| id required | string <uuid> Example: 01912345-6789-7abc-def0-123456789abc Crew UUID |
Home depot assignment (null depotId clears it)
| depotId | string or null <uuid> |
{- "depotId": "5c1dba4a-049c-4946-b492-7dd432cad67c"
}{- "@context": "string",
- "@id": "string",
- "@type": "string",
- "id": "01912345-6789-7abc-def0-123456789abc",
- "code": "EXPRESS-01",
- "name": "Express Logistics Inc.",
- "type": "internal",
- "email": "dispatch@expresslogistics.com",
- "phone": "+1-555-123-4567",
- "status": "active",
- "partnerId": "01912345-6789-7abc-def0-123456789def",
- "partnerName": "string",
- "homeDepotId": "01912345-6789-7abc-def0-123456789aaa",
- "homeDepotName": "string",
- "workspaceTeamId": "01912345-6789-7abc-def0-1234567890ab",
- "createdAt": "2024-01-15T10:00:00+00:00",
- "updatedAt": "2024-06-15T14:30:00+00:00"
}Retrieve a list of all drivers in the fleet.
| page | integer Default: 1 The collection page number |
{- "totalItems": 0,
- "search": {
- "@type": "string",
- "template": "string",
- "variableRepresentation": "string",
- "mapping": [
- {
- "@type": "string",
- "variable": "string",
- "property": "string",
- "required": true
}
]
}, - "view": {
- "@id": "string",
- "@type": "string",
- "first": "string",
- "last": "string",
- "previous": "string",
- "next": "string"
}, - "member": [
- {
- "@context": "string",
- "@id": "string",
- "@type": "string",
- "id": "string",
- "crewId": "string",
- "teamName": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "photoUrl": "string",
- "avatarUrl": "string",
- "status": "active",
- "hireDate": "string",
- "dateOfBirth": "string",
- "emergencyContactName": "string",
- "emergencyContactPhone": "string",
- "emergencyContactRelationship": "string",
- "createdAt": "string",
- "updatedAt": "string"
}
]
}Register a driver and associate with a team.
The new Driver resource
| crewId required | string = 26 characters Default: "" |
| membershipId | string or null = 26 characters |
PersonRepresentation (object) or null | |
ContactRepresentation (object) or null | |
| hireDate | |
EmergencyContactRepresentation (object) or null |
{- "crewId": "",
- "membershipId": "stringstringstringstringst",
- "person": {
- "firstName": "string",
- "lastName": "string",
- "dateOfBirth": "string"
}, - "contact": {
- "email": "user@example.com",
- "phone": "string"
}, - "hireDate": "string",
- "emergencyContact": {
- "name": "string",
- "phone": "string",
- "relationship": "string"
}
}{- "@context": "string",
- "@id": "string",
- "@type": "string",
- "id": "string",
- "crewId": "string",
- "teamName": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "photoUrl": "string",
- "avatarUrl": "string",
- "status": "active",
- "hireDate": "string",
- "dateOfBirth": "string",
- "emergencyContactName": "string",
- "emergencyContactPhone": "string",
- "emergencyContactRelationship": "string",
- "createdAt": "string",
- "updatedAt": "string"
}Retrieve a single driver by ID.
| id required | string Driver identifier |
{- "@context": "string",
- "@id": "string",
- "@type": "string",
- "id": "string",
- "crewId": "string",
- "teamName": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "photoUrl": "string",
- "avatarUrl": "string",
- "status": "active",
- "hireDate": "string",
- "dateOfBirth": "string",
- "emergencyContactName": "string",
- "emergencyContactPhone": "string",
- "emergencyContactRelationship": "string",
- "createdAt": "string",
- "updatedAt": "string"
}Update driver profile details. Only provided fields will be updated.
| id required | string Driver identifier |
The updated Driver resource
PersonRepresentation (object) or null | |
ContactRepresentation (object) or null | |
| photoUrl | |
| hireDate | |
EmergencyContactRepresentation (object) or null |
{- "person": {
- "firstName": "string",
- "lastName": "string",
- "dateOfBirth": "string"
}, - "contact": {
- "email": "user@example.com",
- "phone": "string"
}, - "hireDate": "string",
- "emergencyContact": {
- "name": "string",
- "phone": "string",
- "relationship": "string"
}
}{- "@context": "string",
- "@id": "string",
- "@type": "string",
- "id": "string",
- "crewId": "string",
- "teamName": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "photoUrl": "string",
- "avatarUrl": "string",
- "status": "active",
- "hireDate": "string",
- "dateOfBirth": "string",
- "emergencyContactName": "string",
- "emergencyContactPhone": "string",
- "emergencyContactRelationship": "string",
- "createdAt": "string",
- "updatedAt": "string"
}Activate a driver that is currently in a non-active status.
| id required | string Driver identifier |
{- "@context": "string",
- "@id": "string",
- "@type": "string",
- "id": "string",
- "crewId": "string",
- "teamName": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "photoUrl": "string",
- "avatarUrl": "string",
- "status": "active",
- "hireDate": "string",
- "dateOfBirth": "string",
- "emergencyContactName": "string",
- "emergencyContactPhone": "string",
- "emergencyContactRelationship": "string",
- "createdAt": "string",
- "updatedAt": "string"
}Deactivate a driver with a reason.
| id required | string Driver identifier |
The new Driver resource
| reason required | string <= 1000 characters Default: "" |
{- "reason": ""
}{- "@context": "string",
- "@id": "string",
- "@type": "string",
- "id": "string",
- "crewId": "string",
- "teamName": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "photoUrl": "string",
- "avatarUrl": "string",
- "status": "active",
- "hireDate": "string",
- "dateOfBirth": "string",
- "emergencyContactName": "string",
- "emergencyContactPhone": "string",
- "emergencyContactRelationship": "string",
- "createdAt": "string",
- "updatedAt": "string"
}Grant a driver access to the customer portal via a membership.
| id required | string Driver identifier |
The new Driver resource
| membershipId required | string = 26 characters Default: "" |
{- "membershipId": ""
}{- "@context": "string",
- "@id": "string",
- "@type": "string",
- "id": "string",
- "crewId": "string",
- "teamName": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "photoUrl": "string",
- "avatarUrl": "string",
- "status": "active",
- "hireDate": "string",
- "dateOfBirth": "string",
- "emergencyContactName": "string",
- "emergencyContactPhone": "string",
- "emergencyContactRelationship": "string",
- "createdAt": "string",
- "updatedAt": "string"
}Reinstate a suspended driver back to active status.
| id required | string Driver identifier |
{- "@context": "string",
- "@id": "string",
- "@type": "string",
- "id": "string",
- "crewId": "string",
- "teamName": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "photoUrl": "string",
- "avatarUrl": "string",
- "status": "active",
- "hireDate": "string",
- "dateOfBirth": "string",
- "emergencyContactName": "string",
- "emergencyContactPhone": "string",
- "emergencyContactRelationship": "string",
- "createdAt": "string",
- "updatedAt": "string"
}Revoke a driver's access to the customer portal.
| id required | string Driver identifier |
{- "@context": "string",
- "@id": "string",
- "@type": "string",
- "id": "string",
- "crewId": "string",
- "teamName": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "photoUrl": "string",
- "avatarUrl": "string",
- "status": "active",
- "hireDate": "string",
- "dateOfBirth": "string",
- "emergencyContactName": "string",
- "emergencyContactPhone": "string",
- "emergencyContactRelationship": "string",
- "createdAt": "string",
- "updatedAt": "string"
}Suspend an active driver with a reason.
| id required | string Driver identifier |
The new Driver resource
| reason required | string <= 1000 characters Default: "" |
{- "reason": ""
}{- "@context": "string",
- "@id": "string",
- "@type": "string",
- "id": "string",
- "crewId": "string",
- "teamName": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "photoUrl": "string",
- "avatarUrl": "string",
- "status": "active",
- "hireDate": "string",
- "dateOfBirth": "string",
- "emergencyContactName": "string",
- "emergencyContactPhone": "string",
- "emergencyContactRelationship": "string",
- "createdAt": "string",
- "updatedAt": "string"
}Generate a team code
The new CrewCode resource
| number | string The generated team code |
| type | string Resource type |
| barcode | string or null GS1-128 barcode (if applicable) |
| generatedAt | string Generation timestamp (ISO 8601) |
{- "number": "CAR001",
- "type": "dispatch.crew_code",
- "barcode": "string",
- "generatedAt": "string"
}{- "@context": "string",
- "@id": "string",
- "@type": "string",
- "number": "CAR001",
- "type": "dispatch.crew_code",
- "barcode": "string",
- "generatedAt": "string"
}