docs
  1. Events
  2. Other Events
  3. Shop-category-tree-updated

shop-category-tree-updated

A shop-category-tree-updated event is triggered when the shop category tree has changed when:

Example:

  • Categories are added/removed
  • Categories are moved
  • The state (active/visible) of the shop country-specific category changes to shop category
  • Custom data on shop category or shop country category changes
  • Background jobs that applied category changes are finished (e.g. recalculation of paths)\

Attaching/detaching of products to the categories won't trigger this event. The ID of the affected shop is added to a debouncer set, the processor will take the ID out of the debouncer only after a configured timeout which is by default 60 sec, and then a shop-category-tree-updated webhook is triggered.

The tree needs to be fetched via the GET /shops/{shopKey}/categories Admin API endpoint.

Properties:

  • key string
  • occurredAt string
  • meta object
    • tenantKey string
  • payload object
    • shop object
      • id integer
      • key string
  • type enum (shop-category-tree-updated )