Parcel labels
Each booked delivery has a printable label. Hubs sort parcels by it, so print it and stick it on the parcel before the rider comes.
Download a label
GET /deliveries/{id}/label returns a PDF in A6 size, not JSON. It shows the tracking code as a barcode and a QR code, the drop-off area and the hub.
- cURL
- Node.js
- PHP
- Python
curl https://api.getreeds.co/shipping/v1/deliveries/dlv_9Kd3Qx7M/label \
-H "Authorization: Bearer $REEDS_ACCESS_TOKEN" \
-o label-HQ3W5F2.pdf
import { writeFile } from 'node:fs/promises';
const res = await fetch(
'https://api.getreeds.co/shipping/v1/deliveries/dlv_9Kd3Qx7M/label',
{ headers: { Authorization: `Bearer ${process.env.REEDS_ACCESS_TOKEN}` } },
);
if (!res.ok) throw new Error(`Label failed: ${res.status}`);
await writeFile('label-HQ3W5F2.pdf', Buffer.from(await res.arrayBuffer()));
<?php
$ch = curl_init('https://api.getreeds.co/shipping/v1/deliveries/dlv_9Kd3Qx7M/label');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('REEDS_ACCESS_TOKEN')],
]);
$pdf = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($status === 200) {
file_put_contents('label-HQ3W5F2.pdf', $pdf);
}
import os
import requests
res = requests.get(
"https://api.getreeds.co/shipping/v1/deliveries/dlv_9Kd3Qx7M/label",
headers={"Authorization": f"Bearer {os.environ['REEDS_ACCESS_TOKEN']}"},
)
res.raise_for_status()
with open("label-HQ3W5F2.pdf", "wb") as f:
f.write(res.content)
Drafts have no label
A draft has no tracking code yet, so its label request returns 409 ACTION_NOT_ALLOWED until the delivery is booked. See ACTION_NOT_ALLOWED.
If a parcel has no label
Labelling is recommended, not required. A parcel that arrives without a label is labelled by the rider at pickup.
Packing tips
- Print at A6, or scale to fit. Don't shrink the barcode and QR code so far that they stop scanning.
- Stick the label flat on the largest face of the parcel, away from seams and tape.
- Never cover the barcode with tape.
- Pack the item so it can't open in transit, then label it.