Skip to main content
GET
/
parcel-documents
/
{type}
Retrieve multiple parcel documents
curl --request GET \
  --url https://panel.sendcloud.sc/api/v3/parcel-documents/{type} \
  --header 'Authorization: Basic <encoded-value>'
import requests

url = "https://panel.sendcloud.sc/api/v3/parcel-documents/{type}"

headers = {"Authorization": "Basic <encoded-value>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};

fetch('https://panel.sendcloud.sc/api/v3/parcel-documents/{type}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://panel.sendcloud.sc/api/v3/parcel-documents/{type}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://panel.sendcloud.sc/api/v3/parcel-documents/{type}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Basic <encoded-value>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://panel.sendcloud.sc/api/v3/parcel-documents/{type}")
.header("Authorization", "Basic <encoded-value>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://panel.sendcloud.sc/api/v3/parcel-documents/{type}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'

response = http.request(request)
puts response.read_body
"<string>"
{
"errors": [
{
"code": "invalid",
"status": "400",
"detail": "Invalid document type."
}
]
}
{
"errors": [
{
"code": "not_found",
"status": "404",
"detail": "No Parcel matches the given query."
}
]
}
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 bulk. 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.
proof-of-delivery is not available on this bulk endpoint. Unlike the other document types, which are generated and stored by Sendcloud, proof of delivery is fetched with a live call to the carrier for each individual parcel, so it cannot be retrieved in bulk. Use Retrieve a parcel document to request proof of delivery for a single parcel.

Authorizations

Authorization
string
header
required

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

Path Parameters

type
enum<string>
required

Document type you want to retrieve.

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

"customs-declaration"

Query Parameters

parcels
integer[]
required

Parcels for which you want to retrieve the documents

Required array length: 1 - 20 elements
Example:
[1, 2, 3]
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 files of a specific type.

The response is of type file.