In this tutorial, you will register a webhook endpoint and confirm the shape of the status updates Terminal49 sends. Use webhooks for ongoing tracking updates. Polling is useful for on-demand lookups, but it adds latency and consumes API rate limits.Documentation Index
Fetch the complete documentation index at: https://terminal49-codex-docs-audit-diataxis-skill.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Before you start
You need:- A Terminal49 API key.
- A public HTTPS endpoint that can receive
POSTrequests. - At least one active tracking request.
Create a webhook endpoint
You can create a webhook from the dashboard or the API. To use the dashboard:- Open Developer Webhooks.
- Click Create Webhook Endpoint.
- Enter your HTTPS endpoint URL.
- Choose the events you want to receive.
- Save the webhook.
id and secret. Store the secret securely; you use it to verify webhook signatures.
Receive the first event
After Terminal49 detects a change for one of your tracked shipments or containers, it sends aPOST request to your endpoint.
Every notification has the same top-level shape:
data.attributes.event first. This tells your handler which code path to run.
Common first events are:
tracking_request.succeeded: Terminal49 found the shipment and created tracking records.tracking_request.failed: Terminal49 could not create tracking for the submitted number.container.updated: One or more container attributes changed.
Return a successful response
Your endpoint should return200, 201, 202, or 204 after it accepts the event.
Before you use webhooks in production
Production webhook handlers should:- Verify the
X-T49-Webhook-Signatureheader against the raw request body. - Allowlist Terminal49 webhook IPs.
- Deduplicate by
data.id. - Process asynchronously when work may take more than a few seconds.
Next steps
Event catalog
Choose the events your integration should subscribe to.
Payload reference
Review the notification envelope and example payloads.