Overview
Webhooks provide a way for notifications to be delivered to an external web server whenever certain events occur
What are Webhooks?
Webhooks allows you to receive real-time updates about changes in your Unify account without having to poll the API for changes.
Webhooks are a powerful way to integrate Unify with your own systems, allowing you to automate workflows and respond to events as they happen.
For example, you could use webhooks to trigger a notification in your own system whenever a new order is placed, or to update your inventory levels when a product is sold.
Webhooks are a great way to keep your systems in sync with Unify and to automate processes that would otherwise require manual intervention.
Registering a Webhook
Webhooks can be registered in your admin panel or programmatically using the API. To register a webhook, you need to provide the following information:
- The URL of the webhook endpoint that will receive the notifications.
- The type of events that you want to receive notifications for. You can choose from a list of supported events.
- the secret key that will be used to sign the payloads. This key should be kept secret and not shared with anyone.
Standard Webhook Headers
HTTP POST payloads that are delivered to your webhook's configured URL endpoint will contain several special headers that are used to identify the event type and provide additional information about the request. The headers are as follows:
| Header Name | Description |
|---|---|
User-Agent | Unify-Webhook/1.0 |
Content-Type | application/json |
X-Unify-Topic | The type of event that triggered the webhook. see Supported events |
X-Unify-Org-Id | The ID of the organization that triggered the webhook. |
X-Unify-Hmac-Sha256 | A cryptographic hash of the payload, used to verify the integrity of the data. |
X-Unify-Webhook-Id | The ID of the webhook that triggered the event. |
X-Unify-Triggered-At | The timestamp of when the event was triggered. |
X-Unify-Event-Id | A unique identifier for the event. This can be used to prevent duplicate processing of the same event. |
X-Unify-Retry-Count | The number of times the webhook has been retried. This is useful for debugging and monitoring purposes. |
Updated 2 months ago