CartonCloud
CartonCloud API

Consignment Documents

Endpoints related to Consignment Documents.


List documents

GET
https://api.cartoncloud.com
/tenants/{tenantId}/consignments/{consignmentId}/documents
required permission: VIEW_DOCUMENT

List documents attached to a consignment

List documents › path Parameters

tenantId
​string · uuid · required

Tenant ID. Can be found in organisation settings

consignmentId
​UUID · uuid · required

The consignment ID

Example: 38756e85-d15c-45d9-84fd-1b3e50b73527

List documents › query Parameters

page
​integer

The page number to return results for

size
​integer

The number of elements per page. Default value may vary between endpoints

List documents › Headers

Accept-Version
​string · enum · required

All API end points require Accept-Version in the request header.

Failure to provide the header will return a status code of 400, however, an invalid version can return a 404, 406 or 400.

Enum values:
8

List documents › Responses

Success

​object · required
type
​string · enum · required
Enum values:
TRANSPORT_PROOF_OF_DELIVERY
id
​string · uuid · readOnly
status
​string · enum · readOnly
Enum values:
CREATED_PENDING
UPDATED_PENDING
ACTIVE
INACTIVE
ERROR
Default: CREATED_PENDING
​object
name
​string · enum
Enum values:
Delivery
Load
Pickup
description
​string | null
​DocumentDetails | null

Attachment list for this document, or null when none is present.

​AuditInfo · readOnly

Create document

POST
https://api.cartoncloud.com
/tenants/{tenantId}/consignments/{consignmentId}/documents
required permission: EDIT_DOCUMENT

Create a document attached to a consignment

Create document › path Parameters

tenantId
​string · uuid · required

Tenant ID. Can be found in organisation settings

consignmentId
​UUID · uuid · required

The consignment ID

Example: 38756e85-d15c-45d9-84fd-1b3e50b73527

Create document › Headers

Accept-Version
​string · enum · required

All API end points require Accept-Version in the request header.

Failure to provide the header will return a status code of 400, however, an invalid version can return a 404, 406 or 400.

Enum values:
8
External-Meta-Key
​string

The External-Meta-Key header allows to specify the desired external meta key and only data associated with the specified key will be returned. If no key is specified or the key does not contain data, then externalMeta will not be returned.

Users with VIEW_ALL_EXTERNAL_META permission can specify * to return all available external meta. Data in externalMeta will be keyed by the external meta key.

Create document › Request Body

​object
name
​string · enum
Enum values:
Delivery
Load
Pickup
description
​string | null
​DocumentRequestDetails | null

Send an object with attachments to request presigned upload URLs, or null if there are no files.

type
​string · enum
Enum values:
TRANSPORT_PROOF_OF_DELIVERY

Create document › Responses

Document created. Returns newly created document.

​object · required
type
​string · enum · required
Enum values:
TRANSPORT_PROOF_OF_DELIVERY
id
​string · uuid · readOnly
status
​string · enum · readOnly
Enum values:
CREATED_PENDING
UPDATED_PENDING
ACTIVE
INACTIVE
ERROR
Default: CREATED_PENDING
​object
name
​string · enum
Enum values:
Delivery
Load
Pickup
description
​string | null
​DocumentDetails | null

Attachment list for this document, or null when none is present.

​AuditInfo · readOnly

Get document

GET
https://api.cartoncloud.com
/tenants/{tenantId}/consignments/{consignmentId}/documents/{documentId}
required permission: VIEW_DOCUMENT

Get a document attached to a consignment

Get document › path Parameters

tenantId
​string · uuid · required

Tenant ID. Can be found in organisation settings

consignmentId
​UUID · uuid · required

The consignment ID

Example: 38756e85-d15c-45d9-84fd-1b3e50b73527
documentId
​string · uuid · required

Document ID

Get document › Headers

Accept-Version
​string · enum · required

All API end points require Accept-Version in the request header.

Failure to provide the header will return a status code of 400, however, an invalid version can return a 404, 406 or 400.

Enum values:
8
External-Meta-Key
​string

The External-Meta-Key header allows to specify the desired external meta key and only data associated with the specified key will be returned. If no key is specified or the key does not contain data, then externalMeta will not be returned.

Users with VIEW_ALL_EXTERNAL_META permission can specify * to return all available external meta. Data in externalMeta will be keyed by the external meta key.

Get document › Responses

Document found. Returns document.

​object · required
type
​string · enum · required
Enum values:
TRANSPORT_PROOF_OF_DELIVERY
id
​string · uuid · readOnly
status
​string · enum · readOnly
Enum values:
CREATED_PENDING
UPDATED_PENDING
ACTIVE
INACTIVE
ERROR
Default: CREATED_PENDING
​object
name
​string · enum
Enum values:
Delivery
Load
Pickup
description
​string | null
​DocumentDetails | null

Attachment list for this document, or null when none is present.

​AuditInfo · readOnly

Update document

PUT
https://api.cartoncloud.com
/tenants/{tenantId}/consignments/{consignmentId}/documents/{documentId}
required permission: EDIT_DOCUMENT

Update a document attached to a consignment

Update document › path Parameters

tenantId
​string · uuid · required

Tenant ID. Can be found in organisation settings

consignmentId
​UUID · uuid · required

The consignment ID

Example: 38756e85-d15c-45d9-84fd-1b3e50b73527
documentId
​string · uuid · required

Document ID

Update document › Headers

Accept-Version
​string · enum · required

All API end points require Accept-Version in the request header.

Failure to provide the header will return a status code of 400, however, an invalid version can return a 404, 406 or 400.

Enum values:
8
If-Match
​string

The If-Match header is used for optimistic concurrency control. It should contain the ETag value of the resource being updated. If the ETag doesn't match the current resource state, the request will be rejected.

Update document › Request Body

​object
name
​string · enum
Enum values:
Delivery
Load
Pickup
description
​string | null
​DocumentRequestDetails | null

Send an object with attachments to request presigned upload URLs, or null if there are no files.

type
​string · enum
Enum values:
TRANSPORT_PROOF_OF_DELIVERY

Update document › Responses

Document updated

​object · required
type
​string · enum · required
Enum values:
TRANSPORT_PROOF_OF_DELIVERY
id
​string · uuid · readOnly
status
​string · enum · readOnly
Enum values:
CREATED_PENDING
UPDATED_PENDING
ACTIVE
INACTIVE
ERROR
Default: CREATED_PENDING
​object
name
​string · enum
Enum values:
Delivery
Load
Pickup
description
​string | null
​DocumentDetails | null

Attachment list for this document, or null when none is present.

​AuditInfo · readOnly

Delete document

DELETE
https://api.cartoncloud.com
/tenants/{tenantId}/consignments/{consignmentId}/documents/{documentId}
required permission: EDIT_DOCUMENT

Delete a document attached to a consignment

Delete document › path Parameters

tenantId
​string · uuid · required

Tenant ID. Can be found in organisation settings

consignmentId
​UUID · uuid · required

The consignment ID

Example: 38756e85-d15c-45d9-84fd-1b3e50b73527
documentId
​string · uuid · required

Document ID

Delete document › Headers

Accept-Version
​string · enum · required

All API end points require Accept-Version in the request header.

Failure to provide the header will return a status code of 400, however, an invalid version can return a 404, 406 or 400.

Enum values:
8

Delete document › Responses

Document deleted

No data returned

Get consignment document history

GET
https://api.cartoncloud.com
/tenants/{tenantId}/consignments/{consignmentId}/documents/{documentId}/history
required permission: VIEW_DOCUMENT

Returns the audit history for a consignment document.

Get consignment document history › path Parameters

tenantId
​string · uuid · required

Tenant ID. Can be found in organisation settings

consignmentId
​UUID · uuid · required
documentId
​string · uuid · required

Document ID

Get consignment document history › Headers

Accept-Version
​string · enum · required

All API end points require Accept-Version in the request header.

Failure to provide the header will return a status code of 400, however, an invalid version can return a 404, 406 or 400.

Enum values:
8

Get consignment document history › Responses

Success

​AuditEvent[]
Audit trail entry for a document or entity.
id
​UUID · uuid
eventTime
​string · date-time

Time the event occurred.

​UserReference

Identifies a user by id and display name.

action
​string

Action that caused the change.

entityType
​string

Entity type the event relates to.

entityId
​UUID · uuid
​object

Snapshot of entity data at the time of the event.

​object

Additional context about the change.


Restore document

POST
https://api.cartoncloud.com
/tenants/{tenantId}/consignments/{consignmentId}/documents/{documentId}/restore
required permission: EDIT_DOCUMENT

Restore a trashed document attached to a consignment. Sets document status to either 'ACTIVE' or 'UPDATED_PENDING' depending on the state of its associated attachments.

Restore document › path Parameters

tenantId
​string · uuid · required

Tenant ID. Can be found in organisation settings

consignmentId
​UUID · uuid · required

The consignment ID

Example: 38756e85-d15c-45d9-84fd-1b3e50b73527
documentId
​string · uuid · required

Document ID

Restore document › Headers

Accept-Version
​string · enum · required

All API end points require Accept-Version in the request header.

Failure to provide the header will return a status code of 400, however, an invalid version can return a 404, 406 or 400.

Enum values:
8
If-Match
​string

The If-Match header is used for optimistic concurrency control. It should contain the ETag value of the resource being updated. If the ETag doesn't match the current resource state, the request will be rejected.

Restore document › Responses

Document restored. Returns updated document.

​object · required
type
​string · enum · required
Enum values:
TRANSPORT_PROOF_OF_DELIVERY
id
​string · uuid · readOnly
status
​string · enum · readOnly
Enum values:
CREATED_PENDING
UPDATED_PENDING
ACTIVE
INACTIVE
ERROR
Default: CREATED_PENDING
​object
name
​string · enum
Enum values:
Delivery
Load
Pickup
description
​string | null
​DocumentDetails | null

Attachment list for this document, or null when none is present.

​AuditInfo · readOnly

Trash document

POST
https://api.cartoncloud.com
/tenants/{tenantId}/consignments/{consignmentId}/documents/{documentId}/trash
required permission: EDIT_DOCUMENT

Trash a document attached to a consignment. Sets document status to 'INACTIVE'.

Trash document › path Parameters

tenantId
​string · uuid · required

Tenant ID. Can be found in organisation settings

consignmentId
​UUID · uuid · required

The consignment ID

Example: 38756e85-d15c-45d9-84fd-1b3e50b73527
documentId
​string · uuid · required

Document ID

Trash document › Headers

Accept-Version
​string · enum · required

All API end points require Accept-Version in the request header.

Failure to provide the header will return a status code of 400, however, an invalid version can return a 404, 406 or 400.

Enum values:
8
If-Match
​string

The If-Match header is used for optimistic concurrency control. It should contain the ETag value of the resource being updated. If the ETag doesn't match the current resource state, the request will be rejected.

Trash document › Responses

Document trashed. Returns updated document.

​object · required
type
​string · enum · required
Enum values:
TRANSPORT_PROOF_OF_DELIVERY
id
​string · uuid · readOnly
status
​string · enum · readOnly
Enum values:
CREATED_PENDING
UPDATED_PENDING
ACTIVE
INACTIVE
ERROR
Default: CREATED_PENDING
​object
name
​string · enum
Enum values:
Delivery
Load
Pickup
description
​string | null
​DocumentDetails | null

Attachment list for this document, or null when none is present.

​AuditInfo · readOnly