Respond quickly with a 2xx
Terminal49 expects your endpoint to return one of these status codes:200, 201, 202, or 204. Return the response before doing any heavy processing.
Handle retries and duplicate deliveries
Terminal49 retries failed deliveries, which means your endpoint may receive the same notification more than once. Design your consumer to be idempotent. Every webhook notification has a uniqueid in data.id. Use it to deduplicate:
Verify the webhook source
Terminal49 publishes the IP addresses that webhook notifications originate from. Use the List Webhook IPs endpoint to fetch the current list and validate incoming requests:Cache the IP list and refresh it periodically (e.g., daily). The list rarely changes, but checking the endpoint ensures you stay current.
Monitor delivery status
Use the Webhook Notifications API to check delivery status and catch any notifications your endpoint may have missed:Handle downtime gracefully
If your endpoint goes down, Terminal49 retries failed deliveries. When your endpoint recovers:- Check the Webhook Notifications API for any notifications with
delivery_status: failed. - Use the Trigger Webhook endpoint to replay specific notifications.
- For longer outages, list recent shipments via the API to catch up on any missed state changes.
Keep your webhook active
Terminal49 may deactivate a webhook after repeated delivery failures. Check your webhook’sactive status periodically:
active: true.
Summary checklist
- Return
2xximmediately, process asynchronously - Deduplicate using the notification
id - Validate the source IP against the webhook IPs list
- Monitor for failed notifications and replay as needed
- Subscribe only to the events you need
- Log raw payloads for debugging
Related
- Setting up webhooks — create and configure endpoints
- Event catalog — all available events
- Webhook API Reference — CRUD operations for webhooks