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.

DocumentAuditEntry

API representation of a single curated entry in a Document's audit timeline.

The collection endpoint streams the entries oldest-first. The resource deliberately declares no #[ApiProperty(identifier: true)] so API Platform does not synthesise an item-level Get operation alongside the collection.

List document audit entries

List the audit trail for a document.

Authorizations:
Bearer
path Parameters
documentId
required
string

DocumentAuditEntry identifier

query Parameters
page
integer
Default: 1

The collection page number

Responses

Response samples

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

DocumentRequest

Resource 'DocumentRequest' operations.

List document requests

Paginated list of document requests in the current tenant.

Authorizations:
Bearer
query Parameters
page
integer
Default: 1

The collection page number

Responses

Response samples

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

Create a document request

Open a new document request for a subject to fulfil.

Authorizations:
Bearer
Request Body schema:
required

The new DocumentRequest resource

type
required
string
subject
required
string
expiresAt
string or null

Responses

Request samples

Content type
{
  • "type": "string",
  • "subject": "string",
  • "expiresAt": "string"
}

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "type": "string",
  • "subject": "string",
  • "status": "string",
  • "metadata": {
    },
  • "files": [
    ],
  • "rejectionReason": "string",
  • "producedDocumentId": "string",
  • "requestedBy": "string",
  • "requestedAt": "string",
  • "submittedBy": "string",
  • "submittedAt": "string",
  • "reviewedBy": "string",
  • "validatedAt": "string",
  • "rejectedAt": "string",
  • "expiresAt": "string",
  • "createdAt": "string",
  • "updatedAt": "string"
}

Get a document request

Fetch a single document request by id.

Authorizations:
Bearer
path Parameters
id
required
string

DocumentRequest identifier

Responses

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "type": "string",
  • "subject": "string",
  • "status": "string",
  • "metadata": {
    },
  • "files": [
    ],
  • "rejectionReason": "string",
  • "producedDocumentId": "string",
  • "requestedBy": "string",
  • "requestedAt": "string",
  • "submittedBy": "string",
  • "submittedAt": "string",
  • "reviewedBy": "string",
  • "validatedAt": "string",
  • "rejectedAt": "string",
  • "expiresAt": "string",
  • "createdAt": "string",
  • "updatedAt": "string"
}

Cancel a document request

Cancel an open document request.

Authorizations:
Bearer
path Parameters
id
required
string

DocumentRequest identifier

Responses

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "type": "string",
  • "subject": "string",
  • "status": "string",
  • "metadata": {
    },
  • "files": [
    ],
  • "rejectionReason": "string",
  • "producedDocumentId": "string",
  • "requestedBy": "string",
  • "requestedAt": "string",
  • "submittedBy": "string",
  • "submittedAt": "string",
  • "reviewedBy": "string",
  • "validatedAt": "string",
  • "rejectedAt": "string",
  • "expiresAt": "string",
  • "createdAt": "string",
  • "updatedAt": "string"
}

Download a request file

Streams an attached request file as an attachment.

Authorizations:
Bearer
path Parameters
id
required
string

DocumentRequest identifier

fileId
required
string

DocumentRequest identifier

Responses

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "type": "string",
  • "subject": "string",
  • "status": "string",
  • "metadata": {
    },
  • "files": [
    ],
  • "rejectionReason": "string",
  • "producedDocumentId": "string",
  • "requestedBy": "string",
  • "requestedAt": "string",
  • "submittedBy": "string",
  • "submittedAt": "string",
  • "reviewedBy": "string",
  • "validatedAt": "string",
  • "rejectedAt": "string",
  • "expiresAt": "string",
  • "createdAt": "string",
  • "updatedAt": "string"
}

Reject a document request

Reject the request with a reason.

Authorizations:
Bearer
path Parameters
id
required
string

DocumentRequest identifier

Request Body schema:
required

The new DocumentRequest resource

reason
required
string

Responses

Request samples

Content type
{
  • "reason": "string"
}

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "type": "string",
  • "subject": "string",
  • "status": "string",
  • "metadata": {
    },
  • "files": [
    ],
  • "rejectionReason": "string",
  • "producedDocumentId": "string",
  • "requestedBy": "string",
  • "requestedAt": "string",
  • "submittedBy": "string",
  • "submittedAt": "string",
  • "reviewedBy": "string",
  • "validatedAt": "string",
  • "rejectedAt": "string",
  • "expiresAt": "string",
  • "createdAt": "string",
  • "updatedAt": "string"
}

Start reviewing a document request

Move a submitted request into review.

Authorizations:
Bearer
path Parameters
id
required
string

DocumentRequest identifier

Responses

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "type": "string",
  • "subject": "string",
  • "status": "string",
  • "metadata": {
    },
  • "files": [
    ],
  • "rejectionReason": "string",
  • "producedDocumentId": "string",
  • "requestedBy": "string",
  • "requestedAt": "string",
  • "submittedBy": "string",
  • "submittedAt": "string",
  • "reviewedBy": "string",
  • "validatedAt": "string",
  • "rejectedAt": "string",
  • "expiresAt": "string",
  • "createdAt": "string",
  • "updatedAt": "string"
}

Submit a document request

Submit the collected files for review.

Authorizations:
Bearer
path Parameters
id
required
string

DocumentRequest identifier

Request Body schema:
required

The new DocumentRequest resource

object
expiresAt
string or null

Responses

Request samples

Content type
{
  • "metadata": {
    },
  • "expiresAt": "string"
}

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "type": "string",
  • "subject": "string",
  • "status": "string",
  • "metadata": {
    },
  • "files": [
    ],
  • "rejectionReason": "string",
  • "producedDocumentId": "string",
  • "requestedBy": "string",
  • "requestedAt": "string",
  • "submittedBy": "string",
  • "submittedAt": "string",
  • "reviewedBy": "string",
  • "validatedAt": "string",
  • "rejectedAt": "string",
  • "expiresAt": "string",
  • "createdAt": "string",
  • "updatedAt": "string"
}

Validate a document request

Accept the reviewed request as valid.

Authorizations:
Bearer
path Parameters
id
required
string

DocumentRequest identifier

Responses

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "type": "string",
  • "subject": "string",
  • "status": "string",
  • "metadata": {
    },
  • "files": [
    ],
  • "rejectionReason": "string",
  • "producedDocumentId": "string",
  • "requestedBy": "string",
  • "requestedAt": "string",
  • "submittedBy": "string",
  • "submittedAt": "string",
  • "reviewedBy": "string",
  • "validatedAt": "string",
  • "rejectedAt": "string",
  • "expiresAt": "string",
  • "createdAt": "string",
  • "updatedAt": "string"
}

Document / Requests

Resource 'Document / Requests' operations.

Attach a file to a document request

Upload a file as multipart/form-data and attach it to the named slot on the document request.

Authorizations:
Bearer
path Parameters
id
required
string

DocumentRequest identifier

Request Body schema: multipart/form-data
required

File upload (multipart/form-data)

file
required
string <binary>

The file bytes to upload

slot
required
string

Slot name defined by the request type (e.g. "document", "front", "back")

Responses

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "type": "string",
  • "subject": "string",
  • "status": "string",
  • "metadata": {
    },
  • "files": [
    ],
  • "rejectionReason": "string",
  • "producedDocumentId": "string",
  • "requestedBy": "string",
  • "requestedAt": "string",
  • "submittedBy": "string",
  • "submittedAt": "string",
  • "reviewedBy": "string",
  • "validatedAt": "string",
  • "rejectedAt": "string",
  • "expiresAt": "string",
  • "createdAt": "string",
  • "updatedAt": "string"
}

Remove an attached file from a document request

Remove an attached file from a document request

Authorizations:
Bearer
path Parameters
id
required
string

DocumentRequest identifier

fileId
required
string

DocumentRequest identifier

Responses

DocumentRequestType

Resource 'DocumentRequestType' operations.

List document request types

List the configured document request types.

Authorizations:
Bearer
query Parameters
page
integer
Default: 1

The collection page number

Responses

Response samples

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

Get a document request type

Fetch a single request type by key.

Authorizations:
Bearer
path Parameters
type
required
string

DocumentRequestType identifier

Responses

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "type": "string",
  • "label": "string",
  • "description": "string",
  • "hasExpiry": true,
  • "slots": [
    ],
  • "metadataSchema": {
    }
}

Document

Resource 'Document' operations.

List documents

Paginated list of documents in the current tenant.

Authorizations:
Bearer
query Parameters
page
integer
Default: 1

The collection page number

Responses

Response samples

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

Create a draft document

Create a new document in draft status.

Authorizations:
Bearer
Request Body schema:
required

The new Document resource

type
required
string
subject
required
string
templateId
string or null
number
string or null
source
string or null
expiresAt
string or null
object

Responses

Request samples

Content type
{
  • "type": "string",
  • "subject": "string",
  • "templateId": "string",
  • "number": "string",
  • "source": "string",
  • "expiresAt": "string",
  • "metadata": {
    }
}

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "type": "string",
  • "subject": "string",
  • "status": "string",
  • "generatedBy": "string",
  • "createdAt": "string",
  • "number": "string",
  • "primaryFormat": "string",
  • "source": "string",
  • "sourceRef": "string",
  • "templateId": "string",
  • "templateVersion": 0,
  • "expiresAt": "string",
  • "finalizedAt": "string",
  • "voidedAt": "string",
  • "voidReason": "string",
  • "supersedes": "string",
  • "supersededBy": "string",
  • "storagePath": "string",
  • "fileSize": 0,
  • "failureReason": "string",
  • "updatedAt": "string",
  • "metadata": {
    },
  • "renditions": [
    ],
  • "attachments": [
    ],
  • "references": [
    ]
}

Ingest an external document

Register an externally-produced file as a document.

Authorizations:
Bearer
Request Body schema:
required

The new Document resource

type
required
string
subject
required
string
fileName
required
string
content
required
string
mimeType
required
string
number
string or null
source
string or null
object

Responses

Request samples

Content type
{
  • "type": "string",
  • "subject": "string",
  • "fileName": "string",
  • "content": "string",
  • "mimeType": "string",
  • "number": "string",
  • "source": "string",
  • "metadata": {
    }
}

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "type": "string",
  • "subject": "string",
  • "status": "string",
  • "generatedBy": "string",
  • "createdAt": "string",
  • "number": "string",
  • "primaryFormat": "string",
  • "source": "string",
  • "sourceRef": "string",
  • "templateId": "string",
  • "templateVersion": 0,
  • "expiresAt": "string",
  • "finalizedAt": "string",
  • "voidedAt": "string",
  • "voidReason": "string",
  • "supersedes": "string",
  • "supersededBy": "string",
  • "storagePath": "string",
  • "fileSize": 0,
  • "failureReason": "string",
  • "updatedAt": "string",
  • "metadata": {
    },
  • "renditions": [
    ],
  • "attachments": [
    ],
  • "references": [
    ]
}

Get a document

Fetch a single document by id.

Authorizations:
Bearer
path Parameters
id
required
string

Document identifier

Responses

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "type": "string",
  • "subject": "string",
  • "status": "string",
  • "generatedBy": "string",
  • "createdAt": "string",
  • "number": "string",
  • "primaryFormat": "string",
  • "source": "string",
  • "sourceRef": "string",
  • "templateId": "string",
  • "templateVersion": 0,
  • "expiresAt": "string",
  • "finalizedAt": "string",
  • "voidedAt": "string",
  • "voidReason": "string",
  • "supersedes": "string",
  • "supersededBy": "string",
  • "storagePath": "string",
  • "fileSize": 0,
  • "failureReason": "string",
  • "updatedAt": "string",
  • "metadata": {
    },
  • "renditions": [
    ],
  • "attachments": [
    ],
  • "references": [
    ]
}

Add an attachment

Attach a supporting file to the document.

Authorizations:
Bearer
path Parameters
id
required
string

Document identifier

Request Body schema:
required

The new Document resource

storageKey
required
string
originalFilename
required
string
mimeType
required
string
sizeBytes
integer >= 0
Default: 0
purpose
required
string
slot
string or null

Responses

Request samples

Content type
{
  • "storageKey": "string",
  • "originalFilename": "string",
  • "mimeType": "string",
  • "sizeBytes": 0,
  • "purpose": "string",
  • "slot": "string"
}

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "type": "string",
  • "subject": "string",
  • "status": "string",
  • "generatedBy": "string",
  • "createdAt": "string",
  • "number": "string",
  • "primaryFormat": "string",
  • "source": "string",
  • "sourceRef": "string",
  • "templateId": "string",
  • "templateVersion": 0,
  • "expiresAt": "string",
  • "finalizedAt": "string",
  • "voidedAt": "string",
  • "voidReason": "string",
  • "supersedes": "string",
  • "supersededBy": "string",
  • "storagePath": "string",
  • "fileSize": 0,
  • "failureReason": "string",
  • "updatedAt": "string",
  • "metadata": {
    },
  • "renditions": [
    ],
  • "attachments": [
    ],
  • "references": [
    ]
}

Remove an attachment

Detach a file previously attached to the document.

Authorizations:
Bearer
path Parameters
id
required
string

Document identifier

attachmentId
required
string

Document identifier

Responses

Response samples

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

Apply a cryptographic signature

Cryptographically sign the finalized document.

Authorizations:
Bearer
path Parameters
id
required
string

Document identifier

Request Body schema:
required

The new Document resource

certificateSubject
required
string
algorithm
required
string
signatureHash
required
string
reason
string or null
location
string or null

Responses

Request samples

Content type
{
  • "certificateSubject": "string",
  • "algorithm": "string",
  • "signatureHash": "string",
  • "reason": "string",
  • "location": "string"
}

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "type": "string",
  • "subject": "string",
  • "status": "string",
  • "generatedBy": "string",
  • "createdAt": "string",
  • "number": "string",
  • "primaryFormat": "string",
  • "source": "string",
  • "sourceRef": "string",
  • "templateId": "string",
  • "templateVersion": 0,
  • "expiresAt": "string",
  • "finalizedAt": "string",
  • "voidedAt": "string",
  • "voidReason": "string",
  • "supersedes": "string",
  • "supersededBy": "string",
  • "storagePath": "string",
  • "fileSize": 0,
  • "failureReason": "string",
  • "updatedAt": "string",
  • "metadata": {
    },
  • "renditions": [
    ],
  • "attachments": [
    ],
  • "references": [
    ]
}

Download a document's file

Streams the primary/rendered file as an attachment.

Authorizations:
Bearer
path Parameters
id
required
string

Document identifier

Responses

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "type": "string",
  • "subject": "string",
  • "status": "string",
  • "generatedBy": "string",
  • "createdAt": "string",
  • "number": "string",
  • "primaryFormat": "string",
  • "source": "string",
  • "sourceRef": "string",
  • "templateId": "string",
  • "templateVersion": 0,
  • "expiresAt": "string",
  • "finalizedAt": "string",
  • "voidedAt": "string",
  • "voidReason": "string",
  • "supersedes": "string",
  • "supersededBy": "string",
  • "storagePath": "string",
  • "fileSize": 0,
  • "failureReason": "string",
  • "updatedAt": "string",
  • "metadata": {
    },
  • "renditions": [
    ],
  • "attachments": [
    ],
  • "references": [
    ]
}

Finalize a document

Transition a draft document to finalized/issued.

Authorizations:
Bearer
path Parameters
id
required
string

Document identifier

Request Body schema:
required

The new Document resource

object (Document.FinalizeInput)

Responses

Request samples

Content type
{ }

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "type": "string",
  • "subject": "string",
  • "status": "string",
  • "generatedBy": "string",
  • "createdAt": "string",
  • "number": "string",
  • "primaryFormat": "string",
  • "source": "string",
  • "sourceRef": "string",
  • "templateId": "string",
  • "templateVersion": 0,
  • "expiresAt": "string",
  • "finalizedAt": "string",
  • "voidedAt": "string",
  • "voidReason": "string",
  • "supersedes": "string",
  • "supersededBy": "string",
  • "storagePath": "string",
  • "fileSize": 0,
  • "failureReason": "string",
  • "updatedAt": "string",
  • "metadata": {
    },
  • "renditions": [
    ],
  • "attachments": [
    ],
  • "references": [
    ]
}

Update a document's metadata

Merge-update the document metadata map.

Authorizations:
Bearer
path Parameters
id
required
string

Document identifier

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

The updated Document resource

object

Responses

Request samples

Content type
application/merge-patch+json
{
  • "metadata": {
    }
}

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "type": "string",
  • "subject": "string",
  • "status": "string",
  • "generatedBy": "string",
  • "createdAt": "string",
  • "number": "string",
  • "primaryFormat": "string",
  • "source": "string",
  • "sourceRef": "string",
  • "templateId": "string",
  • "templateVersion": 0,
  • "expiresAt": "string",
  • "finalizedAt": "string",
  • "voidedAt": "string",
  • "voidReason": "string",
  • "supersedes": "string",
  • "supersededBy": "string",
  • "storagePath": "string",
  • "fileSize": 0,
  • "failureReason": "string",
  • "updatedAt": "string",
  • "metadata": {
    },
  • "renditions": [
    ],
  • "attachments": [
    ],
  • "references": [
    ]
}

Add a reference

Link another resource to the document as a reference.

Authorizations:
Bearer
path Parameters
id
required
string

Document identifier

Request Body schema:
required

The new Document resource

targetDocumentId
required
string
type
required
string
description
string or null

Responses

Request samples

Content type
{
  • "targetDocumentId": "string",
  • "type": "string",
  • "description": "string"
}

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "type": "string",
  • "subject": "string",
  • "status": "string",
  • "generatedBy": "string",
  • "createdAt": "string",
  • "number": "string",
  • "primaryFormat": "string",
  • "source": "string",
  • "sourceRef": "string",
  • "templateId": "string",
  • "templateVersion": 0,
  • "expiresAt": "string",
  • "finalizedAt": "string",
  • "voidedAt": "string",
  • "voidReason": "string",
  • "supersedes": "string",
  • "supersededBy": "string",
  • "storagePath": "string",
  • "fileSize": 0,
  • "failureReason": "string",
  • "updatedAt": "string",
  • "metadata": {
    },
  • "renditions": [
    ],
  • "attachments": [
    ],
  • "references": [
    ]
}

Render a document

Produce a rendition of the document in a requested format.

Authorizations:
Bearer
path Parameters
id
required
string

Document identifier

Request Body schema:
required

The new Document resource

format
required
string
locale
string or null

Responses

Request samples

Content type
{
  • "format": "string",
  • "locale": "string"
}

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "type": "string",
  • "subject": "string",
  • "status": "string",
  • "generatedBy": "string",
  • "createdAt": "string",
  • "number": "string",
  • "primaryFormat": "string",
  • "source": "string",
  • "sourceRef": "string",
  • "templateId": "string",
  • "templateVersion": 0,
  • "expiresAt": "string",
  • "finalizedAt": "string",
  • "voidedAt": "string",
  • "voidReason": "string",
  • "supersedes": "string",
  • "supersededBy": "string",
  • "storagePath": "string",
  • "fileSize": 0,
  • "failureReason": "string",
  • "updatedAt": "string",
  • "metadata": {
    },
  • "renditions": [
    ],
  • "attachments": [
    ],
  • "references": [
    ]
}

Replace a document

Replace the document's file/content in place.

Authorizations:
Bearer
path Parameters
id
required
string

Document identifier

Request Body schema:
required

The new Document resource

type
required
string
subject
required
string
templateId
string or null
number
string or null
source
string or null
expiresAt
string or null
object

Responses

Request samples

Content type
{
  • "type": "string",
  • "subject": "string",
  • "templateId": "string",
  • "number": "string",
  • "source": "string",
  • "expiresAt": "string",
  • "metadata": {
    }
}

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "type": "string",
  • "subject": "string",
  • "status": "string",
  • "generatedBy": "string",
  • "createdAt": "string",
  • "number": "string",
  • "primaryFormat": "string",
  • "source": "string",
  • "sourceRef": "string",
  • "templateId": "string",
  • "templateVersion": 0,
  • "expiresAt": "string",
  • "finalizedAt": "string",
  • "voidedAt": "string",
  • "voidReason": "string",
  • "supersedes": "string",
  • "supersededBy": "string",
  • "storagePath": "string",
  • "fileSize": 0,
  • "failureReason": "string",
  • "updatedAt": "string",
  • "metadata": {
    },
  • "renditions": [
    ],
  • "attachments": [
    ],
  • "references": [
    ]
}

Set the retention policy

Set how long the document is retained before disposal.

Authorizations:
Bearer
path Parameters
id
required
string

Document identifier

Request Body schema:
required

The new Document resource

retainUntil
required
string
basis
required
string
autoDelete
boolean
Default: false

Responses

Request samples

Content type
{
  • "retainUntil": "string",
  • "basis": "string",
  • "autoDelete": false
}

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "type": "string",
  • "subject": "string",
  • "status": "string",
  • "generatedBy": "string",
  • "createdAt": "string",
  • "number": "string",
  • "primaryFormat": "string",
  • "source": "string",
  • "sourceRef": "string",
  • "templateId": "string",
  • "templateVersion": 0,
  • "expiresAt": "string",
  • "finalizedAt": "string",
  • "voidedAt": "string",
  • "voidReason": "string",
  • "supersedes": "string",
  • "supersededBy": "string",
  • "storagePath": "string",
  • "fileSize": 0,
  • "failureReason": "string",
  • "updatedAt": "string",
  • "metadata": {
    },
  • "renditions": [
    ],
  • "attachments": [
    ],
  • "references": [
    ]
}

Supersede a document

Replace this document with a newer version, superseding it.

Authorizations:
Bearer
path Parameters
id
required
string

Document identifier

Request Body schema:
required

The new Document resource

replacementId
required
string

Responses

Request samples

Content type
{
  • "replacementId": "string"
}

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "type": "string",
  • "subject": "string",
  • "status": "string",
  • "generatedBy": "string",
  • "createdAt": "string",
  • "number": "string",
  • "primaryFormat": "string",
  • "source": "string",
  • "sourceRef": "string",
  • "templateId": "string",
  • "templateVersion": 0,
  • "expiresAt": "string",
  • "finalizedAt": "string",
  • "voidedAt": "string",
  • "voidReason": "string",
  • "supersedes": "string",
  • "supersededBy": "string",
  • "storagePath": "string",
  • "fileSize": 0,
  • "failureReason": "string",
  • "updatedAt": "string",
  • "metadata": {
    },
  • "renditions": [
    ],
  • "attachments": [
    ],
  • "references": [
    ]
}

Update the document's template version

Point the document at a different template version.

Authorizations:
Bearer
path Parameters
id
required
string

Document identifier

Request Body schema:
required

The new Document resource

version
integer > 0
Default: 1

Responses

Request samples

Content type
{
  • "version": 1
}

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "type": "string",
  • "subject": "string",
  • "status": "string",
  • "generatedBy": "string",
  • "createdAt": "string",
  • "number": "string",
  • "primaryFormat": "string",
  • "source": "string",
  • "sourceRef": "string",
  • "templateId": "string",
  • "templateVersion": 0,
  • "expiresAt": "string",
  • "finalizedAt": "string",
  • "voidedAt": "string",
  • "voidReason": "string",
  • "supersedes": "string",
  • "supersededBy": "string",
  • "storagePath": "string",
  • "fileSize": 0,
  • "failureReason": "string",
  • "updatedAt": "string",
  • "metadata": {
    },
  • "renditions": [
    ],
  • "attachments": [
    ],
  • "references": [
    ]
}

Void a document

Void a document, marking it no longer valid.

Authorizations:
Bearer
path Parameters
id
required
string

Document identifier

Request Body schema:
required

The new Document resource

reason
required
string

Responses

Request samples

Content type
{
  • "reason": "string"
}

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "type": "string",
  • "subject": "string",
  • "status": "string",
  • "generatedBy": "string",
  • "createdAt": "string",
  • "number": "string",
  • "primaryFormat": "string",
  • "source": "string",
  • "sourceRef": "string",
  • "templateId": "string",
  • "templateVersion": 0,
  • "expiresAt": "string",
  • "finalizedAt": "string",
  • "voidedAt": "string",
  • "voidReason": "string",
  • "supersedes": "string",
  • "supersededBy": "string",
  • "storagePath": "string",
  • "fileSize": 0,
  • "failureReason": "string",
  • "updatedAt": "string",
  • "metadata": {
    },
  • "renditions": [
    ],
  • "attachments": [
    ],
  • "references": [
    ]
}

List all registered document types

Returns the global catalog of document types contributed by every module.

Authorizations:
Bearer
query Parameters
page
integer
Default: 1

The collection page number

Responses

Response samples

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

ElementPalette

Resource 'ElementPalette' operations.

List palette elements

List the available template palette elements.

Authorizations:
Bearer
query Parameters
page
integer
Default: 1

The collection page number

Responses

Response samples

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

FileAccess

The four Document-module mint endpoints. Each returns a signed URL pointing at the Document-owned public stream endpoint /api/v1/document/files/access/{token} ({@see DocumentFileStreamProvider}).

Document files live on the module's own {@see \Glacia\Storage\Application\FileStorageContract} (local filesystem), whose storage paths are NOT drive:// URIs — so the URL MUST be served by the Document stream endpoint (which reads through that contract), NOT the shared Storage drive-stream endpoint (which would 404).

Tenant-level authorization runs in the bus pipeline before the handler is invoked (scope check via HasScopeContext); the handler's query service filters its lookup on tenant_id = current_tenant so a cross-tenant probe returns the same 404 as a genuinely missing resource.

Mint a document access URL

Issue a short-lived signed URL to view/download a document.

Authorizations:
Bearer
path Parameters
token
required
string

FileAccess identifier

Request Body schema:
required

The new FileAccess resource

expirySeconds
integer or null [ 1 .. 3600 ]

Responses

Request samples

Content type
{
  • "expirySeconds": 1
}

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "token": "string",
  • "url": "string",
  • "expiresAt": "string",
  • "expiresInSeconds": 0,
  • "filename": "string",
  • "mimeType": "string",
  • "sizeBytes": 0,
  • "isPreviewable": true
}

Stream a file by access token

Public endpoint: streams the file bytes; the signed token IS the auth (signature + expiry).

Authorizations:
Bearer
path Parameters
token
required
string

FileAccess identifier

Responses

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "token": "string",
  • "url": "string",
  • "expiresAt": "string",
  • "expiresInSeconds": 0,
  • "filename": "string",
  • "mimeType": "string",
  • "sizeBytes": 0,
  • "isPreviewable": true
}

Mint a request-file access URL

Issue a short-lived signed URL to view/download a document-request file.

Authorizations:
Bearer
path Parameters
requestId
required
string

FileAccess identifier

fileId
required
string

FileAccess identifier

Request Body schema:
required

The new FileAccess resource

expirySeconds
integer or null [ 1 .. 3600 ]

Responses

Request samples

Content type
{
  • "expirySeconds": 1
}

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "token": "string",
  • "url": "string",
  • "expiresAt": "string",
  • "expiresInSeconds": 0,
  • "filename": "string",
  • "mimeType": "string",
  • "sizeBytes": 0,
  • "isPreviewable": true
}

QuickPick

Resource 'QuickPick' operations.

List quick picks

List built-in and custom document quick-picks.

Authorizations:
Bearer
query Parameters
page
integer
Default: 1

The collection page number

Responses

Response samples

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

Create a custom quick pick

Create a custom document quick-pick.

Authorizations:
Bearer
Request Body schema:
required

The new QuickPick resource

name
required
string
description
string
Default: ""
category
required
string
elementTree
required
string

Responses

Request samples

Content type
{
  • "name": "string",
  • "description": "",
  • "category": "string",
  • "elementTree": "string"
}

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "category": "string",
  • "isSystem": true,
  • "element": {
    }
}

Delete a custom quick pick

Delete a custom document quick-pick.

Authorizations:
Bearer
path Parameters
id
required
string

QuickPick identifier

Responses

Response samples

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

TemplatePreview

Resource 'TemplatePreview' operations.

Preview a template

Compile a template preview from the supplied data.

Authorizations:
Bearer
Request Body schema:
required

The new TemplatePreview resource

elementTree
required
string

Responses

Request samples

Content type
{
  • "elementTree": "string"
}

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "html": "string"
}

Template

Resource 'Template' operations.

List document templates

Paginated list of document templates.

Authorizations:
Bearer
query Parameters
page
integer
Default: 1

The collection page number

Responses

Response samples

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

Create a document template

Create a new document template.

Authorizations:
Bearer
Request Body schema:
required

The new Template resource

name
required
string
documentType
required
string
content
required
string
authoring
string
Default: "code"
engine
string
Default: "twig"
Array of objects

Responses

Request samples

Content type
{
  • "name": "string",
  • "documentType": "string",
  • "content": "string",
  • "authoring": "code",
  • "engine": "twig",
  • "variables": [
    ]
}

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "name": "string",
  • "documentType": "string",
  • "authoring": "string",
  • "engine": "string",
  • "content": "",
  • "isActive": true,
  • "version": 0,
  • "createdAt": "string",
  • "updatedAt": "string",
  • "variables": [
    ]
}

Get a document template

Fetch a single document template by id.

Authorizations:
Bearer
path Parameters
id
required
string

Template identifier

Responses

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "name": "string",
  • "documentType": "string",
  • "authoring": "string",
  • "engine": "string",
  • "content": "",
  • "isActive": true,
  • "version": 0,
  • "createdAt": "string",
  • "updatedAt": "string",
  • "variables": [
    ]
}

Delete a document template

Delete a document template.

Authorizations:
Bearer
path Parameters
id
required
string

Template identifier

Responses

Response samples

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

Update a document template

Merge-update a document template.

Authorizations:
Bearer
path Parameters
id
required
string

Template identifier

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

The updated Template resource

content
string
name
string or null
Array of objects

Responses

Request samples

Content type
application/merge-patch+json
{
  • "content": "string",
  • "name": "string",
  • "variables": [
    ]
}

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "name": "string",
  • "documentType": "string",
  • "authoring": "string",
  • "engine": "string",
  • "content": "",
  • "isActive": true,
  • "version": 0,
  • "createdAt": "string",
  • "updatedAt": "string",
  • "variables": [
    ]
}

Activate a document template

Make the template available for use.

Authorizations:
Bearer
path Parameters
id
required
string

Template identifier

Responses

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "name": "string",
  • "documentType": "string",
  • "authoring": "string",
  • "engine": "string",
  • "content": "",
  • "isActive": true,
  • "version": 0,
  • "createdAt": "string",
  • "updatedAt": "string",
  • "variables": [
    ]
}

Deactivate a document template

Retire the template from use.

Authorizations:
Bearer
path Parameters
id
required
string

Template identifier

Responses

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "name": "string",
  • "documentType": "string",
  • "authoring": "string",
  • "engine": "string",
  • "content": "",
  • "isActive": true,
  • "version": 0,
  • "createdAt": "string",
  • "updatedAt": "string",
  • "variables": [
    ]
}

TemplateVersion

Resource 'TemplateVersion' operations.

List template versions

List the versions of a document template.

Authorizations:
Bearer
path Parameters
templateId
required
string

TemplateVersion identifier

query Parameters
page
integer
Default: 1

The collection page number

Responses

Response samples

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