Skip to main content
PUT
Error

Authorizations

Authorization
string
header
required

Shopify App Bridge session token of the embedded Depict: Search & Merchandising app. The shop in the token determines the merchant; merchant_id parameters must belong to that shop.

Path Parameters

collection_id
string
required

Numeric Shopify collection id.

Query Parameters

merchant_id
string
required

Lite merchant id, e.g. shopify-<shop id>.

Body

application/json
sort_order
enum<string>
required

How Depict sorts the collection's unpinned products, within each boost/bury strength. BEST_SELLING: units sold in the last 30 days (BY_REVENUE: revenue). TRENDING: units sold in the last 7 days (BY_REVENUE: revenue). Unit ties on either break by 30-day revenue. CLICKS_DESC: clicks in the last 30 days. STOCK_DESC: total stock. CREATED: oldest first, CREATED_DESC: newest first, by the store's New in date (published or created, per dynamic status). PRICE*, ALPHA*: price, title. METAFIELD_ASC/DESC: the version's metafield_sort key. MANUAL: the saved order, never re-sorted, and boost/bury does not apply. MOST_RELEVANT: not a Depict sort. It comes from Shopify's relevance sort, which Depict cannot compute: Depict keeps the collection's existing order in Shopify and still applies boost/bury. After Depict's first write that existing order is the one Depict last wrote, so it stops following Shopify's relevance and earlier boosts and pins linger in it.

Available options:
ALPHA_ASC,
ALPHA_DESC,
BEST_SELLING,
BEST_SELLING_BY_REVENUE,
MOST_RELEVANT,
TRENDING,
TRENDING_BY_REVENUE,
CREATED,
CREATED_DESC,
PRICE_ASC,
PRICE_DESC,
STOCK_DESC,
CLICKS_DESC,
METAFIELD_ASC,
METAFIELD_DESC,
MANUAL
pinned_main_product_ids
string[]
required

Product ids pinned to the top, in order.

collection_boost_rules
object[]
required

A merchant-wide rule that moves matching products up (boost) or down (bury) in every automatically sorted collection. type selects how products match.

use_collection_specific_boost_bury
boolean
required
unpin_oos
boolean
required
version
string<uuid> | null
required

The version to save into; null creates a new version.

main
boolean
required

Make the saved version the published (main) one.

metafield_sort
object | null

Required exactly when sort_order is METAFIELD_ASC/METAFIELD_DESC.

active_attachment_ids
string<uuid>[] | null

Null/absent leaves the stored attachments unchanged.

tag_badges
string[]
collection_badges
string[]
metafield_badges
string[]
Pattern: ^[A-Za-z0-9_-]{1,255}\.[A-Za-z0-9_-]{1,64}$

Response

The saved version's UUID.

The response is of type string.