> For the complete documentation index, see [llms.txt](https://eshop.gitbook.io/eshopbox-developers/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://eshop.gitbook.io/eshopbox-developers/advanced/events-webhook.md).

# Webhook

Eshopbox observes several events that you can attach webhooks to. With a webhook,  you can attach custom code that performs actions outside of the Eshopbox ecosystem.

You may want to send a survey email after an order is fulfilled. You can do this via a webhook that sends event data to your custom function.

## Event Object

{% tabs %}
{% tab title="Attributes" %}

| Attribute           | Type     | Description                                                                                            |
| ------------------- | -------- | ------------------------------------------------------------------------------------------------------ |
| `id`                | `string` | Unique identifier for the registered events.                                                           |
| `resource`          | `string` | The resources affected by this event. Refer here for resource types available.                         |
| `eventType`         | `string` | <p>It describes the CRUD format of event .</p><p>Example: <code>POST</code> ,<code>PUT</code> etc.</p> |
| `eventSubType`      | `string` | This defines the event verb specifically for an event Type.                                            |
| `version`           | `string` | It is used for versioning the Events.                                                                  |
| `externalChannelID` | `string` | The channel which has registered for the webhook                                                       |
| `webhookUrl`        | `number` | The url of the API outside Eshopbox domain which is supposed to be triggered                           |
| `webhookMethod`     | `object` | The Rest API signature required to create a request .Example- `GET` ,`PUT` , `POST` , `DELETE`         |
| {% endtab %}        |          |                                                                                                        |

{% tab title="Sample Json" %}

```
{
    "id":"1",
    "resource": "channel_inventory",
    "eventType": "POST",
    "eventSubType": "updated",
    "version": "v1",
    "externalChannelID" : "TATA CLIQ VELOCY KAPAS KRAFT",
    "webhookUrl": "https://hooks.zapier.com/fake-subscription-url",
    "webhookMethod": "POST"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://eshop.gitbook.io/eshopbox-developers/advanced/events-webhook.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
