Skip to main content
POST
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
variant_a_version_uuid
string
required
Minimum string length: 1
variant_b_version_uuid
string
required
Minimum string length: 1
scope_type
enum<string>
required
Available options:
all,
market_groups
traffic_split
integer
required

Percent of traffic routed to variant B.

Required range: 10 <= x <= 90
start_date
string<date-time>
required

ISO 8601; without an offset it is read as UTC.

end_date
string<date-time>
required

ISO 8601; without an offset it is read as UTC.

market_group_ids
string[]

Required (non-empty) when scope_type is market_groups.

name
string | null
Maximum string length: 80

Response

The created test.

test_id
string
required
collection_id
string
required
name
string
required
variant_a_version_uuid
string
required
variant_b_version_uuid
string
required
scope_type
enum<string>
required
Available options:
all,
market_groups
market_group_ids
string[]
required
applies_to_market_ids
string[]
required

The scope as sorted numeric Shopify market ids; two running tests on a collection never share one.

traffic_split
integer
required

Percent of traffic routed to variant B (10–90).

start_date
string<date-time>
required
end_date
string<date-time>
required
status
enum<string>
required
Available options:
running,
ended,
winner_promoted
promoted_variant
enum<string> | null
required
Available options:
A,
B,
null
promoted_market_group_ids
string[]
required

Market groups the winner was published in, global being the main slot. Empty when it went to its own slot only, or before this field existed.

ended_at
string<date-time> | null
required

When the test ended. Null while running, or if ended before this field existed.

variant_a_settings
object | null
required

The variant's rules when the test started, so the results stay explained after the version is edited. Null on older tests.

variant_b_settings
object | null
required

The variant's rules when the test started, so the results stay explained after the version is edited. Null on older tests.

treatment
enum<string>
required

order: arms differ in product order only. full: also in content blocks, duplicates and image settings.

Available options:
order,
full
created_at
string<date-time>
required
created_by_email
string
required

Always empty (the test is storefront-readable).