Get customs docs and invoices
Retrieve CN22, CN23 customs docs and commercial invoices for international packages. Documents are auto-generated post-allocation with the Customs Docs endpoint.
Overview
This page explains the various ways in which the Consignments platform can return customs documents and commercial invoices.
When shipping internationally, Consignments will automatically determine if customs documentation is required for a consignment. The Consignments platform can automatically generate CN22, CN23, or Commercial Invoice documents in PDF format and will determine which document is appropriate for any allocated consignment. The Customs Docs APIs enable you to retrieve the pre-generated documents.
Following the UK’s departure from the EU, certain additional consignment properties must be passed in order to generate customs documentation for UK-originating international consignments. In addition, certain carriers have their own data requirements that UK-originating international consignments must meet in order to be considered for allocation to that carrier. For an explanation of Brexit-related data requirements, see the Brexit Data Guide page.
- Get Commercial Invoice - returns a consignment’s commercial invoice.
- Get Customs Document - returns a CN22 or CN23 document for a particular package.
- Get Customs Documents - returns all customs documents for a particular consignment.
Get commercial invoices
To call Get Commercial Invoice, send a GET
request to https://api.electioapp.com/consignments/docs/commercialinvoice/{consignmentReference}
. The commercial invoice is returned for the relevant consignment as a base-64 encoded byte array.
For full reference information on the Get Commercial Invoice endpoint, see the API reference.
Get an individual customs document
To call Get Customs Document, send a GET
request to https://api.electioapp.com/consignments/docs/{customsDocumentType}/{consignmentReference}/{packageReference}
. The {customsDocumentType}
can return either CN22 or CN23 documents.
The Consignments platform returns the relevant document as a base-64 encoded byte array.
For full reference information on the Get Customs Document endpoint, see the API reference.