Skip to content

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.

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 as product.*, 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.

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" }]
}
}
}
}
  • id is 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.
  • data holds the event’s details. Product events carry the product as of the version they describe (data.product, in the shape the API reads it), and product.created and product.updated also carry the cells that version changed (data.changes). Updates of catalog things carry changed_fields.
  • A variant whose inherited values changed because its model was saved gets a product.updated with inherited: true and the new values in inherited_values. Its own version doesn’t change.
  • reason says what made the change (manual, import, api, rule, bulk, workflow, supplier, ai, restore, translation), and author_id who 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

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))
);
}
  • Any 2xx answer 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 id to tell.
  • Deliveries go out side by side, so they can arrive out of order. Order them by id, or for a product by data.version.

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.test event (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.

EventMeans
product.createdProduct created
product.updatedProduct updated
product.deletedProduct deleted
product.publishedProduct published
product.state_changedProduct workflow state changed
product.availability_changedProduct availability changed
category.createdCategory created
category.updatedCategory updated
category.movedCategory moved
category.deletedCategory deleted
attribute.createdAttribute created
attribute.updatedAttribute updated
attribute.deletedAttribute deleted
family.createdFamily created
family.updatedFamily updated
family.deletedFamily deleted
reference_record.createdReference record created
reference_record.updatedReference record updated
reference_record.deletedReference record deleted
asset.createdAsset created
asset.updatedAsset updated
asset.deletedAsset deleted
draft.submittedDraft submitted
draft.approvedDraft approved
draft.rejectedDraft rejected
feed.generatedFeed generated
comment.createdComment posted