Regenerate TNT label
Endpoint
Section titled “Endpoint”GET /api/bookings/v4/{id}/tntregeneralabelForce-regenerates and returns the PDF shipping label for a TNT booking. Any cached label PDF is discarded and a fresh one is produced from the current booking state.
When to use this
Section titled “When to use this”Use this endpoint when a TNT booking’s label needs to be re-issued because:
- The booking was updated after the original label was generated.
- The TNT consignment was reprocessed and the previously cached PDF is stale.
- You see a “label not found” or empty PDF error from the standard label endpoint for a TNT booking.
For everyday label retrieval, use GET /bookings/v4/{id}/label — it is faster and serves the cached PDF.
Authentication
Section titled “Authentication”Path parameters
Section titled “Path parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The booking ID. The booking must use TNT as the selected courier. |
Example request
Section titled “Example request”curl -X GET \ -H "Api-key: YOUR_API_KEY" \ -o tnt-label.pdf \ https://www.transdirect.com.au/api/bookings/v4/12345678/tntregeneralabelResponse
Section titled “Response”A successful response returns a binary application/pdf body — the regenerated TNT shipping label.
Error responses
Section titled “Error responses”| Status code | Description |
|---|---|
401 | Unauthorised — invalid or missing credentials. |
404 | Not found — no booking exists with the given ID, or it belongs to another member. |
500 | Server error — the label could not be regenerated. Contact support. |