API docs Endpoints
Get the shipping documents (labels)
Receive the shipping documentation in a base64 string.
https://services.parcelparcel.com/partners-api/v1/shipments/{shipmentId}/labelsExample request
Get the labels of shipment 1588448
curl --request GET 'https://services.parcelparcel.com/partners-api/v1/shipments/1588448/labels' \
--header 'X-PP-API: {YourAPIKey}@{YourAPISecret}' \
--header 'Content-Type: application/json'const response = await fetch("https://services.parcelparcel.com/partners-api/v1/shipments/1588448/labels", {
method: "GET",
headers: {
"X-PP-API": "{YourAPIKey}@{YourAPISecret}",
"Content-Type": "application/json",
},
});
const data = await response.json();
console.log(data);import requests
response = requests.get(
"https://services.parcelparcel.com/partners-api/v1/shipments/1588448/labels",
headers={
"X-PP-API": "{YourAPIKey}@{YourAPISecret}",
"Content-Type": "application/json",
},
)
print(response.json())Tip: copy the cURL and paste it in Postman under Import, or straight into the URL bar of a new request. Postman fills in the method, headers and body for you. Replace {YourAPIKey}@{YourAPISecret} with your own API key and secret (use your sandbox key while testing), or import the whole Postman Collection.
This endpoint allows you to get the labels from your shipments.
Header
You need to add the following headers:
| Name | Value |
|---|---|
Content-Type | application/json |
X-PP-API | {YourAPIKey}@{YourAPISecret} |
Don't you have an API Key and API Secret yet? Check our Authentication page and how to get them in under a minute.
Body
There is no body needed; you just put the shipmentId in the URL, and you're done. You can retrieve this shipmentId after you've created a shipment through our create shipment endpoint.
For example:
Response
The following response elements are returned:
| Name | Value | Comments |
|---|---|---|
labels | base64 | The complete shipping documentation of your shipment in base64. |
Example Response
{
"data": {
"labels": "=== base64 encoded label ==="
}
}Examples
Don't know how to test these requests? Check our guide.
Request example - Get the labels of shipment 1588448
curl --location --request GET 'https://services.parcelparcel.com/partners-api/v1/shipments/1588448/labels' \
--header 'X-PP-API: {YourAPIKey}@{YourAPISecret}' \
--header 'Content-Type: application/json'GET /partners-api/v1/shipments/1588448/labels HTTP/1.1
Host: services.parcelparcel.com
X-PP-API: {YourAPIKey}@{YourAPISecret}
Content-Type: application/jsonReplace 1588448 with the id of your own shipment, and don't forget to change the X-PP-API element in the header.