API Documentation

A REST API built for shipment tracking.

Track shipments, run bulk lookups, and get pushed a webhook on every status change. Generate a real API key after you sign up — everything below works exactly as shown.

Base URL

https://weftkart.com/api/v1

Authentication

Every request must include your API key pair as headers. Keys are generated from your dashboard's API Keys page after signup.

X-Api-Key: tk_key_xxxxxxxxxxxxxxxxxxxx
X-Api-Secret: tk_sec_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Track Shipment

POST /track — tracks one AWB. Consumes one credit the first time this AWB is looked up for your account; repeat lookups within a short cache window are served free of charge.

{
    "tracking_number": "53067011009024",
    "courier": "delhivery",         // optional if you only have one active courier
    "order_reference": "ORD-1029",  // optional
    "recipient_name": "Asha Rao",   // optional
    "recipient_email": "asha@example.com", // optional
    "recipient_phone": "+91 98765 43210"   // optional — any format; saved as +91… for WhatsApp updates
}

Response

{
    "success": true,
    "tracking_number": "53067011009024",
    "courier": "delhivery",
    "status": "IN_TRANSIT",
    "status_label": "In Transit",
    "order_reference": "ORD-1029",
    "tracking_url": "https://weftkart.com/track/9c1e2f3a-...",
    "estimated_delivery": null,
    "last_update": "2026-08-19 18:30:00",
    "delivered_at": null,
    "events": [
        { "status": "IN_TRANSIT", "status_label": "In Transit", "location": "Delhi Hub", "description": "...", "event_time": "2026-08-19 18:30:00" }
    ]
}

tracking_url is a public, no-login page you can hand straight to your own customer.

Bulk Tracking

POST /track/bulk — tracks multiple AWBs in one call. The max array size depends on your plan's bulk limit (see Pricing & Plans).

{ "tracking_numbers": ["53067011009024", "53067011009025"], "courier": "delhivery" }

Response — one entry per requested AWB, success or error, in a single results array:

{
    "success": true,
    "results": [
        { "success": true, "tracking_number": "53067011009024", "status": "DELIVERED", ... },
        { "success": false, "tracking_number": "53067011009025", "error": "Tracking number not found at courier" }
    ]
}

Get Shipment

GET /shipments/{tracking_number} — returns the last known state for an AWB you've already tracked, without hitting the courier or consuming a credit.

List Couriers

GET /couriers — returns every courier available on your account, with its slug, name and logo.

Webhooks

Configure an endpoint from your dashboard's Webhooks page and we'll POST here whenever a tracked shipment's status changes:

POST https://yourapp.com/webhook/tracking
Content-Type: application/json
X-WeftKart-Event: status_changed
X-WeftKart-Signature: <hex hmac_sha256 of the raw request body, signed with your webhook secret>

{
    "tracking_number": "53067011009024",
    "courier": "delhivery",
    "old_status": "IN_TRANSIT",
    "new_status": "OUT_FOR_DELIVERY",
    "event_time": "2026-08-19 10:20:00"
}

Verify the signature before trusting a payload:

$expected = hash_hmac('sha256', $rawRequestBody, $yourWebhookSecret);
if (! hash_equals($expected, $_SERVER['HTTP_X_WEFTKART_SIGNATURE'])) {
    http_response_code(401);
    exit;
}

A non-2xx response, a connection error or no reply within 10 seconds counts as a failure and is retried — 5 attempts in all, retried after 1m, 5m, 15m, then 1h — before that delivery is marked failed.

Error Codes

StatusMeaning
401Missing or invalid API key/secret
402Insufficient shipment credits — upgrade your plan or wait for renewal
403Account suspended
422Validation error, or tracking number not found at the courier
429Rate limit exceeded — see retry_after in the response body
503Courier temporarily disabled or misconfigured

Example: cURL

curl -X POST https://weftkart.com/api/v1/track \
  -H "X-Api-Key: tk_key_xxxx" \
  -H "X-Api-Secret: tk_sec_xxxx" \
  -H "Content-Type: application/json" \
  -d '{"tracking_number": "53067011009024"}'

Get your API key

Create a free account and generate a key from your dashboard in under a minute.

Start for Free