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”If your account is in demo mode, the label endpoint returns a static demo label rather than a real courier label. This allows you to test your label download and printing workflow without creating live bookings.
Demo labels are available for the following couriers:
| Courier |
|---|
| Couriers Please |
| Aramex |
| Toll |
| Toll International |
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 |