API specfication for QuayConnect (0.6.0)
Download OpenAPI specification:Download
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:
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 |
object (ServicesStatusResponse) Contains status object for each of the enabled services for this shipment. |
Request samples
- Payload
{- "shipmentId": "string",
- "finalized": true,
- "services": {
- "nl-export-declaration": {
- "status": "success",
- "documentType": "EU",
- "mrn": "string",
- "declaration": "string",
- "errors": [
- {
- "conflict": {
- "value": {
- "code": "conflict",
- "path": [
- "payload",
- "shipmentReference"
], - "message": "Shipment with reference TEST already exists"
}
}
}
]
}, - "uk-import-declaration": {
- "status": "init",
- "mrn": "string",
- "declaration": "string",
- "errors": [
- {
- "conflict": {
- "value": {
- "code": "conflict",
- "path": [
- "payload",
- "shipmentReference"
], - "message": "Shipment with reference TEST already exists"
}
}
}
]
}, - "nl-import-declaration": {
- "status": "init",
- "mrn": "string",
- "declaration": "string",
- "errors": [
- {
- "conflict": {
- "value": {
- "code": "conflict",
- "path": [
- "payload",
- "shipmentReference"
], - "message": "Shipment with reference TEST already exists"
}
}
}
]
}
}
}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:
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 |
| 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
- Payload
{- "autoFinalize": true,
- "onBehalf": "string",
- "services": [
- {
- "serviceType": "nl-export-declaration",
- "gvms": true
}
], - "payload": {
- "shipmentReference": 512238,
- "voyageReference": 12346798,
- "shipmentType": "LCL",
- "voyage": {
- "voyageType": "roro",
- "placeOfLoading": {
- "code": "3011BP 100"
}, - "portOfLoading": {
- "unLocode": "NLRTM"
}, - "portOfDischarge": {
- "unLocode": "NLRTM"
}, - "placeOfDelivery": {
- "code": "3011BP 100"
}, - "trailer": {
- "identity": "12-ABC-3",
- "nationality": "NL"
}, - "truck": {
- "identity": "12-ABC-3",
- "nationality": "NL"
}, - "wagon": {
- "identity": "12-ABC-3",
- "nationality": "NL"
}, - "aircraft": {
- "identity": "12-ABC-3",
- "nationality": "NL"
}, - "flight": {
- "identity": "12-ABC-3",
- "nationality": "NL"
}, - "vessel": {
- "identity": "12-ABC-3",
- "nationality": "NL"
}, - "carrier": {
- "scac": "string",
- "name": "string"
}, - "transitCustomsOffices": "[NL000396]",
- "destinationCustomsOffice": "NL000396",
- "exitCustomsOffice": "NL000396",
- "containers": [
- {
- "containerNumber": "string",
- "seals": [
- "string"
]
}
], - "eta": 0
}, - "invoice": {
- "type": "commercial",
- "invoiceReference": 12346789,
- "invoiceDate": 0,
- "incoterms": "DDP",
- "incotermsLocation": "GBLON",
- "incotermsCountry": "GB",
- "invoiceValue": {
- "amount": 1000,
- "currency": "EUR"
}, - "airTransportCost": {
- "amount": 1000,
- "currency": "EUR"
}, - "freightCost": {
- "amount": 1000,
- "currency": "EUR"
}, - "insuranceCost": {
- "amount": 1000,
- "currency": "EUR"
}
}, - "parties": {
- "haulier": {
- "code": "string",
- "details": {
- "legalName": "Truckershop X Gmbh",
- "eori": "DE01234678912",
- "vat": "84124738AB",
- "address": {
- "street": "string",
- "houseNumber": "string",
- "houseNumberAddition": "string",
- "postalCode": "string",
- "city": "string",
- "country": "string"
}
}
}, - "consignor": {
- "code": "string",
- "details": {
- "legalName": "Truckershop X Gmbh",
- "eori": "DE01234678912",
- "vat": "84124738AB",
- "address": {
- "street": "string",
- "houseNumber": "string",
- "houseNumberAddition": "string",
- "postalCode": "string",
- "city": "string",
- "country": "string"
}
}
}, - "consignee": {
- "code": "string",
- "details": {
- "legalName": "Truckershop X Gmbh",
- "eori": "DE01234678912",
- "vat": "84124738AB",
- "address": {
- "street": "string",
- "houseNumber": "string",
- "houseNumberAddition": "string",
- "postalCode": "string",
- "city": "string",
- "country": "string"
}
}
}, - "seller": {
- "code": "string",
- "details": {
- "legalName": "Truckershop X Gmbh",
- "eori": "DE01234678912",
- "vat": "84124738AB",
- "address": {
- "street": "string",
- "houseNumber": "string",
- "houseNumberAddition": "string",
- "postalCode": "string",
- "city": "string",
- "country": "string"
}
}
}, - "buyer": {
- "code": "string",
- "details": {
- "legalName": "Truckershop X Gmbh",
- "eori": "DE01234678912",
- "vat": "84124738AB",
- "address": {
- "street": "string",
- "houseNumber": "string",
- "houseNumberAddition": "string",
- "postalCode": "string",
- "city": "string",
- "country": "string"
}
}
}
}, - "documents": [
- {
- "number": "KCB/2023/123456",
- "issueDate": "21-03-2023"
}
], - "goods": [
- {
- "productCode": "string",
- "description": "Cucumbers",
- "commodityCode": 707000599,
- "countryOfOrigin": "NL",
- "grossWeight": 1000,
- "netWeight": 900,
- "value": 900,
- "valuationMethod": "UnitPrice",
- "supplementaryUnits": 100,
- "supplementaryUnitsType": "liters",
- "packagingQuantity": 100,
- "packagingQuantityUnit": "PK",
- "packagingMarks": "string",
- "additionalPackaging": [
- {
- "quantity": 500,
- "quantityUnit": "PK",
- "marks": null
}
], - "eppoCode": "CUMSA",
- "species": "Cucumis sativus",
- "class": "Class I",
- "variety": "Plum",
- "previousDocumentLineNumber": 23,
- "documents": {
- "conformity": {
- "number": "KCB/2023/123456",
- "issueDate": "21-03-2023"
}, - "phyto": {
- "number": "KCB/2023/123456",
- "issueDate": "21-03-2023"
}, - "inspection": {
- "number": "KCB/2023/123456",
- "issueDate": "21-03-2023"
}, - "t1": {
- "number": "KCB/2023/123456",
- "issueDate": "21-03-2023"
}, - "cw": {
- "number": "KCB/2023/123456",
- "issueDate": "21-03-2023"
}, - "bl": {
- "number": "KCB/2023/123456",
- "issueDate": "21-03-2023"
}, - "origin": {
- "number": "KCB/2023/123456",
- "issueDate": "21-03-2023"
}
}, - "container": "string"
}
]
}
}Response samples
- 201
- 400
- 401
- 409
- 413
- 500
{- "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:
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
- Payload
{- "dataBase64": "string",
- "filename": "string",
- "documentIdentifier": "string",
- "documentType": "phyto",
- "mimeType": "application/pdf"
}Response samples
- 200
- 400
- 401
- 404
- 413
- 500
{- "documentId": "string",
- "complete": true
}Retrieve the status of a given shipment.
Authorizations:
path Parameters
| shipmentId required | string Unique id of the shipment |
Responses
Response samples
- 200
- 404
- 500
{- "shipmentId": "string",
- "finalized": true,
- "services": {
- "nl-export-declaration": {
- "status": "success",
- "documentType": "EU",
- "mrn": "string",
- "declaration": "string",
- "errors": [
- {
- "conflict": {
- "value": {
- "code": "conflict",
- "path": [
- "payload",
- "shipmentReference"
], - "message": "Shipment with reference TEST already exists"
}
}
}
]
}, - "uk-import-declaration": {
- "status": "init",
- "mrn": "string",
- "declaration": "string",
- "errors": [
- {
- "conflict": {
- "value": {
- "code": "conflict",
- "path": [
- "payload",
- "shipmentReference"
], - "message": "Shipment with reference TEST already exists"
}
}
}
]
}, - "nl-import-declaration": {
- "status": "init",
- "mrn": "string",
- "declaration": "string",
- "errors": [
- {
- "conflict": {
- "value": {
- "code": "conflict",
- "path": [
- "payload",
- "shipmentReference"
], - "message": "Shipment with reference TEST already exists"
}
}
}
]
}
}
}Update the exisiting shipment
Some shipments have validation issues which prevents them from being finalized. This endpoint allows to update such shipment.
Authorizations:
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 |
| 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
- Payload
{- "autoFinalize": true,
- "onBehalf": "string",
- "services": [
- {
- "serviceType": "nl-export-declaration",
- "gvms": true
}
], - "payload": {
- "shipmentReference": 512238,
- "voyageReference": 12346798,
- "shipmentType": "LCL",
- "voyage": {
- "voyageType": "roro",
- "placeOfLoading": {
- "code": "3011BP 100"
}, - "portOfLoading": {
- "unLocode": "NLRTM"
}, - "portOfDischarge": {
- "unLocode": "NLRTM"
}, - "placeOfDelivery": {
- "code": "3011BP 100"
}, - "trailer": {
- "identity": "12-ABC-3",
- "nationality": "NL"
}, - "truck": {
- "identity": "12-ABC-3",
- "nationality": "NL"
}, - "wagon": {
- "identity": "12-ABC-3",
- "nationality": "NL"
}, - "aircraft": {
- "identity": "12-ABC-3",
- "nationality": "NL"
}, - "flight": {
- "identity": "12-ABC-3",
- "nationality": "NL"
}, - "vessel": {
- "identity": "12-ABC-3",
- "nationality": "NL"
}, - "carrier": {
- "scac": "string",
- "name": "string"
}, - "transitCustomsOffices": "[NL000396]",
- "destinationCustomsOffice": "NL000396",
- "exitCustomsOffice": "NL000396",
- "containers": [
- {
- "containerNumber": "string",
- "seals": [
- "string"
]
}
], - "eta": 0
}, - "invoice": {
- "type": "commercial",
- "invoiceReference": 12346789,
- "invoiceDate": 0,
- "incoterms": "DDP",
- "incotermsLocation": "GBLON",
- "incotermsCountry": "GB",
- "invoiceValue": {
- "amount": 1000,
- "currency": "EUR"
}, - "airTransportCost": {
- "amount": 1000,
- "currency": "EUR"
}, - "freightCost": {
- "amount": 1000,
- "currency": "EUR"
}, - "insuranceCost": {
- "amount": 1000,
- "currency": "EUR"
}
}, - "parties": {
- "haulier": {
- "code": "string",
- "details": {
- "legalName": "Truckershop X Gmbh",
- "eori": "DE01234678912",
- "vat": "84124738AB",
- "address": {
- "street": "string",
- "houseNumber": "string",
- "houseNumberAddition": "string",
- "postalCode": "string",
- "city": "string",
- "country": "string"
}
}
}, - "consignor": {
- "code": "string",
- "details": {
- "legalName": "Truckershop X Gmbh",
- "eori": "DE01234678912",
- "vat": "84124738AB",
- "address": {
- "street": "string",
- "houseNumber": "string",
- "houseNumberAddition": "string",
- "postalCode": "string",
- "city": "string",
- "country": "string"
}
}
}, - "consignee": {
- "code": "string",
- "details": {
- "legalName": "Truckershop X Gmbh",
- "eori": "DE01234678912",
- "vat": "84124738AB",
- "address": {
- "street": "string",
- "houseNumber": "string",
- "houseNumberAddition": "string",
- "postalCode": "string",
- "city": "string",
- "country": "string"
}
}
}, - "seller": {
- "code": "string",
- "details": {
- "legalName": "Truckershop X Gmbh",
- "eori": "DE01234678912",
- "vat": "84124738AB",
- "address": {
- "street": "string",
- "houseNumber": "string",
- "houseNumberAddition": "string",
- "postalCode": "string",
- "city": "string",
- "country": "string"
}
}
}, - "buyer": {
- "code": "string",
- "details": {
- "legalName": "Truckershop X Gmbh",
- "eori": "DE01234678912",
- "vat": "84124738AB",
- "address": {
- "street": "string",
- "houseNumber": "string",
- "houseNumberAddition": "string",
- "postalCode": "string",
- "city": "string",
- "country": "string"
}
}
}
}, - "documents": [
- {
- "number": "KCB/2023/123456",
- "issueDate": "21-03-2023"
}
], - "goods": [
- {
- "productCode": "string",
- "description": "Cucumbers",
- "commodityCode": 707000599,
- "countryOfOrigin": "NL",
- "grossWeight": 1000,
- "netWeight": 900,
- "value": 900,
- "valuationMethod": "UnitPrice",
- "supplementaryUnits": 100,
- "supplementaryUnitsType": "liters",
- "packagingQuantity": 100,
- "packagingQuantityUnit": "PK",
- "packagingMarks": "string",
- "additionalPackaging": [
- {
- "quantity": 500,
- "quantityUnit": "PK",
- "marks": null
}
], - "eppoCode": "CUMSA",
- "species": "Cucumis sativus",
- "class": "Class I",
- "variety": "Plum",
- "previousDocumentLineNumber": 23,
- "documents": {
- "conformity": {
- "number": "KCB/2023/123456",
- "issueDate": "21-03-2023"
}, - "phyto": {
- "number": "KCB/2023/123456",
- "issueDate": "21-03-2023"
}, - "inspection": {
- "number": "KCB/2023/123456",
- "issueDate": "21-03-2023"
}, - "t1": {
- "number": "KCB/2023/123456",
- "issueDate": "21-03-2023"
}, - "cw": {
- "number": "KCB/2023/123456",
- "issueDate": "21-03-2023"
}, - "bl": {
- "number": "KCB/2023/123456",
- "issueDate": "21-03-2023"
}, - "origin": {
- "number": "KCB/2023/123456",
- "issueDate": "21-03-2023"
}
}, - "container": "string"
}
]
}
}Response samples
- 200
- 400
- 401
- 404
- 405
- 413
- 500
{- "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:
path Parameters
| shipmentId required | string Unique id of the shipment |
Responses
Response samples
- 200
- 400
- 401
- 404
- 500
{- "shipmentId": "string",
- "complete": true
}Retrieve a page of contacts of the organisation sorted by the creation date
Authorizations:
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
- 200
- 401
- 404
- 500
{- "products": [
- {
- "code": "string",
- "legalName": "string",
- "roles": [
- "string"
], - "address": {
- "street": "string",
- "houseNumber": "string",
- "houseNumberAddition": "string",
- "postalCode": "string",
- "city": "string",
- "country": "string"
}
}
]
}Retrieve a page of products of the organisation sorted by the creation date
Authorizations:
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
- 200
- 401
- 404
- 500
{- "products": [
- {
- "commodity": "string",
- "description": "string",
- "productCode": "string",
- "createdAt": 0
}
]
}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:
path Parameters
| shipmentId required | string Unique id of the shipment. |
Request Body schema: application/json
Update data.
| serviceType required | string Enum: "uk-import-declaration" "nl-export-declaration" |
| updateType required | string Value: "success" |
required | object |
Responses
Request samples
- Payload
{- "serviceType": "uk-import-declaration",
- "updateType": "failure",
- "errors": [
- {
- "message": "string"
}
]
}Response samples
- 200
- 404
- 500
"string"