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.

The Customs Docs API has three endpoints:

  • 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.

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.