# Webhooks

Webhooks are a way to notify client systems in real time when something changes within the Skladon platform.

### Webhook types

Currently, webhooks can be registered for the following types of events:

* CREATE\_ORDER - creating of order
* UPDATE\_ORDER - updating order
* UPDATE\_ORDER\_STATUS - order status update
* CREATE\_PRODUCT - creating of product
* UPDATE\_PRODUCT - updating product
* CREATE\_RECEIVING - creating of receiving
* UPDATE\_RECEIVING - updating receiving
* UPDATE\_RECEIVING\_STATUS - receiving status update
* CREATE\_RETURN - creating of return
* UPDATE\_RETURN - updating return&#x20;
* UPDATE\_RETURN\_STATUS - return status update
* CREATE\_STOCK\_MOVEMENT\_STOCK\_CORRECTION - created stock movement of type stock\_correction
* CREATE\_STOCK\_MOVEMENT\_COMPLETITION - created stock movement of type completition

If any of above types of actions happens in Skladon systems and there is registered webhook. - webhook is sent.

### Webhook subscription

You can have multiple webhooks for any type of actions, but you should have only working urls enabled. Not working webhooks will be automatically deactivated in the future.

In order to use webhooks you should have url(endpoint) ready at your side. To this url we send either GET or POST request.

#### GET webhook

For GET webhooks, we call your URL and append the entity ID as a parameter. You should then retrieve the entity details on your end.

For example. you define GET webhook url ***<https://app.myclientapp/api/orders/changes/>*** and there has been change of your order with eshopOrderId ***123456***.&#x20;

In this case we call url ***<https://app.myclientapp/api/orders/changes/123456> .***

#### POST webhook

POST webhooks, on the other hand, send the new entity data directly in the request payload, so there is no need to fetch the entity details separately.

Format of data in the payload is same as for GET endpoints in API.&#x20;

**Example**

```json
{
   "eshopReceivingId":"ESHOP_RECIVING_ID_123",
   "carrierInfo":null,
   "deliveryNoteNumber":null,
   "deliveryType":null,
   "description":"Example description",
   "driverCompany":null,
   "driverDispatcherContact":null,
   "driverName":null,
   "driverPhone":null,
   "driverTrailerLicensePlate":null,
   "duty":false,
   "estimatedDelivery":"2024-06-13T00:00:00.000Z",
   "handlingUnits":"box_loose",
   "packagings":[
      
   ],
   "products":[
      {
         "sku":"TEST_SKU_1",
         "quantity":6,
         "lot":null,
         "received":null,
         "expirationDate":null,
         "lineState":"D"
      },
      {
         "sku":"TEST_SKU_2",
         "quantity":1,
         "lot":null,
         "received":null,
         "expirationDate":null,
         "lineState":"D"
      },
      {
         "sku":"TEST_SKU_3",
         "quantity":2,
         "lot":null,
         "received":2,
         "expirationDate":null,
         "lineState":"E"
      }
   ],
   "status":"received",
   "supplier":"AMAZON",
   "trackingNumber":null,
   "unitsAmount":1,
   "urgent":null
}
```

{% content-ref url="/pages/uhAilXU5MqDfVyESpNr5" %}
[API](/main/integration/api.md)
{% endcontent-ref %}

### Webhook repeating

If a successful status code is not returned when delivering a webhook, the delivery is retried automatically. Retries are attempted for up to 48 hours, with exponentially increasing intervals between attempts, up to a maximum of 20 retries. If all retry attempts fail, the webhook is deactivated and a notification email is sent. Once the issue is resolved, the webhook can be reactivated via the [Webhooks API](/main/integration/api/webhooks.md#webhooks-id-activate).

### Webhooks API documentation

You can find descriptions of webhook endpoint on the link below.

{% content-ref url="/pages/9ptRL3Tp7Sx6sYKtllY9" %}
[Webhooks](/main/integration/api/webhooks.md)
{% endcontent-ref %}


---

# 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://dev.skladon.com/main/integration/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.
