{"openapi":"3.1.0","info":{"title":"TrackCourier.io API","description":"Courier tracking API for developers","version":"1.0.0"},"paths":{"/v1/track":{"get":{"tags":["Tracking"],"summary":"Track Shipment","description":"Track a shipment.\n\nRequires valid API key in X-API-Key header.\n\nUse GET /v1/couriers to get the list of available courier slugs.\n\nAll requests are synchronous and blocking. For async couriers like Speed Post\nand India Post, TrackRouter polls the backend internally and returns the final\nresult. This may take 10-30 seconds but provides a simpler developer experience.\n\nReturns:\n    - 200: Tracking result with checkpoints\n    - 400: Invalid courier or tracking number\n    - 401: Invalid or missing API key\n    - 402: Quota exceeded\n    - 404: Courier not found\n    - 502/504: Backend service error","operationId":"track_shipment_v1_track_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"courier","in":"query","required":true,"schema":{"type":"string","description":"Courier slug (e.g., 'bluedart', 'delhivery')","title":"Courier"},"description":"Courier slug (e.g., 'bluedart', 'delhivery')"},{"name":"tracking_number","in":"query","required":true,"schema":{"type":"string","description":"AWB/tracking number","title":"Tracking Number"},"description":"AWB/tracking number"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/couriers":{"get":{"tags":["Tracking"],"summary":"List Couriers","description":"List available couriers.\n\nReturns the curated list of supported couriers with their slugs.\n\nRequires valid API key in X-API-Key header.\nThis endpoint does not count against your quota.","operationId":"list_couriers_v1_couriers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/couriers/{slug}":{"get":{"tags":["Tracking"],"summary":"Get Courier","description":"Get details for a specific courier.\n\nRequires valid API key in X-API-Key header.\nThis endpoint does not count against your quota.","operationId":"get_courier_v1_couriers__slug__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks":{"get":{"tags":["Webhooks"],"summary":"List Webhooks","description":"List the customer's webhooks. The `secret` field is stripped (D13).","operationId":"list_webhooks_v1_webhooks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]},"post":{"tags":["Webhooks"],"summary":"Create Webhook","description":"Create a webhook. Returns the raw signing secret once (D13).\n\nThe plan gate is applied per MODE rather than by a dependency, because a\nfree-tier customer may create a TEST webhook while a live one still\nrequires Growth+.","operationId":"create_webhook_v1_webhooks_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/webhooks/{webhook_id}":{"get":{"tags":["Webhooks"],"summary":"Get Webhook","description":"Get one webhook. The `secret` field is stripped (D13).","operationId":"get_webhook_v1_webhooks__webhook_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Webhooks"],"summary":"Update Webhook","description":"Update a webhook. The `secret` field is stripped from the response.","operationId":"update_webhook_v1_webhooks__webhook_id__put","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Webhooks"],"summary":"Delete Webhook","description":"Delete a webhook.","operationId":"delete_webhook_v1_webhooks__webhook_id__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks/{webhook_id}/test":{"post":{"tags":["Webhooks"],"summary":"Fire Test Webhook","description":"Fire a test event at one of the customer's TEST webhooks (#1740, S1).\n\nFree on every tier -- no plan gate, only the test-mode kill-switch. The\nnamed webhook is the only target: trackrouter builds one delivery task for\nit and enqueues that, with no fan-out and no disposable subscription.\n\ntrackrouter refuses a LIVE webhook id with 409, which is forwarded as-is.","operationId":"fire_test_webhook_v1_webhooks__webhook_id__test_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks/rotate-secret":{"post":{"tags":["Webhooks"],"summary":"Rotate Secret","description":"Rotate the customer's webhook signing secret (D13, top-level).\n\nAll of the customer's webhook endpoints flip to the new secret atomically.\nReturns the new raw secret once.","operationId":"rotate_secret_v1_webhooks_rotate_secret_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/demo/track":{"get":{"tags":["Demo"],"summary":"Demo Track","description":"Public demo endpoint for trying the API without authentication.\n\nRate limited to 5 requests per hour per IP.","operationId":"demo_track_demo_track_get","parameters":[{"name":"courier","in":"query","required":true,"schema":{"type":"string","title":"Courier"}},{"name":"tracking_number","in":"query","required":true,"schema":{"type":"string","title":"Tracking Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/plans":{"get":{"tags":["Plans"],"summary":"List Plans","description":"List available subscription plans.","operationId":"list_plans_billing_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"}}}}