Function hooks/subscribe (http://<DOMAIN>/api/hooks/subscribe/)

Parameters:

Response:

Also, on successful subscription to the webhook, the server will return the HTTP/1.1 201 Created header, which means that the webhook was successfully created. For server response statuses other than 20x, it should be assumed that the subscription failed.

The maximum number of subscriptions per event is 5. When this limit is reached, the server response will be "Subscriptions limit for current event has been reached"

Example of a query to http://<DOMAIN>/api/hooks/subscribe/

{
	"token": "<YOUR TOKEN>",
	"event": "order_created",
	"target_url": "http://your_crm.com/order/created"
}

Example of a response to a query

{
    "id": 1
}