# Webhooks

{% hint style="info" %}
Relay is a different product to Checkout with a different set of supported Webhooks. You can read about Checkout webhooks [here](/prism/webhooks.md)
{% endhint %}

Using Webhooks, you can subscribe to the lifecycle of products and orders in the external commerce platform, without any extra integration effort on your part.

Violet provides you with the following webhooks to subscribe to to track Products and Orders across all the merchants you are interested in:

### RELAY\_OFFER\_CREATED

This event will trigger anytime a product is created in the external commerce platform. The body of the webhook will contain a single Violet Offer object.

### RELAY\_OFFER\_UPDATED

This event will trigger anytime a product is updated in the external commerce platform. The body of the webhook will contain a single Violet Offer object.

### RELAY\_OFFER\_REMOVED

This event will trigger anytime a product is deleted in the external commerce platform. The body of the webhook will contain a single Violet Offer object.

### RELAY\_ORDER\_UPDATED

This event will trigger anytime an order is updated in the external commerce platform. The body of the webhook will contain a single Violet Order object with a single nested Violet Bag object.

## Relay Webhook Event Headers

Each Relay webhook event that is sent to your remote endpoint will include the following headers:

`X-Violet-Entity-External-Id` - This string value is the ID of the resource in the external commerce platform and should not exceed 64 characters.\\

`X-Violet-Merchant-Id` - This integer value is the ID of the merchant in Violet.\\

`X-Violet-Topic` - This enum value will be one of the webhook topics described above (example `RELAY_OFFER_CREATED`).

You can learn more about Violet webhook headers [here](/prism/webhooks/handling-webhooks.md#webhook-headers).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.violet.io/relay/webhooks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
