curl --request GET \
--url https://api.mercemur.com/api/v1/experiments \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mercemur.com/api/v1/experiments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.mercemur.com/api/v1/experiments"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.mercemur.com/api/v1/experiments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mercemur.com/api/v1/experiments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": [
{
"audience_id": "<string>",
"created_at": "<string>",
"ended_at": null,
"exclusion_group": "<string>",
"hypothesis": "<string>",
"id": "<string>",
"mode": "<string>",
"name": "<string>",
"primary_metric": "<string>",
"ramp_minutes": 123,
"started_at": "<string>",
"status": "<string>",
"traffic_bps": 123,
"type": "<string>",
"updated_at": "<string>",
"variants": [
{
"allocation_bps": 123,
"config": {},
"created_at": "<string>",
"id": "<string>",
"is_control": true,
"key": "<string>",
"name": "<string>"
}
]
}
],
"page": {
"has_more": true,
"next_cursor": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}List experiments
The store’s A/B tests, newest first, each with its ARMS. The variants are on the list as well as the detail read, because an experiment without them is a name: the arms are what say what the test actually changes. Draft and archived tests are included. Use ?status=running for the live ones. created_by is NOT published. It is the internal user id of the staff member who filed the test, and read_experiments is a grant over the optimize programme’s data rather than over the merchant’s staff directory. A price experiment’s variant config sets the amount a shopper is charged, either as an absolute per-currency price or as a signed basis-points delta applied to every variant of a product or a whole collection. It is readable here and writable nowhere on this API: no write_experiments scope exists to be minted.
curl --request GET \
--url https://api.mercemur.com/api/v1/experiments \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mercemur.com/api/v1/experiments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.mercemur.com/api/v1/experiments"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.mercemur.com/api/v1/experiments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mercemur.com/api/v1/experiments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": [
{
"audience_id": "<string>",
"created_at": "<string>",
"ended_at": null,
"exclusion_group": "<string>",
"hypothesis": "<string>",
"id": "<string>",
"mode": "<string>",
"name": "<string>",
"primary_metric": "<string>",
"ramp_minutes": 123,
"started_at": "<string>",
"status": "<string>",
"traffic_bps": 123,
"type": "<string>",
"updated_at": "<string>",
"variants": [
{
"allocation_bps": 123,
"config": {},
"created_at": "<string>",
"id": "<string>",
"is_control": true,
"key": "<string>",
"name": "<string>"
}
]
}
],
"page": {
"has_more": true,
"next_cursor": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}Authorizations
A secret API key. Publishable keys cannot reach this API. A key may carry an expiry, and an expired key is refused exactly like an unknown one, with a 401 that names no reason; check the key's expires_at in the dashboard rather than inferring it from a response. When a merchant rolls a key's secret they choose a grace window of up to 3 days, and for its duration BOTH the new secret and the one it replaced authenticate, so an integration moves over on its own deploy schedule instead of at the instant the button is pressed. Move before the window closes: after it, the old secret is refused. Nothing else about this contract moves with a roll. The key keeps its id and its scopes, so the only thing an integration updates is the credential itself.
Query Parameters
Only running experiments serve to shoppers. Omit it for every status: an archived test is what a historical result belongs to and a draft is what the merchant is about to launch, so an unfiltered list is the right default for a client syncing tests outward.
draft, running, paused, concluded, archived The lever a variant config targets. price is the one to watch: those variant configs set the amount a shopper is charged.
content, price, offer, shipping, checkout, combination test is a randomised A/B split measured against a control. personalization is an always-on targeted experience exempt from the holdback and the ramp, so its result snapshots carry no meaningful lift and a client reading lift should filter to test.
test, personalization Experiments touched at or after this RFC3339 instant. STATUS AND TRAFFIC SPLIT ARE THE RESOURCE here, and both move on a schedule nobody drives through this API: a ramp raises traffic_bps over time and a conclusion flips status on its own. If you are deciding how to split live traffic, that movement is the whole reason to read the list. Supplying it CHANGES THE ORDER of this endpoint: the default walk descends created_at, and this one climbs updated_at, which is the only ordering in which a keyset walk over a mutable column cannot skip a row. An experiment edited mid-walk moves forward past your position and is returned again, so the walk is AT LEAST ONCE. The bound is INCLUSIVE, so resuming from the newest updated_at you hold re-delivers the rows sharing that instant. A cursor belongs to ONE ordering and is refused by the other.
Rows per page. Out of range is a 400 rather than a silent clamp, so a client asking for more than 100 learns it did not get it.
1 <= x <= 100The next_cursor from the previous page. Opaque: decode nothing from it and construct nothing by hand, since its encoding is not part of this contract. Omit it to read the first page.