Read Consignments
List and retrieve consignments, their events, and attached documents.
Use these endpoints to read consignments your organisation has published or that have been shared with you. All endpoints are read-only — to publish data see Publish Data.
Every request requires Cookie: access_token=<jwt>. See Authentication.
GET /supply-chain/data-space/consignments
GET /supply-chain/data-space/consignments
Cookie: access_token=<jwt>List Consignments
Returns a paginated list of all consignments visible to your organisation.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
cursor | string | No | Cursor returned by the previous response — omit to start from the beginning |
limit | number | No | Number of results per page |
Response 200
{
"entities": [...],
"cursor": "<next-page-cursor>"
}cursor is omitted when there are no more results. Each item in entities follows this schema:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schema.twindev.org/supply-chain/ConsignmentOverview",
"title": "ConsignmentOverview",
"description": "Consignment overview interface for listing operations (supports both v1 and v2 payloads).",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "A unique record id for this supply chain consignment in AIG."
},
"aigId": {
"type": "string",
"description": "The AIG vertex id for this consignment."
},
"identifier": {
"type": "string",
"description": "Unique identifier representing the consignment in supply chain."
},
"globalId": {
"type": "string",
"description": "Unique globalId identifier representing the consignment in supply chain."
},
"transportId": {
"type": "string",
"description": "Transport id for the consignment"
},
"dateOfEntry": {
"type": "string",
"description": "Entry date of the consignment"
},
"portOfEntry": {
"type": "string",
"description": "Entry location of the consignment"
},
"portOfExit": {
"type": "string",
"description": "Exit location of the consignment"
},
"firstConsignor": {
"$ref": "https://schema.twindev.org/unece/UneceTradeParty",
"description": "The first consignor of the consignment, which is the party that initially sent the goods."
},
"lastConsignee": {
"$ref": "https://schema.twindev.org/unece/UneceTradeParty",
"description": "The last consignee of the consignment"
},
"tradeParty": {
"type": "array",
"items": {
"$ref": "https://schema.twindev.org/unece/UneceTradeParty"
},
"description": "The import and exporter of the consignment"
},
"carrierParty": {
"$ref": "https://schema.twindev.org/unece/UneceTradeParty",
"description": "The carrier party responsible for the consignment"
},
"commodities": {
"type": "array",
"items": {
"$ref": "https://schema.twindev.org/unece/UneceConsignmentItem"
},
"description": "Commodities in the consignment"
},
"reference": {
"type": "string",
"description": "Reference field for the goods load (v2)."
},
"transportModeCode": {
"type": "string",
"description": "Transport mode code."
},
"transportMeans": {
"type": "array",
"items": {
"$ref": "https://schema.twindev.org/unece/UneceLogisticsTransportEquipment"
},
"description": "Details of the transport means used for the consignment"
},
"latestStatus": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Status name."
},
"date": {
"type": "string",
"description": "Status date."
}
},
"required": [
"name",
"date"
],
"description": "Latest status information e.g. Planned."
},
"dateCreated": {
"type": "string",
"description": "The date when this entry was created."
},
"dateUpdated": {
"type": "string",
"description": "The date when this entry was updated."
},
"payloadVersion": {
"type": "string",
"description": "Payload version (v1 for Consignment, v2 for GoodsLoad)."
}
},
"required": [
"id",
"identifier",
"latestStatus",
"dateCreated"
]
}Errors
| Status | Cause |
|---|---|
401 | Missing or invalid credentials |
GET /supply-chain/data-space/consignments/:id
GET /supply-chain/data-space/consignments/:id
Cookie: access_token=<jwt>Get a Consignment
Returns the full consignment. :id accepts globalId or identifier.
Response 200
The response is IConsignmentView: all UNECE D23B fields as originally published, plus the following TWIN-specific fields:
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | TWIN's internal ID for this consignment |
created | string | Yes | ISO 8601 creation timestamp |
updated | string | Yes | ISO 8601 last-updated timestamp |
documents | array | Yes | Documents attached to this consignment |
events | array | Yes | Supply chain events added via Add — see events |
systemEvents | array | No | Events generated automatically by TWIN — see systemEvents |
includedConsignments | array | No | Nested consignments associated with this one |
resolvedTransportMode | object | No | Transport mode with human-readable label — see resolvedTransportMode |
resolvedTransportEquipment | array | No | Equipment list with resolved type codes — see resolvedTransportEquipment |
events
Supply chain events added via Add. Each item is the full event object as published and contains at minimum:
| Field | Type | Description |
|---|---|---|
typeCode | string | One of the twin:* event type codes — see Add an event |
occurrenceDateTime | string | ISO 8601 timestamp |
occurrenceLocation | object | Location where the event occurred — LogisticsLocation |
systemEvents
Events generated automatically by TWIN in response to network activity.
Schema:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schema.twindev.org/supply-chain/SystemEvent",
"title": "SystemEvent",
"description": "System Event.",
"type": "object",
"properties": {
"@context": {
"$ref": "https://schema.twindev.org/supply-chain/SupplyChainContextType",
"description": "The JSON-LD context."
},
"id": {
"type": "string",
"description": "The ID of the system event (URI)."
},
"type": {
"const": "SystemEvent",
"description": "The JSON-LD type. Always \"SystemEvent\" for system events."
},
"typeCode": {
"$ref": "https://schema.twindev.org/supply-chain/SystemEventTypeCodes",
"description": "A code specifying the type of system event."
},
"source": {
"$ref": "https://schema.twindev.org/supply-chain/EventObject",
"description": "The source of the event (app or service)."
},
"object": {
"$ref": "https://schema.twindev.org/supply-chain/EventObject",
"description": "The directly concerned element (Consignment, Document, etc.)."
},
"target": {
"$ref": "https://schema.twindev.org/supply-chain/EventObject",
"description": "The affected element from the action (if any)."
},
"date": {
"type": "string",
"description": "The date and time that the event occurred in ISO 8601 format."
}
},
"required": [
"type",
"typeCode",
"source",
"object",
"date"
]
}Type codes:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schema.twindev.org/supply-chain/SystemEventTypeCodes",
"title": "SystemEventTypeCodes",
"description": "Type for System Event Type Codes.",
"anyOf": [
{
"const": "CREATE"
},
{
"const": "ADD"
},
{
"const": "UPDATE"
},
{
"const": "DELETE"
},
{
"const": "NOTIFY"
},
{
"const": "MATCH"
},
{
"const": "UNMATCHED"
}
]
}typeCode | When TWIN generates it |
|---|---|
CREATE | A consignment was created |
ADD | An event or document was added |
UPDATE | A consignment was updated |
DELETE | A consignment or document was deleted |
MATCH | A location operator confirmed a match |
NOTIFY | A border agency notification was sent |
UNMATCHED | A location operator match could not be confirmed |
resolvedTransportMode
A TWIN-resolved transport mode code with human-readable label.
| Field | Type | Description |
|---|---|---|
raw | string | Full UNECE code string, e.g. "unece:TransportModeCodeList#3" |
code | string | Extracted code, e.g. "3" |
label | string | Human-readable label, e.g. "Road transport" |
resolvedTransportEquipment
Each item in the array:
| Field | Type | Description |
|---|---|---|
identifier | string | Equipment identifier |
transportMeansTypes | array | Resolved type codes — each item has raw, code, and label (same shape as resolvedTransportMode) |
Errors
| Status | Cause |
|---|---|
401 | Missing or invalid credentials |
404 | Consignment not found |
GET /supply-chain/data-space/consignments/:id/events
GET /supply-chain/data-space/consignments/:id/events
Cookie: access_token=<jwt>List Consignment Events
Returns the supply chain events for a consignment as an ordered list. Each item has the same shape as the events array above.
Errors
| Status | Cause |
|---|---|
401 | Missing or invalid credentials |
404 | Consignment not found |
GET /supply-chain/data-space/consignments/:id/documents
GET /supply-chain/data-space/consignments/:id/documents
Cookie: access_token=<jwt>List Consignment Documents
Returns a list of documents attached to a consignment.
Response 200
Returns an array of DocumentAttachment objects. Top-level fields represent the latest revision — older revisions are in history.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique ID of the latest revision in storage |
documentId | string | Yes | Business identifier, e.g. "INV-12345" |
documentCode | string | Yes | UNECE document type code — UneceDocumentCodeList |
documentRevision | number | Yes | Revision number as a 0-based index |
href | string | Yes | URL to retrieve the latest revision's content |
documentType | string | No | Human-readable document type, e.g. "Commercial Invoice" |
metadata | object | No | Blob metadata for the latest revision — see metadata |
history | array | No | Previous revisions — see history |
metadata
| Field | Type | Description |
|---|---|---|
encodingFormat | string | MIME type, e.g. "application/pdf" |
blobSize | number | File size in bytes |
fileExtension | string | File extension, e.g. "pdf" |
history
Previous revisions sorted ascending by documentRevision.
| Field | Type | Description |
|---|---|---|
id | string | Unique ID of this revision in storage |
documentRevision | number | Revision number as a 0-based index |
href | string | URL to retrieve this revision's content |
Errors
| Status | Cause |
|---|---|
401 | Missing or invalid credentials |
404 | Consignment not found |
GET /supply-chain/data-space/consignments/:id/documents/:documentId
GET /supply-chain/data-space/consignments/:id/documents/:documentId
Cookie: access_token=<jwt>Get a Consignment Document
Returns a single document attached to a consignment.
Response 200
Returns a single DocumentAttachment object — same shape as List Consignment Documents.
Errors
| Status | Cause |
|---|---|
401 | Missing or invalid credentials |
404 | Consignment or document not found |