4klyft API (1.0.0)

Download OpenAPI specification:

4klyft API Support: support@4klyft.com License: Proprietary

Logistics operations API for the 4klyft platform.

Overview

This API provides comprehensive endpoints for managing:

  • Routes & Execution: Create, manage, and execute delivery routes
  • Shipments & Loads: Track shipments from pickup to delivery
  • Fleet Management: Manage carriers, vehicles, and drivers
  • Proof of Delivery: Capture signatures, photos, and delivery confirmations
  • Settings: Configure system-wide and tenant-specific settings
  • Webhooks: Subscribe to real-time event notifications
  • Analytics: Access delivery performance metrics and reports

Authentication

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>

Rate Limiting

API requests are rate-limited to ensure fair usage. Standard limits are:

  • 1000 requests per minute for read operations
  • 100 requests per minute for write operations

Error Handling

The API uses RFC 7807 Problem Details for error responses.

Asset Contracts

An ownership/lease/rental contract attached to an asset.

owned contracts are non-billable (no rate/cadence/counterparty); every other type carries a currency-aware rate, a cadence, and a counterparty.

List asset contracts

Retrieve a paginated list of asset contracts, filterable by assetId, subject, or status.

Authorizations:
Bearer
query Parameters
page
integer
Default: 1

The collection page number

Responses

Response samples

Content type
{
  • "totalItems": 0,
  • "search": {
    },
  • "view": {
    },
  • "member": [
    ]
}

Attach a contract to an asset

Attach a contract to an asset

Authorizations:
Bearer
Request Body schema:
required

The new AssetContract resource

assetId
required
string
type
required
string
Default: "owned"
Enum: "owned" "leased" "rented" "owner_operator"
periodFrom
required
string

Period start (ISO 8601).

periodTo
string or null

Period end (ISO 8601), or null for an open-ended arrangement.

rateAmount
integer or null >= 0

Rate amount in the smallest currency unit (required for billable types).

rateCurrency
string or null = 3 characters

Rate currency (ISO 4217; required for billable types).

cadence
string or null
Enum: "per_day" "per_week" "per_month" "per_job"

Billing cadence (required for billable types).

counterparty
string or null

Opaque ResourceUri of the lessor/owner counterparty (required for billable types).

Responses

Request samples

Content type
{
  • "assetId": "string",
  • "type": "owned",
  • "periodFrom": "string",
  • "periodTo": "string",
  • "rateAmount": 0,
  • "rateCurrency": "str",
  • "cadence": "per_day",
  • "counterparty": "string"
}

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "assetId": "string",
  • "subject": "string",
  • "type": "owned",
  • "periodFrom": "string",
  • "periodTo": "string",
  • "rateAmount": 120000,
  • "rateCurrency": "USD",
  • "cadence": "per_day",
  • "counterparty": "string",
  • "status": "draft",
  • "createdAt": "string",
  • "updatedAt": "string"
}

Get an asset contract

Get an asset contract

Authorizations:
Bearer
path Parameters
id
required
string

AssetContract identifier

Responses

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "assetId": "string",
  • "subject": "string",
  • "type": "owned",
  • "periodFrom": "string",
  • "periodTo": "string",
  • "rateAmount": 120000,
  • "rateCurrency": "USD",
  • "cadence": "per_day",
  • "counterparty": "string",
  • "status": "draft",
  • "createdAt": "string",
  • "updatedAt": "string"
}

Activate a contract

Activate a contract

Authorizations:
Bearer
path Parameters
id
required
string

AssetContract identifier

Responses

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "assetId": "string",
  • "subject": "string",
  • "type": "owned",
  • "periodFrom": "string",
  • "periodTo": "string",
  • "rateAmount": 120000,
  • "rateCurrency": "USD",
  • "cadence": "per_day",
  • "counterparty": "string",
  • "status": "draft",
  • "createdAt": "string",
  • "updatedAt": "string"
}

Terminate a contract

Terminate a contract

Authorizations:
Bearer
path Parameters
id
required
string

AssetContract identifier

Responses

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "assetId": "string",
  • "subject": "string",
  • "type": "owned",
  • "periodFrom": "string",
  • "periodTo": "string",
  • "rateAmount": 120000,
  • "rateCurrency": "USD",
  • "cadence": "per_day",
  • "counterparty": "string",
  • "status": "draft",
  • "createdAt": "string",
  • "updatedAt": "string"
}

Assets

An asset register entry — a thin ownership ledger record that links to an operational entity (a Fleet vehicle, a Warehousing site, equipment, …) via the opaque subject ResourceUri. Operational data lives on the operational aggregate, not here; the Asset module tracks only ownership/lease/rental arrangements (see AssetContract).

List assets

Retrieve a paginated list of asset register entries.

Authorizations:
Bearer
query Parameters
page
integer
Default: 1

The collection page number

Responses

Response samples

Content type
{
  • "totalItems": 0,
  • "search": {
    },
  • "view": {
    },
  • "member": [
    ]
}

Register an asset

Register an asset

Authorizations:
Bearer
Request Body schema:
required

The new Asset resource

category
required
string
Default: "other"
Enum: "power_unit" "rigid_vehicle" "trailer" "container" "warehouse" "equipment" "other"
subject
required
string

Opaque ResourceUri of the operational entity this register entry tracks.

owner
string or null

Opaque ResourceUri of the owner/counterparty, or null for self/unknown.

acquiredAt
string or null

Acquisition date (ISO 8601), if known.

acquisitionCostAmount
integer or null >= 0

Acquisition cost amount in the smallest currency unit (e.g. cents).

acquisitionCostCurrency
string or null = 3 characters

Acquisition cost currency (ISO 4217). Required when an amount is given.

Responses

Request samples

Content type
{
  • "category": "power_unit",
  • "subject": "string",
  • "owner": "string",
  • "acquiredAt": "string",
  • "acquisitionCostAmount": 0,
  • "acquisitionCostCurrency": "str"
}

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "number": "string",
  • "category": "power_unit",
  • "subject": "glacia:///fleet/vehicles/01HGW...",
  • "owner": "glacia:///partner/partners/01HGW...",
  • "status": "active",
  • "acquiredAt": "string",
  • "acquisitionCostAmount": 4500000,
  • "acquisitionCostCurrency": "USD",
  • "costOfOwnership": [
    ],
  • "createdAt": "string",
  • "updatedAt": "string"
}

Get an asset

Get an asset

Authorizations:
Bearer
path Parameters
id
required
string

Asset identifier

Responses

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "number": "string",
  • "category": "power_unit",
  • "subject": "glacia:///fleet/vehicles/01HGW...",
  • "owner": "glacia:///partner/partners/01HGW...",
  • "status": "active",
  • "acquiredAt": "string",
  • "acquisitionCostAmount": 4500000,
  • "acquisitionCostCurrency": "USD",
  • "costOfOwnership": [
    ],
  • "createdAt": "string",
  • "updatedAt": "string"
}

Update asset details

Update asset details

Authorizations:
Bearer
path Parameters
id
required
string

Asset identifier

Request Body schema: application/merge-patch+json
required

The updated Asset resource

owner
string or null
acquiredAt
string or null
acquisitionCostAmount
integer or null >= 0
acquisitionCostCurrency
string or null = 3 characters

Responses

Request samples

Content type
application/merge-patch+json
{
  • "owner": "string",
  • "acquiredAt": "string",
  • "acquisitionCostAmount": 0,
  • "acquisitionCostCurrency": "str"
}

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "number": "string",
  • "category": "power_unit",
  • "subject": "glacia:///fleet/vehicles/01HGW...",
  • "owner": "glacia:///partner/partners/01HGW...",
  • "status": "active",
  • "acquiredAt": "string",
  • "acquisitionCostAmount": 4500000,
  • "acquisitionCostCurrency": "USD",
  • "costOfOwnership": [
    ],
  • "createdAt": "string",
  • "updatedAt": "string"
}

Dispose of an asset

Dispose of an asset

Authorizations:
Bearer
path Parameters
id
required
string

Asset identifier

Responses

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "number": "string",
  • "category": "power_unit",
  • "subject": "glacia:///fleet/vehicles/01HGW...",
  • "owner": "glacia:///partner/partners/01HGW...",
  • "status": "active",
  • "acquiredAt": "string",
  • "acquisitionCostAmount": 4500000,
  • "acquisitionCostCurrency": "USD",
  • "costOfOwnership": [
    ],
  • "createdAt": "string",
  • "updatedAt": "string"
}

Retire an asset

Retire an asset

Authorizations:
Bearer
path Parameters
id
required
string

Asset identifier

Responses

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "number": "string",
  • "category": "power_unit",
  • "subject": "glacia:///fleet/vehicles/01HGW...",
  • "owner": "glacia:///partner/partners/01HGW...",
  • "status": "active",
  • "acquiredAt": "string",
  • "acquisitionCostAmount": 4500000,
  • "acquisitionCostCurrency": "USD",
  • "costOfOwnership": [
    ],
  • "createdAt": "string",
  • "updatedAt": "string"
}