Get booking label
Endpoint
Section titled “Endpoint”GET /api/bookings/v4/{id}/labelReturns the shipping label for a confirmed booking as a PDF file. Labels are generated by the courier after a booking is confirmed.
Path parameters
Section titled “Path parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The booking ID |
Request
Section titled “Request”curl -X GET \ -H "Api-key: YOUR_API_KEY" \ -o label.pdf \ https://www.transdirect.com.au/api/bookings/v4/123456/labelResponse
Section titled “Response”A successful response returns a 200 status code with the PDF label as the response body. The Content-Type header is set to application/pdf.
Save the response body directly to a .pdf file.
Demo mode
Section titled “Demo mode”When a booking is confirmed with payment_method: "demo", it is placed on the synthetic Demo courier and receives a watermarked test label (and a DEMO-… connote). The label endpoint returns that PDF so you can test download and print workflows without transmitting anything to a real carrier.
Related endpoints
Section titled “Related endpoints”| Endpoint | Purpose |
|---|---|
GET /api/bookings/v4/{id}/a6label | A6-format label PDF |
GET /api/bookings/v4/{id}/manifest | Manifest PDF |
GET /api/bookings/v4/{id}/tntregeneralabel | Force-regenerate TNT label |
GET /api/bookings/v4/{id}/public_url | Time-limited signed public label URL |
Error responses
Section titled “Error responses”| Status code | Meaning |
|---|---|
401 | Unauthorised — invalid credentials or API key |
404 | Not found — the booking does not exist, does not belong to your account, or has not been confirmed |