Skip to main content

API specfication for QuayConnect (0.6.0)

Download OpenAPI specification:Download

License: Proprietary

This API specification describes the functionalities for creating EU export and UK import customs declarations. The main data structure in QuayConnect is a consignment which is the equivalent of a single sales order or invoice. Multiple consignment can be linked together through a voyageReference, which can be useful if multiple orders are shipped in a single container or trailer. In that case a transport order number, container number or trailer licence plate can be provided in the voyageNumber field to link multiple shipments together.

Webhook callback to receive updates on the shipment's service statusses. Webhook

This endpoint should exist in your application, so QuayConnect can call it whenever an update on a service comes in.

The endpoint should be authenticated through http basic auth. You can select a user and password combination for QuayConnect to use to access your server.

To configure the webhook in QuayConnect, contact a developer at QuayConnect so they can enable webhook updates. Provide the URL, username and password.

Authorizations:
BasicAuth
Request Body schema: application/json

Status update on the services

shipmentId
string

Unique identifier of the shipment.

finalized
boolean

If true, it means that we have submitted this shipment towards the enabled services. Otherwise the shipment needs to be finalized by calling the POST /shipments/:shipmentId/finalize endpoint.

object (ServicesStatusResponse)

Contains status object for each of the enabled services for this shipment.

Request samples

Content type
application/json
{
  • "shipmentId": "string",
  • "finalized": true,
  • "services": {
    }
}

Create a new shipment.

This will automatically trigger the services that are configured for this organisation. The service configuration is a one-time setup that happens in the QuayConnect web appplication.

Authorizations:
ApiKey
Request Body schema: application/json

QuayConnect native data format.

autoFinalize
boolean

If false, this means that the shipment is not automatically submitted after creation. If using these options, the shipment needs to be finalized by calling the POST /shipments/:shipmentId/finalize endpoint.

onBehalf
string

Submit the shipment onbehalf of another organisation.

required
Array of objects (ServicesRequest)

Select which service should be enabled for this shipment. Each organisation has a default set of services enabled for shipments, which has been agreed upon during onboarding. You can use this array to enforce the use of a certain service.

If a service is selected that is not configured for your organisation, an error will be provided.

required
object (ShipmentData)

Payload describing the shipment. This exact data requirements depend on the services which are enabled for this shipment.

Responses

Request samples

Content type
application/json
{
  • "autoFinalize": true,
  • "onBehalf": "string",
  • "services": [
    ],
  • "payload": {
    }
}

Response samples

Content type
application/json
{
  • "shipmentId": "string",
  • "complete": true
}

Upload supporting documents to a given shipment.

Some documents are required by the customs agent to process the. This endpoint allows to attach those documents to a previously created shipment.

Authorizations:
ApiKey
path Parameters
shipmentId
required
string

Unique id of the shipment

Request Body schema: application/json

document data

dataBase64
required
string

Base64 encoded data of the document.

filename
required
string

Name of the file.

documentIdentifier
required
string

Unique identifier of the document (e.g. invoice number).

documentType
required
string
Enum: "phyto" "invoice" "health" "inspection" "conformity" "cmr" "bl" "cw" "t1"

Type of the supporting document.

mimeType
required
string

MIME type of the given document.

Responses

Request samples

Content type
application/json
{
  • "dataBase64": "string",
  • "filename": "string",
  • "documentIdentifier": "string",
  • "documentType": "phyto",
  • "mimeType": "application/pdf"
}

Response samples

Content type
application/json
{
  • "documentId": "string",
  • "complete": true
}

Retrieve the status of a given shipment.

Authorizations:
ApiKey
path Parameters
shipmentId
required
string

Unique id of the shipment

Responses

Response samples

Content type
application/json
{
  • "shipmentId": "string",
  • "finalized": true,
  • "services": {
    }
}

Update the exisiting shipment

Some shipments have validation issues which prevents them from being finalized. This endpoint allows to update such shipment.

Authorizations:
ApiKey
path Parameters
shipmentId
required
string

Unique id of the shipment

Request Body schema: application/json

QuayConnect native data format.

autoFinalize
boolean

If false, this means that the shipment is not automatically submitted after creation. If using these options, the shipment needs to be finalized by calling the POST /shipments/:shipmentId/finalize endpoint.

onBehalf
string

Submit the shipment onbehalf of another organisation.

required
Array of objects (ServicesRequest)

Select which service should be enabled for this shipment. Each organisation has a default set of services enabled for shipments, which has been agreed upon during onboarding. You can use this array to enforce the use of a certain service.

If a service is selected that is not configured for your organisation, an error will be provided.

required
object (ShipmentData)

Payload describing the shipment. This exact data requirements depend on the services which are enabled for this shipment.

Responses

Request samples

Content type
application/json
{
  • "autoFinalize": true,
  • "onBehalf": "string",
  • "services": [
    ],
  • "payload": {
    }
}

Response samples

Content type
application/json
{
  • "shipmentId": "string",
  • "complete": true
}

Finalize the exisiting shipment

Some shipments don't get finalized automatically because they're missing important information or were set up to be finalized manually during the creation.

Authorizations:
ApiKey
path Parameters
shipmentId
required
string

Unique id of the shipment

Responses

Response samples

Content type
application/json
{
  • "shipmentId": "string",
  • "complete": true
}

Retrieve a page of contacts of the organisation sorted by the creation date

Authorizations:
ApiKey
query Parameters
customerOrg
string

Domain of the organisation, if not specified the default value will be the domain of authenticating organisation

pageSize
integer >= 1
Default: 25

Number of items per page

page
integer >= 1
Default: 1

Page number

Responses

Response samples

Content type
application/json
{
  • "products": [
    ]
}

Retrieve a page of products of the organisation sorted by the creation date

Authorizations:
ApiKey
query Parameters
customerOrg
string

Domain of the organisation, if not specified the default value will be the domain of authenticating organisation

pageSize
integer >= 1
Default: 25

Number of items per page

page
integer >= 1
Default: 1

Page number

Responses

Response samples

Content type
application/json
{
  • "products": [
    ]
}

Simulate update of a dossier's service state.

Simulate an update of a dossier service. You can test success and failure statuses of each available service.

This endpoint is only available on the test environment.

Authorizations:
ApiKey
path Parameters
shipmentId
required
string

Unique id of the shipment.

Request Body schema: application/json

Update data.

Any of
serviceType
required
string
Enum: "uk-import-declaration" "nl-export-declaration"
updateType
required
string
Value: "success"
required
object

Responses

Request samples

Content type
application/json
{
  • "serviceType": "uk-import-declaration",
  • "updateType": "failure",
  • "errors": [
    ]
}

Response samples

Content type
application/json
"string"