HTTP requests sent by Quable Webhook Notification Service is composed of a JSON Payload.
The structure of the message is the same whatever the event your application is listening to.
Heres an example of a "document.update" event
{
"uuid": "ce6c64a3-4f27-4b0e-862c-ee780eae06d1",
"code": "document.update",
"links": [
{
"rel": "self",
"href": "/events/ce6c64a3-4f27-4b0e-862c-ee780eae06d1"
}
],
"created_at": "2020-06-18T11:48:17+00:00",
"created_by": "john_doz",
"resource": {
"code": "product_blue_pant",
"type": "document",
"document_type_code": "product",
"links": [
{
"rel": "self",
"href": "https://xxx.quable.com/api_1.php/documents/product_blue_pant"
}
],
"locales": {
"updated": [
"fr_FR"
],
"inherited": [
"en_GB",
"fr_FR"
]
},
"updated_items": [
{
"type": "field",
"code": "color"
},
{
"type": "field",
"code": "name"
}
]
}
}
Here's the description of each item :
JSON Key | Label | Comment |
---|---|---|
uuid | Unique identifier of the event |
|
code | Event code | This is the event (or one of the events) your service is listening to
|
links | Link Resource of the event |
|
created_at | DateTime of the event |
|
created_by | User who triggered the event |
|
resource | Information about the updated entity |
|
resource.code | unique identifier of the entity |
|
resource.type | unique identifier of the entity type (enum : document, media, variant, classification, link, value) |
|
resource. document_type_code | unique identifier of the Document Type |
|
resources.links | Link resources to the updated entity |
|
locales.updated | Array of locales used while updating |
|
locales.inherited | Array of locales impacted by the update. | This is the array you probably should watch as it uses inheritance
|
updated_items | Array of object | Each object define the exact item that have been updated.
|