Payload

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

  • mandatory

code

Event code

This is the event (or one of the events) your service is listening to

  • mandatory

links

Link Resource of the event

  • mandatory

created_at

DateTime of the event

  • mandatory

created_by

User who triggered the event

  • mandatory

resource

Information about the updated entity

  • mandatory

resource.code

unique identifier of the entity

  • mandatory

resource.type

unique identifier of the entity type (enum : document, media, variant, classification, link, value)

  • mandatory

resource. document_type_code

unique identifier of the Document Type

  • not mandatory, unless resource.type is document

resources.links

Link resources to the updated entity

  • mandatory

locales.updated

Array of locales used while updating

  • mandatory

locales.inherited

Array of locales impacted by the update.

This is the array you probably should watch as it uses inheritance

  • mandatory

updated_items

Array of object

Each object define the exact item that have been updated.
It could be :

  • field
  • variant
  • document
  • media
  • link