This guide covers best practices for integrating with the Xenia Connect API.
- Always process webhooks asynchronously to ensure quick response times and prevent timeouts:
- Use the
eventIdfield to prevent duplicate processing: - Webhooks can be fired out of order; although highly unlikely, we expect you to retrieve the latest data from the API and handle it instead of relying on the event data itself.
- To tell us you have processed the webhook successfully and prevent retries, your HTTP Response code should be 204.
- Send a 4xx or a 5xx in order to have Xenia retry the webhook. Webhooks have an exponential backoff retry mechanism, retrying up to 5 times over a period of 24 hours.
- Maximum webhooks: 5 per environment
- Event filtering: Subscribe only to events you need to reduce noise
- Unique URLs: Each webhook must have a unique URL
- Don't ignore webhook retries: Xenia retries failed webhooks up to 5 times - ensure your endpoint can handle retries
- Don't assume state order: States can skip (e.g.
ENQUIRY.CREATEDdirectly toENQUIRY.CLOSED) - Don't ignore pagination: Large result sets require handling pagination