Integration Document
Base URL
https://api.tdtracking.com
Authentication
All API requests require authentication via an API key. Include your API key in the X-API-Key
header. You can find your API key at Settings page.
X-API-Key: YOUR_API_KEY
Add label
POST /api/v1/label
curl --location 'https://api.tdtracking.com/api/v1/label' \
--header 'X-API-Key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"platform": "usps",
"input_type": "url",
"input_url": "https://link-to-your-label.pdf",
"ref_id": "<your-unique-id>"
}
'
Response:
{
"meta": {
"code": 200,
"message": "success",
"request_id": ""
},
"data": {
"platform": "usps",
"tracking_number": "xxxxxx"
}
}
Webhook
-
You can set your webhook url at Settings page
-
Webhook payload:
- method: POST
- body:
{
"platform": "usps",
"tracking_number": "xxxxx",
"ref_id": "<your-unique-id>",
"status": "delivered",
"status_detail": "DELIVERED, PARCEL LOCKER. YOUR ITEM WAS DELIVERED TO A PARCEL LOCKER AT 12:18 PM ON JULY 19, 2025 IN xxxxxx"
}
-
List of status:
- info_received
- in_transit
- out_for_delivery
- failed_attempt
- available_for_pickup
- delivered
- exception
- pending