v1

latestOpenAPI 3.0.12026-07-242073551.1 MB
Shipments

Print Document

Request the associated Customs Documents for the printed label.

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

Path parameters

carrierCodestring required

Carrier Code

shipmentIdstring required

Shipment Id <br />The Shipment Id may be an id or a tracking/barcode number.

Request body

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

Document Type <br />Defaults to CN23 <br /> <br />CN23 CN23 <br />PI Proforma Invoice <br />CI Commercial Invoice

NumberOfCopiesinteger

Number of Copies

EoriNumberstring nullable

EORI Number <br />Shipper/Receiver's EORI number starts with the ISO Alpha-2 Country Code followed by a maximum 15 alphanumeric characters. For Northern Ireland starts with XI <br />Overrides the shipper's EORI number on the shipment if provided. <br />If both an EORI and VAT number exist, then only the EORI Number is printed on the CN23.

VatNumberstring nullable

VAT Number <br />Overrides the shipper's VAT number on the shipment if provided.

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. If the carrier is associated with the Universal Postal Union (UPU), then the allowed reasons for export are the following:<br /><br />• Gift<br />• Commercial Sample<br />• Documents<br />• Sale of Goods<br />• Ecommerce Sale of Goods<br />• Commercial Sale of Goods<br />• Return of Goods<br />• Mixed Content<br />• Other<br /><br />Note: Before populating this field, keep in mind the following:<br /><br />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.<br /><br />If this information is provided, it overrides the shipment's reason for export.

Namestring nullable

Shipper's Name <br />Override the shipment's shipper's company/contact name if provided.

Positionstring nullable

Position <br />The shipper's job title in the sender's company. <br />Note: The field can only be used with the proforma and commercial invoice. It will be ignored for CN23s.

SignatureImagestring nullable

Signature Image <br />Base 64 encoded PNG or JPEG. Maximum image size supported is 240 x 34 pixels. <br />Note: The field can only be used with the proforma and commercial invoice. It will be ignored for CN23s.

CompanyStampImagestring nullable

Company Stamp Image <br />Base 64 encoded PNG or JPEG. Maximum image size supported is 600 x 66 pixels. <br />Note: The field can only be used with the proforma and commercial invoice. It will be ignored for 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

Document <br />Base 64 encoded PDF

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

Document Type <br />Defaults to CN23 <br /> <br />CN23 CN23 <br />PI Proforma Invoice <br />CI Commercial Invoice

Example response

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