Webhooks
StructPIM offers support for webhooks for external messaging in response to events in the system
Setting up web hooks
You can manage webhooks by going to the Settings -> Webhooks node. Here you can set up as many webhooks as needed. Each webhook is set up to point to an address, to which an http request shall be made, when an event happens in StructPIM. You can activate or deactivate each webhook and select which events to send to the endpoint.
At each webhook you can view the latest requests made to the webhook endpoint by clicking the arrow at the right side of the webhook header.
Furthermore, you can view actual details of each request by clicking the View details link of a specific request
Implementing your webhook endpoint
When you implement your webhook endpoint, you have to make sure that your endpoint responds on the url you have set up. Webhook requests are all POST requests and uses header information to tell your endpoint what kind of request you are receiving, whereas the request body contains the actual payload of the request
Request header key | value description |
---|---|
X-Event-Key | This header contains an identification of the event type, which can be products.created, products.updated, products.deleted, variants.created, variants.updated, variants.deleted, category.created, category.updated, category.deleted, globallistvalue.created, globallistvalue.updated, globallistvalue.deleted |
X-Hook-UID | Contains the unique id of the webhook you have configured in StructPIM |
X-Request-UID | Contains a unique id identifying this particular webhook request |