Preview a test
Moves a draft test into preview. On a test that is already in
preview, it returns 200 with a fresh set of preview URLs and
changes nothing.
The response carries test_group_preview_urls, one URL per test
group. Open one to see that test group’s changes on your storefront.
The link carries the assignment, so anyone you send it to sees the
same test group for their whole visit, and ordinary shoppers are
unaffected.
For a price test, the URLs open on the first product in the test.
Send {"resource": "<product-handle>"} to open them on a different
product instead. Any product handle on your store works, including
one the test doesn’t cover. Every other test type previews on your
storefront home page.
Preview runs the same checks as start, so a finding that blocks a
launch blocks the preview too. An error finding (a running theme
test, or a product already used by another test) returns the same
422 it would on start, and the test stays a draft.
A few older theme, template, and visual editor tests return 422
preview_unsupported, and the test stays a draft. Preview those
from the ABConvert admin instead. Every other operation works on
them as normal.
Authorizations
Bearer tokens created in the ABConvert admin under
Settings → MCP & API Access. Scopes:
read_experiments and write_experiments (write implies read; the
default is read). See
Authentication for which scope each
request needs.
Path Parameters
The test's numeric ID as a string, for example "3021".
^[0-9]+$"3021"
Body
Product handle to open the preview URLs on. Used by price tests; other types ignore it.
Response
The test in preview, with per-test-group preview URLs.
"experiment"The test's numeric ID as a string.
"3021"
What the test changes: product prices, shipping rates, the theme a
visitor sees, a page template, the URL a visitor lands on, checkout
delivery and payment methods, or a cart offer. visual_editor is a
storefront edit: custom CSS and JavaScript, which you can write here,
alongside DOM changes authored in the ABConvert visual editor.
combined bundles more than one change type in one test. See
CreatableExperimentType for the ones you can create here.
price, shipping, theme, template, url_redirect, checkout, offer, visual_editor, combined The test's current status. The ABConvert admin labels ended as
Closed; the wire value stays ended. Scheduling isn't a status: a
scheduled test is a draft or preview with a schedule.
draft, preview, active, paused, ended, failed, archived One preview link per test group. Each link uses the shop's preview key to assign the visitor to that test group.
The metric the test is judged on.
revenue_per_visitor, average_order_value, conversion_rate, profit_per_visitor, add_to_cart_rate, reached_checkout_rate "revenue_per_visitor"
Configuration shared by every test group in the test, keyed by
change type. Send exactly the key that matches the test's type. A
combined test carries one key per change type it bundles.
The window the scheduler runs the test in. Send at least one bound.
After launch, only end_at is editable.
Limits the test to visitors who match your filters. Without an
audience, every visitor is eligible. In PATCH, audience: null
turns targeting off.
Filter groups combine with AND: a visitor must match every filter group to enter the test. Filters inside one filter group combine with OR: one match is enough.
To require two filters at once, put each one in its own filter group. The example below enters visitors who are on mobile and new. Putting the same two filters in one filter group would enter visitors who are on mobile or new instead.
A test whose targeting you turn off in the ABConvert admin reads
back with no audience.
True when the test has force-assign rules, which you author in
the ABConvert admin. ABConvert evaluates them only for visitors
who already match audience, and applies the first rule whose
filters all match: that rule either puts the visitor in the test
group it names or keeps them out of the test, in place of the
random split.
Increments whenever visitors are reassigned to test groups, for example after a split change.
The product group attached to this test, or null. Its id is what
product_group_id takes on a custom result query. No
product-group endpoint exists, so read it here.
Present only with ?include=results_summary. Null when no
snapshot has been computed for the test yet.
Non-blocking findings. Absent when the request raised none.