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.

Scheduling

Resource 'Scheduling' operations.

Get an availability window by ID

Retrieve a single availability window with all its slots.

Authorizations:
Bearer
path Parameters
id
required
string

AvailabilityWindow identifier

Responses

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "slots": [
    ],
  • "createdAt": "string",
  • "updatedAt": "string"
}

List schedules

Tenant-scoped list of schedules, filterable by status and taskKind.

Authorizations:
Bearer
query Parameters
page
integer
Default: 1

The collection page number

Responses

Response samples

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

Create a schedule

Declares a schedule for a registered task kind. Validates the config against the kind's schema and computes the first run.

Authorizations:
Bearer
Request Body schema:
required

The new Schedule resource

taskKind
string
Default: ""
object
triggerType
string
Default: ""

one_off | periodic

runAt
string or null
cronExpression
string or null
timezone
string or null
Default: "UTC"
startAt
string or null
endAt
string or null
ownerRef
string or null
scopeTier
string or null
Value: "tenant"

Responses

Request samples

Content type
{
  • "taskKind": "",
  • "config": {
    },
  • "triggerType": "",
  • "runAt": "string",
  • "cronExpression": "string",
  • "timezone": "UTC",
  • "startAt": "string",
  • "endAt": "string",
  • "ownerRef": "string",
  • "scopeTier": "tenant"
}

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "",
  • "taskKind": "",
  • "label": "",
  • "config": {
    },
  • "triggerType": "",
  • "runAt": "string",
  • "cronExpression": "string",
  • "timezone": "string",
  • "startAt": "string",
  • "endAt": "string",
  • "ownerRef": "",
  • "scopeTier": "",
  • "requiredScope": "string",
  • "status": "",
  • "nextRunAt": "string",
  • "lastRunAt": "string",
  • "lastRunStatus": "string",
  • "retryPolicy": {
    },
  • "currentAttempt": 1,
  • "retryAt": "string",
  • "createdAt": "string"
}

Get a schedule

Get a schedule

Authorizations:
Bearer
path Parameters
id
required
string

Schedule identifier

Responses

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "",
  • "taskKind": "",
  • "label": "",
  • "config": {
    },
  • "triggerType": "",
  • "runAt": "string",
  • "cronExpression": "string",
  • "timezone": "string",
  • "startAt": "string",
  • "endAt": "string",
  • "ownerRef": "",
  • "scopeTier": "",
  • "requiredScope": "string",
  • "status": "",
  • "nextRunAt": "string",
  • "lastRunAt": "string",
  • "lastRunStatus": "string",
  • "retryPolicy": {
    },
  • "currentAttempt": 1,
  • "retryAt": "string",
  • "createdAt": "string"
}

Cancel a schedule

Cancel a schedule

Authorizations:
Bearer
path Parameters
id
required
string

Schedule identifier

Responses

Response samples

Content type
{
  • "type": "/errors/validation-error",
  • "title": "Validation Error",
  • "status": 400,
  • "detail": "The provided input is invalid",
  • "violations": [
    ],
  • "instance": "string"
}

Pause a schedule

Pause a schedule

Authorizations:
Bearer
path Parameters
id
required
string

Schedule identifier

Responses

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "",
  • "taskKind": "",
  • "label": "",
  • "config": {
    },
  • "triggerType": "",
  • "runAt": "string",
  • "cronExpression": "string",
  • "timezone": "string",
  • "startAt": "string",
  • "endAt": "string",
  • "ownerRef": "",
  • "scopeTier": "",
  • "requiredScope": "string",
  • "status": "",
  • "nextRunAt": "string",
  • "lastRunAt": "string",
  • "lastRunStatus": "string",
  • "retryPolicy": {
    },
  • "currentAttempt": 1,
  • "retryAt": "string",
  • "createdAt": "string"
}

Resume a paused schedule

Resume a paused schedule

Authorizations:
Bearer
path Parameters
id
required
string

Schedule identifier

Responses

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "",
  • "taskKind": "",
  • "label": "",
  • "config": {
    },
  • "triggerType": "",
  • "runAt": "string",
  • "cronExpression": "string",
  • "timezone": "string",
  • "startAt": "string",
  • "endAt": "string",
  • "ownerRef": "",
  • "scopeTier": "",
  • "requiredScope": "string",
  • "status": "",
  • "nextRunAt": "string",
  • "lastRunAt": "string",
  • "lastRunStatus": "string",
  • "retryPolicy": {
    },
  • "currentAttempt": 1,
  • "retryAt": "string",
  • "createdAt": "string"
}

Run a schedule immediately

Run a schedule immediately

Authorizations:
Bearer
path Parameters
id
required
string

Schedule identifier

Responses

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "",
  • "taskKind": "",
  • "label": "",
  • "config": {
    },
  • "triggerType": "",
  • "runAt": "string",
  • "cronExpression": "string",
  • "timezone": "string",
  • "startAt": "string",
  • "endAt": "string",
  • "ownerRef": "",
  • "scopeTier": "",
  • "requiredScope": "string",
  • "status": "",
  • "nextRunAt": "string",
  • "lastRunAt": "string",
  • "lastRunStatus": "string",
  • "retryPolicy": {
    },
  • "currentAttempt": 1,
  • "retryAt": "string",
  • "createdAt": "string"
}

List a schedule's run history

Paginated firing history for a schedule, most recent first.

Authorizations:
Bearer
path Parameters
runId
required
string

ScheduleRun identifier

query Parameters
page
integer
Default: 1

The collection page number

Responses

Response samples

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

List schedulable task kinds

The catalog of registered task kinds — each with its label, description, required scope, and declarative config schema that drives the create form.

Authorizations:
Bearer

Responses

Response samples

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

Get a task kind

Get a task kind

Authorizations:
Bearer
path Parameters
key
required
string

TaskKind identifier

Responses

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "key": "",
  • "label": "",
  • "description": "",
  • "requiredScope": "string",
  • "audience": [
    ],
  • "configSchema": [
    ]
}