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
7672 hours
8772 hours
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

Immediate suspension error codes

The immediate suspension may occur when the retry limit is exceeded. The following table lists the immediate suspension codes that can help you troubleshoot webhook issues:

Error CodeDescriptionDetails
400Bad RequestServer cannot understand the request due to client error
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 does not make sense for resource
417Expectation FailedServer cannot meet 'Expect' header conditions
418I'm a teapotThe server refuses the attempt to brew coffee with a teapot
426Upgrade RequiredThe server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol.
428Precondition RequiredThe origin server requires the request to be conditional
Retry suspension error codes

The system goes in the retry mode due to any temporary failures. In this case, the system retries the deiveries. The following table lists the retry suspension codes that can help you troubleshoot webhook issues:

Error CodeDescriptionDetails
401UnauthorizedRequest lacks valid authentication credentials
404Not FoundThe server cannot find the requested resource
405Method Not AllowedThe request method is known by the server but is not supported by the target resource.
406Not AcceptableThe web server does not find any content that conforms to the criteria given by the user agent.
407Proxy Authentication RequiredAuthentication is needed to be done by a proxy
408Request TimeoutServer attempts to shut down any unused connection
409ConflictThe request conflicts with the current state of the server
411Length RequiredServer rejected the request because the Content-Length header field is not defined
412Precondition FailedThe request indicates preconditions in its headers which the server does not meet
425Too EarlyThe server is unwilling to risk processing a request that might be replayed
429Too Many RequestsThe user has sent too many requests in a given amount of time (rate limiting)
431Request Header Fields Too LargeThe server is unwilling to process the request because its header fields are too large
451Unavailable For Legal ReasonsThe user agent requested a resource that cannot legally be provided

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