Shipments

Print Document

Generate and print various shipping-related documents required for international shipping and customs clearance. With this endpoint, you can specify details of the document you wish to print, submit necessary information, and receive a formatted document in return, typically in the PDF format.

post/v4/shipments/printDocument/{carrierCode}/{shipmentId}

Path parameters

carrierCodestring required

A unique identifier for the carrier associated with the shipping account. This code is typically alphanumeric and helps in identifying the specific carrier linked to the shipping account.

shipmentIdstring required

A unique identifier for the specific shipment for which the document is being printed. This ID is used to reference and track specific shipments within the system. <br /> <br />Note: This ID can be a tracking/barcode number.

Request body

DocumentType'CN23' | 'PI' | 'CI'

Specifies the type of document being requested for printing. Common types include the following: <br /><ul><li> CN23: A customs declaration form used for packages sent outside of the EU. A CN23 is typically only used for postal shipments, not commercial shipments.</li><li> Proforma Invoice (PI): An estimated invoice provided prior to shipping, outlining the items, charges, and terms.</li><li> Commercial Invoice (CI): A formal document provided by the seller to the buyer detailing the items sold, their prices, and terms of sale.</li></ul> <br />Note: By default, this field is set to CN23.

NumberOfCopiesinteger

An integer indicating how many copies of the specified document should be printed. This allows users to request multiple copies for various purposes, such as retaining records or providing documentation to customs. <br /> <br />Note: By default, this value is set to 1.

EoriNumberstring nullable

The Economic Operators Registration and Identification (EORI) number assigned to businesses for trading in the EU. This number is necessary for customs clearance processes. <br /> <br />Shipper/Receiver's EORI number starts with the ISO Alpha-2 Country Code followed by a maximum of 15 alphanumeric characters. For Northern Ireland, it starts with XI, respectively. <br /> <br />Note: If this information is provided, it overrides the shipper's EORI number on the shipment. Additionally, if both VAT and EORI numbers are provided, then only the EORI number is printed on the CN23.

VatNumberstring nullable

The Value Added Tax (VAT) registration number of the business or individual, used for taxation purposes in international transactions. <br /> <br />Note: If this information is provided, it overrides the shipper's VAT number on the shipment.

ReasonForExportstring nullable

Identifies the purpose of the export, such as sale, gift, or return. This information is useful for customs processing to determine the appropriate tariffs and requirements. <br /> <br />If the carrier is associated with the Universal Postal Union (UPU), then the allowed reasons for export are the following: <br /><ul><li>Gift</li><li>Commercial Sample</li><li>Documents</li><li>Sale of Goods</li><li>Ecommerce Sale of Goods</li><li>Commercial Sale of Goods</li><li>Return of Goods</li><li>Mixed Content</li><li>Other</li></ul> <br />Note: Before populating this field, keep in mind the following: <br /> <br /><ul><li>If the Sale of Goods value is selected, the system automatically determines whether the shipment is Ecommerce (B2C or D2C) or Commercial (B2B) based on the value provided in the BusinessTransactionType field in the create shipment request.</li><li>If this information is provided, it overrides the shipment's reason for export.</li></ul>

Namestring nullable

The name of the individual (shipper) who is associated with the shipment. This personalises the documentation and can be important for official purposes. <br /> <br />Note: If this information is provided, it overrides the shipment's shipper's company/contact name.

Positionstring nullable

The job title or position of the individual (shipper) named on the document. This information can add legitimacy and context to the document, especially if it is to be presented to authorities. <br /> <br />Note: This field is only applicable for the proforma and commercial invoices. It is ignored for the CN23s.

SignatureImagestring nullable

An image of the individual's signature, in the Base64 encoded PDF or JPEG format. This provides a digital representation of the signature, required on the customs documents for authenticity. <br /> <br />Note: This field is only applicable for the proforma and commercial invoices. It is ignored for the CN23s.

CompanyStampImagestring nullable

An image of the company stamp, in the Base64 PDF or JPEG format. This stamp can be used to validate the document and provide a formal presentation of the company's authority. <br /> <br />Note: This field is only applicable for the proforma and commercial invoices. It is ignored for the CN23s.

Example request

{
  "EoriNumber": "GB23456789000",
  "VatNumber": "GB 123 4567 89",
  "ReasonForExport": "Gift",
  "Name": "Jane Brown",
  "Position": "Logistics Manager",
  "SignatureImage": "iVBORw0KGgoAAAANSUhEUgAA ... A4QAAAXcCAYAAAB6Q0CbAAAAAXNSR0IArs4",
  "CompanyStampImage": "iVBORw0KGgoAAAANSUhEUgAA ... A4QAAAXcCAYAAAB6Q0CbAAAAAXNSR0IArs4"
}

Response

Returns the specified document for the given shipment.

Documentstring required

The generated document returned as a Base64-encoded PDF, ready for downloading or printing. This represents the finalized version of the requested shipping document based on the provided parameters.

DocumentType'CN23' | 'PI' | 'CI' required

Specifies the type of document requested for printing. Common types include the following: <br /><ul><li> CN23: A customs declaration form used for packages sent outside of the EU.</li><li> Proforma Invoice (PI): An estimated invoice provided prior to shipping, outlining the items, charges, and terms.</li><li> Commercial Invoice (CI): A formal document provided by the seller to the buyer detailing the items sold, their prices, and terms of sale.</li></ul> <br />Note: By default, this field is set to CN23.

Example response

{
  "Document": "iVBORw0KGgoAAAANSUhEUgAA ... A4QAAAXcCAYAAAB6Q0CbAAAAAXNSR0IArs4"
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.