Skip to content
Esc
↑↓navigate↵open⌘Jpreview
On this page

Revalidate payload

JSON body Enad sends to the revalidate endpoint for each content item.

Each revalidate request contains a single JSON object. The type field is a discriminator (product, category, or collection); remaining fields depend on the content type.

All UUIDs are serialized as strings. Translation fields are arrays of { locale, value } objects converted from Enad’s locale maps.

Common types

Translation

Field Type Description
locale string Locale code (for example en, sv)
value string Translated string for that locale

Non-string values in the source locale map are serialized as an empty string.

Product

Sent when a product (or its channel content) changes.

{
  "type": "product",
  "id": "0195a1b2-c3d4-7890-abcd-ef1234567890",
  "name": "Base Product",
  "slug": "base-product",
  "sku": "SKU-1",
  "translations_name": [
    { "locale": "en", "value": "Base EN" },
    { "locale": "sv", "value": "Base SV" }
  ],
  "translations_slug": [
    { "locale": "en", "value": "base-en" },
    { "locale": "sv", "value": "base-sv" }
  ]
}
Field Type Description
type "product" Content discriminator
id string (UUID) Product ID
name string Display name (channel override when endpoint has a channel)
slug string URL slug (channel override when endpoint has a channel)
sku string Stock keeping unit (always from base product)
translations_name Translation[] Localized names
translations_slug Translation[] Localized slugs

Channel override example

When the endpoint is tied to a channel and channel content exists:

{
  "type": "product",
  "id": "0195a1b2-c3d4-7890-abcd-ef1234567890",
  "name": "Channel Product",
  "slug": "channel-product",
  "sku": "SKU-1",
  "translations_name": [
    { "locale": "en", "value": "Channel Product EN" }
  ],
  "translations_slug": [
    { "locale": "en", "value": "channel-product-en" }
  ]
}

Category

Sent when a category changes.

{
  "type": "category",
  "id": "0195a1b2-c3d4-7890-abcd-ef1234567890",
  "name": "Base Category",
  "slug": "base-category",
  "uri": "/base-category",
  "translations_name": [
    { "locale": "en", "value": "Category EN" }
  ],
  "translations_slug": [
    { "locale": "en", "value": "category-en" }
  ],
  "translations_uri": [
    { "locale": "en", "value": "/category-en" }
  ]
}
Field Type Description
type "category" Content discriminator
id string (UUID) Category ID
name string Display name
slug string URL slug
uri string Canonical path or URI
translations_name Translation[] Localized names
translations_slug Translation[] Localized slugs
translations_uri Translation[] Localized URIs

Collection

Sent when a collection changes.

{
  "type": "collection",
  "id": "0195a1b2-c3d4-7890-abcd-ef1234567890",
  "name": "Base Collection",
  "slug": "base-collection",
  "uri": "/base-collection",
  "translations_name": [
    { "locale": "en", "value": "Collection EN" }
  ],
  "translations_slug": [
    { "locale": "en", "value": "collection-en" }
  ],
  "translations_uri": [
    { "locale": "en", "value": "/collection-en" }
  ]
}
Field Type Description
type "collection" Content discriminator
id string (UUID) Collection ID
name string Display name
slug string URL slug
uri string Canonical path or URI
translations_name Translation[] Localized names
translations_slug Translation[] Localized slugs
translations_uri Translation[] Localized URIs

Batch delivery

When multiple items are pending for the same endpoint, Enad sends one HTTP request per item, not a batch array. Requests may arrive concurrently. The endpoint should be idempotent per type + id.