# Event data in webhooks

Webhooks are limited in the data they carry to remain as fast as possible. Webhook data is always contained in the **JSON body** of a webhook:

* **storeId**\
  Ecwid store ID.
* **eventCreated**\
  UNIX timestamp when the event happened.
* **eventId**\
  Internal ID of the webhook event. Unique for each webhook.
* **eventType**\
  Entity and action of the event defining what happened in the store. \
  \
  For example, the `order.created` event means that a new order was placed in the store.
* **entityId**: ID of the affected item, such as order ID, product ID, customer ID, etc. This ID allows you to request additional details about the entity with REST API immediately after receiving a webhook.&#x20;
* **data** object: Additional details available to some events. For example, all `order.created` and `order.updated` webhooks always contain order payment and fulfillment statuses in addition to the order ID.

### Webhook JSON examples

Order events:

{% tabs %}
{% tab title="New order in the store" %}

```json
{
  "eventId":"80aece08-40e8-4145-8764-6c2f0d38678",
  "eventCreated":1234567,
  "storeId":1003,
  "entityId":103878161, // internal order ID. Use "orderId" instead
  "eventType":"order.created",
  "data":{
    "orderId":"XJ12H", // ID of created order
    "newPaymentStatus":"PAID",
    "newFulfillmentStatus":"SHIPPED"
  }
}
```

{% endtab %}

{% tab title="Order was updated" %}

```json
{
  "eventId":"80aece08-40e8-4145-8764-6c2f0d38678",
  "eventCreated":1234567,
  "storeId":1003,
  "entityId":450012387, // internal order ID. Use "orderId" instead
  "eventType":"order.updated",
  "data":{
    "orderId":"B8HGD", // ID of updated order
    "oldPaymentStatus":"PAID",
    "newPaymentStatus":"PAID",
    "oldFulfillmentStatus":"PROCESSING",
    "newFulfillmentStatus":"SHIPPED"
  }
}
```

{% endtab %}

{% tab title="Order was deleted" %}

```json
{
  "eventId":"80aece08-40e8-4145-8764-6c2f0d38678",
  "eventCreated":1234567,
  "storeId":1003,
  "entityId":103878161, //internal order ID. Use "orderId" instead
  "eventType":"order.deleted",
  "data":{
    "orderId":"XJ12H", // ID of deleted order
  }
}
```

{% endtab %}
{% endtabs %}

Abandoned cart events:

{% tabs %}
{% tab title="New abandoned cart left in the store" %}

```json
{
  "eventId": "95ed494f-362d-4fca-933d-f5c7064b04bb",
  "eventCreated": 1634209655,
  "storeId": 1003,
  "entityId": 293225803, // internal order ID. Use "orderId" instead
  "eventType": "unfinished_order.created",
  "data": {
    "orderId": "RA1SD",
    "cartId": "320AB5DE-5EA6-4419-A4CF-0B04D2913190"
  }
}
```

{% endtab %}

{% tab title="Abandoned cart was updated" %}

```json
{
  "eventId": "95ed494f-362d-4fca-933d-f5c7064b04bb",
  "eventCreated": 1634209655,
  "storeId": 1003,
  "entityId": 293225803, // internal order ID. Use "orderId" instead
  "eventType": "unfinished_order.updated",
  "data": {
    "orderId": "RA1SD",
    "cartId": "320AB5DE-5EA6-4419-A4CF-0B04D2913190"
  }
}
```

{% endtab %}

{% tab title="Abandoned cart was deleted" %}

```json
{
  "eventId": "95ed494f-362d-4fca-933d-f5c7064b04bb",
  "eventCreated": 1634209655,
  "storeId": 1003,
  "entityId": 293225803, // internal order ID. Use "orderId" instead
  "eventType": "unfinished_order.deleted",
  "data": {
    "orderId": "RA1SD",
    "cartId": "320AB5DE-5EA6-4419-A4CF-0B04D2913190"
  }
}
```

{% endtab %}
{% endtabs %}

Product events:

{% tabs %}
{% tab title="New product added to the store" %}

```json
{
  "eventId":"08a78904-4c1a-0aa0-953a-2e33c56236f1",
  "eventCreated":1469429915,
  "storeId":1003, 
  "entityId":667251253, // this is the id of the created product
  "eventType":"product.created"
}
```

{% endtab %}

{% tab title="Product was updated" %}

```json
{
  "eventId":"08a78904-0aa0-4c1a-953a-2e33c56236f0",
  "eventCreated":1469429912,
  "storeId":1003, 
  "entityId":66722483, // this is the id of the updated product
  "eventType":"product.updated"
}
```

{% endtab %}

{% tab title="Product was deleted" %}

```json
{
  "eventId":"80aece08-40e8-4145-8764-6c2f0d38678",
  "eventCreated":1469429915,
  "storeId":1003, 
  "entityId":667251253, // this is the id of the deleted product
  "eventType":"product.deleted"
}
```

{% endtab %}
{% endtabs %}

Category events:

{% tabs %}
{% tab title="New category added to the store" %}

```json
{
  "eventId":"08a78904-0aa0-4c1a-953a-2e33c56236f0",
  "eventCreated":1469429912,
  "storeId":1003, 
  "entityId":66722483, 
  "eventType":"category.created"
}
```

{% endtab %}

{% tab title="Category was updated" %}

```json
{
  "eventId":"08a78904-0aa0-4c1a-953a-2e123c236f0",
  "eventCreated":1469429912,
  "storeId":1003, 
  "entityId":66722483, 
  "eventType":"category.updated"
}
```

{% endtab %}

{% tab title="Category was deleted" %}

```json
{
  "eventId":"08a78904-0aa0-4c1a-953a-2e33c562336f0",
  "eventCreated":1469429912,
  "storeId":1003, 
  "entityId":66722483, 
  "eventType":"category.deleted"
}
```

{% endtab %}
{% endtabs %}

Product review events:

{% tabs %}
{% tab title="New product review left in the store" %}

```json
{
  "eventId": "95ed494f-362d-4fca-933d-f5c7064b04bb",
  "eventCreated": 1634209655,
  "storeId": 1003,
  "entityId": 293225803, //internal review id
  "eventType": "review.created",
  "data":{
    "productId": 62752,
    "orderId": 63254,
    "status":"MODERATED",
  }
}
```

{% endtab %}

{% tab title="Product review was updated" %}

```json
{
  "eventId": "95ed494f-362d-4fca-933d-f5c7064b04bb",
  "eventCreated": 1634209655,
  "storeId": 1003,
  "entityId": 293225803, //internal review id
  "eventType": "review.updated",
  "data":{
    "productId": 62752,
    "orderId": 63254,
    "status":"PUBLISHED",
  }
}
```

{% endtab %}

{% tab title="Product review was deleted" %}

```json
{
  "eventId": "95ed494f-362d-4fca-933d-f5c7064b04bb",
  "eventCreated": 1634209655,
  "storeId": 1003,
  "entityId": 293225803, //internal review id
  "eventType": "review.deleted",
  "data":{
    "productId": 62752,
    "orderId": 63254,
  }
}
```

{% endtab %}
{% endtabs %}

Customer events:

{% tabs %}
{% tab title="New customer added to the store" %}

```json
{
  "eventId": "80aece08-40e8-4145-8764-6c2f0d38678",
  "eventCreated": 7891234567,
  "storeId": 1003,
  "entityId": 1663830, // customer ID
  "eventType": "customer.created",
  "data": {
    "customerEmail":"user@example.com" // customer email
  }
}
```

{% endtab %}

{% tab title="Customer was updated" %}

```json
{
  "eventId": "80aece08-40e8-4145-8764-6c2f0d38678",
  "eventCreated": 7891234567,
  "storeId": 1003,
  "entityId": 1663830, // customer ID
  "eventType": "customer.updated",
  "data": {
    "customerEmail":"user@example.com" // customer email
  }
}
```

{% endtab %}

{% tab title="Customer was deleted" %}

```json
{
  "eventId": "80aece08-40e8-4145-8764-6c2f0d38678",
  "eventCreated": 7891234567,
  "storeId": 1003,
  "entityId": 1663830, // customer ID
  "eventType": "customer.deleted",
  "data": {
    "customerEmail":"user@example.com" // customer email
  }
}
```

{% endtab %}
{% endtabs %}

Application events (can only be received by the same app):

{% tabs %}
{% tab title="App was installed to the store" %}

```json
{
  "eventId":"80aece08-40e8-4145-8764-6c2f0d38678",
  "eventCreated":1234567,
  "storeId":1003,
  "entityId":"1003", // duplicates store ID
  "eventType":"application.installed"
}
```

{% endtab %}

{% tab title="App subscription was changed" %}

```json
{
  "eventId":"80aece08-40e8-4145-8764-6c2f0d38678",
  "eventCreated":1234567,
  "storeId":1003,
  "entityId":"1003", // duplicates store ID
  "eventType":"application.subscriptionStatusChanged",
  "data":{
    "oldSubscriptionStatus":"TRIAL",
    "newSubscriptionStatus":"ACTIVE"
    }
}
```

{% endtab %}

{% tab title="App was uninstalled from the store" %}

```json
{
  "eventId":"80aece08-40e8-4145-8764-6c2f0d38678",
  "eventCreated":1234567,
  "storeId":1003,
  "entityId":"1003", // duplicates store ID
  "eventType":"application.uninstalled"
}
```

{% endtab %}
{% endtabs %}

Store profile events:

{% tabs %}
{% tab title="Store profile was updated" %}

```json
{
  "eventId": "80aece08-40e8-4145-8764-6c2f0d38678",
  "eventCreated": 7891234567,
  "storeId": 1003,
  "entityId": 1003,
  "eventType": "profile.updated"
}
```

{% endtab %}

{% tab title="Store subscription was updated" %}

```json
{
  "eventId":"80aece08-40e8-4145-8764-6c2f0d38678",
  "eventCreated":1494503041,
  "storeId":1421002,
  "entityId":1421002, // duplicated store ID
  "eventType":"profile.subscriptionStatusChanged",
  "data":{
    "oldSubscriptionName":"ECWID_BUSINESS",
    "newSubscriptionName":"ECWID_UNLIMITED"
  }
}
```

{% endtab %}
{% endtabs %}

Discount coupon events:

{% tabs %}
{% tab title="New discount coupon added to the store" %}

```json
{
  "eventId": "80aece08-40e8-4145-8764-6c2f0d38678",
  "eventCreated": 7891234567,
  "storeId": 1003,
  "entityId": 12345678, // discount coupon ID
  "eventType": "discount_coupon.created",
}
```

{% endtab %}

{% tab title="Discount coupon was updated" %}

```json
{
  "eventId": "80aece08-40e8-4145-8764-6c2f0d38678",
  "eventCreated": 7891234567,
  "storeId": 1003,
  "entityId": 12345678, // discount coupon ID
  "eventType": "discount_coupon.updated"
}
```

{% endtab %}

{% tab title="Discount coupon was deleted" %}

```json
{
  "eventId": "80aece08-40e8-4145-8764-6c2f0d38678",
  "eventCreated": 7891234567,
  "storeId": 1003,
  "entityId": 12345678, // discount coupon ID
  "eventType": "discount_coupon.deleted"
}
```

{% endtab %}
{% endtabs %}

Promotion (advanced discount) events:

{% tabs %}
{% tab title="New promotion added to the store" %}

```json
{
  "eventId": "95ed494f-362d-4fca-933d-f5c7064b04bb",
  "eventCreated": 1469429915,
  "storeId": 1003, 
  "entityId": 667251253, // Advanced discount ID 
  "eventType": "promotion.created",
  "data": {
    "version": 1 // Internal iterated version for tracking discount changes
  }
}
```

{% endtab %}

{% tab title="Promotion was updated" %}

```json
{
  "eventId": "95ed494f-362d-4fca-933d-f5c7064b04bb",
  "eventCreated": 1469429915,
  "storeId": 1003, 
  "entityId": 667251253, // Advanced discount ID 
  "eventType": "promotion.updated",
  "data": {
    "version": 1 // Internal iterated version for tracking discount changes
  }
}
```

{% endtab %}

{% tab title="Promotion was deleted" %}

```json
{
  "eventId": "95ed494f-362d-4fca-933d-f5c7064b04bb",
  "eventCreated": 1469429915,
  "storeId": 1003, 
  "entityId": 667251253, // Advanced discount ID 
  "eventType": "promotion.deleted",
  "data": {
    "version": 1 // Internal iterated version for tracking discount changes
  }
}
```

{% endtab %}
{% endtabs %}

Invoice events:

{% tabs %}
{% tab title="New order tax invoice was created" %}

```json
{
  "eventId": "08a78904-4c1a-0aa0-953a-2e33c56236f1",
  "eventCreated": 1469429915,
  "storeId": 1003, 
  "entityId": 667251253, // Invoice ID 
  "eventType": "invoice.created",
  "data": {
    "orderId": "GH781" // order ID
  }
}
```

{% endtab %}

{% tab title="Order tax invoice was deleted" %}

```json
{
  "eventId": "08a78904-4c1a-0aa0-953a-2e33c56236f1",
  "eventCreated": 1469429915,
  "storeId": 1003, 
  "entityId": 667251253, // Invoice ID 
  "eventType": "invoice.deleted",
  "data": {
    "orderId": "GH781" // order ID
  }
}
```

{% endtab %}
{% endtabs %}


---

# 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.ecwid.com/webhook-automations/learn-ecwid-webhooks/event-data-in-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.
