# Data Ingestion Source: https://docs.depict.ai/api-guide/data-ingestion A reminder of the data ingestion process Before you continue, make sure you have read and followed the [Data Ingestion](/data-ingestion-guide/overview-of-data-ingestion) guide. Typically, there's a delay between the time of data ingestion and when the data becomes available in the API. If you want to verify the availability of the data, use the [preview browser](https://demo.depict.ai). # Integrating with the Platform API Source: https://docs.depict.ai/api-guide/introduction What the Depict Platform API covers (search, listings, recommendations, tracking), the v2 vs v3 version status, and how markets, locales and currency are resolved. The Platform API is the HTTP API at `https://api.depict.ai`. Use it when you want full control over the UX instead of the pre-built [Depict UI SDK](/react-ui-guide/introduction). It covers four areas, which you can integrate independently: 1. [Search](/api-guide/search) — search results and query suggestions 2. [Listings](/api-guide/listings) — category and collection pages: listing metadata, the navigation tree, and products 3. [Recommendations](/api-guide/recommendations/introduction) — product recommendations 4. [Tracking](/api-guide/tracking/introduction) — the interaction events that power attribution, metrics and ranking The generated endpoint reference is in the API Reference tab, under **Platform API**. Whichever areas you integrate, also complete the [tracking guide](/api-guide/tracking/introduction) — without tracking events, attribution and ranking do not work. ## Build with an AI agent Use [Build an integration with an AI agent](/api-reference/headless/build-with-ai-agent) for search, listings, recommendations and tracking. Use [Build collection pages with an AI agent](/api-reference/headless/build-collections-with-ai-agent) for category and collection pages. Both pages include a short prompt and reference instructions. Supply your merchant configuration when the agent asks. ## Versions > [!WARNING] > > The Platform API currently has two active versions. Build new integrations > against the `/v3` endpoints — `/v3` is the successor to `/v2`. `/v2` is > expected to be deprecated within roughly 6 months and `/v3` within roughly 9 > months, with a v4 API expected in Q4. These are expectations, not committed > dates — confirm timelines with your Depict contact before planning a > migration deadline. The `/v2/recommend/products/category` endpoint follows a different schedule from the rest of `/v2`: see [category recommendations](/api-guide/recommendations/api#category-recommendations). ## Request conventions on v3 | Convention | v3 | v2 | | - | - | - | | Store identifier field | `merchant` | `tenant` | | `locale` | Required on every request | Optional, falls back to the default locale | | User identity fields | `session_id` only | `user_id`, `session_id`, `dsid` | > [!WARNING] > > v3 request bodies silently ignore unknown fields. A misspelled field name > (for example `Limit` instead of `limit`) is dropped without an error, so the > request succeeds with the field's default instead of failing. ## Markets, locales and currency Enumerate the valid `market` and `locale` values for your account at runtime: | Endpoint | Method | Response body | | - | - | - | | `/v3/markets?merchant={merchant}` | GET | `{"markets": ["..."]}` — sorted market ids | | `/v3/locales?merchant={merchant}` | GET | `{"locales": ["..."]}` — sorted locale ids | > [!NOTE] > > These endpoints return separate lists. They do not return valid market and > locale pairs. Use the pairs configured for your storefront. There is no currency request parameter anywhere in the API. Prices arrive pre-resolved inside display objects for the requested `market` and `locale`, and the only currency code the serving API emits is on range-filter metadata (for price sliders). On tracking events you supply `currency` yourself. > [!TIP] > > If you are using TypeScript you can see all [API type definitions here](https://unpkg.com/browse/@depict-ai/types@latest/api/) # Listings Source: https://docs.depict.ai/api-guide/listings How to call the Platform API listing endpoints: addressing by listing_id or external_id, listing metadata and content cards, the navigation tree, and fetching products. > [!WARNING] > > The Platform API currently has two active versions. Build new integrations > against the `/v3` endpoints — `/v3` is the successor to `/v2`. `/v2` is > expected to be deprecated within roughly 6 months and `/v3` within roughly 9 > months, with a v4 API expected in Q4. These are expectations, not committed > dates — confirm timelines with your Depict contact before planning a > migration deadline. Listings are category, collection and campaign pages. The Platform API splits a listing page across two calls: a GET for the listing's metadata (title, breadcrumbs, subcategories, content cards) and a POST for its products. | Endpoint | Method | Purpose | | - | - | - | | `/v3/listings` | GET | The full listing tree — build navigation menus from one call | | `/v3/listings/{listing_id}` | GET | Metadata for one listing, addressed by Depict id | | `/v3/listings/external_id/{external_id}` | GET | Metadata for one listing, addressed by your own id | | `/v3/listings/{listing_id}/products` | POST | Products in a listing, addressed by Depict id | | `/v3/listings/external_id/{external_id}/products` | POST | Products in a listing, addressed by your own id | ## Limits and behavior * Every route exists in two addressing variants: by Depict `listing_id` (a UUID) or by `external_id` (the listing's id in your PIM, CMS or e-commerce platform). Use whichever id system you store. * The products response contains no listing metadata — no title, breadcrumbs or content cards. Fetch metadata with the GET routes. * Filters, sorting and pagination on the products endpoint work exactly as on [search](/api-guide/search); the same limits apply (cursor `limit` 1–250, `hits_per_page` 1–200, no mixing of pagination styles). * There is no `query` field on listing requests. The per-response tracking id is `product_listing_request_id` (search: `search_request_id`) and each display carries `product_listing_result_id` (search: `search_result_id`). * The GET routes carry a 10-second cache header — they are designed to be called on every page load. * An unknown `listing_id` or `external_id` returns 404. * v2's body-based addressing (`query_id` — typically the slug — plus `type` to disambiguate name collisions) does not exist on v3. v3 addresses listings by path parameter, so slug ambiguity cannot occur. * Response fields with null values are omitted from the JSON (`exclude_none` serialization). ## The listing object All listing endpoints return listings in this shape: | Field | Type | Description | | - | - | - | | `listing_id` | string (UUID) | Depict's id for the listing | | `external_id` | string | The listing's id in your own system. May be absent | | `listing_type` | string | One of `category`, `campaign`, `smart_pick`, `brand`, `look`, `style`, `long_tail_collection` — see [types of listing pages](/reference/glossary/types-of-listing-pages) | | `title` | string | Display title of the listing | | `slug` | string | URL slug. May be absent | | `page_url` | string | The listing's page URL, when supplied. May be absent; use your storefront route mapping otherwise | | `image_urls` | array of strings | Images for the listing | | `show_in_breadcrumbs` | boolean | Whether to show the listing in navigation breadcrumbs | | `show_in_quicklinks` | boolean | Whether to show the listing in quicklinks | ## Listing metadata `GET /v3/listings/{listing_id}` or `GET /v3/listings/external_id/{external_id}` with query parameters `merchant`, `market`, `locale` (all required) and optional `session_id`. The response is [the listing object](#the-listing-object) plus: | Field | Type | Description | | - | - | - | | `ancestors` | array of listings | Ordered ancestors, root first — use for breadcrumbs | | `siblings` | array of listings | Listings sharing the same parent, including the requested listing itself | | `children` | array of listings | Direct children — use for subcategory navigation | | `content_blocks` | array | The listing's content cards, to place in the product grid | ### Content cards Content cards are merchandising tiles (images or videos) placed in the product grid. On the wire the field is named `content_blocks`. Each element: | Field | Type | Description | | - | - | - | | `span_columns` | integer | Grid columns the card spans | | `span_rows` | integer | Grid rows the card spans | | `row` | integer | Grid row the card is placed on | | `position` | string | Horizontal placement: `left`, `center` or `right` | | `content` | object | The media: `type` (`image` or `video`), `url`, optional `link`, and the optional text overlay fields below | The text overlay fields on `content`: | Field | Type | Description | | - | - | - | | `text` | string or null | Single-line copy shown on the card, up to 140 characters | | `cta` | string or null | Optional call-to-action line shown under `text` (for example "Shop now"), up to 60 characters | | `text_position` | string | Where to place the overlay: one of `top-left`, `top-center`, `top-right`, `middle-left`, `middle-center`, `middle-right`, `bottom-left`, `bottom-center`, `bottom-right`. Defaults to `bottom-center` | The API never sends `text` or `cta` longer than these limits: longer copy is shortened to fit rather than dropped, and line breaks and invisible characters are removed, so you can render the values as they arrive. The API sends only the words and their position, never a font, colour or size. Your storefront renders the overlay, so style `text` and `cta` with your own CSS, for example with your brand font. ## Navigation tree `GET /v3/listings` with query parameters `merchant`, `market`, `locale` (all required) and an optional repeatable `types` parameter to filter by `listing_type`. The response is a list of [listing objects](#the-listing-object), each extended with a recursive `children` array of the same shape — the complete listing tree in one call. ## Products in a listing `POST /v3/listings/{listing_id}/products` or `POST /v3/listings/external_id/{external_id}/products` with a JSON body: | Field | Type | Required | Description | | - | - | - | - | | `merchant` | string | Yes | Your merchant identifier | | `market` | string | Yes | Market identifier | | `locale` | string | Yes | Locale identifier | | `filters` | array | No | Same semantics as [search filters](/api-guide/search#filters) | | `sort` | object | No | Same semantics as [search sorting](/api-guide/search#sorting) | | `session_id` | string | No | Session identifier; required for the request to be tracked and attributable | | `metadata` | object | No | String-to-string map; only use values agreed with Depict | | `cursor` / `limit` / `page` / `hits_per_page` | — | No | [Pagination](/api-guide/search#pagination), same rules as search | Example request: ```json theme={null} { "merchant": "MERCHANT_ID", "market": "MARKET", "locale": "en", "limit": 40, "session_id": "SESSION_ID" } ``` ### Response | Field | Type | Description | | - | - | - | | `displays` | array of objects | The products, one object per card. Merchant-specific product data; each display carries a `product_listing_result_id` used for [tracking](/api-guide/tracking/product-cards) | | `n_hits` | integer | Total number of products in the listing. Not necessarily exact | | `sorts` | array | Available sorting methods | | `filters` | array | Available filters | | `product_listing_request_id` | string | Identifier for this response, used in tracking | | `cursor` | string | Cursor for the next page. Absent when there are no more results | | `page` | integer | Echoed page index when page-based pagination was used; absent otherwise | ## Quicklinks and breadcrumbs when replacing the UI SDK The metadata response supplies `ancestors`, `children` and `siblings`. It does not supply a computed `quick_links` or `breadcrumbs` array. To preserve the UI SDK's quicklink selection: 1. Select `children` when the unfiltered array is not empty. 2. Otherwise, select `siblings`. 3. Keep entries whose `show_in_quicklinks` value is `true`. 4. Keep the returned order. For breadcrumbs, use `ancestors` in their returned order. Display entries whose `show_in_breadcrumbs` value is `true`. If your design also shows parent quicklinks, read them directly from the metadata's `ancestors`. Filter these parents by `show_in_quicklinks`. Exclude the current `listing_id` from the parent group. Remove duplicate listing IDs. Do not require the current listing to occur in the selected quicklink group. It usually does not occur in `children`. Build links with your storefront's route function and the full ancestor `slug` chain. For a child link, include the current listing's `slug` before the child's `slug`. For a sibling link, use the current listing's ancestors. Keep all route segments, even when a navigation flag hides a segment's label. If a slug is absent, use your existing CMS route mapping. # Interfacing directly with the API Source: https://docs.depict.ai/api-guide/recommendations/api How to call POST /v3/recommend/products: request fields, how product_ids selects the recommendation flavor, the response shape on the wire, and the status of category recommendations. > [!WARNING] > > The Platform API currently has two active versions. Build new integrations > against the `/v3` endpoints — `/v3` is the successor to `/v2`. `/v2` is > expected to be deprecated within roughly 6 months and `/v3` within roughly 9 > months, with a v4 API expected in Q4. These are expectations, not committed > dates — confirm timelines with your Depict contact before planning a > migration deadline. If you don't want to use our API Client you can make the requests yourself. Recommendations are served by a single endpoint: ``` POST https://api.depict.ai/v3/recommend/products ``` It replaces the three v2 endpoints `/v2/recommend/products/general`, `/v2/recommend/products/product` and `/v2/recommend/products/products` — the number of ids in `product_ids` selects the behavior. The full request/response schema is in the API Reference tab, under **Platform API**. ## Limits and behavior * `limit` is 1–128. * No category parameter exists on `/v3/recommend/products`, and category recommendations have no v3 endpoint — see [Category recommendations](#category-recommendations). * Valid `type` values are configured per merchant. Get your list from your Depict contact; an unconfigured combination returns an error (see [Errors](#errors)). * Unknown request fields are silently ignored — a misspelled field name is dropped, not rejected. * Display fields depend on your merchant configuration — see [Response](#response). ## Request | Field | Type | Required | Description | | - | - | - | - | | `merchant` | string | Yes | Your merchant identifier, provided by Depict | | `market` | string | Yes | Market identifier | | `locale` | string | Yes | Locale identifier | | `type` | string | Yes | The recommendation type, e.g. `cross_sell`. Configured per merchant | | `product_ids` | array of strings | No | Zero, one or multiple product identifiers — selects the behavior, see below. Default `[]` | | `limit` | integer | No | Maximum number of recommendations, 1–128 | | `session_id` | string | No | Session identifier; links the request to tracking | `product_ids` selects which recommendations you get: | `product_ids` | Behavior | Typical placement | v2 endpoint it replaces | | - | - | - | - | | Empty / omitted | General recommendations for the page type | Front page | `/v2/recommend/products/general` | | One id | Recommendations for that product | Product page | `/v2/recommend/products/product` | | Two or more ids | Recommendations for the set of products | Cart | `/v2/recommend/products/products` | Common surface names include `after_basket` for a cart drawer and `checkout` for checkout recommendations. These are separate surfaces. Preserve the type and product context used by your existing integration. Confirm availability for each market with Depict. Do not select a type only from a surface's display title. Example request: ```json theme={null} { "merchant": "MERCHANT_ID", "market": "MARKET", "locale": "en", "type": "TYPE", "product_ids": ["product-1", "product-2"], "session_id": "SESSION_ID" } ``` ## Response On the wire the response is: | Field | Type | Description | | - | - | - | | `displays` | array of objects | The recommendations, one object per product card. Merchant-specific product data; each display carries a `recommendation_id` used for [tracking](/api-guide/tracking/product-cards) | | `error` | string | Error message. Absent on success | | `variant` | integer | A/B test variant, when an experiment is running. May be absent | | `experiment_id` | string | A/B test experiment identifier. May be absent | > [!NOTE] > > Displays contain merchant-specific objects. Confirm the fields your product > cards need with Depict. Preserve each display's `recommendation_id` when you > transform its product data. ## Category recommendations > [!WARNING] > > `POST /v2/recommend/products/category` is deprecated and closed to new > integrations. It remains available for its existing consumers, and its > removal is aligned with the upcoming v4 recommendations launch — not with > the general v2 deprecation timeline. No v3 equivalent exists today, and > `/v3/listings` is not a substitute: it serves merchandised category browsing, > which is a different contract from category recommendations. If you have an existing integration on this endpoint: it takes a v2-shaped body (`tenant`, `market`, `category_id`, `type`) and returns the same response shape as above. Do not build new functionality on it. ## Errors * An unconfigured merchant returns 400 with `{"detail": "Merchant {merchant} not configured for recommendations."}`. * An unconfigured `(merchant, market, type)` combination returns 400 with `{"error": "(tenant, market, type) not yet configured. Please contact Depict."}`. The message wording uses the v2 vocabulary (`tenant`) and may change — match on the presence of `error`, not on the exact message text. # JavaScript API client Source: https://docs.depict.ai/api-guide/recommendations/api-client Install the Depict UI package, import the recommendations client, and fetch recommendations for a page, a product or a set of products. The JavaScript API client wraps `POST /v3/recommend/products` so you don't build the request yourself. It ships inside the Depict UI packages. ## Install ```shell NPM (React) theme={null} npm i @depict-ai/react-ui ``` ```shell Yarn (React) theme={null} yarn add @depict-ai/react-ui ``` ```shell NPM (JS) theme={null} npm i @depict-ai/js-ui ``` ```shell Yarn (JS) theme={null} yarn add @depict-ai/js-ui ``` ## Import Add the import at the top of the file where you fetch recommendations: ```typescript js-ui theme={null} import { fetchDepictRecommendations } from "@depict-ai/js-ui"; ``` ```typescript react-ui theme={null} import { useFetchRecommendations } from "@depict-ai/react-ui"; // In the component that needs recommendations: const { fetchRecommendations } = useFetchRecommendations(); // `merchant` and `market` are taken from the DepictProvider, so you don't // pass them to this `fetchRecommendations`. ``` ## Fetch recommendations `fetchDepictRecommendations` takes an options object and returns a promise of an array of displays (product data). Every option is listed in the [reference](/reference/recommendations-sdk/recommendations-sdk-api-wrapper). > [!NOTE] > > Where to find your merchant and market ids: see [Set up DPC](/api-guide/tracking/setup#merchant-and-market-ids). > [!TIP] > > For a list of possible types, try checking the [preview browser](https://demo.depict.ai/null/null/recommendations?headers=%7B%22force-new-displays%22%3A%221%22%7D) or ask your Depict contact. Usually the available types are also detailed in the kickoff slides. If you get a response whose `error` says the `(tenant, market, type)` combination is not yet configured, that means a type isn't available for you - let us know if you want it. (The exact message text uses the v2 vocabulary `tenant` and may change.) | Use case | Extra option | Example | | - | - | - | | General recommendations for a page type, most often the front page | none | `type: "front_page"` | | Recommendations for one product, for example below the description on a product page | `productId` | `productId: "this-is-an-amazing-product"` | | Recommendations for several products, for example everything in the cart | `productIds` | `productIds: ["product-1", "product-2"]` | ```typescript TypeScript theme={null} import { fetchDepictRecommendations } from "@depict-ai/js-ui"; const frontPageRecs = await fetchDepictRecommendations({ merchant: "MERCHANT_ID", market: "MARKET", locale: "en_GB", // See demo.depict.ai for available locales type: "TYPE", }); const productPageRecs = await fetchDepictRecommendations({ merchant: "MERCHANT_ID", market: "MARKET", locale: "en_GB", type: "TYPE", productId: "this-is-an-amazing-product", }); const cartRecs = await fetchDepictRecommendations({ merchant: "MERCHANT_ID", market: "MARKET", locale: "en_GB", type: "TYPE", productIds: ["product-1", "product-2", "product-3"], }); ``` That's it for fetching. Render the displays with your own product card, then follow the [tracking guide](/api-guide/tracking/introduction) so clicks and purchases are attributed to the recommendations. # Introduction Source: https://docs.depict.ai/api-guide/recommendations/introduction We provide two ways to use the API: 1. [With our JavaScript API client (recommended)](/api-guide/recommendations/api-client) 2. [By making the requests yourself](/api-guide/recommendations/api) against `POST /v3/recommend/products` To experiment with what recommendations are available for you and see queries made in action, checkout the [preview browser](https://demo.depict.ai/null/null/recommendations?headers=%7B%22force-new-displays%22%3A%221%22%7D). > [!NOTE] > > Don't forget to follow the [tracking guide](/api-guide/tracking/introduction) # Search Source: https://docs.depict.ai/api-guide/search How to call the Platform API search endpoints: the /v3/search/results request and response, pagination, filter and sort semantics, and /v3/search/suggestions. > [!WARNING] > > The Platform API currently has two active versions. Build new integrations > against the `/v3` endpoints — `/v3` is the successor to `/v2`. `/v2` is > expected to be deprecated within roughly 6 months and `/v3` within roughly 9 > months, with a v4 API expected in Q4. These are expectations, not committed > dates — confirm timelines with your Depict contact before planning a > migration deadline. Search on the Platform API consists of these endpoints: | Endpoint | Method | Purpose | | - | - | - | | `/v3/search/results` | POST | Search results for a query, with filters, sorting and pagination | | `/v3/search/suggestions` | GET | Query and listing suggestions for autocomplete | | `/v3/search/related` | POST | Related-products recommendations for a search — returns a recommendations-shaped response, see the note below | > [!NOTE] > > `/v3/search/related` returns the same response shape as > [`/v3/recommend/products`](/api-guide/recommendations/api), not a search > response. Its displays carry `recommendation_id` (not `search_result_id`) for > [tracking](/api-guide/tracking/product-cards). ## Limits and behavior * Every response is a single JSON body. No search endpoint streams; there is no SSE or chunked delivery. * Two pagination styles exist — cursor-based and page-based. They are mutually exclusive: mixing fields from both in one request returns 400. * Cursor-based `limit`: 1–250. Page-based `hits_per_page`: 1–200 and required whenever `page` is sent. * `merchant`, `market` and `locale` are required on every request. Enumerate valid values via [`/v3/markets` and `/v3/locales`](/api-guide/introduction#markets-locales-and-currency). * Unknown request fields are silently ignored — a misspelled field name is dropped, not rejected. * Available filters and sorts are per-merchant configuration. Do not hardcode them: read them off the `filters` and `sorts` arrays in each response. * `GET /v2/search/content` (dedicated content search) has no v3 equivalent. Content results are available only as `content_search_links` inside `/v3/search/results` responses. * Suggestions responses carry a one-hour cache header; `limit` for suggestions is 1–10, default 3. * Response fields with null values are omitted from the JSON (`exclude_none` serialization). ## Search results `POST /v3/search/results` with a JSON body: | Field | Type | Required | Description | | - | - | - | - | | `merchant` | string | Yes | Your merchant identifier, provided by Depict | | `market` | string | Yes | Market identifier | | `locale` | string | Yes | Locale identifier | | `query` | string | No | The search query | | `filters` | array | No | Filters to apply — see [Filters](#filters) | | `sort` | object | No | Sorting method — see [Sorting](#sorting) | | `session_id` | string | No | Session identifier; required for the request to be tracked and attributable | | `metadata` | object | No | String-to-string map that can modify search behavior; only use values agreed with Depict | | `cursor` | string | No | Cursor-based pagination — see [Pagination](#pagination) | | `limit` | integer | No | Cursor-based pagination: max results per response, 1–250 | | `page` | integer | No | Page-based pagination: 1-based page index | | `hits_per_page` | integer | No | Page-based pagination: results per page, 1–200; required when `page` is sent | Example request: ```json theme={null} { "merchant": "MERCHANT_ID", "market": "MARKET", "locale": "en", "query": "jeans", "limit": 40, "session_id": "SESSION_ID" } ``` ### Response | Field | Type | Description | | - | - | - | | `displays` | array of objects | The results, one object per product card. The contents are merchant-specific product data; each display also carries a `search_result_id` used for [tracking](/api-guide/tracking/product-cards) | | `n_hits` | integer | Total number of results for the query. Not necessarily exact | | `sorts` | array | Available sorting methods. Any element can be sent as `sort` in a subsequent request | | `filters` | array | Available filters that can be sent back in a subsequent request | | `search_request_id` | string | Identifier for this response, used in tracking | | `cursor` | string | Cursor for the next page. Absent when there are no more results | | `page` | integer | Echoed page index when page-based pagination was used; absent otherwise | | `content_search_links` | array | Content pages matching the query — see [Content results](#content-results) | ## Pagination | Style | Request fields | How to page | | - | - | - | | Cursor-based | `cursor`, `limit` (1–250) | Omit `cursor` for the first request. Send the response's `cursor` in the next request until the response has no `cursor` | | Page-based | `page` (≥1), `hits_per_page` (1–200) | Request each page by index. `hits_per_page` is required whenever `page` is sent | Rules for how the two styles interact: * The styles are mutually exclusive. A request that mixes fields from both returns 400 with `{"error": "Cannot mix cursor-based and page-based pagination."}`. * `page` without `hits_per_page` returns 400. * An undecodable `cursor` returns 400 with `{"error": "Invalid pagination cursor."}`. * The response mirrors the style used: page-based requests always echo `page` (defaulting to 1) and omit `cursor`; cursor-based requests omit `page`. ## Filters Each response's `filters` array describes the available filters. To apply a filter, send its `field`, `op` and selected `data` in the next request. The schema requires `field` and `op`. It permits omitted or null `data`, but that does not select a value. An empty selection does not constrain results. A filter object: | Field | Type | Description | | - | - | - | | `field` | string | The product attribute the filter applies to | | `op` | string | One of `eq`, `neq`, `in`, `nin`, `leq`, `geq`, `inrange` | | `data` | varies | The selected state — format depends on the filter type, see below | | `meta` | object | UI metadata (type, title, selectable values, counts, display names). Returned by the API; not required when sending a filter back | | `id` | string | Groups filters that belong together. Optional | The filter type is in `meta.type`: | `meta.type` | Selection behavior | `data` format | | - | - | - | | `range` | Numeric range, e.g. price | `[min, max]` | | `radio` | Exactly one value selectable | List with the selected value | | `checkbox` | Multiple values selectable | List of selected values | | `checkbox-grid` | Same as `checkbox`; render compactly as a grid (typically sizes) | List of selected values | | `checkbox-color` | Same as `checkbox`; `meta.swatches` provides color swatches per value | List of selected values | | `checkbox-hierarchical` | Tree of values, typically categories | List of paths — see below | ### Range filters `data` is `[min, max]`. `meta` carries the selectable bounds `min` and `max`, plus optional `unit` and `currency` for rendering. ### Value filters `data` is the list of selected values. `meta.values` lists the selectable values, `meta.counts` the result count per value, and `meta.names` optional display names. ### Hierarchical filters `data` is a list of paths, where each path is the list of node titles from the root to a selected node. If a parent is selected, all of its children must also be included as selected. Example: a category tree where the user selected **Shirts** and **Jeans**: 1. Clothes 1. **Shirts** 1. **Cotton Shirts** 2. **Linen Shirts** 2. Pants 1. **Jeans** 2. Shorts Selecting Shirts (a parent) implies both of its children, so the corresponding `data` is: ```json theme={null} [ ["Clothes", "Shirts"], ["Clothes", "Shirts", "Cotton Shirts"], ["Clothes", "Shirts", "Linen Shirts"], ["Clothes", "Pants", "Jeans"] ] ``` Invalid filter, market or locale combinations return 422 with `{"error": "Invalid request parameters. Please check your filters, market, and locale."}`. ## Sorting Each response's `sorts` array lists the available sorting methods for your catalog; the default is relevance. To sort, send one of them back as `sort`: `{"field": "...", "order": "asc" | "desc"}`. The `meta` object on each sort (title, selectable orders, display names) is for rendering and does not need to be sent back. ## Query suggestions `GET /v3/search/suggestions` with query-string parameters: | Parameter | Type | Required | Description | | - | - | - | - | | `merchant` | string | Yes | Your merchant identifier | | `market` | string | Yes | Market identifier | | `locale` | string | Yes | Locale identifier | | `query` | string | No | The partial query the user has typed | | `session_id` | string | No | Session identifier | | `limit` | integer | No | Maximum number of suggestions, 1–10. Default 3 | The response is `{"suggestions_request_id": "...", "suggestions": [...]}` where each suggestion is one of two shapes: | `type` | Fields | Meaning | | - | - | - | | `query` | `query`, `suggestions_result_id` | A suggested search query | | `listing` | `listing_id`, `external_id`, `listing_type`, `title`, `slug`, `image_urls`, `show_in_breadcrumbs`, `show_in_quicklinks`, `ancestors`, `suggestions_result_id` | A suggested [listing](/api-guide/listings). `ancestors` is the ordered breadcrumb path, root first | > [!NOTE] > > On v2 the suggested-query field was named `title` and listing suggestions > were category suggestions. On v3 the field is `query` and suggestions > reference listings. Suggestions responses carry a one-hour cache header. If the suggestions index for the requested locale has not been built yet, the endpoint returns 404 with an `{"error": ...}` body. ## Content results There is no dedicated content-search endpoint on v3 — `GET /v2/search/content` has no successor. Content results arrive as the `content_search_links` array on `/v3/search/results` responses. Each element: | Field | Type | Description | | - | - | - | | `type` | string | Always `content_link` | | `title` | string | Title of the content page | | `description` | string | Short description. May be absent | | `image_url` | string | Image for the content page. May be absent | | `page_url` | string | URL of the content page | | `highlights` | array | Snippets showing why the query matched | ## Errors | Status | Body | Cause | | - | - | - | | 400 | `{"error": "..."}` | Invalid cursor, `page` without `hits_per_page`, mixed pagination styles, unknown merchant/market configuration | | 422 | `{"error": "..."}` | Invalid filters, market or locale | | 422 | `{"detail": [...]}` | Request body fails schema validation (missing required field, wrong type) | | 404 | `{"error": "..."}` | Suggestions index or search backend resource not found | | 500 | `{"error": "..."}` | A handled search backend failure; the message includes an `Error ID` | | 503 | `{"detail": "..."}` | Search is temporarily unavailable; the response can include `Retry-After` | Handled unexpected search errors include an `Error ID`. Give that ID to Depict support. Other failures can have a different body. Check the HTTP status before you read response fields. Apply a request timeout in your storefront. Keep the page usable if the request fails. Depict does not specify a storefront timeout or a rate-limit policy on this page. ## Product card data `displays` contains merchant-specific product objects. Confirm your display mapping with Depict before you assign types to these objects. If your mapping uses `variant_displays` and `variant_index`, select the card variant with `display.variant_displays[display.variant_index]`. The [display transformer guide](/reference/listings-search/display-transformers) shows this structure and the usual card fields: * `product_id` identifies the selected variant for product page and add-to-cart tracking. * `title` supplies the card title. * `image_urls` is an array of image URLs. Some mappings use one `image_url` instead. * `sale_price` and `original_price` supply the resolved prices. * `page_url` can come from your display transformer. It is not guaranteed in the raw response. * If your mapping supplies `in_stock`, use it for the card's availability state. Preserve `search_result_id` on the outer display for card tracking. Use the returned prices for the requested market and locale. Keep the API's product order. If a returned variant is unavailable, disable its add-to-cart control. Do not infer availability from the image or price. Provide an image placeholder when no usable image is present. # Add to cart tracking Source: https://docs.depict.ai/api-guide/tracking/add-to-cart You need to track both the add-to-cart button on your product page and, if applicable, on your product cards You can either send `addToCart` events manually to Depict, or automatically by marking add-to-cart buttons in the DOM using the `depict-add-to-cart` class. The automatic tracking is limited to one product id per product detail page and product card. If your website uses size and color selectors before adding to cart, the imperative tracking is more reliable. **Sending add-to-cart events imperatively** > [!NOTE] > > Use the same variant-level `product_id` that our API returns in the displays > — the same id vocabulary as [`setProductId`](/api-guide/tracking/product-pages). > See [Which ID goes where](/api-guide/tracking/ids). Whenever a product was successfully added to the cart anywhere on your website (including surfaces not directly related to Depict), send an `addToCart` event with the corresponding product id. If you implement imperative tracking, skip the automatic tracking section below. ```typescript dpq theme={null} dpq("addToCart", "[PRODUCT_ID_FOR_ADDED_PRODUCT]"); ``` ```typescript DPC instance theme={null} dpc.sendAddToCartEvent({ product_id: "[PRODUCT_ID_FOR_ADDED_PRODUCT]" }); ``` **Mark up your add-to-cart buttons for automatic tracking** Add the `depict-add-to-cart` class to all add-to-cart buttons on your website, including product cards and product detail pages. Depict will automatically track clicks as necessary, using the [product id](/api-guide/tracking/product-pages) set on product detail pages or [result id](/api-guide/tracking/product-cards) for buttons inside product cards. ```html HTML theme={null} ``` # Which ID goes where Source: https://docs.depict.ai/api-guide/tracking/ids Tracking uses three different kinds of ids. Sending the right one in each event is what makes attribution work. Depict tracking uses **three id vocabularies**. They look similar but are not interchangeable, and sending the wrong kind does not produce an error — the event is accepted and then silently fails to match anything, which quietly degrades your metrics. This page is the reference for which id each event needs. | Event | Id to send | Where it comes from | | - | - | - | | Product card clicks | **result id** (`search_result_id`, `recommendation_id` or `product_listing_result_id`) | Returned inside every display in our API responses. You place it on the card as a data attribute — see [Product Card Tracking](/api-guide/tracking/product-cards). | | `setProductId` (PDP views) | **product id** (`product_id`) | The `product_id` field of the displays our API returns. It identifies the product on variant level — on Shopify this is the variant id. | | `addToCart` | **product id** (`product_id`) | Same as `setProductId`. Use the id of the variant that was added. | | `purchase` → `items[].item_id` | **transaction product id** | The id your product data was ingested with for transaction matching. By default this is the SKU from your catalog; on Shopify it is the variant's SKU, or the variant id for variants without a SKU. | ## Why the difference matters * **Result ids** are unique per API response, not per product — they tie a click to the exact search, listing or recommendation that produced it. That link is what powers surface-level performance metrics and lets ranking learn from real behaviour. * **Product ids** join PDP views and add-to-carts to your catalog. If the id you send doesn't match the displays' `product_id`, those events can't be connected to products. * **Transaction product ids** join purchase line items to your catalog through a mapping that is refreshed on every catalog ingestion. A line item whose `item_id` doesn't match drops out of per-product revenue, best-seller and funnel metrics — while still counting toward raw totals, which makes the gap easy to miss. > [!WARNING] > > The most common integration mistake is sending the displays' `product_id` as > a purchase `item_id` (or vice versa). They are different vocabularies — > purchases match on your SKUs, not on `product_id` — unless your catalog > happens to use the same value for both. ## Result-id lifetime and event validation Rules that apply when sending events — DPC follows them automatically, so they matter mostly for server-side or custom event senders posting to `/create-events`: * **A result id is attributable for 10 minutes** after the API response that contained it was generated. Send click events promptly with the exact id from the clicked display — an event with an expired or unknown result id is accepted with a 200 but can no longer be attributed to its search, listing or recommendation. * Every event must carry at least one identity field: `session_id`, `user_id` or `dsid`. A batch containing an event without one is rejected with 422, naming the index of the failing event. * A `click` event must carry at least one of `search_result_id`, `recommendation_id`, `product_listing_result_id` or `click_location` — otherwise the batch is rejected with 422. Which result id each endpoint returns: | Endpoint the display came from | Result id on the display | | - | - | | `/v3/search/results` | `search_result_id` | | `/v3/listings/.../products` | `product_listing_result_id` | | `/v3/recommend/products` | `recommendation_id` | | `/v3/search/related` | `recommendation_id` — related-products displays are recommendations and do **not** carry `search_result_id` | ## How to verify The "Tracking status" tab on [app.depict.ai](https://app.depict.ai) shows your incoming events live. The table at the bottom lists examples of valid product ids from your ingested catalog — compare them against what your events are sending. After your first test purchases, confirm they map to catalog products rather than only appearing in raw event counts. # Introduction Source: https://docs.depict.ai/api-guide/tracking/introduction A guide to setting up tracking for your Depict API integration For any Depict product that's integrated, it is important to set up tracking so that our product performs correctly. Visit the "Tracking status" tab on [app.depict.ai](https://app.depict.ai) for live feedback on your tracking events. This guide will walk you through the steps to set up tracking for your Depict project using DPC (Depict Performance Client). > [!NOTE] > > Is your integration built on the legacy `@depict-ai/react-ui` SDK? That > package installs and initialises DPC automatically — skip ahead to [Product > Card Tracking](/api-guide/tracking/product-cards) and follow it for any > product cards you render yourself. `@depict-ai/js-ui` does not initialise DPC > for you — if you use it, install and initialise DPC by following this guide. > [!NOTE] > > For more detailed information see the [DPC > Reference](/reference/performance-client/introduction-to-depict-performance-client) ## Testing without polluting analytics There is no sandbox host and no test merchant: `https://api.depict.ai` is the only environment, and tracked test traffic counts toward your production analytics. Do not use a merchant id ending in `demo` as a staging stand-in — those ids are proxied to a legacy backend and do not behave like production v3. To keep test and load-test traffic out of your analytics: * Send the header `track: false` on `/v3/search/results` and `/v3/listings/.../products` requests. These endpoints record a search/listing analytics event server-side on every tracked request, so load tests without this header inflate your dashboards. * Omit `session_id` from serving requests. Requests without a session id are excluded from tracking. * Requests from load-test tools identifying as `Locust...` and from common crawler user agents are excluded automatically: serving-side tracking is skipped, and `POST /create-events` returns `{"message": "ok"}` without processing the events. When verifying that events are accepted, use a browser-like `User-Agent` — a crawler-like one makes `/create-events` a no-op that still returns 200. A 200 `{"message": "ok"}` confirms the batch parsed, not that attribution resolved; use the "Tracking status" tab on [app.depict.ai](https://app.depict.ai) to confirm events arrive, and see [result-id lifetime](/api-guide/tracking/ids#result-id-lifetime-and-event-validation) for the rules that make events attributable. # Product Card Tracking Source: https://docs.depict.ai/api-guide/tracking/product-cards How to make sure DPC tracks your product cards correctly > [!NOTE] > > These steps apply to product cards you render yourself. Cards rendered by a > legacy Depict UI SDK already carry these attributes. We need to tell DPC about the product cards that you created using Depict data. Also, you need to enable Depict to understand what product this product card is in our internal representation. In the response from all our API:s there's an id inside each display. You need to add this id to your product card template as a data attribute. The ID is called different things based on different endpoints | Endpoint you got product data from | Name of ID in `display` (display = product data provided from API response) | Attribute name to be used | | - | - | - | | /v3/listings/\* | product\_listing\_result\_id | data-product-listing-result-id | | /v2/product-listing | product\_listing\_result\_id | data-product-listing-result-id | | /v3/recommend/products | recommendation\_id | data-recommendation-id | | /v2/recommend/\* | recommendation\_id | data-recommendation-id | | /v3/search/results | search\_result\_id | data-search-result-id | | /v2/search/results | search\_result\_id | data-search-result-id | | /v3/search/related | recommendation\_id | data-recommendation-id | | /v2/search/related | recommendation\_id | data-recommendation-id | > [!NOTE] > > `/v3/search/suggestions` returns no displays, so there is nothing to tag for it. This step enables DPC to track clicks on the product cards — including clicks on [add-to-cart buttons](/api-guide/tracking/add-to-cart) inside them. Cards added later (for example after client-side navigation or infinite scroll) are picked up automatically. ## Examples One attribute per card, named after the endpoint the display came from (see the table above). The value is the id from that display. ```html Collection or category page (/v3/listings/*) theme={null}
``` ```html Recommendations (/v3/recommend/products) theme={null}
``` ```html Search results (/v3/search/*) theme={null}
``` ## Product card impressions A click data attribute does not prove that impression tracking is active. When you render cards yourself, add visibility tracking for search, listing and recommendation cards. Check the events your installed DPC version sends before you add a second sender. Send a card impression when the card becomes visible. Send it from the browser, after rendering. Do not send an impression only because the server rendered a card in HTML. A custom sender can use `POST https://api.depict.ai/create-events` with a JSON array. Each event requires `tenant`, `market`, `type` and at least one identity field: `session_id`, `user_id` or `dsid`. For an impression, set `type` to `element_visible`. Include the result ID from the visible display and its selected variant's `product_id`. ```json theme={null} [ { "tenant": "MERCHANT_ID", "market": "MARKET", "session_id": "SESSION_ID", "type": "element_visible", "search_result_id": "RESULT_ID_FROM_DISPLAY", "product_id": "PRODUCT_ID_FROM_SELECTED_VARIANT" } ] ``` For listing cards, use `product_listing_result_id` instead of `search_result_id`. For recommendation cards, use `recommendation_id`. Include exactly the result ID for the card's source. A custom click sender uses the same endpoint and identity fields, with `type: "click"` and the card's result ID. `/create-events` uses `tenant`, although v3 serving requests use `merchant`. Use the same session ID in serving requests, DPC and custom events. Configure DPC with [`setSessionId`](/reference/performance-client/performance-client#informing-depict-of-logged-in-users-optional). The [ID guide](/api-guide/tracking/ids#result-id-lifetime-and-event-validation) explains the 10-minute result ID lifetime and event validation. Check the HTTP status when sending events. A `200` response with `{"message": "ok"}` confirms that the batch passed validation. It does not prove that result IDs matched. Confirm event arrival and product matching in the portal's Tracking status tab. # Product Page Tracking Source: https://docs.depict.ai/api-guide/tracking/product-pages How to make sure DPC tracks your Product Details Page (PDP) views correctly. > [!NOTE] > > The product id used in `setProductId` and `addToCart` events must be the > same id that our API returns in the displays as `product_id` — see [Which ID > goes where](/api-guide/tracking/ids). For examples of valid product ids, see > the bottom table on the "Tracking status" tab on > [app.depict.ai](https://app.depict.ai). Every time after navigating to a page representing a product on your website, you need to send a `setProductId` event to register which product id is currently viewed. This includes client-side route changes in single-page apps: DPC detects the navigation and invalidates the previous product id, but it never infers the new one — send `setProductId` again on every PDP view. ```typescript dpq theme={null} dpq("setProductId", "PRODUCT_ID_FOR_CURRENT_PDP"); ``` ```typescript DPC instance theme={null} dpc.setProductId("PRODUCT_ID_FOR_CURRENT_PDP"); ``` # Purchase tracking Source: https://docs.depict.ai/api-guide/tracking/purchases To calculate revenue figures, you need to track purchases. This is done with the `purchase` event. A purchase is an event that tracks when a user has gone through the checkout process and paid for a set of products. Send it once, from your order-confirmation page. Send events for **all** purchases — including ones that had nothing to do with Depict. Store-wide purchase data is the baseline that Depict's performance and analytics metrics are computed against. ```typescript dpq theme={null} dpq("purchase", { transaction_id: "YOUR_TRANSACTION_ID", items: [{ item_id: "white-socks-xl", price: 89.9, quantity: 12 }], currency: "SEK", }); ``` ```typescript DPC instance theme={null} dpc.sendPurchaseEvent({ transaction_id: "YOUR_TRANSACTION_ID", items: [{ item_id: "white-socks-xl", price: 89.9, quantity: 12 }], currency: "SEK", }); ``` ## Field reference * **`transaction_id`** — the id of the order in your system. It must be stable and unique per purchase: Depict deduplicates purchase events on it, so accidentally sending the same order twice is safe, but reusing an id across different orders loses data. * **`items`** — one entry per order line: * **`item_id`** — the id this product was ingested with as its *transaction product id*. By default that is the SKU from your product data; on Shopify it is the variant's SKU, or the variant id for variants without a SKU. See [Which ID goes where](/api-guide/tracking/ids). * **`price`** — the final **per-unit** price, after taxes and discounts. If a discount applies to a whole line, spread it across the units. Items with price `0` (for example free gifts) are excluded from purchase metrics. * **`quantity`** — a whole number, at least 1. * **`currency`** — the ISO 4217 code the prices are denominated in (e.g. `SEK`, `EUR`). Revenue is converted for display in the portal, so the code must be correct. > [!WARNING] > > A wrong `item_id` does not produce an error — the line item is accepted but > can't be matched to your catalog, so it silently disappears from per-product > metrics and attribution while still counting toward raw totals. After going > live, check the "Tracking status" tab on > [app.depict.ai](https://app.depict.ai) to confirm your purchases map to > catalog products. > [!NOTE] > > Purchase events are sent from the browser. If your checkout completes on a > domain where DPC can't run, or you'd rather report purchases > server-to-server, [contact us](mailto:support@depict.ai) — we'll set it up > together. > [!TIP] > > Tracking is set up. Open the "Tracking status" tab on [app.depict.ai](https://app.depict.ai) to confirm that product card, product page, add-to-cart and purchase events arrive. # Set up DPC Source: https://docs.depict.ai/api-guide/tracking/setup Install, import and initialise the Depict Performance Client once, then send events from anywhere in your app. DPC (Depict Performance Client) is the small browser library that sends tracking events to Depict. Set it up once; the event pages that follow assume `dpc` is initialised. ## Install Add the dependency to your project: ```shell NPM theme={null} npm i @depict-ai/dpc ``` ```shell Yarn theme={null} yarn add @depict-ai/dpc ``` If you don't use a module bundler, skip this step and load DPC from a CDN in the next one. ## Import Add the import at the top of the file where you initialise DPC: ```ts ESM theme={null} import { DPC } from "@depict-ai/dpc"; ``` ```ts CommonJS theme={null} const { DPC } = require("@depict-ai/dpc"); ``` ```html Not using a module bundler theme={null} ``` ## Initialise Execute this once in your application, with your merchant id and the market the visitor is browsing: ```ts theme={null} import { DPC } from "@depict-ai/dpc"; const dpc = new DPC("{merchant_id}", { market: "market" }) ``` Both values are case-sensitive; merchant ids are always lowercase. Once DPC is initialised, the `dpq` global for sending events imperatively is also available. See the [DPC reference](/reference/performance-client/performance-client) for more information. ### Merchant and market ids > [!NOTE] > > Your **merchant id** is the first path segment after `/v2` in the portal URL: > when you're logged in at [app.depict.ai](https://app.depict.ai) the address > looks like `app.depict.ai/v2/your-merchant-id/dashboard`. It's always > lowercase. > [!NOTE] > > Your **market ids** are set up together with your data ingestion and appear > in the market filters throughout the portal (for example on the Analytics > page). Use them exactly as written there — they are case-sensitive. If in > doubt, ask your Depict contact. > [!WARNING] > > **Consent management:** DPC stores a single random visitor identifier in > `localStorage` under the key `_dep_id` (with a cookie fallback of the same > name) and starts sending events as soon as it is initialised — it has no > built-in consent gating. If your consent policy requires it, only initialise > DPC after the visitor has consented to performance/analytics tracking. # A collection's copies across the multi-store group, with replication sources Source: https://docs.depict.ai/api-reference/a-collections-copies-across-the-multi-store-group-with-replication-sources /api-reference/openapi/lite.json get /multi-store/replication-data/{collection_id} For one of `merchant_id`'s collections, every linked copy in the group's stores (the collection itself included) and which store each copy replicates from. Call it before editing replication for a collection. Empty when the merchant has no group or the collection is not linked. Read-only. # A product's available stock per variant and market group Source: https://docs.depict.ai/api-reference/a-products-available-stock-per-variant-and-market-group /api-reference/openapi/lite.json get /products/{product_id}/variant-stock Available quantity of each variant in each of the merchant's market groups. Read-only. A single-market store, or a failed stock read, answers the empty payload (no groups). # Add, change or remove some of a collection version's content cards Source: https://docs.depict.ai/api-reference/add-change-or-remove-some-of-a-collection-versions-content-cards /api-reference/openapi/lite.json patch /brand-features/{collection_id} Merges changes into one collection version's content cards: cards the body does not name are left exactly as they are. Read the cards first with `GET /brand-features/{collection_id}`, then send each card you change whole, as GET returned it with only your change applied: a field left out is cleared. A handle of this version's cards updates that card in place; a card without a handle is created and placed first. A handle that belongs to a card outside this collection version is refused (409). `delete_handles` removes cards from this version. Versions of a collection can share a card, so an update shows in every version that lists it. Send one PATCH at a time per collection: a PATCH that races another is refused (409) and must be retried from a fresh GET. Media must be existing Shopify file gids (for example one another card uses); uploading new images or videos is not available. Side effects: Shopify metaobject writes, live on the storefront at once when the version is the collection's published one. Returns the version's resulting cards in GET's shape, including generated handles. Give each new card a `handle` of your own (lowercase letters, digits, `-`, `_`), so resending a PATCH whose answer you lost updates the card instead of creating it twice. # An AI assistant's pending connection request, for the consent panel Source: https://docs.depict.ai/api-reference/an-ai-assistants-pending-connection-request-for-the-consent-panel /api-reference/openapi/lite.json get /mcp/consent Reads the request an MCP client (an AI assistant such as Claude Code) parked when it started signing in to a store's endpoint: which client asks, where approving sends the browser, for which scopes, on which store. The Settings page calls it with the link's `mcp_txn` to render the consent panel, then POST /mcp/consent to approve. Read-only; a request lasts 10 minutes. # Compare Analytics Endpoint Source: https://docs.depict.ai/api-reference/analytics/compare-analytics-endpoint /api-reference/openapi/portal.json get /api/v1/merchants/{merchant_id}/analytics/compare # Create Api Key Endpoint Source: https://docs.depict.ai/api-reference/analytics/create-api-key-endpoint /api-reference/openapi/portal.json post /api/v1/merchants/{merchant_id}/analytics/api-keys # Export Analytics Endpoint Source: https://docs.depict.ai/api-reference/analytics/export-analytics-endpoint /api-reference/openapi/portal.json post /api/v1/merchants/{merchant_id}/analytics/export # Get Analytics Overview Endpoint Source: https://docs.depict.ai/api-reference/analytics/get-analytics-overview-endpoint /api-reference/openapi/portal.json get /api/v1/merchants/{merchant_id}/analytics/overview Merchant-wide analytics for the hub page. Defaults to last 30 days vs the previous 30; pass ``start_timestamp`` / ``end_timestamp`` (Unix seconds, UTC date only) for a custom range. ``None`` when the metrics backend is unavailable (degrade like api_v0's KPI endpoints, never a 500). # Get Analytics Periods Endpoint Source: https://docs.depict.ai/api-reference/analytics/get-analytics-periods-endpoint /api-reference/openapi/portal.json get /api/v1/merchants/{merchant_id}/analytics/periods # List Api Keys Endpoint Source: https://docs.depict.ai/api-reference/analytics/list-api-keys-endpoint /api-reference/openapi/portal.json get /api/v1/merchants/{merchant_id}/analytics/api-keys # Revoke Api Key Endpoint Source: https://docs.depict.ai/api-reference/analytics/revoke-api-key-endpoint /api-reference/openapi/portal.json delete /api/v1/merchants/{merchant_id}/analytics/api-keys/{key_id} # Apply one automated sort to many collections Source: https://docs.depict.ai/api-reference/apply-one-automated-sort-to-many-collections /api-reference/openapi/lite.json put /collections/bulk-automated-sorting Saves `sort_order` (plus optional collection-specific boost/bury rules) as the main version of up to 100 collections and syncs each back to Shopify; with `publish_non_live`, collections Depict did not manage yet are activated too (plan-capped, 402). Per-collection failures land in `errors`. Returns the rollup. # Approve an AI assistant's connection request Source: https://docs.depict.ai/api-reference/approve-an-ai-assistants-connection-request /api-reference/openapi/lite.json post /mcp/consent Approves a request read with GET /mcp/consent: grants the MCP client the scopes it asked for and the user approved, on the request's store, and answers the client's OAuth redirect. Navigate the top-level window to `redirect_to` to finish connecting. Side effects: one OAuth grant for the store, replacing the approving user's earlier grants of the same client (other users' grants of it stay); it lasts 30 days; the client's registration is renewed for 90 days; the request is used up (approving it again answers 404). # Build the unpublished theme copy with search in it Source: https://docs.depict.ai/api-reference/build-the-unpublished-theme-copy-with-search-in-it /api-reference/openapi/lite.json post /search-onboarding/go-live Queues the job that duplicates the live theme and applies the prepared search header to the copy. Allowed once the status is `stashed` (or to retry `golive_failed`, or to recreate at `live_ready`). Poll searchOnboardingStatus until `live_ready`, which carries the editor and preview links; the merchant publishes the copy in Shopify. Needs a plan that includes Search. # Cancel a collection version's scheduled publish Source: https://docs.depict.ai/api-reference/cancel-a-collection-versions-scheduled-publish /api-reference/openapi/lite.json put /collections/{collection_id}/unschedule_version/{version} Clears the version's schedule. Nothing is unpublished. # Cancel the subscription and drop to the free tier Source: https://docs.depict.ai/api-reference/cancel-the-subscription-and-drop-to-the-free-tier /api-reference/openapi/lite.json delete /settings/subscription Downgrades the merchant to the free tier. Side effects, in order: sync-back to Shopify is switched off for the listed collections (at most 3; more is a 400 before anything changes), then the Shopify app subscription is cancelled with proration. Answers null. # Cart and order stages each Depict feature led to Source: https://docs.depict.ai/api-reference/cart-and-order-stages-each-depict-feature-led-to /api-reference/openapi/lite.json get /depict-funnel The bridged funnel stages (carts, carted, ordered, orders) of the collection, recommendation and search funnels under the same rule as depictAttribution, for the window and the one before. Read-only. # Change search settings and the empty-state configuration Source: https://docs.depict.ai/api-reference/change-search-settings-and-the-empty-state-configuration /api-reference/openapi/lite.json patch /search-config Partial update of the merchant's search config: every field is optional and an omitted field keeps its stored value; `search_configuration` merges key by key. Saves the store's search settings, which live storefront search uses, so a save changes what shoppers see. Read back with the configuration and states routes. An empty body is a no-op. # Change the multi-store group's settings Source: https://docs.depict.ai/api-reference/change-the-multi-store-groups-settings /api-reference/openapi/lite.json put /multi-store/group-settings/{merchant_id} Sets the toggles present in the body for `merchant_id`'s whole group and returns the resulting settings. Side effects: enabling auto_replicate_enabled makes the caller the replication source (if none is recorded) and stamps existing links to replicate from it; enabling sync_publish_status publishes every replica whose source is live and syncs those stores back to Shopify. Switching a toggle from off to on requires multi-store in the plan (402 otherwise); re-sending an unchanged toggle or switching one off never does. # Clicks per content block in a collection over a date range Source: https://docs.depict.ai/api-reference/clicks-per-content-block-in-a-collection-over-a-date-range /api-reference/openapi/lite.json get /brand-features/content-block-clicks/{collection_id} Storefront clicks (and, where recorded, click and impression sessions) per content block in the collection between from_date and to_date inclusive, from Depict analytics. Use it to rank content blocks by engagement. Read-only; ranges up to 365 days. # Clicks, views and CTR per product in one collection Source: https://docs.depict.ai/api-reference/clicks-views-and-ctr-per-product-in-one-collection /api-reference/openapi/lite.json get /analytics/collections/{collection_id}/product-clicks Per product in the collection's grid over from_date..to_date: clicks, share of the top product's clicks, average grid position, views and CTR. Optionally narrowed to one market or market group. Read-only. # Add Collection Favourite Endpoint Source: https://docs.depict.ai/api-reference/collections/add-collection-favourite-endpoint /api-reference/openapi/portal.json put /api/v1/merchants/{merchant_id}/collections/{collection_id}/favourite # Compare Collection Analytics Endpoint Source: https://docs.depict.ai/api-reference/collections/compare-collection-analytics-endpoint /api-reference/openapi/portal.json get /api/v1/merchants/{merchant_id}/collections/{collection_id}/analytics/compare # Create Collection Endpoint Source: https://docs.depict.ai/api-reference/collections/create-collection-endpoint /api-reference/openapi/portal.json post /api/v1/merchants/{merchant_id}/collections # Delete Collection Endpoint Source: https://docs.depict.ai/api-reference/collections/delete-collection-endpoint /api-reference/openapi/portal.json delete /api/v1/merchants/{merchant_id}/collections/{collection_id} # Discard Collection Curation Override Endpoint Source: https://docs.depict.ai/api-reference/collections/discard-collection-curation-override-endpoint /api-reference/openapi/portal.json delete /api/v1/merchants/{merchant_id}/collections/{collection_id}/curation # Get Collection Analytics Endpoint Source: https://docs.depict.ai/api-reference/collections/get-collection-analytics-endpoint /api-reference/openapi/portal.json get /api/v1/merchants/{merchant_id}/collections/{collection_id}/analytics # Get Collection Curation Endpoint Source: https://docs.depict.ai/api-reference/collections/get-collection-curation-endpoint /api-reference/openapi/portal.json get /api/v1/merchants/{merchant_id}/collections/{collection_id}/curation # Get Collection Endpoint Source: https://docs.depict.ai/api-reference/collections/get-collection-endpoint /api-reference/openapi/portal.json get /api/v1/merchants/{merchant_id}/collections/{collection_id} # Get Collection Metrics Endpoint Source: https://docs.depict.ai/api-reference/collections/get-collection-metrics-endpoint /api-reference/openapi/portal.json get /api/v1/merchants/{merchant_id}/collections/{collection_id}/metrics # Get Collections Metrics Endpoint Source: https://docs.depict.ai/api-reference/collections/get-collections-metrics-endpoint /api-reference/openapi/portal.json post /api/v1/merchants/{merchant_id}/collections/metrics Metrics for an explicit set of collections in one request. Replaces the per-row `GET /{collection_id}/metrics` burst from the collections list: the whole-catalog Tinybird fetch is shared across the batch and memberships resolve concurrency-capped server-side. The id cap is route-level only (batch internals serve the 300-collection overview) and fits the list page's max page size; larger sets must be chunked by the caller. # Get Collections Metrics Summary Endpoint Source: https://docs.depict.ai/api-reference/collections/get-collections-metrics-summary-endpoint /api-reference/openapi/portal.json get /api/v1/merchants/{merchant_id}/collections/metrics/summary Storewide totals over the whole catalog's metrics — the collections KPI row's source. Route safety is by shape, not declaration order: ``{collection_id}`` can't match across ``/`` so it can't swallow ``metrics/summary``, and ``/{collection_id}/metrics`` needs a literal ``metrics`` second segment — don't add a ``:path`` convertor to those. 503 (not an all-zero summary) when the listing metrics are unavailable, so degraded infrastructure reads as "unavailable" client-side rather than as a store with no traffic. # List Collection Favourites Endpoint Source: https://docs.depict.ai/api-reference/collections/list-collection-favourites-endpoint /api-reference/openapi/portal.json get /api/v1/merchants/{merchant_id}/collections/favourites # List Collection Products Endpoint Source: https://docs.depict.ai/api-reference/collections/list-collection-products-endpoint /api-reference/openapi/portal.json post /api/v1/merchants/{merchant_id}/collections/{collection_id}/products # List Collections Endpoint Source: https://docs.depict.ai/api-reference/collections/list-collections-endpoint /api-reference/openapi/portal.json get /api/v1/merchants/{merchant_id}/collections # Remove Collection Favourite Endpoint Source: https://docs.depict.ai/api-reference/collections/remove-collection-favourite-endpoint /api-reference/openapi/portal.json delete /api/v1/merchants/{merchant_id}/collections/{collection_id}/favourite # Save Collection Endpoint Source: https://docs.depict.ai/api-reference/collections/save-collection-endpoint /api-reference/openapi/portal.json patch /api/v1/merchants/{merchant_id}/collections/{collection_id} # Update Collection Parent Endpoint Source: https://docs.depict.ai/api-reference/collections/update-collection-parent-endpoint /api-reference/openapi/portal.json put /api/v1/merchants/{merchant_id}/collections/{collection_id}/parent # Compose a recommendation surface Source: https://docs.depict.ai/api-reference/compose-a-recommendation-surface /api-reference/openapi/lite.json post /recommendations/compose Composes a surface by id (or an unsaved `draft` of it) from the merchant's current candidate pools, as the storefront would, and returns the product id per slot with the shuffle seed used. Pass `anchor` for a product or category surface and `recent_views` to exercise history-seeded steps. Use it to test what shoppers would see; for the editor's saved-surface preview by name, see the surface preview routes. Read-only: nothing is written or recomputed. # Connect an Instagram account from an OAuth code Source: https://docs.depict.ai/api-reference/connect-an-instagram-account-from-an-oauth-code /api-reference/openapi/lite.json post /instagram/{merchant_id}/account/connect Finishes Instagram's OAuth flow: exchanges the code for a long-lived token and stores it encrypted as the merchant's Instagram login, replacing any previous one. Only useful right after the OAuth dialog redirects back; codes are single-use. Returns JSON `null`. # Connect another store to this merchant's multi-store group Source: https://docs.depict.ai/api-reference/connect-another-store-to-this-merchants-multi-store-group /api-reference/openapi/lite.json post /multi-store/connect-store/{merchant_id} Joins `merchant_id` and the store whose activation code is given into one multi-store group (creating the group if neither has one). Call it when a merchant enters another store's activation code. Side effect: writes both merchants' group. Follow with create-collection-mappings to link their collections by handle. Refused when both stores are already in groups. Requires multi-store in the plan of the caller and of every store it would put into a group (402 otherwise). # Connect or release collections across the group's stores Source: https://docs.depict.ai/api-reference/connect-or-release-collections-across-the-groups-stores /api-reference/openapi/lite.json post /multi-store/collection-mappings/{group_id} Puts `connect.collections` into one cross-store connection (an existing `group_collection_id`, or a new one) and/or releases `disconnect.collections` from theirs (the mapping row stays, unlinked). Every merchant named must belong to the group. Side effects: writes mapping rows; if the group has auto-replicate on, new links are stamped to replicate from its source. Connecting requires multi-store in the caller's plan (402 otherwise); releasing never does. Answers null. # Copy an image or video from a public URL into the merchant's Shopify Files Source: https://docs.depict.ai/api-reference/copy-an-image-or-video-from-a-public-url-into-the-merchants-shopify-files /api-reference/openapi/lite.json post /media/{merchant_id}/upload_media_from_url Downloads `url` and uploads it to Shopify Files like /upload does (same waiting, same multi-store fan-out and side effects), returning the processed file node. Used to import Instagram media into a content block. A source that answers 4xx (e.g. an expired Instagram CDN link) is a 400; the source must send a Content-Length. # Count the merchant's active collections Source: https://docs.depict.ai/api-reference/count-the-merchants-active-collections /api-reference/openapi/lite.json get /collections/nbr-of-active-collections Returns how many collections Depict currently manages (sync_back_to_shopify on) for the merchant: the number plan limits cap. Read-only. # Count what this store would have to unlink before disconnecting Source: https://docs.depict.ai/api-reference/count-what-this-store-would-have-to-unlink-before-disconnecting /api-reference/openapi/lite.json get /multi-store/unlink-collections/{merchant_id} How many mapping rows `merchant_id` has in its group, and how many of them GET collection-mappings does not show. Call it before offering disconnect. Read-only; zeros for a store in no group. # Countries that searched in a date range Source: https://docs.depict.ai/api-reference/countries-that-searched-in-a-date-range /api-reference/openapi/lite.json get /search-reports/countries The country codes seen in the inclusive from_date..to_date range, for a country filter. Not narrowed by country. Read-only. # Create a market group (or rename the group its name maps to) Source: https://docs.depict.ai/api-reference/create-a-market-group-or-rename-the-group-its-name-maps-to /api-reference/openapi/lite.json post /{merchant_id}/market-groups Creates a group whose id is derived from `name` (lowercased; spaces, dashes and `/ \ ? # %` to underscores; an all-dot id to underscores) and moves the given markets into it. A name that maps to an existing id renames that group instead. Returns the group. # Create or replace a recommendation surface Source: https://docs.depict.ai/api-reference/create-or-replace-a-recommendation-surface /api-reference/openapi/lite.json put /recommendations/surfaces/{surface_name} Creates the surface named in the path, or replaces its editable fields (context, steps, filters, limit, exclusions) if it exists; an existing surface keeps its id and serving directives. The body's `name` must equal the path's. Side effects: writes the storefront metaobject in Shopify, then the recommendations config; deletes pins whose anchor type the new context no longer admits; queues a background recompute of this surface and replicates the change to linked stores. Requires recommendations in the store's plan (402 otherwise),. Changed metafield keys request full ingestion after saving. Returns the saved surface. # Create or update a collection version Source: https://docs.depict.ai/api-reference/create-or-update-a-collection-version /api-reference/openapi/lite.json put /collections/{collection_id}/update_version Saves the body as a version of the collection without publishing it (publishing is PUT …/publish_version/{version}); `version` null or unknown creates a new version. Side effects: writes the version row, and when `is_market_active` is true deactivates the other versions of the same market or market group; then triggers a Shopify order sync-back (its failure does not fail the save). Setting `is_market_active` true makes the version live for its market, so it requires collection versions in the plan like publishing does (402 otherwise); drafting never does. Returns the version as stored. # Create, update or delete a collection version's brand features Source: https://docs.depict.ai/api-reference/create-update-or-delete-a-collection-versions-brand-features /api-reference/openapi/lite.json put /brand-features/{collection_id} Writes one kind of brand feature (content blocks, image settings, product duplicates or the legacy A/B test) for a collection version: upserts `upsert_metaobjects` as Shopify metaobjects (matched by `handle`) and deletes `delete_metaobjects_by_handle`, then records the version's feature list. Side effects: Shopify metaobject writes (live on the storefront for the published version), definition creation on first use, and multi-market expansion. Returns a list of warnings; `[]` when there are none. # Daily results of a collection A/B test Source: https://docs.depict.ai/api-reference/daily-results-of-a-collection-ab-test /api-reference/openapi/lite.json get /ab-test/{collection_id}/metrics Page views, clicks, add-to-carts and purchases per day for variant A (the original collection) and B (Depict's), their rates, and a p-value per rate over the whole window. Read the test's dates from its metaobject and pass them as from_date/to_date. Read-only; the input for abTestGenerateConclusion. # Daily search health: no-results, click rates, latency Source: https://docs.depict.ai/api-reference/daily-search-health:-no-results-click-rates-latency /api-reference/openapi/lite.json get /search-reports/guardrails-daily Per day: searches, no-result rate, click-through, no-click rate, median click position and index latency. Takes the current and previous windows (from_ts/to_ts, prev_from_ts/prev_to_ts) and answers both, for period-over-period comparison. Read-only. # Decline an AI assistant's connection request Source: https://docs.depict.ai/api-reference/decline-an-ai-assistants-connection-request /api-reference/openapi/lite.json delete /mcp/consent Declines a request read with GET /mcp/consent: nothing is granted. The client is told (`redirect_to` carries `error=access_denied`) only when its redirect URI is on this computer (loopback): anyone can register any other, and following it would turn a click on Cancel into a redirect to a stranger's page. Works while AI assistants are off for the store or the Depict app is not installed on it, so a refused request can still be answered. Side effect: the request is used up (declining it again answers 404). # Delete a collection version Source: https://docs.depict.ai/api-reference/delete-a-collection-version /api-reference/openapi/lite.json delete /collections/{collection_id}/delete_version/{version} Deletes the version: retires it from any market it is live on (a failure there is logged, not fatal), removes it from the Shopify versions metafields, and if it was main clears the main pointer and the live brand-feature metafields; then deletes the row and triggers the order sync-back. Irreversible. An unknown version still answers 200. Returns null. # Delete a recommendation surface and its pins Source: https://docs.depict.ai/api-reference/delete-a-recommendation-surface-and-its-pins /api-reference/openapi/lite.json delete /recommendations/surfaces/{surface_name} Deletes the surface named in the path. Side effects: deletes its Shopify metaobject, removes it from the recommendations config, deletes all its pins, and replicates the deletion to linked stores; other surfaces are unaffected and no recompute is queued. Returns `{deleted: }`. Irreversible. # Delete an ended collection version A/B test Source: https://docs.depict.ai/api-reference/delete-an-ended-collection-version-ab-test /api-reference/openapi/lite.json delete /collections/{collection_id}/ab-tests/{test_id} Deletes a test that is no longer running, with its Shopify metaobjects. A running test must be ended first (409). No content (204). # Delete this store's own cross-store collection links Source: https://docs.depict.ai/api-reference/delete-this-stores-own-cross-store-collection-links /api-reference/openapi/lite.json post /multi-store/unlink-collections/{merchant_id} Permanently deletes `merchant_id`'s own mapping rows (all, or the listed collections), which is what lets it disconnect. All or nothing: refused with 409 while another store still replicates from any of them; those stores unlink first. Never touches another store's rows. # Disconnect an AI assistant from a store Source: https://docs.depict.ai/api-reference/disconnect-an-ai-assistant-from-a-store /api-reference/openapi/lite.json delete /mcp/grants/{grant_id} Revokes one grant from GET /mcp/grants and every token issued under it: the assistant's next call is refused, and it has to be connected again. Idempotent: an unknown or already revoked grant also answers 204. # Disconnect the merchant's Instagram account Source: https://docs.depict.ai/api-reference/disconnect-the-merchants-instagram-account /api-reference/openapi/lite.json post /instagram/{merchant_id}/account/disconnect Stores an Instagram config with no login, so `instagramAccount` answers `null` and `instagramMedia` 400s until an account is connected again. Instagram itself is not called. Returns JSON `null`. # Enable or disable every market in a market group Source: https://docs.depict.ai/api-reference/enable-or-disable-every-market-in-a-market-group /api-reference/openapi/lite.json put /{merchant_id}/market-groups/{group_id}/toggle Enables or disables Depict for all markets in the group. Disabling returns a warning with the number of active collection versions that target the group, and queues a Shopify sort sync for the merchant's active collections. # End, extend or refresh a collection version A/B test, or promote a winner Source: https://docs.depict.ai/api-reference/end-extend-or-refresh-a-collection-version-ab-test-or-promote-a-winner /api-reference/openapi/lite.json patch /collections/{collection_id}/ab-tests/{test_id} Applies one lifecycle action (see the body). Promoting makes the variant's version the collection's main version and syncs it to Shopify. Returns the updated test. # Create Events Source: https://docs.depict.ai/api-reference/events/create-events /api-reference/openapi/storefront.json post /create-events Send a JSON array of card impression or click events. This endpoint uses tenant, although v3 serving requests use merchant. Read the product card tracking guide at /api-guide/tracking/product-cards for event examples and ID rules. A successful response confirms validation; it does not prove attribution. # Create Events V2 Source: https://docs.depict.ai/api-reference/events/create-events-v2 /api-reference/openapi/storefront.json post /v2/create-events # Every theme-onboarding run for a merchant, newest first Source: https://docs.depict.ai/api-reference/every-theme-onboarding-run-for-a-merchant-newest-first /api-reference/openapi/lite.json get /onboarding/{merchant_id}/onboardings The full history behind the admin Theme Onboardings page: per run, the theme, when it ran, and each resource Depict generated (with the patched file and whether it changed against the next-older run). Unpaginated and potentially tens of MB for long-lived stores; bodies past 8 MB stream, so a late failure truncates the body instead of answering 500. Read-only; for support/debugging, not for routine polling. # Build collection pages with an AI agent Source: https://docs.depict.ai/api-reference/headless/build-collections-with-ai-agent A short agent prompt and API reference instructions for category and collection pages. Use this prompt when you want to replace collection and category grids with Platform API calls. Copy it into your coding agent. Use the [full integration prompt](/api-reference/headless/build-with-ai-agent) for a migration that also includes search and recommendations. ## Agent prompt ```text theme={null} Integrate Depict collection and category listings into our storefront with direct Platform API calls. Follow https://docs.depict.ai/api-guide/listings Use https://docs.depict.ai/api-guide/search#pagination and https://docs.depict.ai/api-guide/search#filters for request controls. Follow https://docs.depict.ai/api-guide/tracking/product-cards and https://docs.depict.ai/api-guide/tracking/ids Use the endpoint reference: https://docs.depict.ai/api-reference/headless/overview#api-overview Read the machine contract: GET https://api.depict.ai/openapi.json Treat actual serving responses as the runtime authority. Verify card event acceptance and attribution in Tracking status. Ask me for our merchant id, our markets and locales, listing IDs, and where product routes and tracking data live. ``` ## Runtime authority Read the published machine contract at `GET https://api.depict.ai/openapi.json`. Use actual serving responses for your merchant, market and locale. Confirm card event acceptance and attribution in the portal's Tracking status tab. HTTP 200 alone does not prove attribution. Product fields depend on the merchant's display mapping. ## Scope and server rendering Replace only the category and collection page integration. Keep the store's existing search, recommendation and other tracking integrations. Render products, navigation and metadata in the first server response. Hydrate that response without a second first-page request. Fetch metadata and products independently when their listing ID is already known. Use the same session identity in serving requests and browser events. Confirm how the store supplies that identity during the first SSR request. If your current grid renders after browser mounting, move its first render to the server. Reuse your storefront's route function, product card design and currency formatter. ## Endpoint contract Use `https://api.depict.ai`. GET requests carry query parameters; POST requests carry JSON bodies. Required serving fields are `merchant`, `market` and `locale`. Send `session_id` for attributable product requests. | Method and path | Other request inputs | Response fields | | - | - | - | | GET `/v3/listings/{listing_id}` | Required UUID path ID; optional `session_id` | Listing metadata below | | GET `/v3/listings/external_id/{external_id}` | Required merchant listing ID; optional `session_id` | Same metadata shape | | POST `/v3/listings/{listing_id}/products` | Required path ID; optional `filters`, `sort`, pagination | `displays`, `n_hits`, `filters`, `sorts`, `product_listing_request_id`, `cursor` or `page` | | POST `/v3/listings/external_id/{external_id}/products` | Required merchant listing ID; same body | Same product response shape | Listing product requests have no `query` field. Product responses do not contain listing metadata. Fetch that metadata with the GET route. Use the existing CMS mapping to obtain the listing ID or external ID. For discovery, GET `/v3/markets?merchant={merchant}` returns `markets`. GET `/v3/locales?merchant={merchant}` returns `locales`. These routes require only `merchant`. Separate lists do not establish every valid market/locale pair. ## Pagination, filters and sorting Choose one pagination mode: * Cursor mode: send `limit` from 1 to 250. Omit `cursor` initially. Send each returned cursor unchanged. Stop when no cursor remains. * Page mode: send `page` from 1 and `hits_per_page` from 1 to 200. `hits_per_page` is required with `page`. Do not mix the modes. Reset pagination when the listing, filters, sort, market or locale changes. Keep the current storefront's page size and navigation behavior. Do not treat approximate `n_hits` as proof of completeness. Build controls from returned `filters` and `sorts`. Send the chosen filter's `field`, `op` and selected `data`. Read `meta.type`, `meta.values`, `meta.counts`, `meta.names`, range `min`/`max`, and optional `meta.currency`. Use the documented selection format for each filter type. Keep its returned operator. Send a returned sort's `field` and `order`. ## Metadata, breadcrumbs and quicklinks Use `listing_id`, optional `external_id`, `listing_type`, `title`, optional `slug` and `page_url`, `image_urls`, `show_in_breadcrumbs`, `show_in_quicklinks`, `ancestors`, `children`, `siblings` and `content_blocks`. Use `content_blocks` for the API's merchandising cards. Preserve any existing CMS content placement required by the storefront. The response supplies raw hierarchy arrays. It does not supply computed `quick_links` or `breadcrumbs` arrays. To preserve SDK quicklink selection: 1. Select the unfiltered `children` array when it contains entries. 2. Otherwise, select `siblings`. 3. Keep entries with `show_in_quicklinks: true`. 4. Keep the returned order. Build parent quicklinks independently from raw `ancestors`. Keep flagged parents in their returned order. Exclude the current `listing_id` from the parent group. Remove duplicate IDs. The current category need not occur in child quicklinks. Sibling quicklinks can include the current category. Build breadcrumbs from ordered ancestors with `show_in_breadcrumbs: true`. Display the current category according to the existing page design. Use a supplied `page_url` when available. Otherwise, use the storefront route function with the complete ancestor slug chain. Add the current slug for a child path. Use the current ancestors for a sibling path. Hidden navigation labels must not remove URL segments. Resolve missing slugs through the CMS. A listing with children can omit the current category from its quicklink selection. Read parent links from metadata instead of requiring the current category to occur in that selection. ## Product card data Confirm your merchant's display mapping before assigning product types. If your mapping uses `variant_displays` and `variant_index`, select `display.variant_displays[display.variant_index]`. Keep `product_listing_result_id` on the outer display. Common selected-variant fields include `product_id`, `title`, `image_urls`, `sale_price` and `original_price`. Use `in_stock` if your mapping supplies it. Your cards need an availability state and a product URL. Confirm the complete mapping for each market. Use a returned product `page_url` when available. Create missing URLs with your storefront's route function and its confirmed display fields. Support a documented single `image_url` mapping when applicable. Provide a placeholder for missing images. Disable purchase controls for unavailable variants. Keep API product order and returned prices. Retain the store's configured market currency and price formatter. No serving currency request parameter exists. ## Card clicks and impressions Reuse the browser's DPC instance. Set the same serving session through `dpc.setSessionId(session_id)`. Update DPC when the active market changes. Add `data-product-listing-result-id` to each card, using its exact outer `product_listing_result_id`. DPC records card clicks from this attribute. The response's `product_listing_request_id` cannot replace a card result ID. Add visibility tracking separately. A custom sender posts a JSON array to `POST https://api.depict.ai/create-events`. Each card impression carries `tenant`, `market`, `session_id`, `type: "element_visible"`, `product_listing_result_id` and the selected `product_id`. This event endpoint uses `tenant`; serving requests use `merchant`. At least one identity field is required. Send visibility events from the browser. Server rendering alone is not an impression. Check existing senders to prevent duplicate events. A custom click sender can use the same endpoint with `type: "click"` and the card result ID. Use one click sender. Result IDs expire after 10 minutes. Confirm event arrival and product matching in Tracking status. ## Caching, timeouts and errors Cache listing metadata by merchant, market, locale and ID for at most 10 seconds, as its cache header permits. Chosen project policy: keep product responses and SSR HTML with result IDs out of shared caches. Obtain fresh result IDs from new product responses before their attribution lifetime expires. Choose a request deadline within the storefront's SSR budget. A starting project budget is 1,500 ms per serving request. This is not an API guarantee. Check HTTP status before reading display fields. Handle invalid requests, missing listings, malformed JSON and temporary failures with an empty component. Keep the rest of the page usable. Log status and any Error ID. Preserve the existing canonical URL and SEO metadata. ## Acceptance checks For a migration, compare the existing integration and API with the same listing, session, market, locale, filters, sort and page size. For a new integration, compare the rendered view with its API response. For anonymous API comparisons, omit `session_id` and use `track: false`. Do not send comparison impressions. Verify actual tracking separately with attributable user journeys. * Compare a listing with children. Verify its flagged parents and child links. * Compare a leaf listing. Verify sibling links and the current listing's active state. * Compare a root listing. Check navigation without ancestors and apply returned filters and sorts. * Traverse pagination through its last page. Check order, termination, omissions and duplicate cards. * Repeat for every configured market/locale pair. Check titles, URLs, prices, currency and availability. * Check initial SSR HTML, hydration, client navigation, empty results and timeout handling. * Verify card clicks and visibility events with the returned result IDs and the common session. Equal means the same ordered products, selected variants, prices, stock state, images, filter selections/counts and URL targets. Newly generated IDs can differ. Parent links must remain available when child quicklinks omit the current listing. ## Sources and open questions Use these public guides with the [API overview](https://docs.depict.ai/api-reference/headless/overview#api-overview) and `GET https://api.depict.ai/openapi.json`: * [Listings](/api-guide/listings): endpoints, metadata, cache headers, hierarchy and navigation rules. * [Search controls](/api-guide/search): pagination, filters, sorting and common card fields. * [API introduction](/api-guide/introduction): discovery routes, market/locale combinations and currency behavior. * [Card tracking](/api-guide/tracking/product-cards): click attributes and visibility events. * [Tracking IDs](/api-guide/tracking/ids): identity, result ID lifetime and validation. * [DPC reference](/reference/performance-client/performance-client): market and shared session configuration. * [Display transformers](/reference/listings-search/display-transformers): product URLs and variant fields. * [Published OpenAPI contract](https://api.depict.ai/openapi.json): machine-readable request and response schemas. Confirm listing IDs and locale pairs, the display mapping, stock and pre-order behavior, first SSR session handling, missing slugs, caching and retry policy. Confirm rate limits and API migration dates with Depict. The timeout and SSR cache policies above are implementation choices. # Build an integration with an AI agent Source: https://docs.depict.ai/api-reference/headless/build-with-ai-agent A short agent prompt and reference instructions for a Platform API storefront integration. Copy the prompt below into your coding agent. Give the agent your store's configuration when it asks. The reference sections apply to any merchant. Use the [collections-only prompt](/api-reference/headless/build-collections-with-ai-agent) for a migration limited to category and collection pages. ## Agent prompt ```text theme={null} Integrate the Depict Platform API into our stack for search, listings, recommendations and tracking. Follow https://docs.depict.ai/api-guide/introduction and https://docs.depict.ai/api-guide/search Follow https://docs.depict.ai/api-guide/listings, https://docs.depict.ai/api-guide/recommendations/api and https://docs.depict.ai/api-guide/tracking/introduction Use the endpoint reference: https://docs.depict.ai/api-reference/headless/overview#api-overview Read the machine contract: GET https://api.depict.ai/openapi.json Treat actual serving responses as the runtime authority. Verify event acceptance and attribution in the portal's Tracking status tab. Ask me for our merchant id, our markets and locales, recommendation surfaces, and where catalog and tracking data live. ``` ## Runtime authority The published machine contract is `GET https://api.depict.ai/openapi.json`. It describes request and response schemas. It does not define every merchant-specific display field or establish tracking attribution. Use actual serving responses for the requested merchant, market and locale. Check HTTP status and response error fields. A successful tracking response confirms batch validation. Confirm attribution in the portal's Tracking status tab. Read the integration guides with the generated endpoint reference. ## Integration scope and SSR Build your storefront with direct Platform API calls. Render the first search and listing results with server-side rendering (SSR). Preserve API ranking, filters, pagination, navigation, prices and availability. For a migration, compare these results with the existing integration. Use your merchant configuration and its valid market/locale pairs. Use `/v3` serving endpoints at `https://api.depict.ai`. Keep DPC for browser tracking. Confirm how your storefront supplies a common session during the first SSR request and subsequent browser interactions. ## Endpoints and response fields All serving routes in this table require `merchant`, `market` and `locale`. GET routes use query parameters. POST routes use JSON bodies. Use the same `session_id` in supported serving requests and tracking. | Method and exact path | Other request fields | Fields to use | | - | - | - | | POST `/v3/search/results` | Optional `query`, `filters`, `sort`, pagination | `displays`, `n_hits`, `filters`, `sorts`, `search_request_id`, `cursor` or `page`, `content_search_links` | | GET `/v3/search/suggestions` | Optional `query`, `limit` 1–10, default 3 | `suggestions_request_id`, `suggestions`; query suggestions use `type`, `query`, `suggestions_result_id`; listing suggestions use `listing_id`, `title`, `slug`, `ancestors`, `suggestions_result_id` | | GET `/v3/listings/{listing_id}` or `/v3/listings/external_id/{external_id}` | Required path ID; optional `session_id` | `listing_id`, `external_id`, `listing_type`, `title`, optional `slug` and `page_url`, `image_urls`, navigation flags, `ancestors`, `children`, `siblings`, `content_blocks` | | POST `/v3/listings/{listing_id}/products` or `/v3/listings/external_id/{external_id}/products` | Required path ID; optional `filters`, `sort`, pagination | `displays`, `n_hits`, `filters`, `sorts`, `product_listing_request_id`, `cursor` or `page`; metadata comes from GET | | POST `/v3/recommend/products` | Required `type`; optional `product_ids`, `limit` 1–128 | `displays`, `error`; optional `variant`, `experiment_id` | Discover IDs with GET `/v3/markets?merchant={merchant}` and GET `/v3/locales?merchant={merchant}`. Their response fields are `markets` and `locales`. These routes require only `merchant`. The lists do not establish all valid market/locale combinations. GET `/v3/listings` requires `merchant`, `market` and `locale`. It returns the navigation tree. Use the recommendation `type` configured for each surface and market. Common names include `after_basket` and `checkout`. Confirm their availability with Depict. Preserve each surface's existing product context during a migration. Empty `product_ids` selects general recommendations. One ID selects product recommendations. Multiple IDs select recommendations for that set. Use the API's `product_id` values for the product context. Choose one pagination mode. Cursor mode uses `limit` from 1 to 250 and optional `cursor`. Page mode uses `page` from 1 and required `hits_per_page` from 1 to 200. Never mix the modes. Start without a cursor. Send each returned cursor unchanged. Stop when no cursor remains. Reset pagination when the query, listing, filters, sort, market or locale changes. `n_hits` can be approximate. Build facets from returned `filters` and sorting controls from `sorts`. Send selected `field`, `op` and `data`. Read `meta.type`, `meta.values`, `meta.counts`, `meta.names`, range bounds and optional `meta.currency`. Preserve each filter's returned operator. Send a returned sort's `field` and `order`. For quicklinks, select the unfiltered `children` array when it contains entries. Otherwise, select `siblings`. Then filter by `show_in_quicklinks`. If your design includes parent quicklinks, read them independently from raw `ancestors`. Exclude the current ID from the parent group. Remove duplicate IDs. Preserve the returned order. Build breadcrumbs from ancestors with `show_in_breadcrumbs: true`, root first. Use a returned `page_url` when available. Otherwise, use your route function with the full slug chain. Child paths include the current listing's slug. Hidden navigation labels must not remove route segments. Preserve `content_blocks` placement. ## Tracking Initialize `new DPC(merchant, { market })` once in the browser. Call `dpc.setSessionId(session_id)` with the serving session. Update DPC on market changes. Tag each card with its outer display result ID. Search uses `data-search-result-id`. Listings use `data-product-listing-result-id`. Recommendations use `data-recommendation-id`. DPC records card clicks. Request IDs cannot replace card result IDs. Implement card visibility events separately. POST `/create-events` accepts a JSON array. Each impression uses `tenant`, `market`, `session_id`, `type: "element_visible"`, selected `product_id` and the corresponding result ID field. Set `tenant` to your merchant identifier. Send impressions when cards become visible. Avoid duplicate senders. Result IDs expire after 10 minutes. Confirm attribution in Tracking status. HTTP 200 alone is insufficient. On every PDP visit, call `dpc.setProductId(product_id)`. After each successful cart addition, call `dpc.sendAddToCartEvent({ product_id })` with the added variant. Send all purchases once through `dpc.sendPurchaseEvent`. Supply a stable `transaction_id`, `items` and the actual ISO `currency`. Each item needs `item_id`, final per-unit `price` and integer `quantity` of at least 1. Purchase `item_id` uses the ingested transaction product ID. Confirm that mapping for your catalog. Missing events reduce recommendation quality and ranking feedback. ## Rendering and operation Confirm your merchant's display mapping before assigning product types. If it uses `variant_displays` and `variant_index`, select `display.variant_displays[display.variant_index]`. Preserve the outer result ID. Your cards need a product identity, title, image, price, availability state and product URL. Common variant fields include `product_id`, `title`, `image_urls` or `image_url`, `sale_price` and `original_price`. Use `in_stock` if your mapping supplies it. Create missing product URLs with your route mapping and display transformer. Confirm any URI field before using it. Disable purchase controls for unavailable variants. Preserve API order. Use an image placeholder for missing images. Prices already reflect the requested market and locale. The serving API has no currency request parameter. Retain your storefront's configured market currency and price formatter. Cache listing metadata and the tree by merchant, market, locale and ID for at most 10 seconds. Suggestions have a one-hour cache header. Keep product responses and SSR HTML containing result IDs out of shared caches. Obtain fresh result IDs from new serving responses. Choose a serving timeout within your storefront's page budget. A starting budget is 1,500 ms per request. This is a project choice, not an API guarantee. Handle failed HTTP status, malformed JSON and recommendation `error` with an empty component. Keep the page usable. Log status and any Error ID. Preserve your canonical URLs and SEO metadata. ## Acceptance checks Use your catalog, routes, configured surfaces and market/locale pairs. For a migration, compare the existing integration with the API implementation under the same session, query, filters, sort and page size. For a new integration, compare each rendered view with its API response. * Test representative product queries, a query with no matches and selected filters. * Test a listing with children, a listing with siblings and a root listing. * Verify flagged parent links when the current listing is absent from child quicklinks. * Traverse pagination through its last page. Check order, termination and duplicate cards. * Compare each recommendation surface with the same product context. * Repeat the checks for each configured market/locale pair. * Check initial SSR HTML, hydration, navigation, empty states and timeouts. * Verify card, PDP, add-to-cart and purchase events with the correct identities. Equal means the same ordered products, variants, prices, availability, images, filter selections/counts and URL targets. Generated tracking IDs can differ. For read-only search and listing comparisons, use `track: false`. Omit `session_id` for anonymous checks. Verify actual tracking separately with attributable user journeys. ## Sources and open questions Use these public guides with the [API overview](https://docs.depict.ai/api-reference/headless/overview#api-overview) and `GET https://api.depict.ai/openapi.json`: * [API introduction](/api-guide/introduction): request conventions, discovery routes, markets, locales and currency. * [Search](/api-guide/search): results, suggestions, filters, sorting, pagination, product data and errors. * [Listings](/api-guide/listings): metadata, products, cache headers, hierarchy and navigation rules. * [Recommendations](/api-guide/recommendations/api): configured types, product context and response fields. * [DPC setup](/api-guide/tracking/setup): browser initialization. * [Card tracking](/api-guide/tracking/product-cards): click attributes and visibility events. * [Tracking IDs](/api-guide/tracking/ids): result IDs, product IDs, transaction IDs and event validation. * [PDP tracking](/api-guide/tracking/product-pages), [add-to-cart tracking](/api-guide/tracking/add-to-cart) and [purchase tracking](/api-guide/tracking/purchases): event requirements. * [DPC reference](/reference/performance-client/performance-client): market and shared session configuration. * [Display transformers](/reference/listings-search/display-transformers): product URLs and variant fields. * [Published OpenAPI contract](https://api.depict.ai/openapi.json): machine-readable request and response schemas. Ask Depict to confirm recommendation types and product context per market, transaction IDs, initial SSR session handling, display/stock mapping and missing slug handling. Confirm rate limits, retry guidance, cache invalidation and migration dates. Obtain answers before enabling the affected features. # API Overview Source: https://docs.depict.ai/api-reference/headless/overview The APIs behind Depict for headless merchants: the Portal API used by the merchant portal, and the Platform API that serves search, listings and recommendations to your shop. ## API overview Depict exposes two APIs, each with a different audience: > [card] Portal API > > The REST API behind the merchant portal. Manage merchants, products, > collections and curation, and read the metrics and analytics that power the > portal dashboards: collection metrics, dead stock, pinned-vs-auto > performance, merchant-wide analytics and search insights. > [card] Platform API > > The public product-discovery API served from `api.depict.ai`. Fetch search > results, query suggestions, product listings and recommendations, and send > tracking events from your storefront. ## Authentication **Portal API** endpoints require a bearer token issued by Depict's Auth0 tenant. Requests are authorized per merchant: the authenticated user must have access to the `merchant_id` in the path. ```bash theme={null} curl https:///api/v1/merchants/{merchant_id}/collections \ -H "Authorization: Bearer $ACCESS_TOKEN" ``` **Platform API** endpoints identify your shop through the `merchant` and `market` parameters that are part of each request body or query string. They are designed to be called directly from the browser. ## Build a storefront integration Use the Platform API at `https://api.depict.ai` for storefront requests. Build new integrations with `/v3` serving endpoints. Send `merchant`, `market` and `locale` as specified by each endpoint. The market and locale discovery endpoints require only `merchant`. Start with [Build an integration with an AI agent](/api-reference/headless/build-with-ai-agent) for a prompt you can adapt to your store. Use [Build collection pages with an AI agent](/api-reference/headless/build-collections-with-ai-agent) when you only want to replace category and collection pages. | Area | Endpoints | Integration guide | | - | - | - | | Search | `POST /v3/search/results`, `GET /v3/search/suggestions` | [Search](/api-guide/search) | | Listing metadata | `GET /v3/listings`, `GET /v3/listings/{listing_id}`, `GET /v3/listings/external_id/{external_id}` | [Listings](/api-guide/listings) | | Listing products | `POST /v3/listings/{listing_id}/products`, `POST /v3/listings/external_id/{external_id}/products` | [Listing products](/api-guide/listings#products-in-a-listing) | | Recommendations | `POST /v3/recommend/products` | [Recommendations](/api-guide/recommendations/api) | | Tracking | `POST /create-events` for card impressions and clicks; DPC for product page, add-to-cart and purchase events | [Tracking](/api-guide/tracking/introduction), [Card impressions](/api-guide/tracking/product-cards#product-card-impressions) | | Markets and locales | `GET /v3/markets?merchant={merchant}`, `GET /v3/locales?merchant={merchant}` | [Markets, locales and currency](/api-guide/introduction#markets-locales-and-currency) | Read each integration guide with the generated endpoint reference. The guides explain filter selection, pagination, cache headers, tracking IDs and errors. Product display fields and recommendation types depend on your merchant configuration. The reference does not supply a complete product card schema for every merchant. ## Conventions * All endpoints accept and return JSON unless noted otherwise. * Time ranges on metrics endpoints use Unix timestamps (`start_timestamp`, `end_timestamp`). When omitted, most metrics endpoints default to the last 30 days compared against the previous 30 days. * Metric values that compare against a previous period return a `value` together with a `delta_pct` (relative change) or `delta_pts` (percentage-point change for rates such as CTR). # Hourly conversion of sessions that searched Source: https://docs.depict.ai/api-reference/hourly-conversion-of-sessions-that-searched /api-reference/openapi/lite.json get /search-reports/conversion Sessions with a search, and how many of those purchased, per hour. Takes the current and previous windows (from_ts/to_ts, prev_from_ts/prev_to_ts) and answers both, for period-over-period comparison. Read-only. # Hourly purchase rate of sessions that did not search Source: https://docs.depict.ai/api-reference/hourly-purchase-rate-of-sessions-that-did-not-search /api-reference/openapi/lite.json get /search-reports/non-search-baseline The baseline to compare search conversion against. Takes the current and previous windows (from_ts/to_ts, prev_from_ts/prev_to_ts) and answers both, for period-over-period comparison. Read-only. # Hourly search funnel: searches, clicks, carts, orders, revenue Source: https://docs.depict.ai/api-reference/hourly-search-funnel:-searches-clicks-carts-orders-revenue /api-reference/openapi/lite.json get /search-reports/funnel The storefront search funnel per hour, plus exact per-window totals counted in searches. Revenue is attributed by the one Depict rule and converted to `currency`. Takes the current and previous windows (from_ts/to_ts, prev_from_ts/prev_to_ts) and answers both, for period-over-period comparison. Read-only. # How far the merchant's automatic theme onboarding got Source: https://docs.depict.ai/api-reference/how-far-the-merchants-automatic-theme-onboarding-got /api-reference/openapi/lite.json get /onboarding/{merchant_id}/status One word for the whole store, reduced over every theme Depict tried to onboard: `success` beats `warning` beats `failure`; `pending` when nothing has run yet. Returns a bare JSON string. Read-only. # How far the merchant's first catalog import has come Source: https://docs.depict.ai/api-reference/how-far-the-merchants-first-catalog-import-has-come /api-reference/openapi/lite.json get /merchants/{merchant_id}/ingestion-status Returns whether the first full Shopify catalog import has finished, its percentage, and the last sync time. Poll it after install until `has_run_at_least_one_ingestion` is true; for the index side use catalog-readiness. Read-only. # How long an A/B test on this collection would need Source: https://docs.depict.ai/api-reference/how-long-an-ab-test-on-this-collection-would-need /api-reference/openapi/lite.json get /collections/{collection_id}/ab-test-duration-estimate From the collection's visitors and click rate over the last 28 days: the days a test with the given split needs before a 10% relative difference in click rate becomes visible, with 80% power at a two-sided 5% level. Read-only. # Index content pages for search Source: https://docs.depict.ai/api-reference/index-content-pages-for-search /api-reference/openapi/lite.json post /search-config/content-pages Queues the pages for indexing and returns at once; the list shows each as PROCESSING until its scrape and index finish. A URL already listed is re-indexed, and one the merchant removed earlier stops being skipped by auto-index. # Install or reinstall the app for the calling Shopify store Source: https://docs.depict.ai/api-reference/install-or-reinstall-the-app-for-the-calling-shopify-store /api-reference/openapi/lite.json post /merchant-create/ Creates the merchant for the Shopify store in the caller's session token, or marks an existing one reinstalled, then exchanges and stores a fresh offline Admin API token. Call it from the app's install flow only: it saves the store, its default market, default boost/bury rules and its Shopify settings. Needs a Shopify session token. Returns the merchant record. # Link the group's collections that share a handle Source: https://docs.depict.ai/api-reference/link-the-groups-collections-that-share-a-handle /api-reference/openapi/lite.json post /multi-store/create-collection-mappings/{merchant_id} Creates a cross-store link for every collection handle present in more than one store of `merchant_id`'s group (existing links are kept), then, if the group has auto-replicate on, stamps the new links to replicate from its source. Call it after connecting a store. Requires multi-store in the plan (402 otherwise). Answers null. # List a collection's version A/B tests Source: https://docs.depict.ai/api-reference/list-a-collections-version-ab-tests /api-reference/openapi/lite.json get /collections/{collection_id}/ab-tests Returns the collection's version A/B tests (every status unless `status` narrows it), read from their Shopify metaobjects. Read-only. # List a collection's versions Source: https://docs.depict.ai/api-reference/list-a-collections-versions /api-reference/openapi/lite.json get /collections/{collection_id}/versions Returns every saved version of the collection's Depict configuration (newest first): sort, pins, rules, which one is main, market targeting and schedule. Read-only. # List every collection of the merchant Source: https://docs.depict.ai/api-reference/list-every-collection-of-the-merchant /api-reference/openapi/lite.json get /collections Returns ALL of the merchant's Shopify collections (no paging; large stores have thousands), each with its Depict state: active or not, sort order, pin count, first product images. Read-only. Prefer GET /collections/paginated for search or large stores. # List product tags hidden from search Source: https://docs.depict.ai/api-reference/list-product-tags-hidden-from-search /api-reference/openapi/lite.json get /search-config/excluded-tags Shopify product tags whose products never appear in storefront search. Read-only. # List products hidden from search Source: https://docs.depict.ai/api-reference/list-products-hidden-from-search /api-reference/openapi/lite.json get /search-config/excluded-products Products the merchant excluded from storefront search results, with the title and image captured when they were picked. Read-only. # List the content pages indexed for search Source: https://docs.depict.ai/api-reference/list-the-content-pages-indexed-for-search /api-reference/openapi/lite.json get /search-config/content-pages Store pages, policies, blog posts and custom URLs the merchant asked search to index, each with its indexing status (PROCESSING while being scraped and indexed, then SUCCESS or FAILED), plus the auto-index switches and the paths auto-index skips. Read-only. # List the Inspiration gallery of published collections Source: https://docs.depict.ai/api-reference/list-the-inspiration-gallery-of-published-collections /api-reference/openapi/lite.json get /published-collections/ Returns up to 150 collections that merchants published to the shared Inspiration gallery in the last 30 days, across ALL merchants (the list does not depend on `merchant_id`, which only authorizes the caller). Read-only. Use it to browse examples. The trailing slash in the path is required. # List the merchant's boost/bury rules Source: https://docs.depict.ai/api-reference/list-the-merchants-boostbury-rules /api-reference/openapi/lite.json get /boost-bury Returns every boost/bury rule the merchant has, ordered by id. These rules are merchant-wide: the collection sorter applies them to every automatically sorted collection (per-collection rules live on the collection version instead). Read-only. Call it before PUT /boost-bury/rules, which replaces the whole set, so you can send back the rules you want to keep. # List the merchant's recommendation surfaces Source: https://docs.depict.ai/api-reference/list-the-merchants-recommendation-surfaces /api-reference/openapi/lite.json get /recommendations/surfaces Returns every recommendation surface the merchant has configured, as an object keyed by surface name in creation order. Call it to discover which surfaces exist (and their ids) before reading, editing, previewing or pinning one. Read-only; a merchant with recommendations not set up gets `{}`. # List the product tags a tag rule can match Source: https://docs.depict.ai/api-reference/list-the-product-tags-a-tag-rule-can-match /api-reference/openapi/lite.json get /boost-bury/tags Returns every distinct Shopify product tag in the merchant's ingested catalog, sorted, for building `type: "tag"` rules. Read-only; reflects the last catalog sync, not live Shopify. # List the stores in a merchant's multi-store group Source: https://docs.depict.ai/api-reference/list-the-stores-in-a-merchants-multi-store-group /api-reference/openapi/lite.json get /multi-store/stores/{merchant_id} Every store (merchant) in the same multi-store group as `merchant_id`, the merchant itself included. Call it to find the group's other stores before reading or changing cross-store collection links. Empty when the merchant is in no group. Read-only. # Get Listing Source: https://docs.depict.ai/api-reference/listing-v3/get-listing /api-reference/openapi/storefront.json get /v3/listings/{listing_id} # Get Listing Via External Id Source: https://docs.depict.ai/api-reference/listing-v3/get-listing-via-external-id /api-reference/openapi/storefront.json get /v3/listings/external_id/{external_id} # Get Listings Source: https://docs.depict.ai/api-reference/listing-v3/get-listings /api-reference/openapi/storefront.json get /v3/listings # API Overview Source: https://docs.depict.ai/api-reference/lite/overview The Search & Merchandising API: the REST API behind the Depict: Search & Merchandising Shopify app. Depict: Search & Merchandising is Depict's native Shopify product: it merchandises your existing Shopify collections without any theme changes. The Search & Merchandising API is the REST API behind the app's admin experience. ## Base URL The Search & Merchandising API is served under the `/api/lite` prefix of the Depict portal backend: ``` https:///api/lite ``` ## Authentication The Search & Merchandising API is called by the Depict: Search & Merchandising app itself, which runs embedded in the Shopify admin. Every request carries the Shopify session token that App Bridge issues to the app, sent as a bearer token: ```bash theme={null} curl "https:///api/lite/collections?merchant_id=$MERCHANT_ID" \ -H "Authorization: Bearer $SHOPIFY_SESSION_TOKEN" ``` The shop is taken from the token. Where an endpoint takes a `merchant_id` parameter, it must be the merchant of that shop; multi-store endpoints take explicit `merchant_id` parameters for the connected stores. Session tokens are short-lived and are only issued inside the Shopify admin, so there is no standalone API key for this API. ## AI assistants and other outside callers The session token above is the Depict: Search & Merchandising app's own path. Callers outside the app, such as AI assistants, use Depict's MCP server instead. Each store has its own endpoint: ``` https://platform.depict.ai/mcp?store_id= ``` It is protected with OAuth 2.1: clients register themselves (dynamic client registration), sign in with PKCE, and ask for the scopes `depict:read` and `depict:write`. A person with access to the store approves each connection in the Shopify admin. The authorization server is described at `https://platform.depict.ai/.well-known/oauth-authorization-server`, and each store's endpoint at `https://platform.depict.ai/.well-known/oauth-protected-resource?store_id=`. Through the MCP server, an assistant calls the operations of this API that are open to assistants, as the person who approved it. Connecting an assistant, the approval screen and revoking are described on the [AI assistants](/shopify-lite/ai-assistants) page. ## What you can do with it * **Collections** — list, activate and configure merchandised collections, including the ordering that Depict pushes back to Shopify. * **Boost & bury** — manage per-collection and global boost/bury rules. * **A/B testing** — estimate how long a collection test needs, configure tests and read their results. * **Recommendations** — create and edit recommendation surfaces, their pins and hidden products, and read their performance. * **Search** — read and change the search configuration, including search's own boost & bury rules, the content pages indexed for search and which product metafields are searchable. * **Analytics** — read the performance numbers shown in the app, and counts that describe your synced catalogue. * **Multi-store** — connect several Shopify stores and replicate collection configuration between them. * **Onboarding & Shopify integration** — ingestion status, markets, theme compatibility checks and setup state. # Get Locales Source: https://docs.depict.ai/api-reference/markets/get-locales /api-reference/openapi/storefront.json get /v3/locales # Get Markets Source: https://docs.depict.ai/api-reference/markets/get-markets /api-reference/openapi/storefront.json get /v3/markets # Merchant-wide collection traffic totals for a window Source: https://docs.depict.ai/api-reference/merchant-wide-collection-traffic-totals-for-a-window /api-reference/openapi/lite.json get /collection-totals Returns merchant-wide collection-page traffic (views, clicks, shoppers, click-through) summed over all collections for [from_date, to_date], and for the same-length window immediately before it so a caller can show a delta. Read-only; answers from Depict analytics, cached privately for 5 minutes. A null row means no collection traffic in that window. # Get Merchant Endpoint Source: https://docs.depict.ai/api-reference/merchants/get-merchant-endpoint /api-reference/openapi/portal.json get /api/v1/merchants/{merchant_id} # List Merchants Endpoint Source: https://docs.depict.ai/api-reference/merchants/list-merchants-endpoint /api-reference/openapi/portal.json get /api/v1/merchants # One merchant record Source: https://docs.depict.ai/api-reference/one-merchant-record /api-reference/openapi/lite.json get /merchants/{merchant_id} Returns one merchant's record: shop domain, currency, grid columns, onboarding and multi-store state. Read-only. # One page of the connected Instagram account's posts Source: https://docs.depict.ai/api-reference/one-page-of-the-connected-instagram-accounts-posts /api-reference/openapi/lite.json get /instagram/{merchant_id}/media Lists the connected account's posts (newest first) with captions, permalinks, counters and album items, for picking posts into content blocks. Media URLs are short-lived signed links. Page with `next_page` = the previous `paging.cursors.after`. Read-only; one Instagram Graph call per request. # One product's sales and grid performance over a date range Source: https://docs.depict.ai/api-reference/one-products-sales-and-grid-performance-over-a-date-range /api-reference/openapi/lite.json get /products/{product_id}/analytics Revenue, units, conversion, grid views/clicks, add-to-carts and the product score for [from_date, to_date], each with the previous period's value; daily series; the collections the product sits in with its position and clicks; and its revenue rank. Read-only. At most 365 days. Amounts are in the shop currency. # One recommendation surface's performance totals Source: https://docs.depict.ai/api-reference/one-recommendation-surfaces-performance-totals /api-reference/openapi/lite.json get /recommendation-metrics/surfaces/{surface_id} As the totals route, narrowed to one surface by id, with the surface's current name. An unknown or deleted surface answers 200 with its history (zeros if none) and a null name, never 404. Counts come from storefront events attributed to recommendation carousels; money figures use the shared Depict attribution rule. Read-only; answers from Depict analytics. # Order counts per product in a collection Source: https://docs.depict.ai/api-reference/order-counts-per-product-in-a-collection /api-reference/openapi/lite.json get /collections/{collection_id}/product-orders Returns `{product id: orders}` for the collection's products over [from_date, to_date], from Depict analytics. Products without orders are absent. Read-only. # Per-product funnel: clicks, carts, orders, performance score Source: https://docs.depict.ai/api-reference/per-product-funnel:-clicks-carts-orders-performance-score /api-reference/openapi/lite.json get /product-funnel-metrics/metrics A page of products ranked by `order_by` (the performance score by default), each with clicks, add-to-carts, orders, views, revenue and their previous-period values, the product itself, the collections it sits in and a Need attention verdict. The performance score is units ordered, shown 0–10 against the best product in the result; under the default order_by only products clicked in a collection grid in the window are scored. Need attention flags products that sell but sit low in a merchandised grid (bring up) and products near the top that barely sell (take action). Storewide, or one collection's products with `collection_id`. Page with offset/page_size while has_more. Full rows are large; `view=summary` drops the product and collection details for ranking a whole catalogue (title, the numbers, the verdict and the grids it names), and is what the assistant connector uses by default. For full details on a few products use `view=full` with a small page_size, or productSearch with `query` = the product id. Read-only. # Per-query table: what shoppers searched and how it went Source: https://docs.depict.ai/api-reference/per-query-table:-what-shoppers-searched-and-how-it-went /api-reference/openapi/lite.json get /search-reports/query-performance One row per search query in the current window, sorted by `order_by` and paged with offset/page_size: searches, no-results, clicks, no-click rate, median click position. Use it to find queries that return nothing or get no clicks. Read-only. # Preview a collection's products under a sort Source: https://docs.depict.ai/api-reference/preview-a-collections-products-under-a-sort /api-reference/openapi/lite.json post /collections/{collection_id}/products Returns the collection's products ordered as `sort_order` (and the given version's pins and rules) would order them on the storefront. The body previews unsaved rules, pins, groupings or a metafield sort; send `{}` (or null fields) to use the saved ones. Read-only despite POST. # Preview a saved surface Source: https://docs.depict.ai/api-reference/preview-a-saved-surface /api-reference/openapi/lite.json get /recommendations/surfaces/{surface_name}/preview Composes a saved surface right now from the current candidate pools, exactly as the storefront would for the given anchor and market, and returns the product ids per slot (pins included). A `product` or `category` surface needs `anchor_id`; an `any` surface must omit it. Read-only: nothing is written or recomputed. # Preview an unsaved draft of a surface Source: https://docs.depict.ai/api-reference/preview-an-unsaved-draft-of-a-surface /api-reference/openapi/lite.json post /recommendations/surfaces/{surface_name}/preview As the GET preview, but composes the unsaved `surface` in the body (the upsert's shape) in place of the saved one, keyed to the saved surface's id and directives. Use it to show the effect of edits before saving. Read-only: nothing is written. # Update Collection Product Images Endpoint Source: https://docs.depict.ai/api-reference/product-images/update-collection-product-images-endpoint /api-reference/openapi/portal.json put /api/v1/merchants/{merchant_id}/collections/{collection_id}/products/{main_product_id}/images # Update Product Media Urls Endpoint Source: https://docs.depict.ai/api-reference/product-images/update-product-media-urls-endpoint /api-reference/openapi/portal.json put /api/v1/merchants/{merchant_id}/products/{main_product_id}/images # Get Products In Listing Source: https://docs.depict.ai/api-reference/product-listing/get-products-in-listing /api-reference/openapi/storefront.json post /v3/listings/{listing_id}/products # Get Products In Listing, Via External Id Source: https://docs.depict.ai/api-reference/product-listing/get-products-in-listing-via-external-id /api-reference/openapi/storefront.json post /v3/listings/external_id/{external_id}/products # Product Listing Endpoint V2 Source: https://docs.depict.ai/api-reference/product-listing/product-listing-endpoint-v2 /api-reference/openapi/storefront.json post /v2/product-listing # Get Product Basic Metrics Endpoint Source: https://docs.depict.ai/api-reference/product-metrics/get-product-basic-metrics-endpoint /api-reference/openapi/portal.json get /api/v1/merchants/{merchant_id}/products/{main_product_id}/metrics/basic # Get Product Overview Chart Endpoint Source: https://docs.depict.ai/api-reference/product-metrics/get-product-overview-chart-endpoint /api-reference/openapi/portal.json get /api/v1/merchants/{merchant_id}/products/{main_product_id}/metrics/overview/chart # Get Product Toplist Endpoint Source: https://docs.depict.ai/api-reference/product-metrics/get-product-toplist-endpoint /api-reference/openapi/portal.json get /api/v1/merchants/{merchant_id}/products/{main_product_id}/metrics/toplist # Get Product Weekly Stats Endpoint Source: https://docs.depict.ai/api-reference/product-metrics/get-product-weekly-stats-endpoint /api-reference/openapi/portal.json get /api/v1/merchants/{merchant_id}/products/{main_product_id}/metrics/weekly # Get Dead Stock Products Endpoint Source: https://docs.depict.ai/api-reference/products/get-dead-stock-products-endpoint /api-reference/openapi/portal.json get /api/v1/merchants/{merchant_id}/products/dead-stock Merchant-wide dead stock: products with stock on hand but zero sales in the metrics period. Scope matches the merchant overview's ``dead_stock`` tile (Tinybird-scoped); per-collection ``CollectionMetricsSummary.dead_stock`` additionally counts stocked products Tinybird hasn't seen. When the inventory scope resolves to unknown (blanked), the overview tile renders None while this filter finds nothing — 0 here means "none identifiable", not a measurement. Backed by the cached whole-catalog ``fetch_collection_metrics``, so on a warm cache this is an in-memory filter. Items are sorted by inventory (worst offenders first) and capped at ``DEAD_STOCK_MAX_ITEMS``; ``total`` is the uncapped count. Products no longer in the catalog are dropped. # Get Product Endpoint Source: https://docs.depict.ai/api-reference/products/get-product-endpoint /api-reference/openapi/portal.json get /api/v1/merchants/{merchant_id}/products/{main_product_id} # Get Product Visibility Endpoint Source: https://docs.depict.ai/api-reference/products/get-product-visibility-endpoint /api-reference/openapi/portal.json get /api/v1/merchants/{merchant_id}/products/visibility # Get Products Metrics Endpoint Source: https://docs.depict.ai/api-reference/products/get-products-metrics-endpoint /api-reference/openapi/portal.json post /api/v1/merchants/{merchant_id}/products/metrics Per-product metrics for an explicit set of products. Lets the collection grid paint immediately (products are fetched without metrics) and then overlay the numbers. The expensive whole-catalog fetch is shared via the cached, single-flighted ``fetch_collection_metrics``, so on a warm cache this endpoint is just an in-memory slice keyed by the requested ids. Missing ids resolve to zeroed metrics, mirroring the inline ``include_metrics`` path. # List Product Filters Endpoint Source: https://docs.depict.ai/api-reference/products/list-product-filters-endpoint /api-reference/openapi/portal.json post /api/v1/merchants/{merchant_id}/products/filters # List Products Post Endpoint Source: https://docs.depict.ai/api-reference/products/list-products-post-endpoint /api-reference/openapi/portal.json post /api/v1/merchants/{merchant_id}/products # Patch Product Visibility Endpoint Source: https://docs.depict.ai/api-reference/products/patch-product-visibility-endpoint /api-reference/openapi/portal.json patch /api/v1/merchants/{merchant_id}/products/visibility # Publish a collection to the Inspiration gallery Source: https://docs.depict.ai/api-reference/publish-a-collection-to-the-inspiration-gallery /api-reference/openapi/lite.json post /published-collections/{collection_id} Renders a PNG preview of the merchant's live collection page (with the given theme template) and adds or refreshes its entry in the shared Inspiration gallery, where every merchant can see it; re-publishing resets the entry's likes to 0. Then queues a Shopify order sync-back for the collection. If the storefront is password-protected nothing is rendered or written and the call still answers 200 null. Slow: the render can take several seconds. Returns null. # Publish a collection version to the storefront Source: https://docs.depict.ai/api-reference/publish-a-collection-version-to-the-storefront /api-reference/openapi/lite.json put /collections/{collection_id}/publish_version/{version} Makes `body.version` live: as the collection's main version, or for its market / market group (retiring that market's previously live version). Writes the version's content blocks, product duplicates and image settings to Shopify metafields/metaobjects, then triggers the order sync-back. The path's {version} must equal `body.version`. An unknown version is a 404 and writes nothing. Requires collection versions in the plan (402 otherwise). Returns null. # Read a collection version's content cards Source: https://docs.depict.ai/api-reference/read-a-collection-versions-content-cards /api-reference/openapi/lite.json get /brand-features/{collection_id} Returns the content cards (image, video and text tiles placed in the collection's product grid) of one collection version, in stored order, read from Shopify. Each card is in the shape `PATCH /brand-features/{collection_id}` accepts, plus read-only fields PATCH ignores (`metaobject_id`, `clicks_id`, `image_url`, `hover_image_url`, `link.name`). Read the cards before changing them: PATCH replaces a card's settings with the card it is sent. Version ids come from `GET /collections/{collection_id}/versions`. Read-only. # Read a collection's products in Shopify's own order Source: https://docs.depict.ai/api-reference/read-a-collections-products-in-shopifys-own-order /api-reference/openapi/lite.json post /collections/{collection_id}/shopify/shopify-ordering Returns the collection's products in the order Shopify itself holds (the manual order before Depict sorts). Read-only despite POST. # Read a collection's products in their current order Source: https://docs.depict.ai/api-reference/read-a-collections-products-in-their-current-order /api-reference/openapi/lite.json get /collections/{collection_id}/initial-products Returns the collection's products in the order the storefront shows now (the main version's sort, pins and rules). Read-only. # Read a surface's pin sets Source: https://docs.depict.ai/api-reference/read-a-surfaces-pin-sets /api-reference/openapi/lite.json get /recommendations/surfaces/{surface_name}/pins Returns every pin set of a surface: one entry per (anchor_type, anchor_id, market_id), each listing the pinned products by slot position. Call it before saving pins, since a save replaces a whole set. Read-only. # Read one collection version A/B test with its results Source: https://docs.depict.ai/api-reference/read-one-collection-version-ab-test-with-its-results /api-reference/openapi/lite.json get /collections/{collection_id}/ab-tests/{test_id} Returns the test plus its results so far: per-variant and per-market KPIs, B-over-A lift, significance and a daily series. Results are null before the start date or when analytics are unavailable. Read-only. # Read one collection's Depict configuration Source: https://docs.depict.ai/api-reference/read-one-collections-depict-configuration /api-reference/openapi/lite.json get /collections/{collection_id} Returns the collection's configuration for a version: sort order, pinned products (for MANUAL sort, the full manual order), boost/bury rules, badges, metafield sort and product attachments. Without `version` it is the published (main) version. Read-only. 404 when the collection or the version has no Depict configuration (never opened, deleted, or not ingested). # Read one recommendation surface Source: https://docs.depict.ai/api-reference/read-one-recommendation-surface /api-reference/openapi/lite.json get /recommendations/surfaces/{surface_name} Returns one saved surface by name: its id, context, steps, filters, limit, exclusions and the read-only serving directives. Call it to inspect a surface before changing it with the PUT on the same path. Read-only. # Read search's own boost/bury rules Source: https://docs.depict.ai/api-reference/read-searchs-own-boostbury-rules /api-reference/openapi/lite.json get /search-config/boost-bury Returns the rule set that ranks storefront search results, when search has one of its own. `boost_bury_rules: null` means it has none and search ranks with the merchant-wide rules (GET /boost-bury), so an edit there reaches search too. Read-only. # Read the merchant's award notification state Source: https://docs.depict.ai/api-reference/read-the-merchants-award-notification-state /api-reference/openapi/lite.json get /collections/award-status Returns which collection-milestone awards the merchant has achieved (with when) and which notifications were dismissed. Read-only; an empty state when none is saved. # Read the merchant's search relevance settings Source: https://docs.depict.ai/api-reference/read-the-merchants-search-relevance-settings /api-reference/openapi/lite.json get /search-config/configuration Returns how storefront search ranks and filters for the merchant: keyword/meaning blend, searchable fields with weights, filter facets, sold-out handling and synonym groups. Unset values come back resolved to the serving defaults. Read-only. A 404 means the merchant has no Search section yet; the portal uses this read to decide whether to show it. # Read the multi-store group's settings Source: https://docs.depict.ai/api-reference/read-the-multi-store-groups-settings /api-reference/openapi/lite.json get /multi-store/group-settings/{merchant_id} The replication and publish-sync toggles of `merchant_id`'s group. A group that never changed a toggle answers the defaults (auto-replicate off, publish-sync on, recommendations off), and those are the values in effect, not a guess: fan-out and replication read the same defaults. A merchant in no group gets 400 NOT_IN_GROUP rather than defaults. Read-only. # Read the product metafield definitions and selection Source: https://docs.depict.ai/api-reference/read-the-product-metafield-definitions-and-selection /api-reference/openapi/lite.json get /search-config/searchable-metafields # Read the search empty-state configuration Source: https://docs.depict.ai/api-reference/read-the-search-empty-state-configuration /api-reference/openapi/lite.json get /search-config/states What the search overlay shows before the shopper types: product sort, pinned products, suggestion chips per locale, blocked suggestion terms, generator instructions and UI string overrides. Read-only; change it with the search-config PATCH. The product preview itself is not here (the storefront search API's `/empty-state-products` serves it). # Recommendation performance per day Source: https://docs.depict.ai/api-reference/recommendation-performance-per-day /api-reference/openapi/lite.json get /recommendation-metrics/timeseries Returns the same figures as the totals route, one point per day of [from_date, to_date], optionally narrowed to one surface. Call it for trends and sparklines. Counts come from storefront events attributed to recommendation carousels; money figures use the shared Depict attribution rule. Read-only; answers from Depict analytics. # Recommendation performance totals for a window Source: https://docs.depict.ai/api-reference/recommendation-performance-totals-for-a-window /api-reference/openapi/lite.json get /recommendation-metrics/totals Returns the merchant's recommendation performance over [from_date, to_date]: impressions, clicks, CTR, attributed add-to-carts, orders and revenue, and the derived rates, plus when the merchant's recommendation data starts. Call it for headline numbers or to compare two windows (call twice). Counts come from storefront events attributed to recommendation carousels; money figures use the shared Depict attribution rule. Read-only; answers from Depict analytics. # Get Displays Endpoint V3 Source: https://docs.depict.ai/api-reference/recommendations/get-displays-endpoint-v3 /api-reference/openapi/storefront.json post /v3/get-displays # Recommend For Category And User Source: https://docs.depict.ai/api-reference/recommendations/recommend-for-category-and-user /api-reference/openapi/storefront.json post /v2/recommend/products/category # Recommend For Product And User Source: https://docs.depict.ai/api-reference/recommendations/recommend-for-product-and-user /api-reference/openapi/storefront.json post /v2/recommend/products/product # Recommend For Products And User Source: https://docs.depict.ai/api-reference/recommendations/recommend-for-products-and-user /api-reference/openapi/storefront.json post /v2/recommend/products/products # Recommend For User Source: https://docs.depict.ai/api-reference/recommendations/recommend-for-user /api-reference/openapi/storefront.json post /v2/recommend/products/general # Recommendations Source: https://docs.depict.ai/api-reference/recommendations/recommendations /api-reference/openapi/storefront.json post /v3/recommend/products # Remove a store from its multi-store group Source: https://docs.depict.ai/api-reference/remove-a-store-from-its-multi-store-group /api-reference/openapi/lite.json post /multi-store/disconnect/{merchant_id} Clears `merchant_id`'s multi-store group. Refused while the store still has collection mappings in the group or other stores replicate from it; unlink those first (POST unlink-collections). Side effect: writes the merchant's group. A no-op for a merchant in no group. # Rename a market group or replace its markets Source: https://docs.depict.ai/api-reference/rename-a-market-group-or-replace-its-markets /api-reference/openapi/lite.json put /{merchant_id}/market-groups/{group_id} Renames the group when `name` is non-empty, and when `market_ids` is given replaces its markets with exactly those (removed markets go back to `global`; `[]` empties it). The `global` group cannot be modified. Returns the group. # Replace or clear search's own boost/bury rules Source: https://docs.depict.ai/api-reference/replace-or-clear-searchs-own-boostbury-rules /api-reference/openapi/lite.json patch /search-config/boost-bury Whole-replaces the rule set search ranks with (send the full list). A list, including `[]`, takes search off the merchant-wide rules: collections keep them, search uses only this list. `null` clears it, and search follows the merchant-wide rules again. Storefront search picks the change up within about two minutes (its config cache); collections are never affected. Strengths written here hold until the merchant next saves in the portal, whose editor derives every strength from list position (n..1, -1..-n) and keeps the order. # Replace the merchant's boost/bury rules Source: https://docs.depict.ai/api-reference/replace-the-merchants-boostbury-rules /api-reference/openapi/lite.json put /boost-bury/rules Replaces ALL of the merchant's boost/bury rules with `rules` in one atomic write; any rule not sent is deleted, and an empty list clears them. To add or edit one rule, GET /boost-bury first and send the full list back. Side effects: the new rules take effect the next time collections are sorted (no immediate re-sort is triggered), and an `updated_boost_bury` analytics event is recorded. Returns null. # Replace the product tags hidden from search Source: https://docs.depict.ai/api-reference/replace-the-product-tags-hidden-from-search /api-reference/openapi/lite.json patch /search-config/excluded-tags Whole-replaces the excluded-tags list (`[]` clears it); tags are trimmed and deduplicated. Live search stops returning products carrying any of them. # Replace the products hidden from search Source: https://docs.depict.ai/api-reference/replace-the-products-hidden-from-search /api-reference/openapi/lite.json patch /search-config/excluded-products Whole-replaces the excluded-products list (send the full list; `[]` clears it). Duplicate ids are dropped, first wins. Live search stops returning these products. # Replace the selected searchable metafields Source: https://docs.depict.ai/api-reference/replace-the-selected-searchable-metafields /api-reference/openapi/lite.json post /search-config/searchable-metafields # Revenue and orders Depict drove, per feature Source: https://docs.depict.ai/api-reference/revenue-and-orders-depict-drove-per-feature /api-reference/openapi/lite.json get /depict-attribution Under the one attribution rule (a purchased line belongs to the feature the shopper last clicked that product on within window_hours before buying): lines, orders, revenue and touches for collections, recommendations and search, plus unattributed, Depict total and the whole store, for the window and the one before, with a daily revenue series. Read-only. # Revenue and sell-through per product in a collection Source: https://docs.depict.ai/api-reference/revenue-and-sell-through-per-product-in-a-collection /api-reference/openapi/lite.json get /collections/{collection_id}/product-metrics Returns, for every product in the collection (0 revenue when it sold nothing), revenue over [from_date, to_date] converted to the merchant's base currency (ECB rates at to_date; an unconvertible currency adds 0), and the sell-through rate. Read-only; answers from Depict analytics. # Run an allow-listed Shopify Admin GraphQL operation for the merchant Source: https://docs.depict.ai/api-reference/run-an-allow-listed-shopify-admin-graphql-operation-for-the-merchant /api-reference/openapi/lite.json post /shopify/proxy/{merchant_id}/admin-api/graphql.json Forwards a GraphQL request to the merchant's Shopify Admin API with the app's stored access token. Only the portal's own allow-listed operations pass (the name and document must both match); everything else is refused. Allow-listed mutations write to the live store. Returns Shopify's GraphQL body verbatim, including GraphQL-level `errors`. # Save a collection's Depict configuration Source: https://docs.depict.ai/api-reference/save-a-collections-depict-configuration /api-reference/openapi/lite.json put /collections/{collection_id} The collection editor's save: writes the body as a version (a new one when `version` is null) and, with `main`, makes it the published version. Side effects: a Shopify order sync-back, replication of a main save to linked multi-store collections, and tracked events. 402 when the installation is frozen. Returns the saved version's UUID. # Save one pin set of a surface Source: https://docs.depict.ai/api-reference/save-one-pin-set-of-a-surface /api-reference/openapi/lite.json put /recommendations/surfaces/{surface_name}/pins Saves one pin set of a surface: the body is the complete set for one (anchor_type, anchor_id, market_id), and the stored pins for that set are reconciled to it (added, moved, removed); an empty `pins` clears the set. Other sets are untouched. Side effect: queues a background recompute of the surface. Returns the saved set. # Save the merchant's award notification state Source: https://docs.depict.ai/api-reference/save-the-merchants-award-notification-state /api-reference/openapi/lite.json put /collections/award-status Replaces the award state with the body (send the full state from GET /collections/award-status, modified). Side effect: appends a new config row authored by the caller. Returns null. # Save the thresholds behind the computed product badges Source: https://docs.depict.ai/api-reference/save-the-thresholds-behind-the-computed-product-badges /api-reference/openapi/lite.json put /settings/dynamic-status Replaces the merchant's badge thresholds (all six counts are required; `new_in_date_source` defaults to published_at). Side effects: a new settings version is stored with the caller as author, and every collection that syncs back to Shopify is re-ordered there with the new badges (best effort: a failed re-order is logged, the save still succeeds). Answers null. # Schedule a collection version to publish later Source: https://docs.depict.ai/api-reference/schedule-a-collection-version-to-publish-later /api-reference/openapi/lite.json put /collections/{collection_id}/schedule_version/{version} Sets when the version is published automatically (by a cron, within minutes of the time); replaces any earlier schedule. Records the caller as the scheduler. Nothing is published now. Scheduling the main version is the normal way to time a publish of the live configuration; it is valid even when that version is already the one the storefront shows. Requires scheduled publishing in the plan (402 otherwise); schedules already set still publish. # Search and page the merchant's collections Source: https://docs.depict.ai/api-reference/search-and-page-the-merchants-collections /api-reference/openapi/lite.json get /collections/paginated Returns one page of the merchant's collections ordered by title, optionally filtered by a title search. Read-only. To page, pass the response's `offset` back while `has_next` is true. # Get Search Query Stats Endpoint Source: https://docs.depict.ai/api-reference/search-metrics/get-search-query-stats-endpoint /api-reference/openapi/portal.json get /api/v1/merchants/{merchant_id}/search/metrics/queries # Search or page through a merchant's products Source: https://docs.depict.ai/api-reference/search-or-page-through-a-merchants-products /api-reference/openapi/lite.json get /products Finds products whose title, any variant SKU, product id or any tag contains `query` (case-insensitive); an exact product-id match sorts first. A blank `query` pages the whole catalogue, or one collection with `collection_id` (in the collection's order unless `sort` is given), and also returns the scope's `total`. Read-only. Use it to look up products by name/SKU/id before calling the per-product routes. # Search totals for the window Source: https://docs.depict.ai/api-reference/search-totals-for-the-window /api-reference/openapi/lite.json get /search-reports/summary One row per window: searches, users, clicks and the rates. Takes the current and previous windows (from_ts/to_ts, prev_from_ts/prev_to_ts) and answers both, for period-over-period comparison. Read-only. # Get Related Recommendations Source: https://docs.depict.ai/api-reference/search/get-related-recommendations /api-reference/openapi/storefront.json post /v2/search/related # Get Related Recommendations Source: https://docs.depict.ai/api-reference/search/get-related-recommendations-1 /api-reference/openapi/storefront.json post /v3/search/related # Get Results Source: https://docs.depict.ai/api-reference/search/get-results /api-reference/openapi/storefront.json post /v2/search/results # Get Results Source: https://docs.depict.ai/api-reference/search/get-results-1 /api-reference/openapi/storefront.json post /v3/search/results # Get Suggestions Source: https://docs.depict.ai/api-reference/search/get-suggestions /api-reference/openapi/storefront.json get /v2/search/suggestions # Get Suggestions Source: https://docs.depict.ai/api-reference/search/get-suggestions-1 /api-reference/openapi/storefront.json get /v3/search/suggestions # Search Through Text Content Source: https://docs.depict.ai/api-reference/search/search-through-text-content /api-reference/openapi/storefront.json get /v2/search/content # Searches by where the shopper started them Source: https://docs.depict.ai/api-reference/searches-by-where-the-shopper-started-them /api-reference/openapi/lite.json get /search-reports/entry-points Searches, sessions and clicks per entry point (e.g. header search, search page). Takes the current and previous windows (from_ts/to_ts, prev_from_ts/prev_to_ts) and answers both, for period-over-period comparison. Read-only. # Set how many products per row Depict's collection grid shows Source: https://docs.depict.ai/api-reference/set-how-many-products-per-row-depicts-collection-grid-shows /api-reference/openapi/lite.json put /shopify-collection-template/{merchant_id}/columns-settings Writes `[desktop_columns, mobile_columns]` to the shop metafield `$app:column-settings.column_settings` (creating its definition on first use), which Depict's theme templates read on the storefront. Side effects: a Shopify write that is live on the storefront at once, and a `colums_settings_updated` analytics event. Returns JSON `null`. # Set the option name the collection grid groups variants by Source: https://docs.depict.ai/api-reference/set-the-option-name-the-collection-grid-groups-variants-by /api-reference/openapi/lite.json put /merchants/{merchant_id}/variant_group_by_name Sets which product option (e.g. Color) groups variants into one card in the collection grid; omit the parameter to clear it. Returns null. # Set which store each collection copy replicates from Source: https://docs.depict.ai/api-reference/set-which-store-each-collection-copy-replicates-from /api-reference/openapi/lite.json post /multi-store/collection-replication Sets `replication_merchant_id` on the given collection copies (null stops replicating); copies left out are unchanged. A merchant may only name stores of its own group; through an AI assistant, only the connected store itself or null. Side effect: writes mapping rows; the next publish of a source collection copies its setup to its replicas. Naming a source a copy does not already have requires multi-store in the caller's plan (402 otherwise); an entry that keeps its current source, and null, never do. Answers null; an empty list is a no-op. # Get Auto Hide Settings Endpoint Source: https://docs.depict.ai/api-reference/settings/get-auto-hide-settings-endpoint /api-reference/openapi/portal.json get /api/v1/settings/{merchant_id}/auto-hide # Update Auto Hide Exclude Products Endpoint Source: https://docs.depict.ai/api-reference/settings/update-auto-hide-exclude-products-endpoint /api-reference/openapi/portal.json put /api/v1/settings/{merchant_id}/auto-hide/exclude-products # Update Auto Hide Settings Endpoint Source: https://docs.depict.ai/api-reference/settings/update-auto-hide-settings-endpoint /api-reference/openapi/portal.json put /api/v1/settings/{merchant_id}/auto-hide # Start a collection version A/B test Source: https://docs.depict.ai/api-reference/start-a-collection-version-ab-test /api-reference/openapi/lite.json post /collections/{collection_id}/ab-tests Splits the collection's storefront traffic between two saved versions for 7–30 days, in every market or in the given market groups. Creates the test and per-variant orderings as Shopify metaobjects; a failure rolls them back. Needs the launch flag (403) and a Custom Merchandising plan (402); a scope that overlaps a running test on the collection is a 409. Returns the created test (201). # Start a legacy basic subscription Source: https://docs.depict.ai/api-reference/start-a-legacy-basic-subscription /api-reference/openapi/lite.json post /settings/subscription/basic Creates a pending Shopify app subscription on the legacy basic plan and returns the confirmation URL the merchant must open to approve it; nothing is billed until they do. Side effect: a pending AppSubscription in Shopify. New subscriptions should use POST /settings/subscription (products + size). # Start a legacy essentials subscription Source: https://docs.depict.ai/api-reference/start-a-legacy-essentials-subscription /api-reference/openapi/lite.json post /settings/subscription/essentials Creates a pending Shopify app subscription on the legacy essentials plan and returns the confirmation URL the merchant must open to approve it; nothing is billed until they do. Side effect: a pending AppSubscription in Shopify. New subscriptions should use POST /settings/subscription (products + size). # Start a legacy pro subscription Source: https://docs.depict.ai/api-reference/start-a-legacy-pro-subscription /api-reference/openapi/lite.json post /settings/subscription/pro Creates a pending Shopify app subscription on the legacy pro plan and returns the confirmation URL the merchant must open to approve it; nothing is billed until they do. Side effect: a pending AppSubscription in Shopify. New subscriptions should use POST /settings/subscription (products + size). # Start preparing the search header on the merchant's theme Source: https://docs.depict.ai/api-reference/start-preparing-the-search-header-on-the-merchants-theme /api-reference/openapi/lite.json post /search-onboarding/enable Queues the background job that prepares Depict's search header for the merchant's live theme (nothing is published; the result is stashed). Call once; then poll searchOnboardingStatus until `stashed`, and continue with searchOnboardingGoLive. Needs a plan that includes Search. # Stop indexing content pages Source: https://docs.depict.ai/api-reference/stop-indexing-content-pages /api-reference/openapi/lite.json delete /search-config/content-pages Removes the pages from search, then from the list. A removed store page is skipped by auto-index until it is indexed again by hand. # Store-wide clicks, add-to-carts and orders for a window Source: https://docs.depict.ai/api-reference/store-wide-clicks-add-to-carts-and-orders-for-a-window /api-reference/openapi/lite.json get /funnel-totals The Analytics funnel's totals for from_date..to_date and the period before it, with attributed revenue and distinct store orders. Read-only. # Storefront sessions per day Source: https://docs.depict.ai/api-reference/storefront-sessions-per-day /api-reference/openapi/lite.json get /dashboard/traffic-daily Daily storefront sessions over from_date..to_date for the dashboard's traffic trend. Read-only. # Subscribe to, upgrade or downgrade to a plan (products + size) Source: https://docs.depict.ai/api-reference/subscribe-to-upgrade-or-downgrade-to-a-plan-products-+-size /api-reference/openapi/lite.json post /settings/subscription Resolves the selection to a catalogue plan and creates a pending Shopify app subscription replacing the current one; returns the confirmation URL the merchant must open to approve it. Nothing is billed or changed until they approve, except that a downgrade to a plan without Merchandising deactivates the collections not in `keep_collection_ids`. Upgrades and lateral moves apply immediately (prorated), downgrades at the next billing cycle. See GET /settings/subscription/plans for what can be bought. # Switch a collection to another theme template Source: https://docs.depict.ai/api-reference/switch-a-collection-to-another-theme-template /api-reference/openapi/lite.json post /shopify-collection-template/{collection_id}/activate Sets the collection's `templateSuffix` on Shopify, which changes the live storefront page at once. Activating a Depict template (suffix starting `depict`) also marks the theme approved. Side effects: the Shopify write, a theme re-onboarding request, and a `template_activated` analytics event. Returns the template now in use. # Switch auto-index for one store content type Source: https://docs.depict.ai/api-reference/switch-auto-index-for-one-store-content-type /api-reference/openapi/lite.json patch /search-config/content-pages On: the type's published items are indexed now and every night new ones are added and deleted ones removed. Off: nothing new is added; pages already indexed stay. # The AI assistants connected to a store Source: https://docs.depict.ai/api-reference/the-ai-assistants-connected-to-a-store /api-reference/openapi/lite.json get /mcp/grants Lists the store's OAuth grants to MCP clients (AI assistants such as Claude Code), newest first: one per connected assistant, with its name, scopes and approval time. Never carries tokens. Read-only; the Settings page shows it under Connections, and a `grant_id` from it disconnects that assistant through DELETE /mcp/grants/{grant_id}. # The badges a product currently earns Source: https://docs.depict.ai/api-reference/the-badges-a-product-currently-earns /api-reference/openapi/lite.json get /products/{product_id}/badges Computed merchandising badges for one product (on sale, stock state, bestseller, trending, new in, tag/collection badges, ...), store-wide scope. Read-only. Returns [] when the product earns none, and also when the badge service cannot answer (badges are decoration, so a failure is logged, not surfaced). # The collection templates a collection can switch between Source: https://docs.depict.ai/api-reference/the-collection-templates-a-collection-can-switch-between /api-reference/openapi/lite.json get /shopify-collection-template/{merchant_id}/{collection_id}/templates Lists the collection templates in the store's published theme, marks the one this collection uses, and flags which render Depict's grid. When the Depict variant of the active template does not exist yet, a `written: false` placeholder is appended and `theme_onboarding_status` says whether Depict is still writing it (the portal polls while it is `pending`). Read-only; several Shopify calls per request. # The collections dashboard: a sorted, filtered page with traffic Source: https://docs.depict.ai/api-reference/the-collections-dashboard:-a-sorted-filtered-page-with-traffic /api-reference/openapi/lite.json post /collections/data-sorted-by Returns one page of the merchant's collections with their traffic over [from_date, to_date] (views, clicks, CTR), ordered by traffic (`top_views`, `top_ctr`, `top_clicks`) or metadata (`updated_at`, `name_a_z`, `number_of_products`), optionally filtered by status and title. Read-only; POST because the filters and date window travel as a JSON body. To page, pass the response's `offset` back while `has_next` is true. # The countries mapped to one market Source: https://docs.depict.ai/api-reference/the-countries-mapped-to-one-market /api-reference/openapi/lite.json get /merchants/{merchant_id}/markets/{market_id}/mappings Returns the ISO country codes mapped to one market, sorted. Read-only. # The Instagram account connected to the merchant, if any Source: https://docs.depict.ai/api-reference/the-instagram-account-connected-to-the-merchant-if-any /api-reference/openapi/lite.json get /instagram/{merchant_id}/account Reads the stored Instagram login and asks Instagram for the account's id, name and profile picture. Returns JSON `null` when no account is connected. Read-only; one Instagram Graph call per request. # The merchant's market groups Source: https://docs.depict.ai/api-reference/the-merchants-market-groups /api-reference/openapi/lite.json get /{merchant_id}/market-groups Lists the market groups (global first) with their markets and whether each group is enabled. Call it to pick the market group a collection version targets. For a Shopify caller with no groups yet, it first creates the default `global` group. # The merchant's plan, usage and entitlements Source: https://docs.depict.ai/api-reference/the-merchants-plan-usage-and-entitlements /api-reference/openapi/lite.json get /settings/subscription/status Everything the portal gates on: active collections vs the cap, this month's sessions (and a projection) vs the quota, trial state, whether the store is frozen or erroring, the active Shopify subscription, and the plan-derived entitlements. Read-only; computed fresh on every call. # The merchant's public Storefront API token and store domain Source: https://docs.depict.ai/api-reference/the-merchants-public-storefront-api-token-and-store-domain /api-reference/openapi/lite.json get /shopify/storefront_api_credentials What a client needs to call the store's Storefront GraphQL API directly (e.g. to read published products and shop metafields as shoppers see them). Read-only; one config read, no Shopify call. # The merchant's published Shopify theme and Depict's footprint in it Source: https://docs.depict.ai/api-reference/the-merchants-published-shopify-theme-and-depicts-footprint-in-it /api-reference/openapi/lite.json get /onboarding/{merchant_id}/themes/main Reads the store's themes from the Shopify Admin API, picks the published (`main`) one and reports whether Depict's inline script and a Depict collection template are installed in it. Call it to decide whether the theme setup steps are done. Read-only; two Shopify calls per request. # The merchant's Shopify markets and their countries Source: https://docs.depict.ai/api-reference/the-merchants-shopify-markets-and-their-countries /api-reference/openapi/lite.json get /merchants/{merchant_id}/markets Returns every Shopify market of a multi-market store with its countries and whether Depict serves it. A single-market store returns []. Read-only. # The merchant's Shopify markets with their countries and currency Source: https://docs.depict.ai/api-reference/the-merchants-shopify-markets-with-their-countries-and-currency /api-reference/openapi/lite.json get /{merchant_id}/available-regions Lists every Shopify market of the merchant, grouped or not, with its mapped countries and currency, ordered by country. Call it to offer markets when building a market group. Read-only. # The merchants the caller may act for Source: https://docs.depict.ai/api-reference/the-merchants-the-caller-may-act-for /api-reference/openapi/lite.json get /merchants/ Returns the merchant record of the caller's own store, in a list. Call it first to discover merchant ids and each store's settings. Read-only. # The multi-store group's cross-store collection links Source: https://docs.depict.ai/api-reference/the-multi-store-groups-cross-store-collection-links /api-reference/openapi/lite.json get /multi-store/collection-mappings/{group_id} Every collection linked across two or more stores of the group, plus every live collection of every store (to label them). The caller must belong to the group. Read-only. # The plans the merchant can buy Source: https://docs.depict.ai/api-reference/the-plans-the-merchant-can-buy /api-reference/openapi/lite.json get /settings/subscription/plans Every sellable catalogue plan (products + size) with its monthly and annual price, trial days and session quota, in catalogue order. Read-only. Subscribe to one with POST /settings/subscription using the same products and size. # The recommender catalog a surface step can use Source: https://docs.depict.ai/api-reference/the-recommender-catalog-a-surface-step-can-use /api-reference/openapi/lite.json get /recommendations/recommenders Returns the recommender catalog: every step `kind` a surface may use, its display name, and whether it needs a product anchor (`bucket: per_product`). Call it before building or editing a surface's `steps`. Read-only. # The store's Shopify name and brand logo Source: https://docs.depict.ai/api-reference/the-stores-shopify-name-and-brand-logo /api-reference/openapi/lite.json get /shop-brand Returns the store's name and Shopify brand logo (Settings > Brand), read live from the Shopify Storefront API. Call it to render the merchant's brand, e.g. in a search preview. Read-only. # The thresholds behind the computed product badges Source: https://docs.depict.ai/api-reference/the-thresholds-behind-the-computed-product-badges /api-reference/openapi/lite.json get /settings/dynamic-status How the dynamic badges are computed for this merchant: the New in window, how many products count as bestsellers, slow movers and trending, the low-stock percentage and the order window. Read-only; a merchant that never saved settings gets the defaults. # This store's replica collections that are unpublished while their source is live Source: https://docs.depict.ai/api-reference/this-stores-replica-collections-that-are-unpublished-while-their-source-is-live /api-reference/openapi/lite.json get /multi-store/replica-publish-divergence/{merchant_id} Collections of `merchant_id` that replicate a live collection of another store in the group but are themselves unpublished. An empty list also answers a merchant in no group and a group with publish-sync off, where drift is expected rather than a fault; call GET group-settings (400 NOT_IN_GROUP / `sync_publish_status: false`) to tell those apart from a checked group with nothing diverged. Read-only. # Turn Depict on or off for many collections Source: https://docs.depict.ai/api-reference/turn-depict-on-or-off-for-many-collections /api-reference/openapi/lite.json put /collections/bulk-activation The bulk form of PUT /collections/activation for up to 100 collections. The plan limit is checked for the whole batch (402). A collection that fails (unknown, a Shopify error) is reported in `errors` and the others still apply. Returns the rollup. # Turn Depict on or off for one collection Source: https://docs.depict.ai/api-reference/turn-depict-on-or-off-for-one-collection /api-reference/openapi/lite.json put /collections/activation Activating makes Depict manage the collection (its saved sort, pins and rules are written back to Shopify); deactivating hands the order back to Shopify and restores the collection's template. Activating is capped by the plan's active-collection limit (402). Side effects: Shopify writes, a sync-back, linked multi-store collections follow, and a tracked event. Returns null. # Unpublish a collection version Source: https://docs.depict.ai/api-reference/unpublish-a-collection-version /api-reference/openapi/lite.json put /collections/{collection_id}/unpublish_version/{version} Takes a published version off the storefront: the main version (clears its Shopify metafields and the main pointer) or a market version (retires it for its markets); then triggers the order sync-back. The version itself is kept. # Update one legacy A/B test metaobject Source: https://docs.depict.ai/api-reference/update-one-legacy-ab-test-metaobject /api-reference/openapi/lite.json put /brand-features/metaobject/{metaobject_id} Upserts the A/B test metaobject named by the body's `handle`, creating its definitions on first use; when the body carries its `id`, it must be the path's metaobject. Used to edit a running legacy whole-collection A/B test (dates, name, notify email, generated conclusion). Side effect: a Shopify metaobject write. Returns JSON `null`. # Upload an image or video file to the merchant's Shopify Files Source: https://docs.depict.ai/api-reference/upload-an-image-or-video-file-to-the-merchants-shopify-files /api-reference/openapi/lite.json post /media/{merchant_id}/upload Streams one multipart `file` into Shopify Files (staged upload, fileCreate), waits until Shopify has processed it, and returns the file node, whose `id` a content block then references. Side effects: creates a Shopify file in this store, and in every multi-store sibling linked through `collection_id`; nothing is rolled back if one store fails. Images and videos only; Shopify's size caps apply. Can take tens of seconds for a video. # What the merchant's synced catalogue contains, in counts Source: https://docs.depict.ai/api-reference/what-the-merchants-synced-catalogue-contains-in-counts /api-reference/openapi/lite.json get /catalogue-facts Returns counts over the merchant's synced catalogue: products, collections, how many are out of stock or have no image, how many carry a description or tags, and how many share a tag with another product. Call it to describe a store to itself before any shopper data exists — the onboarding Home shows these instead of invented sales figures. Read-only. # Where a merchant's catalog is between Shopify and the search index Source: https://docs.depict.ai/api-reference/where-a-merchants-catalog-is-between-shopify-and-the-search-index /api-reference/openapi/lite.json get /merchants/{merchant_id}/catalog-readiness Returns where the merchant's catalog is between Shopify and the search/recommendations index: the pipeline `stage`, whether search is `serving`, and document counts. Call it to tell whether search and recommendations can work yet, or how far an import has come; the portal polls it every few seconds while a store activates. Read-only. # Where the merchant's search onboarding stands Source: https://docs.depict.ai/api-reference/where-the-merchants-search-onboarding-stands /api-reference/openapi/lite.json get /search-onboarding/status The state of adding Depict search to the merchant's storefront theme: a background job prepares a search header on an unpublished copy of the live theme, then builds that copy for the merchant to preview and publish. Poll it after searchOnboardingEnable or searchOnboardingGoLive. Read-only. # Whether the merchant's recommendations are computed yet Source: https://docs.depict.ai/api-reference/whether-the-merchants-recommendations-are-computed-yet /api-reference/openapi/lite.json get /recommendations/precompute-status Reports whether the merchant's recommendations have been computed: the run in flight (if any), the last finished run, and `ready` (the last run completed with at least one market). Poll it after enabling recommendations or changing surfaces to know when storefront recommendations are live. Read-only. # Whether the storefront is behind Shopify's password page Source: https://docs.depict.ai/api-reference/whether-the-storefront-is-behind-shopifys-password-page /api-reference/openapi/lite.json get /merchants/{merchant_id}/storefront-password-protected Returns a bare boolean: true when the online store is password-protected, so shopper-facing previews cannot load. Asks Shopify live; a 502 means Shopify could not be asked (dead token, frozen shop, no config), so the answer is unknown, not false. Read-only. # Whether the store's catalog is indexed for search yet Source: https://docs.depict.ai/api-reference/whether-the-stores-catalog-is-indexed-for-search-yet /api-reference/openapi/lite.json get /search-reports/ingestion-status How far catalog indexing has come (0–100) with a display line, and when the shop's search data starts. Poll until has_run_at_least_one_ingestion. Read-only. # Whether the store's stored Shopify token still works Source: https://docs.depict.ai/api-reference/whether-the-stores-stored-shopify-token-still-works /api-reference/openapi/lite.json get /merchant-create/check-token-health/ Probes the stored offline Admin API token of the store in the caller's session token. Returns `needs_reinstall: true` when the store is unknown, has no usable config, or Shopify answers 401 for the token (then marks the app uninstalled); the app then re-runs the install flow. Any other Shopify answer, 403 included, is `false`. Needs a Shopify session token. # Which brand features the merchant's plan allows Source: https://docs.depict.ai/api-reference/which-brand-features-the-merchants-plan-allows /api-reference/openapi/lite.json get /brand-features/eligibility One entry per brand feature (content blocks, image settings, product duplicates, the legacy A/B test, collection-version A/B tests) saying whether the merchant's plan allows it and, if not, the upgrade reason to show. Derived from the merchant's entitlements. Read-only; cacheable for 5 minutes. # Which pinned products replication would skip, per replica Source: https://docs.depict.ai/api-reference/which-pinned-products-replication-would-skip-per-replica /api-reference/openapi/lite.json get /multi-store/replication-report/{merchant_id} For every replication link in `merchant_id`'s group, the source collection's pinned products that would NOT reach the replica (no SKU, SKU missing in the target store, or gone from the source). Call it to explain why a replica differs from its source. Read-only; `{edges: []}` for a store in no group. # Write the plain-language conclusion of an A/B test Source: https://docs.depict.ai/api-reference/write-the-plain-language-conclusion-of-an-ab-test /api-reference/openapi/lite.json put /ab-test/generate_conclusion Asks the model to explain the test's result from its metrics (abTestMetrics) and stores the text on the test's Shopify metaobject. If `metaobject.generated_conclusion` is already non-empty it is returned unchanged: no model call, no write. Otherwise it costs a model call and writes to Shopify. # Changelog Source: https://docs.depict.ai/changelog/headless New features and improvements in the Depict platform for headless merchants and the Shopify theme app. **October 2026** Settings, collections, search and push API ## Product issues A new **Product issues** page under Settings lists the products Depict had trouble with while processing your catalog — images that could not be downloaded, products that could not be indexed, and source data problems — with the message from your platform and when each issue was first and last seen. Filter by status and type, search for a product, and export to CSV. Fix the product in your store and the issue resolves the next time Depict processes it. See [Settings](/headless/features/settings#product-issues). ## Standard filters are editable Standard filters such as price, size and color can now be edited like your own filters: change their titles per language, their filter type and who sees them. Only the attribute behind a standard filter stays fixed. ## Shopify attributes are view-only For stores on Shopify, the **Attributes** page now shows which Shopify options, metafields and tags feed each attribute in a read-only table. Attributes can no longer be added or changed there; [contact Depict support](mailto:support@depict.ai) to change a mapping. ## Collection display options The **Display** menu in the collection editor sets how many cards sit in a row, from 2 to 10 on the desktop layout, alongside card density and which details each card shows. The setting changes only your view in the portal and is remembered per store. ## Campaigns tab always visible The **Campaigns** tab in the collections list is now always shown, so you can create your first campaign from there. ## Add content and synonyms from their tab **Add content** and **Add synonym** now sit on the **Content** and **Synonyms** tabs of the Search page, next to the language menu, instead of in a menu in the page header. Choose a language first: content and synonyms are saved per language. ## Push product API: category deletes and listing dates The push product API can now delete categories, once no product or child category references them, and accepts an optional `source_created_at` on products and product groups. That date drives the "newest" sort. See the [push product API guide](/data-ingestion-guide/push-product-api). **September 2026** Search ## Search opens on Overview The Search page now opens on **Overview** for every store, including stores on Depict's new search engine, so the numbers come first and the settings are one tab away. **August 2026** Analytics ## A simpler Analytics page Four store-wide tiles — Depict revenue, clicks, CTR and catalog sell-through — now sit above the tabs. The Search tab adds unique searchers and a funnel from searches to orders, and the Recommendations tab opens with its own revenue, impressions, CTR and funnel tiles. ## Pinned vs Auto Lift Each pinned product now gets its own verdict — **Keep pinned**, **Unpin advised** or **Needs more data** — in the collection's analytics drawer. ## Stock Health A **Stock Health** view in the analytics drawer lists the collection's low-stock variants and the products at dead stock risk. ## Boost Lift and Rule Health The Boost & Bury page now shows whether your boosted collections out-click the store average, and flags collection rules that have gone stale, bury proven sellers or boost collections nobody sees. See [Boost & Bury](/headless/features/boost-and-bury#header-analytics). **August 2026** New portal We are improving the portal **one area at a time**, and improvements reach stores in stages — so you may see something here before a colleague at another store does. Nothing you have set up changes: your settings, rules and data carry across untouched. When an improvement reaches you, the portal marks it with a dot in the navigation and shows a short note about what is different. ## Your dashboard at a glance Attributed revenue, conversion, average order value and orders across search and recommendations, each opening a daily trend for the period you pick. ## Recommendations in one place Surfaces, rules and pinned products sit together, so setting up a placement takes fewer clicks and less hunting. Where recommendation analytics is on, each surface reports its own performance and every KPI tile opens a trend. ## Recommendation rules, easier to work with Each rule shows what it applies to, what it pins and what it hides without being opened, so a surface can be read top to bottom. Rules apply in order and drag to reorder. A search box filters them by the product or collection ID they reference, which is how you find the one rule touching a product among dozens. If a new rule contradicts an existing one for shoppers who match both, the conflict is shown with the ways to resolve it before anything is saved. ## Live preview for recommendations Pick a product and see the recommendations a shopper would get for it right now, with the products your rules pinned marked as such. Saved rule changes appear within a few minutes. Personalised surfaces need session data before they return anything, and a few surface types cannot be previewed. Pinned products that are out of stock in every market are flagged on the rule itself and counted on the surface, since a pin on an unavailable product is silently doing nothing. ## Search insights and settings together Your top queries, the searches that return nothing, and your search configuration now live on the same page — so you can spot a gap and fix it without changing screens. A funnel traces impressions through clicks, add-to-carts and orders. ## Boost and Bury, easier to work with Rules are easier to read and reorder, and you can see what each rule is doing to your listings before you save. ## A faster product catalog Browsing the whole catalog stays fast however large it is, filters and search are kept in the URL so a view can be shared, and the product drawer collects details, inventory and the collections a product belongs to in one place. ## Settings, easier to navigate Users, attributes, filters, markets and tracking are grouped in the sidebar instead of one long page, so each area has room to breathe. **August 2026** Collections ## Collections, quicker to work in Collections now works the same way for every store, with: * Configurable product cards: density, product id, stock, engagement, sales and hover image, remembered per merchant * A list layout alongside the grid, with drag-to-reorder in both * Re-nesting, cover images and sub-collection creation from the list itself * Scroll position and expansion state preserved when you navigate back * Filters, search and sorting kept in the URL, so a view can be shared Collection metrics — views, CTR, revenue, sell-through — appear on the list for merchants with collection analytics enabled. **August 2026** Analytics areas ## Search and recommendation analytics Analytics is switched on per area, so search and recommendation reporting can arrive separately from collection metrics. **Search analytics** adds KPI tiles to the Search overview, a funnel from impressions through clicks and add-to-carts to orders, per-query trends against the previous period, and decision-support metrics on the products and collections you pin in Start View. **Recommendation analytics** reports impressions, clicks, CTR, attributed revenue and add-to-carts for every surface, plus average order value, add-to-cart rate and purchase rate — so placements can be compared with each other rather than only counted. **August 2026** Collections ## Favourite collections in the sidebar Star a collection and it appears in the sidebar, so the ones you work on daily are one click away from anywhere in the portal. Drag them to set your own order. **August 2026** Search ## Start View for empty search Start View controls what shoppers see when they open search **before typing anything**: pin the products and collections you want to lead with, reorder them by dragging, and preview the result as a shopper would see it. * Suggestions drawn from what the empty search would return organically, so you can promote what is already working * Manual pickers for products and collections outside those suggestions * Decision-support metrics on every row (views, units sold, visitors, revenue) for merchants with search analytics enabled * Changes save automatically — there is no save button to forget **August 2026** Analytics ## Export any analytics view to CSV Export the Analytics page for any period, choosing which blocks to include: overview KPIs, collection highlights, search KPIs, search queries and recommendation surfaces. One row per metric, with the previous period beside it, and the file names its own scope and contents so it still makes sense a month later. Blocks that could not be loaded are recorded in the file rather than silently missing. ## Recommendation performance per surface Each recommendation surface now reports average order value, add-to-cart rate and purchase rate alongside impressions, clicks, CTR and attributed revenue — so you can compare placements rather than just totals. ## Search funnel and click cut-off The search funnel traces impressions to clicks to add-to-carts to orders for the selected market and period. On collections, the click cut-off names how far down the listing shoppers reach before 95% of clicks are accounted for. **July 2026** Documentation ## Shopify theme app docs folded into Headless The full Shopify theme app documentation now lives under **Headless → Storefront integration (Shopify theme app)**. Old `/shopify-guide/` URLs redirect automatically. Release notes for the Shopify theme app appear in this changelog going forward. **July 2026** Analytics hub ## Merchant-wide Analytics page A new top-level **Analytics** page aggregates performance across your whole store: * Store-wide KPIs: revenue, views, average CTR, units sold, add-to-carts and dead stock risk * A merchant-wide conversion funnel from impressions to purchases * Search insights: top queries and zero-result queries per market * Collection highlights: top collections by revenue, declining collections, and a pinned-vs-auto health rollup ## Collection analytics improvements * **Pinned vs Auto** recommendations: plain-language verdicts (keep pinned / unpin advised) with per-product breakdowns and one-click pin/unpin * **Add-to-cart tracking** integrated into collection metrics and the conversion funnel * **Variant availability** as a real inventory metric * **Benchmarking**: compare collections against each other and against the all-collections baseline * **Dead stock** and stock coverage per collection, with a searchable, CSV-exportable dead stock list * Metric tooltips explaining CTR, STR, RPM and friends wherever they appear # Changelog Source: https://docs.depict.ai/changelog/shopify-lite New features and improvements in Depict: Search & Merchandising. **November 2026** Merchandising settings ## Product badges and the collection grid moved Product badges and the collection grid now live on a **Settings** tab on the **Collections** page, instead of the Merchandising tab of the Settings page. Your saved values are unchanged. Market groups moved to the Store tab of the Settings page. See [Product badges](/shopify-lite/settings#product-badges). **October 2026** Search, recommendations and onboarding ## Personalized recommendations Recommendation surfaces can now use what each shopper viewed and has in their cart. Add a **Recently viewed** step, or base Similar products, Bought together, Viewed together and Pairs well with on the shopper's recently viewed products or cart, so they also work on cart and home pages. Personalized surfaces are built for each shopper as the page loads, and the editor's preview has a simulated shopper to try them with. See [Personalized surfaces](/shopify-lite/recommendations#personalized-surfaces). ## Recommendations on pages and blog posts The **Depict Recommendations** section can now be added to page, blog and blog post templates, for example a "Shop the look" carousel built from a Best sellers step filtered to one collection. See [Pages and blog posts](/shopify-lite/recommendations#pages-and-blog-posts). ## Choose which metafields search reads In **Search → Results & ranking** you can now pick product metafields for search to read, so shoppers find products by the details you keep in them. Saving your choice re-indexes your catalog. ## Content pages in search Search can now return your store pages, policies and blog posts next to products. Pick the pages to index, switch on automatic indexing per type, or add custom URLs. ## Out-of-stock products and New arrivals in recommendations Each recommendation surface has an **Include out-of-stock products** toggle, for stores that want sold-out products to stay visible. New arrivals steps gained a **Published within (days)** window, set to 30 days for new steps. ## Define "New in" by published or created date The **New in** badge in **Settings → Merchandising → Product badges** has a **Define by** choice: published date or created date. The same date orders collections sorted by Newest in or Oldest in. ## A new install screen While Depict reads your catalog after install, the app now shows what it does for merchandising, recommendations and search, with previews built from your own products. **September 2026** Analytics, recommendations and multi-store ## One Analytics page **Analytics** now brings collections, search, recommendations and products together under one period picker and one export. Search reports and the weekly report moved in as tabs. **Help** is back in the navigation, with video guides, documentation and chat. ## Filter recommendations by tag Recommendation steps can be filtered by Shopify tag: keep or drop products with the tags you list, or match tags with the product being viewed. ## Hide products from a surface A recommendation surface can now hide products. Hiding wins over pinning, so a hidden product never appears on that surface. ## Recommendations across linked stores Turn on **Replicate recommendations** in your multi-store group to copy recommendation surfaces from the source store to the other stores, with collection filters and hidden products translated for each store. ## Card spacing and image choice in the recommendations section The Depict Recommendations theme section has new settings: **Space between cards**, and **Card image** and **Hover image** to choose which product image the cards show. ## Search boost & bury of its own Search can now use its own boost & bury rules, separate from your collections, or go back to the collection rules at any time. ## A new name The app is now called Depict: Search & Merchandising in your Shopify admin. **August 2026** Install and recommendations ## Fewer permissions at install Installing the app now asks for fewer Shopify permissions. Access to discounts, price rules, navigation, product feeds, reports and shipping is no longer requested. ## Catalog sync is fully automatic Your catalog syncs from Shopify automatically, so Settings no longer offers a manual sync. ## Pinned products on recommendation surfaces Pin products to fixed slots on a recommendation surface, on every page it serves or per product. ## Products page The **Products** page shows how a single product performs: revenue, a shopper funnel, daily trends and its performance in each collection. **July 2026** Documentation ## New documentation home Depict: Search & Merchandising now has its own documentation section, covering onboarding, collection merchandising, boost & bury, A/B testing and multi-store — plus a full API reference. Release notes for Depict: Search & Merchandising will appear here going forward. > [!NOTE] > > In-app product news continues to appear in the Depict: Search & Merchandising > dashboard's changelog feed. # Centra Source: https://docs.depict.ai/data-ingestion-guide/centra-setup-guide Connect a Centra store to Depict: the API token, the required permissions, and how sync works. Depict reads your catalog directly from the Centra GraphQL API. You provide your Centra API base URL and a GraphQL access token; Depict imports the full catalog and then keeps it updated from Centra's event stream. ## Limits and behavior * Every permission in the table below is mandatory. The integration cannot run with a subset. * The token must have an integration name set. Without one the catalog imports once, but updates never arrive. * Changes propagate through Centra's event queue, which Depict polls roughly every 5 seconds. A daily reconciliation run compares Depict's copy against Centra to catch drift. * Saving the onboarding wizard starts the initial import. The wizard shows its status and offers controls to start or retry that first import when available. For a later full backfill or re-import, contact Depict. * Depict does not currently send token-expiry or revocation alerts. Record the expiry date and set a renewal reminder, even if Centra's expiry emails are enabled. * Depict reads catalog data only. No customer, order, or checkout data leaves Centra through this integration. ## Setup steps ### 1. Create the Centra token Open **System** → **API tokens** in Centra and create an Integration API token. See [Centra's access-token guide](https://centra.dev/integration-api/#obtaining-access-token-via-ams). Confirm with your Centra CSM/PSM that the [event system is enabled](https://centra.dev/integration-api/handling-events#how-to-enable-the-system) for the environment you're connecting; QA and production must be enabled separately. * Fill **Description**, **Organization name** and **Email**. Use contact details for the organisation responsible for maintaining the integration; Centra requires the organisation name and email. * Set **Integration name** to a new name used only by Depict, for example `Depict`. Create a name rather than selecting one another integration already uses. Tokens with the same name share an event queue, so another consumer can acknowledge updates before Depict receives them. * Check **Expires at** before saving. Centra's access-token guide describes a 30-day default; check the actual date in your form and choose a date your team can renew before. Record it and set a reminder. * Grant every permission in the checklist below, then save. Copy the generated GraphQL access token: it is the credential used for [Centra's bearer-token authorization](https://centra.dev/integration-api/#authorizing-requests), rather than a token identifier or another code. ### 2. Connect through the Depict wizard Sign in at [app.depict.ai](https://app.depict.ai) and select your merchant, marked **Onboarding**. If your merchant or account is missing, ask your Depict contact to grant access. On **Welcome to Depict**, click **Get Started** and choose **Centra**. 1. On **Connect Centra to Depict**, paste your Centra GraphQL endpoint URL (including `/graphql`) into **API URL** and the access token into **API Key**. Paste only the token value, without `Bearer`. Click **Verify**; continue when the credentials are valid. 2. On **Review markets you want to import**, select one Centra store and the markets to import. 3. On **Map attributes**, choose the attribute type and element key for **Color**, **Gender** and **Age**, and any optional attributes you need. **Select one attribute for all products** assigns the chosen value to every product; use it when that value applies to your whole catalog. 4. On **Complete Centra data integration**, click **Continue** to save the configuration and start the initial import. 5. On **Set up site**, check **First product import**. It shows import progress and the product count after success. If offered, use **Start ingestion** or **Retry**; contact Depict if the import remains failed or unknown. You can click **Complete** while the import runs; it returns you to the Dashboard. Continue with [Getting started](/headless/getting-started) to install Depict on your storefront. Connecting the catalog does not activate storefront search; your Depict contact confirms search setup separately. > [!WARNING] > > **Use a dedicated integration name for Depict.** A token without an > integration name can import once but will not receive ongoing updates. > Reusing another integration's name shares its event queue. See > [Centra's event-queue guide](https://centra.dev/integration-api/handling-events). ## Required permissions Select these individual read permissions and the one event update permission. Leave **ALL** unselected: it grants access beyond what Depict needs. The object and field names below identify the choices; the API scope is the exact permission Depict checks. Choose each object's read permission, plus its listed attributes or stock permissions; these are separate choices. > [!NOTE] > > Centra's token-field and permission labels may differ by Centra version. > Labels were last checked against Centra's public docs on **2026-10-12**. > This table lists API object/field names and required scopes; the literal AMS > checkbox labels remain unverified. If you cannot match the labels, ask your > Depict contact to check your token's permissions. | Area | Centra object / field | Required API scope | | - | - | - | | Read | AllocationRule | `AllocationRule:read` | | Read | Attribute | `Attribute:read` | | Read | Brand | `Brand:read` | | Read | Bundle | `Bundle:read` | | Read | Campaign | `Campaign:read` | | Read | Category.attributes | `Category.attributes:read` | | Read | Category | `Category:read` | | Read | Collection | `Collection:read` | | Read | Country | `Country:read` | | Read | Display.attributes | `Display.attributes:read` | | Read | Display | `Display:read` | | Read | Event | `Event:read` | | Update | Event | `Event:write` | | Read | Language | `Language:read` | | Read | Market | `Market:read` | | Read | Price | `Price:read` | | Read | Pricelist | `Pricelist:read` | | Read | Product.attributes | `Product.attributes:read` | | Read | Product | `Product:read` | | Read | ProductMedia.attributes | `ProductMedia.attributes:read` | | Read | ProductMedia | `ProductMedia:read` | | Read | ProductSize.stock | `ProductSize.stock:read` | | Read | ProductSize | `ProductSize:read` | | Read | ProductVariant.attributes | `ProductVariant.attributes:read` | | Read | ProductVariant.stock | `ProductVariant.stock:read` | | Read | ProductVariant | `ProductVariant:read` | | Read | Store | `Store:read` | | Read | Translation | `Translation:read` | | Read | Warehouse | `Warehouse:read` | `Event:write` is required because Depict acknowledges consumed events back to Centra. ## How sync works * **Initial import.** Saving the wizard's configuration starts the full catalog download. Follow its progress under **First product import** on **Set up site**; completing onboarding does not mean the import has finished. * **Ongoing updates.** Depict polls Centra's event queue roughly every 5 seconds, so a price, stock, or content change typically reaches Depict within seconds and is live in search within minutes. Incremental updates cover these Centra object types: | Centra object type | | - | | `Market` | | `Pricelist` | | `MappedAttribute` | | `Category` | | `Product` | | `ProductVariant` | | `Language` | | `Display` | | `ProductSize` | * **Reconciliation.** Once a day Depict compares its copy of the catalog against Centra to detect drift. If you suspect your catalog is out of date, contact Depict, who can run the comparison on demand and re-trigger a full import. ## What Depict reads The import fetches your markets (with their warehouses), pricelists, mapped attributes, categories, languages, and the active products' displays with media, prices, and per-warehouse stock. Attributes come through Centra's mapped attributes; translations come per language. Centra's product hierarchy maps onto Depict's three-level model like this: | Centra entity | Depict entity | | - | - | | Product | Product (level 1) | | ProductVariant | Product group (level 2) | | ProductSize | Variant (level 3) — the sellable unit that carries stock | Note the offset: a "variant" in Depict is your Centra size, and your Centra variant is Depict's product group. ## Markets and languages Markets, pricelists, and languages are imported in full, and each language gets its own search index. > [!WARNING] > > **Removing a language in Centra deletes that locale's search index** and > everything in it. The index is rebuilt automatically if the language is > re-added, but treat language removal as a destructive action. ## If the token stops working A revoked or expired token stops catalog updates. Depict does not currently send its own expiry or revocation alert. To keep updates running: * Track the date shown in **Expires at** and renew the token before it. Centra documents [expiry-email notifications](https://support.centra.com/updates/2026/centra-3-117-updates), but keep your own reminder rather than relying on their availability. * If an existing connection needs a replacement token, contact Depict to update it. Depict can audit its permissions and integration name against this checklist. ## Data scope The permission list above contains no customer, order, or checkout scope: Depict does not read customer or order data from Centra. Behavioural data (purchases, clicks, search queries) is collected by Depict's on-site tracking on your storefront — a separate processing activity, not data read from Centra. # Overview of Data Ingestion Source: https://docs.depict.ai/data-ingestion-guide/overview-of-data-ingestion The three ways product data reaches Depict: Centra, Shopify, and the Push Product API. Depict serves search, listing pages and recommendations from its own copy of your product catalog. That copy comes in over exactly one ingestion path per merchant, chosen by your commerce platform. ## Limits and behavior * Each merchant runs on exactly one ingestion path: Centra, Shopify, or the Push Product API. * There is no merchant-facing ingestion-status endpoint or completion webhook. See [Verifying your data is in](#verifying-your-data-is-in) for what you can check instead. * Catalog ingestion carries product data only. Behavioural data (clicks, add-to-carts, purchases) is collected separately by Depict's on-site tracking as part of the storefront integration. * Product feeds are superseded by the [Push Product API](/data-ingestion-guide/push-product-api). ## Ingestion paths | Path | Who it is for | How it works | | - | - | - | | [Centra](/data-ingestion-guide/centra-setup-guide) | Merchants on Centra | Depict reads the Centra GraphQL API with a token you provide, then keeps the catalog updated from Centra's event stream | | [Shopify](/data-ingestion-guide/shopify-setup-guide) | Merchants on Shopify | You install a Depict custom app from an install link; the app keeps the catalog updated | | [Push Product API](/data-ingestion-guide/push-product-api) *(beta)* | Merchants on any other stack, or pushing directly from a PIM | Your backend pushes products, prices, stock and catalog configuration to one JSONL endpoint, with a per-line receipt for everything you send | ## From ingestion to serving All three paths feed the same pipeline: 1. **Raw import.** Data from your platform (or your push requests) lands in Depict's raw store. 2. **Transform.** Raw data is projected into Depict's three-level product model: product, product group, variant. 3. **Indexing.** The search index is updated incrementally, per locale. Only changed products are re-indexed. Each stage runs automatically after the previous one. A change that reaches Depict is typically live in search within minutes. ## Verifying your data is in There is no ingestion-status page or endpoint. To verify your catalog end to end: * **Check the portal's Products page.** It reads the same catalog serving reads, so a product visible there has completed ingestion. * **Query your storefront.** Search for a product you recently changed and confirm the change is reflected. This is the definitive end-to-end check. * **Push Product API merchants** get a per-line receipt for every line sent. A receipt confirms the data was accepted into Depict's raw store; the change is live in search after the transform and indexing stages complete, which is not separately signalled. * **Centra merchants**: Depict runs a daily reconciliation against Centra to catch drift. If you suspect your catalog is out of date, contact Depict. # Shopify Source: https://docs.depict.ai/data-ingestion-guide/shopify-setup-guide Learn how to import your product data from Shopify. This page describes how Shopify merchants can import their product data to Depict and keep it up to date. Depict integrates directly with Shopify using a custom app. ### Setup steps 1. Get install link from Depict 2. Open install link 3. Follow instructions 4. Inform Depict that the installation is complete Once complated, your product data is imported into Depict’s systems and synchronised periodically to reflect any changes. # AI assistants Source: https://docs.depict.ai/headless/features/ai-assistants Connecting Claude, ChatGPT or Codex to your headless store through Depict's MCP server: the server URL, the approval screen, what an assistant can do, and disconnecting. AI assistants such as Claude, ChatGPT and Codex can work with your store's Depict data through Depict's MCP server (MCP, the Model Context Protocol, is the standard these assistants use to connect to other services). A connected assistant can answer questions about your collections, products, search, recommendations and analytics, and, if you allow it, make changes such as pinning products in a collection or adding a synonym. Each assistant connects to one store. You approve every connection yourself, choose whether it may make changes, and can disconnect it at any time. AI assistants are in beta, for selected stores. ## Limits and behavior * Depict turns AI assistants on per store, with two switches: **AI assistants (MCP)** lets assistants read, and **Assistant changes** lets them make changes. When **AI assistants (MCP)** is on, **AI assistants** appears in **Settings**. * Every connection can read. Making changes needs two things: you checked **Make changes on your behalf** when you approved the connection, and **Assistant changes** is on for your store. * Changes are attributed to the person who approved the connection. * A connection lasts as long as you chose when you approved it: 1, 7, 30 or 90 days, or until you disconnect it. A timed connection ends that long after approval, however often it's used; after that the assistant has to connect again, and you approve it again. A connection kept until you disconnect it doesn't expire. * If the person who approved a connection loses access to the store (they are removed from it, or their Depict account is deactivated), the connection stops working at its next request. If they still have no access a day later, the connection ends and leaves **Settings → AI assistants**. Giving them access again doesn't bring it back: they connect the assistant again. * If Depict turns **AI assistants (MCP)** off, connected assistants stop working at their next request, and work again once it's back on. ## Requirements * **AI assistants (MCP)** turned on for your store. If **AI assistants** is missing from **Settings**, [contact us](mailto:support@depict.ai). * A Depict account with access to the store. You sign in with it when you approve the connection. * An assistant that supports remote MCP servers with OAuth sign-in. The steps below cover Claude, Claude Code, ChatGPT and Codex. Other assistants that work the same way can connect too. ## Your endpoint URL Every store has its own endpoint URL: ``` https://app.depict.ai/mcp?store_id= ``` You don't need to build it yourself. In the portal at app.depict.ai, open **Settings → AI assistants**: * **Your MCP endpoint** shows the URL with a **Copy** button, and the full Claude Code and Codex commands, each with its own **Copy** button. * **Connected assistants** lists the assistants connected to the store. Use the URL exactly as copied. The `store_id` part ties the connection to your store; without it, the assistant can't connect. ## Connecting an assistant Whichever assistant you use, connecting works the same way: you give it the endpoint URL, it opens the approval screen in Depict, you sign in and approve it, and it is connected. You don't create keys or enter a client ID or secret. ### Claude Claude on the web and the Claude desktop app share connectors. **1. Add a custom connector** In Claude, go to **Customize → Connectors**, click **+ Add**, then **Add custom connector**. On a Team or Enterprise plan, an organization owner adds it instead, under **Organization settings → Connectors** (**Add → Custom → Web**). **2. Enter the endpoint** Give the connector a name, for example `Depict`, and paste your endpoint URL. Leave the OAuth client ID and secret empty. Then click **Add**. **3. Connect** Click **Connect** on the new connector. Your browser opens Depict; see [The approval screen](#the-approval-screen). **4. Turn it on in a chat** In a chat, open the **+** menu, then **Connectors**, and make sure the Depict connector is on. The steps follow Anthropic's [custom connector guide](https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp). ### Claude Code **1. Add the server** Copy the command from **Claude Code** on the AI assistants page and run it in your terminal. It looks like this: ```bash theme={null} claude mcp add --transport http depict "https://app.depict.ai/mcp?store_id=" ``` Keep the quotes: without them, some shells treat the `?` in the URL as a wildcard. **2. Sign in** Start Claude Code, run `/mcp`, select **depict** and choose to authenticate. Your browser opens Depict; see [The approval screen](#the-approval-screen). ### ChatGPT ChatGPT connects to remote MCP servers on the web for Business, Enterprise and Edu workspaces, and your workspace's permissions decide who can add one. Menu names change, so follow OpenAI's [guide to custom MCP servers](https://help.openai.com/en/articles/12584461-connecting-custom-mcp-servers-in-chatgpt). **1. Add a custom MCP server** In ChatGPT, add a custom MCP server from **Plugins**. Give it a name, for example `Depict`, paste your endpoint URL, and set the authentication to OAuth. Leave any client ID and secret empty. **2. Connect** Start the sign-in. Your browser opens Depict; see [The approval screen](#the-approval-screen). ### Codex **1. Add the server and sign in** Copy the command from **Codex** on the AI assistants page and run it in your terminal. It adds the server, then signs in: ```bash theme={null} codex mcp add depict --url "https://app.depict.ai/mcp?store_id=" && codex mcp login depict ``` Keep the quotes, as with Claude Code. Your browser opens Depict; see [The approval screen](#the-approval-screen). To sign in again later, run `codex mcp login depict` on its own. The steps follow OpenAI's [Codex MCP guide](https://learn.chatgpt.com/docs/extend/mcp?surface=cli). ## The approval screen When an assistant connects, your browser opens a Depict approval page. If you are not signed in, sign in first. The request waits for 10 minutes. The page reads **\[name] wants to connect to \[store]**, followed by where approving sends you. Read both before you allow it. **The name is what the assistant calls itself.** Any program can register under any name, so the name alone doesn't tell you who is asking. **Where approving sends you is the part you can check.** When you click **Allow**, your browser is sent back to the assistant with a one-time code that completes the connection. The page says where that is: | The page says | Meaning | | - | - | | *back to an app on this computer (localhost)*, or *(127.0.0.1)* | A program running on your own computer, such as Claude Code or Codex. | | *to claude.ai* (or another website) | A website. Claude.ai and the Claude desktop app use claude.ai; ChatGPT uses chatgpt.com. | | *to the `name:` app* | An app registered for its own link type on your computer. | For a website or an app link, the page adds **Only allow if you started this from \[name] yourself.** If you didn't just start connecting an assistant, click **Cancel**: someone may be trying to get access to your store through a link they sent you. **Choose what it may do:** * **Read your store's Depict data (collections, products, analytics)** is required and always checked. * **Make changes on your behalf (publish curation changes, edit rules)** is unchecked. Check it only if you want the assistant to make changes. It appears only when the assistant asked for changes and **Assistant changes** is on for your store. If the store has changes off, the page says the assistant will only read. **Choose how long it lasts:** **Keep this connection for** offers 1 day, 7 days, 30 days (selected), 90 days or **Until I disconnect it**. The line under it says when the connection ends. Pick the shortest time that covers what you need: a connection kept until you disconnect it stays valid until someone disconnects it, or until the person who approved it loses access to the store for a day. Then click **Allow** to connect, or **Cancel** to refuse. After you allow, you can close the tab. ## What an assistant can do A connected assistant gets these tools: * **overview**: a one-page explanation of how Depict models a headless store. The assistant reads it before its first search. * **search**: finds the Depict operation that answers a question. * **execute**: reads your store's data. It never makes changes. * **execute\_write**: also makes changes. Only a connection you allowed to make changes gets this tool, and its changes are refused while **Assistant changes** is off. So an assistant can, for example, answer: * "Which collections have the most hidden products?" * "List every pinned product in Norway, collection by collection." * "Compare last week's revenue per collection with the week before." * "Why doesn't search show this product?" With changes allowed, it can also act on requests like: * "Pin these three products at the top of the SUMMER SALE collection." * "Set the pins of BESTSELLERS in Finland to this list, in this order." * "Pin these products in the search start view, in this order." * "Hide these 40 products in the OUTLET collection." * "Move the SUMMER SALE collection under OUTLET." * "Translate the filter word *Colour* into Swedish." * "Show the Size filter before the Colour filter." * "Add *jumper* as a synonym for *sweater*." * "Turn off the query rule for *rain jacket*." * "Hide these three products from search in every market." * "Reset these 31 products to From feed." Changes cover moving a collection, pinning and hiding products in collections, hand-picked collection products, a product's visibility, Boost & Bury rules, the search start view, products and tags search never returns, synonyms, search content, query rules, the order and translations of search filters, auto-hide exemptions and custom recommendation rules. Anything else is changed in the portal. On some stores Depict keeps the settings itself: both the assistant and the portal refuse the change there, and only [Depict support](mailto:support@depict.ai) can make it. An assistant can read the pinned and hidden products of many collections in one step, for one market or market group at a time, so checking pins across the store doesn't take a call per collection. It sees product ids, and leaves out collections with nothing pinned or hidden unless you ask for them. To set a collection's whole pin order, give the assistant the complete list in order. It sets the pins of one market or market group in a single change, and tells you first which current pins the list leaves out, because those are unpinned. Pins the portal doesn't show, such as archived products, stay where they are. For a few changes, ask for those pins one by one. The search start view works the same way, with one list for pinned products and one for pinned collections. The assistant sees at most the first 10 products there, and not products hidden for being out of stock, so list every pin you want to keep: other pins left out are unpinned. Deleted products and collections stay where they are. To hide or unhide many products in a collection, or to add or remove many hand-picked products, give the assistant the whole list. It makes the change in one step, for up to 500 products at a time, and tells you which products changed and which were already that way. If any product in the list can't be changed, nothing is changed and the assistant names every product that was refused: for example a product that isn't in your catalogue, a pinned product it was asked to hide, or a product the collection's rules add, which can be hidden but not removed. A product's visibility says whether it's hidden or shown in collections, search and recommendations, for every market, a market group or one market. Resetting a product puts it back to **From feed**. A reset clears only the level it names, so if a product is hidden for one market group, ask for that group. The assistant changes up to 100 products in one step and splits a longer list into several. If any product in a step can't be changed, nothing in that step is changed and the assistant names the products that were refused. A visibility change reaches collections and search in about a minute. Moving a size filter also makes it count only sizes in stock, as it does when you reorder filters in the portal. The assistant tells you when that applies. Changes are safe: * Every change starts from the latest data. If someone else changed the same thing since the assistant last read it, the change is refused. The assistant reads again and retries. * Changes sent right after each other can be refused with a message that a save is already running. Nothing is saved; retrying a moment later fixes it. Some limits to know about: * An answer over 1 MB is refused with a message to narrow the request. Ask for fewer rows, a shorter period, or leave out extra metrics. * Ask for only a few rows of product metrics at a time: at most 40 products over 30 days, 15 over 90 days or 5 over a year. * Metrics reads can take 10 to 30 seconds. Ask for a shorter period if one fails. * If you name something Depict doesn't recognise, such as a mistyped product id or a market group that was deleted, you still get an answer, and the assistant tells you what wasn't recognised. A product Depict has no record of shows as visible, which isn't a confirmed state. For a market group that doesn't exist or has no markets, the numbers cover the whole store, or the one market you named, and not that group. Stock numbers can be missing or read zero, so a list of dead stock can come back empty, and a period comparison covers at most 10 collections. * Comparing two periods for one market or market group covers at most 10 collections, because Depict works those numbers out when you ask. The assistant tells you when that happens, and the totals add up only those collections. To choose which collections, name up to 10 of them. > [!WARNING] > > Whether an assistant asks you before it runs a tool is decided by the > assistant and its settings, not by Depict. Changes only go through > **execute\_write**, so you can let **execute** run without asking and still > review every change. Don't choose "always allow" for **execute\_write** if you > want to see each change first, or connect with read access only. ## Disconnecting access **Connected assistants** on **Settings → AI assistants** lists every connection with its name, where it signs in, its access, the date it was connected and when it expires (**Until you disconnect it** for a connection that doesn't expire). **Access** is what you approved: **Read**, or **Read and write** if you checked **Make changes on your behalf**. A new connection can take a minute to appear; reload the page if you don't see it yet. Click **Disconnect** on a row and confirm. The assistant loses access to the store, its old sign-in stops working, and it has to connect again, with a new approval, to get access back. Disconnecting one assistant doesn't affect the others. The same assistant may appear more than once, for example on two computers. If the portal says it could not disconnect the assistant, click **Disconnect** again. ## Troubleshooting **The AI assistants page is missing from Settings, or the assistant says *AI assistants are not enabled for this store*.** AI assistants are off for your store. A direct link to the page shows a page headed "This page got buried". [Contact us](mailto:support@depict.ai) to turn them on. Connected assistants stop working while they are off. **The assistant says it is not authorised.** Its connection has ended: it was disconnected, it reached the end of the time chosen when it was approved (the end date is on **Settings → AI assistants**), the person who approved it lost access to the store, or the sign-in was refused. Remove the connector, add it again, and approve it again. **I connected an assistant but the page says none are connected.** A new connection can take a minute to appear. Wait a minute, then reload the page. **There is no *Make changes on your behalf* box on the approval page, or the assistant can't make a change.** Either **Assistant changes** is off for your store, the assistant didn't ask for changes, or you connected it without checking the box. Check with [us](mailto:support@depict.ai) that changes are on, then disconnect the assistant, connect it again and check the box. ***This connection request has expired or was already used; connect again from your assistant.*** A request is valid for 10 minutes and can be answered once. Start connecting again from the assistant. ***You cannot answer this connection request.*** Your Depict account has no access to this store. Sign in with one that does. **The assistant says an answer was too large, or a change was refused because the data changed.** See the limits above. For a refused change, ask the assistant to read again and retry. # Analytics Source: https://docs.depict.ai/headless/features/analytics The merchant-wide analytics hub: per-area tabs, KPIs, conversion funnel, search insights, recommendation surface metrics, CSV export and analytics API keys. The Analytics page is the merchant-wide view of how the storefront performs. A row of store-wide tiles sits at the top, and below it the page is split into three tabs — **Recommendations**, **Search** and **Collections** — one per analytics area. Every number covers the selected period compared with the equally long period immediately before it. ## Limits and behavior * The Analytics page appears only for stores with analytics enabled. Without it, the sidebar item is hidden and a direct link shows "The analytics page is not enabled for your account." * Analytics is enabled per area. The **Search** and **Recommendations** tabs render only when their area is enabled; the **Collections** tab is always available when the page is. The page reopens on the tab you used last. * The period is selectable: **30d** (default), **7d**, **1d** or **Custom** (start and end date). Every metric is compared with the equally long period immediately before the selected one; there is no year-over-year comparison on this page. * The period and market selection is shared across pages — the same selection follows you between Dashboard, Analytics and Collections. * Attributed metrics (revenue, add-to-carts, orders) are approximate and last-touch, with a 7-day attribution window. Attributed revenue is summed across markets without currency conversion. * Impressions are counted from when impression tracking shipped and cover only surfaces that report visibility, so CTR can read high until coverage is complete. * CSV export numbers are store-wide (all markets), and the export modal's time range is independent of the page's selection (it defaults to 30d). * When the metrics backend is unavailable, tiles show empty values rather than errors; the corresponding API endpoints return a null body, and the CSV export endpoint returns HTTP 503. * Analytics API keys: at most 50 active keys per store; the key secret is shown once at creation and cannot be retrieved again. ## Store-wide tiles Four tiles above the tabs cover the whole store, whichever tab is open: | Tile | Meaning | | - | - | | **Depict Revenue** | Revenue attributed to Depict surfaces — search plus recommendations, last click within 7 days. The bottom line shows the store's total tracked revenue across all channels. | | **Depict Clicks** | Product clicks on every Depict-powered surface: collection pages, search and recommendations | | **Depict CTR** | Product clicks divided by views on Depict surfaces | | **Catalog STR** | Sell-through rate across every product: units sold divided by units sold plus stock on hand. Sales from every channel count, not only Depict-driven ones | ## Collections tab The Collections tab is the merchant-wide view of your collection pages. It shows: | KPI tile | Meaning | | - | - | | **Collection Revenue** | Revenue attributed to collection pages in the selected period | | **Dead Stock Risk** | Products with stock but no sales — the tile opens a searchable, exportable product list across the whole catalog | Below the KPI row: * The merchant-wide **Conversion funnel** from impressions through clicks and add-to-carts to purchases, with stage-to-stage conversion rates. Add to cart appears as a stage once add-to-cart tracking events are flowing. * **Collection highlights**: **Top collections by revenue** and **Losing traffic** — the collections losing the most traffic versus the previous period. * A **Benchmark** button for side-by-side collection comparison. ## Search tab The Search tab covers how shoppers search the store over the selected period: | KPI tile | Meaning | | - | - | | **Search Revenue** | Revenue from purchases last-clicked from a search result within 7 days (approximate) | | **Unique Searchers** | Distinct devices that searched, with the number of searches per searcher; the same person on two devices counts twice. Tracked across all markets only | | **Zero-Result Rate** | Share of searches that returned no products | | **Search CTR** | Clicks on search results divided by search result impressions. Tracked across all markets only | | **Search funnel** | Searches → Clicked searches → Add to carts → Orders; add-to-carts and orders are attributed to search by the shopper's last click | The tab also shows two query tables, **Most common searches** and **Most common searches without results**, per market. ## Recommendations tab The Recommendations tab opens with four tiles — **Recommendation Revenue**, **Impressions**, **CTR** and a **Recommendation funnel** (recommendation clicks → add to carts → orders) — and then breaks engagement down **By surface**, ranked by clicks, with these columns per recommendation surface: | Column | Meaning | | - | - | | **Surface** | The recommendation surface | | **Impressions** | Recommended product tiles shown on the surface | | **Clicks** | Clicks on the surface's recommended products | | **CTR** | The surface's clicks divided by its impressions | | **Attributed Revenue** | Revenue from purchases last clicked from the surface within 7 days | | **Attributed Add-to-Carts** | Add-to-carts last clicked from the surface within 7 days | | **AOV** | Attributed revenue divided by attributed orders | | **Add-to-Cart Rate** | Attributed add-to-carts divided by clicks (per click, so it can exceed 100%) | | **Purchase Rate** | Attributed orders divided by clicks | Surface metrics cover all markets. ## Export to CSV The page header has an **Export to CSV** button. The export produces one file, one row per metric, with the previous period beside each value; numbers are store-wide (all markets). 1. Click **Export to CSV**. 2. Pick a time range (30d, 7d, 1d or a custom range — independent of the page's selection). 3. Select the metric sections to include. 4. Click **Export**. Result: a CSV file downloads. Sections that could not load fully or have no data for the period are named in the modal and left incomplete or out of the file. | Export section | Contents | | - | - | | **Store totals, funnel & collection revenue** | The store-wide tiles, the conversion funnel and collection revenue | | **Collection highlights (top & losing traffic)** | Top collections by revenue and collections losing traffic | | **Search KPIs & funnel** | The Search tab's KPI tiles and funnel | | **Search queries (top & zero-result)** | The two query tables | | **Recommendation surfaces** | The per-surface breakdown | ## Analytics API keys Analytics API keys give a merchant's own systems read-only access to the analytics report endpoints without a browser session — for example a scheduled weekly CSV pull. A key is a string starting with `dpk_`, sent in the `X-API-Key` request header. It is scoped to one store and works only on the report endpoints listed below; it cannot modify anything. To create a key: 1. Open **Settings**, then **General**. 2. In the **API keys** card, enter a key name. 3. Click **Create key**. Result: the key secret is displayed once, with the notice "Copy this secret now — it won't be shown again." The list below shows each key's name, prefix and creation date. > [!WARNING] > > The secret is shown exactly once. Depict stores only a SHA-256 hash and the > first 8 characters; a lost secret cannot be recovered — revoke the key and > create a new one. Key management (create, list, revoke) requires a portal login; keys cannot manage other keys. A store can have at most 50 active keys — creating more returns HTTP 409. Revoking a key takes effect immediately. ## Analytics API endpoints The following endpoints accept either a portal JWT or a merchant API key via the `X-API-Key` header. All paths are under `/api/v1/merchants/{merchant_id}`. | Endpoint | Description | | - | - | | `GET /analytics/overview` | Merchant-wide analytics for the hub. Optional `start_timestamp` / `end_timestamp` (Unix seconds; only the UTC date is used); defaults to the last 30 days vs the previous 30. Returns a null body when the metrics backend is unavailable. | | `GET /analytics/periods` | The week and month periods available for comparison, each with `has_snapshot`. | | `GET /analytics/compare` | Collection-level period-A vs period-B comparison. Query: `period_type` (`week` or `month`), `period_a`, `period_b` (ISO dates — period starts), optional `collection_ids`, `market_group_id`, `market`, `locale`. | | `POST /analytics/export` | CSV export of a period comparison. Streams a `text/csv` attachment; returns HTTP 503 when the metrics backend is unavailable. | The export request body: | Field | Values | Default | | - | - | - | | `period_type` | `week` or `month` | required | | `period_a_start` | ISO date — start of the newer period | required | | `period_b_start` | ISO date — start of the comparison period | the period immediately before `period_a_start` | | `collection_ids` | List of collection UUIDs to include | none | | `all_collections` | `true` to include every collection | `false` | | `level` | `collection` (one row per collection) or `product` (one row per product; requires exactly one `collection_ids` entry, otherwise HTTP 400) | `collection` | | `market_group_id` | Market group to scope by | none — the whole store | | `market` | Single market to scope by | none | For a product-level view of one collection, use the export with `level: "product"`. Comparison responses carry period metadata with `source: "snapshot"` or `"live"`: periods are served from stored snapshots when one exists and computed from live data otherwise. Live-sourced stock and position figures reflect today, not the historical period. ## Where the numbers come from Every metric on this page uses the same backend aggregation as the per-collection metrics — the analytics hub and the collection pages agree. Metric definitions are documented in the tooltips next to each label in the portal. # Boost & Bury Source: https://docs.depict.ai/headless/features/boost-and-bury Storewide boost and bury rules: available conditions, market scoping and how rules interact. Boost & Bury adjusts ranking on collection pages and in search, on top of Depict's automatic ranking. Boosted products rank higher; buried products rank lower. ## Limits and behavior * Saved rule changes can take up to 30 minutes to take effect. * Boost and bury rules do not affect pinned or hidden products. * Buried products stay visible to shoppers — they are ranked lower, not hidden. * Boost and bury rules do not change recommendations. To keep products out of a recommendation surface, such as sale items on product pages, add a **Hide these products** rule on that surface. See [Recommendations](/headless/features/recommendations#rules). * A rule with no markets selected applies to every market. * Each condition except **Collection** can be used at most once per effect side (boost or bury). * **New in (proportional)** rules are managed by Depict: they appear in the Boost list but cannot be created or edited in the portal. ![Boost and Bury page with boost rules for new products, best selling and a collection, and bury rules for out of stock, few sizes and on sale](https://mintcdn.com/depictai/bVOq4sS-xd91_mJy/images/headless/boost-and-bury.png?fit=max\&auto=format\&n=bVOq4sS-xd91_mJy\&q=85\&s=3292c6aa631c5d8e662768f39fc605de) Boost and bury rules, editable in a modal with a live preview of affected products. ## Header analytics The top of the page summarizes your rules: | Tile | What it shows | | - | - | | **Active Rules** | Every boost and bury rule currently applied, split into boosts, burys and collection rules | | **Boost Lift** | The average CTR of your boosted collections against the store average over the last 30 days. It is directional, not causal: boosted products also rank higher, and boosts usually go to collections that were already strong | | **Rule Health** | Collection rules that have gone stale or work against you, or **All healthy** | **Boost Lift** and **Rule Health** need collection analytics and at least one collection rule; rules on conditions such as **On sale** or **New products** have no per-rule metrics. Rule Health flags three problems, each with an **Edit rule** shortcut: | Issue | Meaning | | - | - | | **Target reports nothing** | The collection is gone or has no data, so the rule does nothing. Delete or retarget it | | **Burying proven sellers** | A buried collection's products account for at least 5% of store revenue in the last 30 days | | **Boost never seen** | A boosted collection got no product clicks in 30 days. Check where the collection is shown | If some collection rules or store revenue could not be read, Rule Health shows **Not fully checked**. ## Rules The page shows two lists side by side — **Boost** and **Bury**. Rules are created and edited in a modal with a live preview of the products the rule will affect. | Condition | Available as | Notes | | - | - | - | | **New products** | Boost | | | **Best selling** | Boost | | | **On sale** | Boost or Bury | | | **Collection** | Boost or Bury | Targets the products in a collection you pick. | | **Out of stock** | Bury | | | **Few sizes available** | Bury | | | **New in (proportional)** | Boost (display only) | Managed by Depict; cannot be created or edited in the portal. | Each condition (other than collection rules) can only be used once per effect side — the same condition can exist as both a boost and a bury, as long as the two rules' markets don't overlap. Market selection is optional: a rule with no markets selected applies to every market. Picking at least one market is only required when an opposite-effect rule with the same condition already exists. ## When to use what * Use **Boost & Bury** for storewide, condition-based pushes ("bury everything with few sizes left"). * Use [collection pinning](/headless/features/collections) when you want a specific product in a specific place on a specific page. * Check the pinned-vs-auto verdicts in [collection analytics](/headless/features/collection-analytics#pinned-vs-auto) to see whether your manual interventions actually beat the automatic ranking. # Collection analytics Source: https://docs.depict.ai/headless/features/collection-analytics Recorded collection engagement, current product performance, stock health, pinned-vs-auto lift and benchmarking. Every collection carries its own analytics, surfaced in three places: KPI tiles above the collections table, performance columns in the table itself, and a detailed analytics drawer per collection. ## Limits and behavior * Metrics cover the last 30 days compared with the previous 30 days by default; the presets are 30, 7 and 1 days, plus a custom range. The drawer has its own period picker. * Add-to-cart facts appear only when add-to-cart events are tracked; they keep their product-performance basis. * Collection engagement uses **Recorded collection visitors**, **Recorded clicking visitors** and **Visitor CTR** for the selected markets and period. Revenue, Units and STR retain their existing definitions. There is no inventory column and no pinned-vs-auto column in the collections table. * Recorded collection visitors and clickers describe devices observed on that collection's own page. Earlier product-based figures added activity on the collection's current products, including activity elsewhere. The definitions are not directly comparable, and lower numbers alone do not show lost traffic. * Missing or withheld engagement shows **—**. A **Tracking unreliable** warning withholds Visitor CTR throughout the selected scope; otherwise eligible visitor and clicker counts remain. See [Fix collection-page tracking](#fix-collection-page-tracking). * Dead stock counts products with inventory but zero units sold in the selected period. * Average stock coverage is the number of days current inventory lasts at the current sales rate; it appears in the analytics drawer, not in the collections table. * Pinned vs Auto needs enough traffic on both your pins and the automatically ordered products before it gives a verdict. ## KPI row The tiles above the collections table retain their existing revenue and product-performance definitions: * **Collection Revenue** — revenue attributed to collection pages in the period. * **Current product performance** — current-product views and clicks, with add-to-cart and order facts shown separately from collection engagement. These product facts are not the recorded collection visitors or clicking visitors shown for an individual collection. Per-collection device counts are not added together and presented as unique merchant-wide visitors. Every metric label has a tooltip explaining its basis. The permanent **Tracking unreliable** explanation and repair link are also accessible by keyboard and touch. Clicking a tile opens a **trend modal** with the metric charted over time (30d/7d/1d or a custom range). Next to the scope controls, a dead stock button counts the products at risk ("3 items at dead stock risk", or "No dead stock risk"). It opens a searchable list of those products with CSV export. The **Benchmark** button is in the page header. ## The analytics drawer Open the drawer from a collection row's **View analytics** button. ![Collection analytics drawer showing RPM, sales velocity, inventory donut chart and per-product pinned versus auto CTR comparison with recommendations](https://mintcdn.com/depictai/bVOq4sS-xd91_mJy/images/headless/analytics-drawer.png?fit=max\&auto=format\&n=bVOq4sS-xd91_mJy\&q=85\&s=087f045ad6a0adef688955471b0ef2a4) The analytics drawer: performance KPIs, inventory breakdown and the Pinned vs Auto comparison. ### Performance **Current product performance** keeps revenue, **Product CTR** and sell-through on their existing product basis, with previous-period deltas and trend charts where available. **Show more** adds RPM (revenue per thousand product impressions), sales velocity, inventory and variant availability — in-stock variants as a share of all variants in the collection. These values are separate from **Visitor CTR** and recorded collection visitors. A product metric is never substituted for an unavailable visitor metric. ### Collection engagement **Recorded collection visitors**, **Recorded clicking visitors** and **Visitor CTR** describe recorded devices on this collection's own page. Visitor CTR is clicking visitors divided by collection visitors, when the row and the selected scope are eligible. Tracking quality and availability are checked separately for the current and previous periods; an unavailable previous value does not hide an eligible current count. Product impressions, add-to-cart events and sales retain their own bases. They are not connected to recorded collection visitors with cross-basis conversion rates. The click cut-off describes how far down the listing shoppers reach before 95% of recorded clicks are accounted for. ### Pinned vs Auto Lift How your pinned products compare with auto-ranked ones — see [Pinned vs Auto](#pinned-vs-auto). ### Product Health The collection's **Top 3 Sellers** and **Bottom 3 Sellers**. **Show more** opens the full ranking. ## Stock Health The **Stock Health** view lists the collection's low-stock variants and dead-stock risk in one place. Open it from the variant availability tile in the drawer's Performance section (under **Show more**); the tile also says how many products are low on stock or at dead stock risk. | Tab | What it lists | | - | - | | **Low stock variants** | Products with variants that have between 1 and 5 units left, with the sizes in stock and the stock count | | **Dead stock risk** | Products flagged **No sales**, **Low CTR** or **Low revenue**, with units sold, revenue and stock | ## Pinned vs Auto For collections with pinned products, Depict compares the click-through rate of your pinned products with what automatic ordering would get, and turns the result into a recommendation: | Verdict | Meaning | | - | - | | **Keep pinned** | Your pins are doing better than automatic ordering would. | | **Unpin advised** | Automatic ordering would do better — unpinning should lift clicks. | | **Needs more data** | The difference is small, or there isn't enough traffic yet to tell. | The drawer and the **Pinned vs Auto** modal break it down per product, with the lift between the two CTRs, per-product recommendations, one-click pin/unpin actions and CSV export. You can filter the list to **Unpin advised** or **Keep pinned**. An info tooltip explains how to read the numbers. ## Inventory and dead stock **Dead stock** counts products with stock but effectively no sales in the period — capital sitting still. **Average stock coverage** estimates how many days current inventory lasts at the current sales rate. The dead stock button above the collections table lists the specific products across all collections so you can act on them; the [Stock Health](#stock-health) view does the same for one collection. ## Benchmarking The **Benchmark** button opens a modal where you compare any set of collections side by side — against each other and against the "All collections" baseline — across revenue, engagement and inventory metrics. Recorded engagement uses the same selected markets, period and availability rules as the collection table. Product snapshots keep their product basis; they are not compared with live visitor values as though the definitions were interchangeable. ![Benchmark modal comparing two collections against the average of all collections across revenue, views, clicks, CTR and more](https://mintcdn.com/depictai/bVOq4sS-xd91_mJy/images/headless/benchmark-modal.png?fit=max\&auto=format\&n=bVOq4sS-xd91_mJy\&q=85\&s=7d862113fdb21602882527a66bab90ce) Benchmarking two collections against the all-collections average. ## Fix collection-page tracking Depict may withhold Visitor CTR when recorded collection visitors and clicking visitors are inconsistent for the selected markets and period. This warning describes the recorded data. It does not identify a single integration fault or prove that every unflagged row has complete tracking. ### What the collection numbers describe **Recorded collection visitors** count devices associated with requests for that collection's products. **Recorded clicking visitors** count devices whose product-card clicks were attributed to that listing. A product-detail page view, a card impression and a collection visitor describe different activity; one does not substitute for another. **Visitor CTR** is recorded clicking visitors divided by recorded collection visitors. When at least 10% of the returned collection rows in the selected markets and period have more recorded clickers than viewers, Depict marks that scope **Tracking unreliable** and withholds Visitor CTR on every collection in it. Otherwise eligible visitor and clicker counts remain available with the warning. They are recorded observations, not proof of complete tracking. The threshold is a warning rule, not an acceptable tracking-error rate. An inconsistent row has its visitor count and Visitor CTR withheld even when fewer than 10% of rows are inconsistent. Independently recorded clickers can remain available. Missing or withheld portal values show **—**; they are not invented zeros or rates capped at 100%. The **Export Most Popular** CSV uses the same definitions and rules, with empty cells for missing or withheld values. A different period or market scope can have a different warning and availability. ### Check the listing request and shopper identity Ask the team maintaining your storefront to inspect a listing-products request in the browser's network tools. Confirm that it addresses the intended collection and market and carries the shopper's session identity. In the Platform API, the products request's `session_id` is required for tracking and attribution even though it is optional for serving products. A successful products response alone does not establish attributable visitor coverage. Use the same session identity in serving requests, DPC and custom events. Do not replace all shoppers with one shared dummy identity. After client-side navigation, confirm that the requested listing matches the collection displayed. Follow your existing consent requirements; this guide does not require sending events without consent. See [Listings](/api-guide/listings) and [Which ID goes where](/api-guide/tracking/ids). ### Check clicks against the display that was rendered For custom product cards, use the `product_listing_result_id` from that exact display as the card's `data-product-listing-result-id`. Keep listing, search and recommendation result IDs separate. Do not reuse an old display's result ID for a newly returned card. Legacy Depict UI SDK cards already carry these attributes. Check the integration before adding a second sender. The [Product Card Tracking guide](/api-guide/tracking/product-cards) covers the attributes and custom event sending. The [ID guide](/api-guide/tracking/ids#result-id-lifetime-and-event-validation) explains the ten-minute result-ID lifetime and event validation. Send clicks promptly with the result ID from the clicked display. If clicks arrive but listing visits do not, check the serving request's session identity and collection/market mapping alongside the click integration. Adding only product-card impression events does not repair missing listing-request visitor records. ### Verify the repair in the right period After an integration change, compare the same collection, markets and a period covering the new activity. Check both collection visitors and clicking visitors. A recent repair does not automatically fill earlier missing records, so an older period can remain unreliable. In the portal, **Settings → Tracking** shows live integration diagnostics for the last 72 hours, including event arrival and product mapping. Its **Product page view events** table concerns product-detail pages. It is not proof that the collection visitor denominator is complete for your selected period. Likewise, an accepted event batch does not prove that every result ID was attributed. If the collection numbers remain inconsistent, contact Depict with the collection/page, selected markets, date range and approximate test time. Depict can check the aggregate listing and click paths. Do not send shopper identifiers, tokens or raw customer-event exports. ### Collection engagement and current product performance Collection engagement describes recorded activity on the collection page. **Current product performance** describes activity on the collection's current products, including activity elsewhere. Those definitions differ, so a fall in collection engagement alone does not show that site traffic fell. Tracking gaps are a separate possible cause. Sales, units and product reports retain their own definitions. Product CTR is a separate product metric and is not Visitor CTR. Explaining the definitions or withholding an inconsistent metric does not itself repair storefront instrumentation. # Collections Source: https://docs.depict.ai/headless/features/collections Curate every collection with pinned and auto-sorted products, bulk actions, content cards and per-market settings. The Collections area is where you merchandise your storefront's listing pages. ## Limits and behavior * Changes in the collection editor are staged until you press **Save**; saving publishes immediately — there is no separate publish step. * Deleting a collection deletes its merchandising data, including pins. * Collections created in the portal are either categories or campaigns; only campaigns have an editable URL slug. * When your commerce platform owns your categories, the portal rejects creating a category, and synced categories keep their metadata and product membership read-only (product order stays editable). * Products added through **Add products** join the collection unpinned. * Filter rules labeled **Platform-synced** are managed by your platform integration and cannot be edited. * Ranking options can be unavailable for a store, and an option marked no longer available cannot be re-selected after you change away from it. ## Collections list * Browse collections as a **table or tree** (toggle in the header). * Filter by type — All, Categories, Smart Picks, Brands, Campaigns, Styles, Looks — and search by title. The **Campaigns** tab is always shown, even before you have created a campaign; other type tabs appear only when the store has collections of that type. * Sort by title, last updated or product count. * The table also shows performance columns — Views, Clicks, CTR, Revenue, Units and STR, each with the change versus the preceding period — see [Collection analytics](/headless/features/collection-analytics) for what they mean. * Mark collections as **favourites** to pin them to the sidebar. ### Creating collections **Create** in the header opens a dropdown with the two collection types you can create: | Type | What it creates | | - | - | | **Category** | A category collection. When your commerce platform owns your categories, the portal rejects creating one — categories then come from the platform sync. | | **Campaign** | A collection created and owned in Depict, with its own URL slug. Use campaigns for pages you build yourself, such as seasonal drops. | ## Collection editor Products in a collection are split into two sections: * **Pinned** — products you've fixed to a position. Drag to reorder. * **Auto-sorted** — everything else, ranked automatically by performance. You can pin/unpin products, hide/unhide them, and remove them from the collection. Fully managed collections (for example automatic categories) may restrict curation — the editor tells you when products can't be edited. ### Display options The **Display** button sets how product cards look in the editor. These options change only your view in the portal, not the storefront, and are remembered in your browser for each store. | Option | Values | | - | - | | **Density** | **Compact** or **Standard**; changing a toggle below makes it custom | | **Columns** | 2–10 cards per row in the desktop layout. Above 7 columns, cards use the compact layout. The mobile preview keeps your storefront's column count | | Card details | Toggles for **Product ID**, **Stock status**, **Views / Clicks / CTR**, **STR / Sold / Revenue**, **Second image on hover** and **Analytics summary** | Display options apply to the grid; in list view they are disabled. ### Bulk actions Select multiple products (Escape clears the selection) and apply an action to all of them at once: pin, pin to top, pin to bottom, pin to an exact position, unpin, hide, unhide or remove. ### Adding products and rules The **Add products** modal adds products as (unpinned) collection members. Merchants with the corresponding permission can also add filter rules that define collection membership dynamically. ### Content cards Interleave content cards with the product grid — add, edit, move and delete them directly in the editor. A card sits in the grid beside the products and takes one of three sizes: | Card size | Shape | | - | - | | **1 x 1** | A small tile, the size of one product card | | **2 x 2** | A large square, two columns wide and two rows tall | | **4 x 1** | A full-width banner, four columns wide and one row tall | A card can also carry a line of copy (up to 140 characters) and an optional call-to-action (up to 60 characters), placed in one of nine positions on the image or video. Depict sends only the words and their position: your storefront shows them, so its own styling (for example your brand font) decides how they look. See [content cards](/api-guide/listings#content-cards) for the fields your developers render. ### Collection settings The settings modal has three tabs: * **General** — localized titles per language and, for campaigns, the URL slug. The collection ID and type are copyable here. * **Ranking** — choose how the auto-sorted section is arranged. * **Visibility** — toggles that control where the collection appears across your storefront. The ranking options: | Ranking option | Behavior | | - | - | | **Standard** | Products are sorted by Depict's automatic ranking, with your boost & bury rules applied. | | **Grouped** | Products are paired with similar products, then sorted with your boost & bury rules applied. | | **Matched** | Products are paired with complementary products, then sorted with your boost & bury rules applied. | > [!NOTE] > > The portal API represents these options as `top` (Standard), `similar` > (Grouped) and `complementary` (Matched). The visibility toggles: | Visibility toggle | Controls | | - | - | | **Collection filters** | Whether the collection shows inside the filters on the search page. | | **Breadcrumbs** | Whether the collection shows at the top of the page for quick navigation. | | **Quicklinks** | Whether the collection shows below the search field as a collection suggestion. | | **Search results** | Whether the collection shows as a suggestion or result in the search modal and page. | Collections can be deleted from this modal (with a two-step confirmation). ### Working across markets Scope the editor by market or market group; an unsaved-changes guard prevents you from losing edits when switching. A storefront preview link and a mobile/desktop grid preview show what shoppers will see. Changes are staged until you hit **Save** — a persistent bar lets you save or revert, and the portal warns you before navigating away with unsaved changes. # Dashboard Source: https://docs.depict.ai/headless/features/dashboard The portal landing page: headline KPIs, product and collection highlights, and traffic trends for the selected period. The Dashboard is the page you land on after signing in. It summarizes how the store performed over the selected period and points to the page where each number can be acted on. ## Limits and behavior * The market and period selectors at the top scope every number on the page. Period presets are 30, 7 or 1 days (default 30) plus a custom date range; every change figure compares against the equally long period immediately before. * The Dashboard requires performance reporting to be enabled for the store. Without it, the page states "Performance reporting is not switched on for this store" instead of rendering empty tiles. * Performance reporting is enabled per area (search, recommendations, collections). Sections and tiles backed by an area that is off are omitted rather than shown empty. * The revenue and conversion tiles need purchase tracking: if orders are not reaching Depict, or cannot be attributed, the tiles are replaced by a "Link your orders" or "Send us your orders" explainer with setup guidance. * A dash on a KPI tile means no data for the period; a real zero renders as 0. ## Hero KPIs | Tile | What it shows | | - | - | | **Attributed revenue** | Revenue from orders attributed to Depict surfaces (search attribution plus recommendation surfaces). | | **Search conversion** | Attributed orders per search click, as a percentage. | | **AOV** | Attributed revenue divided by attributed orders. Until recommendation orders are reported, it uses search-attributed revenue and orders only. | | **Orders by Depict** | Orders attributed to Depict: search plus recommendations. The breakdown also shows orders via collection pages for context; they are not added to the total. | | **Search health** | Share of searches returning no results — lower is better. | Clicking the first four tiles opens a daily trend chart for that metric over the selected period. Clicking **Search health** opens the Search page. ## Highlights Three cards sit below the KPI row: | Card | Content | Link | | - | - | - | | Product highlights | Tabs **Bestselling** and **Slowest movers** | **View all** opens the full **Top products** list | | **Trending products** | Products moving up the ranking fastest | **View all** opens the full list | | **Top clicked collections** | Collections by clicks in the period | **View all** opens the Collections page | Clicking a product in any card opens its product details, with a shortcut matching the context: **Boost product** for a bestseller, **Boost or bury** for a slow mover, **Feature in recommendations** for a trending product, and **Open in Products** in every case. The collections card appears only when collection performance reporting is on. ## Traffic A chart at the bottom plots one metric per day — switch between **Clicks**, **Revenue**, **Orders** and **CTR** — split into three series: **Collections**, **Search** and **Recommendations**, with the total and the change against the previous period. A **vs previous period** toggle adds the previous period to the chart, and **Overlay** draws a second metric on top. Search and recommendations counts come from attribution; the remainder of each day's total is reported as collections, so the three series sum to the true total. # Products Source: https://docs.depict.ai/headless/features/products Browse your catalog with performance metrics, manage stock-based visibility and edit product imagery. The Products page is your catalog, ranked and measured. ![Products page listing products with inventory, views, clicks, CTR and STR columns plus stock filter tabs](https://mintcdn.com/depictai/ystZXW5ETn0w1Oyb/images/headless/products.png?fit=max\&auto=format\&n=ystZXW5ETn0w1Oyb\&q=85\&s=d4887eba68a88fb28bf02e2ab2c8bce8) The catalog table with per-product performance metrics and stock tabs. ## Catalog table * Infinite-scrolling, sortable table with per-product metrics: inventory, views, clicks, CTR, STR, orders and revenue — each compared to the previous period. * **Stock tabs**: All / Out of stock / Low stock, with live product counts. * Text search plus attribute filters (checkbox, range and radio filters, with clear-all). * Trigger a **catalog sync** from the page header when you've changed data at the source. ## Auto-hide for out-of-stock products In the Out of stock view, enable **Auto-hide** to automatically hide out-of-stock products across your storefront. Individual products can be excluded from auto-hiding when you want them to stay visible (for example, items about to restock). ## Product details Open any product for a detail view with previous/next navigation: * **Overview** — last-30-day metrics versus the previous period, weekly stats, toplist ranking and a weekly views/clicks/revenue chart, optionally scoped by market group. * **Details** — description, categories, status, per-variant price and inventory, plus a **visibility matrix**: show or hide the product per market group across the three surfaces (listing pages, search, recommendations). * **Images** — reorder product images with drag-and-drop. > [!NOTE] > > Some capabilities (the Overview metrics tab and market-group filtering) roll > out gradually per merchant. If you don't see them, contact > [support](mailto:support@depict.ai). # Recommendations Source: https://docs.depict.ai/headless/features/recommendations Recommendation surfaces, the self-service rule editor, and the live preview of what each surface returns. The Recommendations page lists every recommendation surface Depict serves on your storefront. Each surface has its own rule set, edited directly on the surface's page and verified in a live preview. ## Limits and behavior * Saved rule changes go live on the storefront within a few minutes; the save confirmation states "Changes saved. Live in a few minutes." * Rules are applied top to bottom; drag a rule to change its priority. * Rules have no names — a rule is identified by its position ("Rule 1", "Rule 2"). * Contradictory rules cannot be saved: the conflict resolver must be completed first. * A pinned product that is out of stock in every market is not shown in recommendations; the editor and the surface KPIs flag such pins. * On surfaces that can render outside product pages, rules apply only when the surface is shown on product detail pages — the surface carries a "Product Page Only" hint. * The live preview is not available for every surface type; personalized surfaces return results only once the engine has session data for a shopper. * The engagement KPI tiles (clicks, impressions, CTR, attributed revenue, attributed add-to-carts) require performance reporting to be enabled for the store; the configuration tiles (rule and product counts) always show. * Attributed revenue and add-to-carts use approximate last-touch attribution: the shopper's last click on the product came from a recommendation within 7 days, summed across markets without currency conversion. ## Surfaces | Surface | What it recommends | | - | - | | **Style with** | Looks and complementary products | | **More like this** | Similar products | | **Recently viewed** | Personalized products based on recent views | | **Popular** | Popular products based on views and sales in the last 30 days | | **Basket** | Complementary and upsell products based on products in the cart | | **Checkout** | A set of products before final checkout | | **For you** | Personalized products based on products viewed and in cart | | **Custom recommendations** | Any custom surfaces configured for your store | The list shows each surface with its rule count and stock status, and can be searched across surfaces and rules. KPI tiles above the list cover the selected period: **Recommendation Revenue**, a **Recommendation funnel** (recommendation clicks → add to carts → orders), **Impressions** and **CTR**. Click a surface to open it. The surface page shows its own tiles — **Rules**, **Pinned Products**, **Hidden Products**, **Targeted Products** and **Surface Clicks** — above the rule list. ## Rules Each rule has three parts: * **When showing these products** — where the rule applies: specific products, a collection, or all products. * **Show these products** — products always shown (pinned) in the recommendations. * **Hide these products** — products, or whole collections, never shown in the recommendations. A hidden collection also hides products added to it later. ### Add a rule 1. Open a surface from the Recommendations page. 2. Click **Add rule**. 3. Under **When showing these products**, choose **Add products**, **Add collection** or **All products** and make your selection. 4. Under **Show these products**, add the products to pin, if any. 5. Under **Hide these products**, choose **Add products** or **Add collection** to exclude products, if any. 6. Click **Save rule**, then click **Save** on the rule list. Result: the rule appears in the list at its priority position, and the save confirmation states the changes are live in a few minutes. To change or remove a rule, open its **More actions** menu and choose **Edit** or **Delete**. To change priority, drag rules into order — rules are applied top to bottom. ### Conflicts If two rules disagree about the same products for the same trigger, saving opens the **Resolve rule conflict** dialog. Conflicts are resolved one at a time; for each, pick a resolution path — remove the trigger from one of the two rules, or delete the other rule — then apply and save. > [!WARNING] > > If someone else saves different rules while you are editing, saving again > overwrites their version with yours. Reload the page instead to see their > version; your edits are then lost. ## Live preview The **Live preview** button on a surface page opens a preview of what the recommendations return right now. Pick or **Swap** the product being previewed for ("Previewing for"), and products forced in by your rules carry a **Pinned by rule** badge. Pinned products that cannot be shown in the selected market are listed separately. Saved rule changes appear in the preview within a few minutes. Storefront integration of recommendation surfaces is covered in the [API integration guide](/api-guide/recommendations/api). # Search Source: https://docs.depict.ai/headless/features/search Search analytics, synonyms, search content, the start view, and search configuration for the storefront search Depict serves. The Search page manages the search experience Depict serves on your storefront. Its tab set depends on which search generation the store runs: | Tab | Available on | Purpose | | - | - | - | | **Overview** | Every store | Search analytics: KPIs, funnel, query tables | | **Content** | Stores with Depict search | Non-product content in search results | | **Synonyms** | Stores with Depict search on the previous engine | Vocabulary the engine should treat as equivalent | | **Start View** | Stores with Depict search | What shoppers see when they open search before typing | | **Configuration** | Stores on Depict's new search engine | Searchable fields, filter facets, sold-out visibility, search focus | | **States** | Stores on Depict's new search engine | Suggested searches, blocked terms, tone of voice, storefront translations | | **Boost & Bury** | Stores on Depict's new search engine | Search-specific ranking rules | The page always opens on **Overview**. On Depict's new search engine the **Synonyms** tab is not shown. ## Limits and behavior * The market and period selectors at the top scope the analytics. Period presets are 30, 7 or 1 days (default 30) plus a custom date range; change figures compare against the equally long period immediately before. * The KPI tiles and search funnel on **Overview** require search performance reporting to be enabled for the store; the query tables show for every store. * There is no per-query result curation: you cannot pin specific products to a specific search term. Result ranking follows automatic ranking plus the rules on the Boost & Bury page — and, on the new engine, the search-specific rules on this page's **Boost & Bury** tab. * On Depict's new search engine, synonym sets have no effect: the engine matches related words on its own and does not use them. * Query tables hide queries searched fewer than 3 times (they are still included in the CSV export), and **Total Searches** excludes queries under 3 characters. * Propagation: synonym changes take up to 30 minutes; Configuration and States changes reach the storefront within a few minutes; blocked-term changes can take up to an hour to reach autocomplete; Start View changes on the previous engine reach the store within about a minute. * Caps on the new engine: 20 sold-out exception tags, 4 suggested searches per language, 200 blocked terms and 6 pinned start-view products. * Content entries and synonyms are saved per language. Choose a language in the page's language menu before you add one; stores with a single language have it selected already. * The Query Performance export is capped at 20,000 queries; the least-searched queries are left out beyond that. ## Overview For stores on the previous engine, the Overview combines: | Element | Content | | - | - | | **Total Searches** | Searches in the period across all queries; queries under 3 characters excluded | | **Zero-Result Rate** | Share of searches that returned no products | | **Search CTR** | Clicks on search results divided by result impressions; tracked across all markets only | | **Attributed Revenue** | Revenue from purchases where the shopper's last click came from a search result (approximate last-touch attribution, summed without currency conversion) | | **Search funnel** | Searches → Result clicks → Add to carts → Orders, with step conversion; the result-clicks stage is hidden when a single market is selected because result clicks are tracked store-wide only | | Zero-results insight | The period's zero-result share with an **Add synonyms** action | | **Most common searches** | Top queries with counts and trends | | **Most common searches without results** | Queries that returned nothing | | **Export CSV** | Downloads the query data, including queries hidden from the tables | Stores on the new search engine get a reporting dashboard as their Overview instead: KPI tiles (searches, users, CTR, no-click rate, zero-results rate, attributed revenue), metric charts (**Attributed Revenue**, **Search Conversion Rate**, **Search Session Purchase Rate**, **Non-Search Conversion Rate**, **Total Searches**, **Zero-Results Rate**, **No-Click Rate**, **Avg. Click Position**, **Attributed AOV**, **Non-Search AOV**), a **Search Funnel**, **Search Entry Points** (the page shoppers were on when they started searching), and a **Query Performance** table with each query's full funnel — searches, zero-results, clicks, CTR, carts, orders and attributed revenue. Charts switch between **Daily** and **Hourly** views (hourly for ranges of 10 days or less), can be filtered by visitor country and locale, and both metrics and query performance export to CSV. ## Steering search results Which products rank first for a query is decided by automatic ranking plus your rules: * On the previous engine, search follows the store-wide rules on the Boost & Bury page. To lift specific products in search, boost them (or a collection containing them) there. * On the new search engine, the **Boost & Bury** tab on this page holds search-specific rules with the same boost and bury lists as the merchandising page. While no search rules exist, a banner states "No search rules — merchandising Boost & Bury applies" and search follows the merchandising rules. As soon as search rules exist, they replace the merchandising rules for search results ("Search rules set — overruling merchandising for search"); remove all of them to fall back. ## Synonyms Synonym groups teach the previous engine your customers' vocabulary, per language. Zero-result queries are the best source of candidates — the **Add synonyms** action on the Overview's zero-results insight pre-fills the form with the query. 1. Open the **Synonyms** tab and choose a language in the language menu. 2. Click **Add synonym**. In the **Add synonyms** dialog, select one or more **Languages**. 3. Enter the words under **Synonyms**, pressing Enter after each. 4. Save. Result: the group appears in the synonyms table; the toast states the change may take up to 30 minutes to take effect. If a new group shares words with existing groups, an **Overlapping synonyms found** review shows how they will be combined; choose **Merge and save** or **Save without merging**. > [!WARNING] > > Merging synonym groups cannot be undone — review the resulting groups before > confirming. Existing groups can be edited or deleted from the table. ## Content The **Content** tab adds non-product content to search results, per language — size guides, service pages, campaign landing pages. Each entry has a **Title**, a **URI** and **Keywords**; the content appears when a shopper's query matches a keyword. To create an entry, choose a language in the language menu, then click **Add content** next to it on the **Content** tab. ## Start View The **Start View** tab controls what shoppers see when they open search before typing anything. On the previous engine it holds two lists, **Pinned products** and **Pinned collections**. The order in each list is the order shoppers see; drag to reorder. Below each list, suggestions are drawn from the store's current organic start view, so you can pin what is already showing. Changes save automatically ("All changes saved") and reach the store within about a minute. The **Preview** button shows the composition shoppers will get: pinned items first, then the store's organic results. > [!NOTE] > > The Start View needs a default market and language on the account; the tab > says so and asks you to contact Depict support if they are missing. On the new search engine the tab instead holds a **Default product order** setting (**Newest**, **Highest stock** or **Bestsellers**) for unpinned products, and a **Pinned products** list of up to 6 products shown first. ## Configuration Settings for stores on Depict's new search engine: | Setting | What it controls | | - | - | | **Searchable fields** | Which catalog attributes are searched and how strongly each counts — fields at the top weigh more; add, remove and reorder. SKU and product ID are always searched with exact matching and cannot be turned off. | | **Filter facets** | Which facets appear in the search filter panel and in what order. | | **Show sold-out products** | When on, sold-out products appear ranked below in-stock products; when off, they are hidden. Tag exceptions keep specific products visible with no inventory (for coming-soon items and pre-orders); tags must match exactly, including capitalization. | | **Search focus** | A slider between **Exact words** and **Meaning & concepts**: closer to exact only finds text present in the catalog and misses synonyms; closer to meaning handles synonyms but can miss exact names such as a brand. | Saved changes reach the storefront within a few minutes. ## States Per-language search states on the new engine: | Section | What it controls | | - | - | | **Suggested searches before typing** | The search chips shoppers see when they open search, in order, per storefront language — up to 4. Saving marks them as yours so the nightly generator stops replacing them. | | **Suggestion controls** | **Blocked terms** that must never appear in an AI-generated suggestion (case-insensitive, catches variants such as "jet-black" for "jet black"; up to 200), and an optional **Tone of voice** instruction for how suggestions are written. | | **Translations** | Overrides for the storefront search texts per language — the search input placeholder and the filter labels. Empty fields use the default. | # Settings Source: https://docs.depict.ai/headless/features/settings The Settings area: portal language, user management, attributes, storefront filters, market groups, tracking diagnostics, product issues, AI assistants and analytics API keys. The Settings area is where a store configures Depict itself: who can access the portal, which store data becomes attributes, which filters shoppers see, how markets are grouped, whether tracking events are arriving correctly, and which products ran into problems when Depict processed them. It has seven sub-pages in the sidebar: **General**, **Users**, **Attributes**, **Filters**, **Markets**, **Tracking** and **Product issues**, plus **AI assistants** when Depict has turned it on for the store. ## Limits and behavior * All settings are per store. Switching store in the merchant switcher switches every setting described on this page. * There are no user roles. Every member of a store has the same permissions; a view-only account cannot be created. * There is no numeric limit on the number of users per store. * You cannot remove your own account from a store's user list. * On a standard filter (such as price, size or color) the attribute is fixed; its titles, filter type and visibility can be edited. * The **Attributes** page is configurable only for stores on Centra. Stores on Shopify see their attributes in a read-only table, and other platforms see "Not available for your platform". * **Product issues** is read-only: you fix an issue in your store's source data, and the list updates when the product is processed again. * Deleting a market group moves its markets to the default group and deletes every merchandising exception scoped to that group. * The **Tracking** page shows the last 72 hours of events and refreshes every 30 seconds. * Analytics API keys (created on **General**) are capped at 50 active keys per store; the key secret is shown once and cannot be retrieved again. * The interface language setting is stored in the browser, not on the account: it applies per browser, not per user. ## General The General page holds portal-wide preferences and the analytics API keys. | Setting | Values | Default | | - | - | - | | **Language** — the portal interface language | English, Svenska | English | When analytics is enabled for the store, the General page also shows an **API keys** card for creating and revoking the read-only analytics API keys used with the `X-API-Key` header. See [Analytics API keys](/headless/features/analytics#analytics-api-keys) for the key format, limits and the endpoints the keys unlock. ## Users The Users page manages who can access the store in Depict. It lists every member by email, with a **You** badge on your own account and an **Admin** badge on Depict staff accounts. Every member has the same permissions — there is no role system and no view-only mode. To invite a teammate: 1. Open **Settings**, then **Users**. 2. Click **Invite user**. 3. Enter the teammate's work email. 4. Confirm the invite. Result: the teammate appears in the member list. If they do not have a Depict account yet, one is created — they sign in via "Forgot password" or SSO, and they have the same permissions as you. To remove a member, use the remove action on their row and confirm. Removal takes effect immediately, and the person can be invited again at any time. You cannot remove your own account. ## Attributes The Attributes page configures which store data is ingested as Depict attributes, used across search, filters and merchandising. The page's contents depend on the store's platform: | Platform | What the page offers | | - | - | | Shopify | A read-only view of the Shopify options, metafields and tags behind each attribute | | Centra | Configure standard, mandatory and custom Centra attribute ingestion | | Any other | "Not available for your platform" — contact Depict support | ### Shopify attributes For stores on Shopify the page is a searchable, read-only table with three columns: **Attribute**, **Status** (**Configured** / **Not configured**) and **Data source** — the Shopify option, metafield (shown as `namespace:key`) or tags the attribute reads. **Color**, **Size**, **Gender** and **Age** are always listed, followed by any other configured attributes in alphabetical order. Title, description, variant, image, original price, sale price, stock levels and brand are ingested automatically and need no mapping. Attributes cannot be added or changed from this page. To change which Shopify data an attribute reads, [contact Depict support](mailto:support@depict.ai). ### Centra attribute configuration Three tabs: **Standard Centra attributes**, **Mandatory Depict attributes** and **Custom Centra attributes**. Each row is configured with these columns: | Column | Meaning | | - | - | | **Attribute ID** | Identifier for the attribute (custom attributes are prefixed `custom.`) | | **Attribute Type** | The attribute's type | | **Field Name** | The Centra field the data comes from | | **Default Value** | Value used when the field is empty | | **Set as N/A** | Marks the attribute as not applicable | | **Include in display response** | Whether the attribute is returned in display responses | Attribute IDs must be unique, and every row needs an attribute ID, type and field name before the page can be saved. ## Filters The Filters page configures the filters shoppers use to narrow product listings on the storefront. Filters can be added with **Add filter**, edited, deleted and reordered by dragging. Filters visible only to you are marked **For you only** in the list. > [!WARNING] > > Deleting a filter removes it from the storefront and the Depict app > immediately after you confirm. Each filter is configured with: | Setting | Values | | - | - | | **Filter name** | Free text | | **Titles per locale** | One title per storefront locale; **Auto-translate** fills the other locales from one title | | **Attribute used for its data** | Any configured attribute | | **Filter type** | Checkbox, Radio Button, Color Checkbox, Hierarchical Checkbox | | **Visibility** | "Shoppers (web store) and You (Depict app)" or "You only (Depict app)" | Standard filters — such as price, discount, on sale, in stock, size, categories and color — use their own types, for example a range slider for price, a toggle for on sale and in stock, a grid checkbox for size, a hierarchical checkbox for categories and a color checkbox for color. When you edit a standard filter, its **Attribute used for its data** is locked; the titles, filter type and visibility can still be changed. For other filters, the values can be managed per filter: | Capability | Behavior | | - | - | | Value groups | **Add a group** collects values under one label; values can be moved between groups or un-grouped | | Color swatches | On a **Color Checkbox** filter, a **Color swatch** (any CSS color, e.g. `#ff0000`) can be set per value | | Sort | **Size**, **A-Z**, **Z-A**, **Occurrence** or **Custom** (drag values into order; the order is saved when the sort is set to "Custom") | ## Markets The Markets page groups a store's markets into market groups. Markets in a group share merchandising rules and analytics scope — market groups are the unit that merchandising, analytics and stock are scoped by across the portal. * Drag a market onto a group to move it. Changes apply when you save. * **Add market group** creates a group with a **Group name**; the group id is derived from the name and must be unique. * One group is marked **Default**. * Every group needs at least one market before the page can be saved. > [!WARNING] > > Deleting a market group moves its markets back to the default group and > deletes every merchandising exception scoped to that group. ## Tracking The Tracking page is a live diagnostic of the store's tracking integration: the last 72 hours of events, whether their product ids map to the ingested catalog, and purchase attribution quality. It refreshes every 30 seconds. Four event feeds are shown, each with the id the events must use: | Feed | Required id | | - | - | | **Click events** | Depict result IDs (unique to each product card in a Depict surface) | | **Product page view events** | Product ID, on all product detail pages | | **Add-to-cart events** | Product ID, on all add-to-cart actions | | **Purchase events** | Transaction product ID, on the order confirmation page | Each feed carries a product-id mapping status: | Status | Meaning | Action | | - | - | - | | "All event product IDs map to ingested products" | Tracking ids match the catalog | None | | "Some event product IDs can not be mapped to ingested products" | Part of the events reference unknown products | Check which id the integration sends against the **Product ID examples** table | | "No event product IDs can be mapped to ingested products" | The integration sends ids Depict does not recognize | Fix the id field in the tracking integration | | "No event product IDs to map" | No events of this type in the window | Verify the event is implemented and firing | | "Couldn't load" | Diagnostic data unavailable | Retry later | The page also shows **Purchase device ids with attribution events** — the share of purchases whose device also produced attribution events — and a **Product ID examples** table with sample ids from the ingested catalog, as tracking events should reference them. ## Product issues The Product issues page lists the products Depict had trouble with while processing your catalog, so you can fix the source data or image in your store. Image issues that are still open are checked again every day, and the list updates when the product is processed again. | Issue | What it means | | - | - | | **Image could not be downloaded** | Depict processed the product without that image. The product may still appear in search. | | **Product could not be indexed** | The product could not be added to Depict's index. | | **Source data issue** | The product's data in your store has a problem Depict could not process. | Each row shows the product, links to the image and the source product, the issue, the message from your platform (**Show message**), and when the issue was first seen, last seen and last checked. * Filter by status — **Open** (the default), **Resolved** or **All issues** — and by issue type, or search for a product. **Reset filters** clears them. * Resolved issues show why they were resolved: **Processed successfully**, **Removed from your store** or **Language or collection removed**. * **Export CSV** downloads the matching issues, up to 5,000; narrow the filters to export a larger set. The page cannot fix issues itself: correct the product in your store, and the issue is resolved the next time Depict processes that product. ## AI assistants Shown in **Settings** when Depict has turned on AI assistants for the store. The page holds the store's MCP endpoint URL and the Claude Code and Codex commands, each with a copy button, and lists the connected assistants with a **Disconnect** button for each. Connecting, approving and disconnecting are documented on the [AI assistants](/headless/features/ai-assistants) page. # Getting started Source: https://docs.depict.ai/headless/getting-started From first login to a fully merchandised, measured storefront. ## 1. Get access The Depict portal is available to Depict merchants. Log in with the account credentials provided during onboarding — authentication is handled by Auth0, and every user is scoped to the merchants they've been granted access to. Add teammates yourself under **Settings** → **Users** with **Invite user** — there is no seat limit, and every member has the same permissions (see [Settings](/headless/features/settings#users)). Plan terms are commercial and handled in your Depict contract; the portal does not enforce usage caps on collections, pins or users, and has no in-product billing or upgrade flow. ## 2. Connect your data Depict needs two data streams to work well: * **Catalog data** — products, variants, prices, stock and collections. Follow the [data ingestion overview](/data-ingestion-guide/overview-of-data-ingestion) and the guide for your platform ([Centra](/data-ingestion-guide/centra-setup-guide), [Shopify](/data-ingestion-guide/shopify-setup-guide) or the [Push Product API](/data-ingestion-guide/push-product-api)). * **Behavioural data** — impressions, clicks, add-to-carts and purchases from your storefront. This comes from the tracking part of your storefront integration and powers every metric in the portal. > [!NOTE] > > Metrics such as CTR, sell-through rate and the conversion funnel only appear > once tracking events flow in. Expect a few days of data collection before the > analytics pages are meaningful. ## 3. Curate your first collection Open **Collections**, pick a high-traffic collection and try the editor: 1. Pin your hero products to the top — everything else stays auto-sorted by performance. 2. Use bulk actions to pin, hide or reorder many products at once. 3. Save, then check the storefront preview. See [Collections](/headless/features/collections) for the full editor reference. ## 4. Measure * The **Analytics** page gives you the merchant-wide view: revenue, traffic, conversion funnel, search insights and which collections are winning or declining. * Each collection has its own analytics drawer with traffic, product health and a pinned-vs-auto comparison that tells you whether your manual pins are helping or hurting. From here, iterate: adjust pins where the data says auto-ranking does better, add [Boost & Bury](/headless/features/boost-and-bury) rules for storewide pushes, and keep an eye on [dead stock](/headless/features/collection-analytics#inventory-and-dead-stock). # Introduction Source: https://docs.depict.ai/headless/introduction Depict for headless merchants: AI product discovery — collection merchandising, search and recommendations — served through an API and steered from one portal. Depict is **AI product discovery for e-commerce brands**: curate the moments that matter, automate the rest. For headless and composable storefronts, the full engine is available through the Platform API — you own the frontend, Depict ranks and serves what your customers see. Three products, one engine, one portal: > [card] [Collection merchandising](/headless/features/collections) > > Merchandise hundreds of collections with precise control over brand and > storytelling, while the AI engine keeps every page optimally sorted — > no more re-sorting by hand every Monday. > [card] [Search](/headless/features/search) > > Hybrid search that combines AI, keyword matching and your merchandising > rules to deliver relevant results every time — plus insights into what > customers actually search for. > [card] [Recommendations](/headless/features/recommendations) > > Product recommendations that understand your brand rules and > automatically match the best products across thousands of SKUs. All three are steered and measured from the **Depict portal**: > [card] [Analytics](/headless/features/analytics) > > A merchant-wide analytics hub plus per-collection analytics: KPIs, > conversion funnel, search insights, inventory risk and pinned-vs-auto > health. > [card] [Products](/headless/features/products) > > Your catalog with performance metrics, stock-based visibility and > auto-hide for out-of-stock products. > [card] [Boost & Bury](/headless/features/boost-and-bury) > > Storewide ranking rules — push bestsellers up, bury out-of-stock or > on-sale products — set once, applied to collection pages and search. > [card] [Collection analytics](/headless/features/collection-analytics) > > Per-collection performance with benchmarking, dead stock detection and > per-product pin recommendations. ## How it fits together 1. **Your catalog and behavioural data are ingested** into Depict — see the [data ingestion guide](/data-ingestion-guide/overview-of-data-ingestion). 2. **Depict ranks and serves** search results, product listings and recommendations to your storefront through the [Platform API](/api-guide/introduction), the [Depict UI SDK](/react-ui-guide/introduction), or the [Shopify apps](/shopify-search/introduction), with [tracking events](/api-guide/tracking/introduction) closing the loop. 3. **You steer and measure** everything from the portal: curation, merchandising rules and analytics. ## Storefront integration paths Choose how Depict reaches your storefront: > [card] [Depict UI SDK (React)](/react-ui-guide/introduction) > > Pre-built search, listing pages and recommendations for React, Next.js and Gatsby. > [card] [Depict UI SDK (JavaScript)](/js-ui-guide/introduction) > > Same components for plain JavaScript storefronts. > [card] [Platform API](/api-guide/introduction) > > Full control — call the API directly and build your own UX. > [card] [Shopify apps](/shopify-search/introduction) > > Search by Depict and Depict: Search & Merchandising — installed from the Shopify App Store, configured with theme blocks and app embeds. ## Where to go next * New to Depict? Start with [Getting started](/headless/getting-started). * Integrating your storefront? Pick a path above — SDK, API, or the Shopify apps. * Building against the APIs? See the **API Reference** tab for the Portal API and the Platform API. # Compatibility and Browser Support for Depict Packages Source: https://docs.depict.ai/js-ui-guide/compatible-environments **If** you have a dependency listed below, make sure you have the minimum version or greater installed. You can also use parcel, vite or other bundlers, but we don't know the minimum version for those tools yet. | Dependency (if applicable) | Minimum version | | - | - | | `sass` | 1.54.6 | | `webpack` | 5.0 | > [!NOTE] > > The only required dependency of above is `sass` `@depict-ai/js-ui` ships no server build and targets browsers only; if you render on the server, use `@depict-ai/react-ui` (see [server-side rendering](/react-ui-guide/ssr)). ## Browser support By default, the exported versions of Depict packages are transpiled for older browsers (targeting ES10). This makes it easier for the Depict UI to function in older browsers by default, but also results in a larger network payload and poorer page performance. However, you may still need to add polyfills (see below). If you're not keen on supporting older browsers, or you'd prefer to handle the transpilation process yourself, append `/latest` to all your imports to include the untranspiled version. ```ts theme={null} import { /* your imports */ } from "@depict-ai/js-ui/latest"; import { /* your locales */ } from "@depict-ai/js-ui/locales/latest"; ``` ### Choosing a build Depict packages ship two builds, selected by the import path: | Import postfix | ECMAScript version | Intended for | | - | - | - | | `/ES10` (default) | ES10 (ECMAScript 2019) | Older browsers — see [browser list](https://browsersl.ist/#q=supports+array-flat) | | `/latest` | Untranspiled (targets the latest Chrome version) | Current major browsers, or when you transpile yourself; smaller payload | The bare import (for example `@depict-ai/react-ui`) resolves to the ES10 build. To switch an existing codebase to `/latest`, find and replace across your `.js`/`.ts`/`.tsx` files: find `(@depict-ai(?!/types)[^"';\s]*)`, replace with `$1/latest`. > [!NOTE] > > The default search modal's CSS uses > [container queries](https://caniuse.com/css-container-queries), which older browsers lack. > For those browsers, [use the classic modal](/other-guides/introduction#switching-to-the-classic-search-modal). ### Polyfilling The ES10 build handles syntax, not missing APIs — older browsers may still need polyfills. Test your application in the oldest browser you target and add what is missing. Enable SDK logging first by running `localStorage.debug = true` and reloading (see the debugging section of the [react-ui](/react-ui-guide/introduction) or [js-ui](/js-ui-guide/introduction) introduction), and exercise as many UI features as possible — some polyfills are only needed for specific features. Bundle the polyfills you need with your own build (for example via [core-js](https://github.com/zloirock/core-js)) rather than loading them from a third-party polyfill CDN at runtime. The polyfills Depict uses: | Web API (click for compatibility) | Polyfill | | - | - | | [structuredClone](https://caniuse.com/mdn-api_structuredclone) | `import "core-js/stable/structured-clone";` | | [Array.toSorted()](https://caniuse.com/mdn-javascript_builtins_array_tosorted) | `import "core-js/stable/array/to-sorted";` | | [Smooth scrolling](https://caniuse.com/mdn-api_window_scrollby_options_behavior_parameter) | [smoothscroll-polyfill](https://www.npmjs.com/package/smoothscroll-polyfill) | | [Element.replaceChildren()](https://caniuse.com/mdn-api_element_replacechildren) | Custom polyfill used by Depict — [contact us](mailto:support@depict.ai) for the source | | [WeakRef](https://caniuse.com/mdn-javascript_builtins_weakref) | Custom polyfill used by Depict — [contact us](mailto:support@depict.ai) for the source | | [EventTarget](https://caniuse.com/mdn-api_eventtarget) (somewhat misleading compat table, doesn't list which versions have a constructable EventTarget) | Custom polyfill used by Depict — [contact us](mailto:support@depict.ai) for the source | | [String.at()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/at) | `import "core-js/proposals/relative-indexing-method";` | | [String.trimStart()](https://caniuse.com/mdn-javascript_builtins_string_trimstart) & [String.trimEnd](https://caniuse.com/mdn-javascript_builtins_string_trimend) | `import "core-js/proposals/string-left-right-trim";` | | [queueMicrotask](https://caniuse.com/mdn-api_queuemicrotask) | Custom polyfill used by Depict — [contact us](mailto:support@depict.ai) for the source | | [Node.contains()](https://caniuse.com/mdn-api_node_contains) | Custom polyfill used by Depict — [contact us](mailto:support@depict.ai) for the source | | [globalThis](https://caniuse.com/?search=globalThis) | Custom polyfill used by Depict — [contact us](mailto:support@depict.ai) for the source | | [`