Handle webhook suspension

Webhook suspension refers to the disabling of the webhook notifications for shipment events due to an error.

If the receiving endpoint (the system where the notifications are sent) is down or encounters errors, for example, time out, invalid data, SAPIENT may suspend sending further webhook notifications to avoid overwhelming the system.

Quick Recovery

Reactivate suspended webhooks immediately using the Activate toggle in the GUI to minimise data loss.

Monitoring Setup

Set up dedicated webhook monitoring before suspension notifications are triggered for better reliability.

How webhook suspension works

Suspension Process

When your webhook endpoint is down or encounters errors, SAPIENT follows a structured retry process before suspending the webhook:

  1. Error Detection: The system detects issues like timeouts, invalid data, or server errors
  2. Retry Attempts: Multiple retry attempts are made following specific intervals
  3. Threshold Exceeded: If all retry attempts fail, the webhook is suspended
  4. Notification: An email is sent to the primary user registered for the customer

Primary User: Set up during customer onboarding. Contact Intersoft's onboarding team to change the primary user.

Retry Schedule

The system follows this retry schedule before suspending a webhook:

Retry IDRetry CountInterval
105 minutes*
2110 minutes
3215 minutes
4330 minutes
545 hours
6518 hours
7624 hours
8724 hours

*Initial retry after first failure

Reactivation Process

To reactivate a suspended webhook:

  1. Navigate to the webhook configuration in your GUI
  2. Toggle the Activate switch to enable the webhook
  3. Monitor the endpoint to ensure it's functioning properly
Activating tracking webhook
🚧

Important

Once the webhook is suspended, it looses all its tracking data. For example, if a customer reactivates the webhook after one week, they loose one week of the tracking data. Therefore, if you do not want to loose any tracking data, then make sure to activate it promptly.



Error reference

Common Error Codes

Understanding these error codes can help you troubleshoot webhook issues:

Error CodeDescriptionDetails
400Bad RequestServer cannot understand the request due to client error
401UnauthorizedRequest lacks valid authentication credentials
402Payment RequiredPayment required to access the resource (experimental)
403ForbiddenNo permission to access the resource
410GoneResource permanently unavailable and intentionally removed
413Payload Too LargeRequest size exceeds server's file size limit
414URL Too LongRequested URL exceeds server processing limits
415Unsupported Media TypePayload format not supported by server
416Range Not SatisfiablePartial range request doesn't make sense for resource
417Expectation FailedServer cannot meet 'Expect' header conditions
418I'm a teapotEaster egg status code (not used in practice)

Best Practices

Prevention

  • Implement robust error handling
  • Set up monitoring and alerting
  • Ensure endpoint reliability
  • Test webhook endpoints regularly

Recovery

  • Monitor suspension notifications
  • Reactivate webhooks promptly
  • Verify endpoint functionality
  • Check for missed tracking data

See also