Webhooks
A webhook sends a signed HTTP request to your system whenever something it subscribes to happens: a product is saved or published, a category moves, a file in the library changes. Every change made in the app, by an import, through the API or by an approved AI proposal is sent the same way.
Setting one up
Section titled “Setting one up”Under Settings › Webhooks, choose New webhook (admins and catalog managers may). A webhook has:
- A URL that answers on the public internet over
https://. Addresses on private networks and the local machine are refused. - The events it subscribes to: single types such as
product.updated, everything about one thing such asproduct.*, or*for all of them. - Headers of your own, for example an API key your receiver expects. Their values are stored encrypted and not shown again; when you change the webhook’s host, enter them again.
- Active. A paused webhook gets no new events, but you can still replay events to it.
Each webhook has its own signing secret (whsec_…), shown on its page. Copy it to your
receiver. You can replace it with a new one at any time; requests are then signed with the new one
at once.
What a request looks like
Section titled “What a request looks like”Each event is a POST with a JSON body:
{ "id": 4821, "type": "product.updated", "occurred_at": "2026-11-26T09:14:03Z", "tenant": "your-workspace", "aggregate": { "type": "product", "id": "01kb…" }, "data": { "product_id": "01kb…", "identifier": "SKU-1", "version": 7, "reason": "api", "author_id": 12, "changed_fields": ["values.price"], "product": { "identifier": "SKU-1", "family": "shoes", "enabled": true, "values": {}, "categories": [], "associations": {} }, "changes": { "values.price._._": { "old": [{ "amount": "49.90", "currency": "EUR" }], "new": [{ "amount": "44.90", "currency": "EUR" }] } } }}idis the event’s own number. It is the same when an event is sent again, so use it to skip events you have already handled.dataholds the event’s details. Product events carry the product as of the version they describe (data.product, in the shape the API reads it), andproduct.createdandproduct.updatedalso carry the cells that version changed (data.changes). Updates of catalog things carrychanged_fields.- A variant whose inherited values changed because its model was saved gets a
product.updatedwithinherited: trueand the new values ininherited_values. Its own version doesn’t change. reasonsays what made the change (manual,import,api,rule,bulk,workflow,supplier,ai,restore,translation), andauthor_idwho made it. A system that both writes through the API and listens to webhooks can skip events with its own account as author.
The request carries these headers:
| Header | Holds |
|---|---|
X-Pim-Event |
The event type, such as product.updated |
X-Pim-Event-Id |
The event’s id |
X-Pim-Delivery |
This delivery’s number; a redelivery of the same event has a new one |
X-Pim-Timestamp |
When the request was signed, in Unix seconds |
X-Pim-Signature |
sha256= and the signature of the request |
Checking the signature
Section titled “Checking the signature”The signature is the hex HMAC-SHA256, keyed with the webhook’s signing secret, of the timestamp, a
dot and the raw body: "<X-Pim-Timestamp>.<body>". Compute it over the body exactly as it arrived,
before parsing it, compare it in constant time, and refuse requests whose timestamp is more than a
few minutes old.
$timestamp = $request->header('X-Pim-Timestamp');$expected = 'sha256='.hash_hmac('sha256', $timestamp.'.'.$request->getContent(), $secret);
$valid = hash_equals($expected, (string) $request->header('X-Pim-Signature')) && abs(time() - (int) $timestamp) < 300;import { createHmac, timingSafeEqual } from 'node:crypto';
function isValid(rawBody, timestamp, signature, secret) { const expected = 'sha256=' + createHmac('sha256', secret) .update(`${timestamp}.${rawBody}`) .digest('hex'); const fresh = Math.abs(Date.now() / 1000 - Number(timestamp)) < 300;
return ( fresh && expected.length === signature.length && timingSafeEqual(Buffer.from(expected), Buffer.from(signature)) );}Answers, retries and order
Section titled “Answers, retries and order”- Any
2xxanswer counts as delivered. Answer quickly and do the work afterwards: a request waits 10 seconds at most, and redirects are not followed. - Anything else is tried again, five times in all, 1 minute, 5 minutes, 30 minutes and 2 hours apart. After the fifth try the delivery is marked failed.
- Delivery is at least once: after an outage on either side, an event can arrive twice. Use
idto tell. - Deliveries go out side by side, so they can arrive out of order. Order them by
id, or for a product bydata.version.
The delivery log, tests and replays
Section titled “The delivery log, tests and replays”The webhook’s page lists its deliveries with their status, the answer your system gave and the request that was sent.
- Send test event sends a
webhook.testevent (id 0) at once, signed like the others, and shows what your system answered. Use it to check your signature code. - Redeliver sends one delivery again.
- Replay events sends every event the webhook subscribes to again, from a point in time or from an event id. This is how you catch up after an outage longer than the retries.
Deliveries are kept in the log for 30 days. Events are kept longer, so a replay can reach further back than the log.
Event types
Section titled “Event types”| Event | Means |
|---|---|
product.created | Product created |
product.updated | Product updated |
product.deleted | Product deleted |
product.published | Product published |
product.state_changed | Product workflow state changed |
product.availability_changed | Product availability changed |
category.created | Category created |
category.updated | Category updated |
category.moved | Category moved |
category.deleted | Category deleted |
attribute.created | Attribute created |
attribute.updated | Attribute updated |
attribute.deleted | Attribute deleted |
family.created | Family created |
family.updated | Family updated |
family.deleted | Family deleted |
reference_record.created | Reference record created |
reference_record.updated | Reference record updated |
reference_record.deleted | Reference record deleted |
asset.created | Asset created |
asset.updated | Asset updated |
asset.deleted | Asset deleted |
draft.submitted | Draft submitted |
draft.approved | Draft approved |
draft.rejected | Draft rejected |
feed.generated | Feed generated |
comment.created | Comment posted |