Skip to main content
GET
/
parcels
/
{id}
/
documents
/
{type}
Retrieve a parcel document
curl --request GET \
  --url https://panel.sendcloud.sc/api/v3/parcels/{id}/documents/{type} \
  --header 'Authorization: Basic <encoded-value>'
"<string>"
Sendcloud generates the correct type of document for your shipment when you Create a parcel, provided that 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. This endpoint supports the following document types:
  • label
  • customs-declaration
  • air-waybill
For international shipments, customs declaration must be attached (either physically or digitally for some carriers) to the shipment for customs officials to access.

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.

Note: If a label is requested as native ZPL from the carrier it can't be converted to another format and will always be returned in ZPL.

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.

Available options:
label,
customs-declaration,
air-waybill
Example:

"customs-declaration"

Query Parameters

dpi
enum<integer>
default:72

DPI, or dots per inch, refers to the printing resolution of your shipping labels. Labels must be printed at a high enough resolution to ensure the clarity of address details and the barcode for scanning purposes.

Use the following table to find the appropriate DPI for each file format:

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

paper_size
enum<string>

The paper size of the document you would like to retrieve. Paper size can be one of:

  • A4
  • A5
  • A6

Omitting this query parameter leads to the internal paper size of the document being used. Generally this is A6 for labels and A4 for larger documents, like customs documents.

Available options:
A4,
A5,
A6
Example:

"A4"

Response

Requested parcel document file

The response is of type file.