Skip to main content
GET
/
parcels
/
{id}
/
documents
/
{type}
Retrieve parcel documents
curl --request GET \
  --url https://panel.sendcloud.sc/api/v2/parcels/{id}/documents/{type} \
  --header 'Authorization: Basic <encoded-value>'
"<string>"
For international shipments, a commercial invoice, CN23 or CN22 (+CP71) form must be attached (either physically or digitally for some carriers) to the shipment for customs officials to access. The type of document required depends on the shipping method and value of the shipment. When you use the Create a parcel or parcels endpoint, Sendcloud generates the correct type of document for your shipment if you have filled in all the information related to the parcel contents, value, and invoice. Use this endpoint to retrieve these documents in your preferred format. The supported document types are as follows:
  • air-waybill
  • cn23
  • cn23-default
  • commercial-invoice
  • cp71
  • label
  • qr

Authorizations

Authorization
string
header
required

Basic Authentication using API key and secrets is currently the main authentication mechanism.

Headers

Accept
enum<string>
default:application/pdf

The returned format of the document

Available options:
application/pdf,
application/zpl,
image/png
Example:

"image/png"

Path Parameters

id
integer
required

Identifier of the parcel which you want to retrieve a document from

Required range: x >= 1
Example:

1

type
enum<string>
required

Document type you want to retrieve for this parcel

Available options:
air-waybill,
cn23,
cn23-default,
commercial-invoice,
cp71,
label,
qr
Example:

"commercial-invoice"

Query Parameters

dpi
enum<integer>
default:72

DPI refers to the printing resolution of your shipping labels. It's important that labels are printed at a high enough resolution to ensure the clarity of address details and the barcode for scanning purposes. Use following amounts for appropriate result:

File formatDefault DPIValid DPI
pdf7272
png300150, 300
ZPL labels are not affected by the DPI setting, as the resolution is determined by the carrier itself. Most carriers use a resolution of 203 DPI. Zebra printers need to be configured to print at the specific DPI of the label if they have higher resolution capabilities.
Available options:
72,
150,
203,
300,
600
Required range: x >= 1
Example:

300

raw
boolean

There have been identified cases where custom documents, internally rendered, will only include some of the necessary information, mainly due to some restrictions. Using the raw query param, one can request to receive the document in the originally received format by the carrier. This temporary solution to the problem allows the normal operations of the affected customers. As such, you can expect this property to be sunsetted shortly once the necessary changes have been implemented.

Response

Requested parcel document file

The response is of type file.