Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.abconvert.io/llms.txt

Use this file to discover all available pages before exploring further.

Preview — this page is an early draft. We’re still verifying the API reference against the current endpoints. Fields, response shapes, and examples may change before this section is marked stable. Follow PRO-1459 or ask in #abconvert-dev if you’re integrating against this today.
ABConvert provides a dedicated creation endpoint for each experiment type. This design lets each endpoint validate and process the parameters that make sense for that type. All creation endpoints are session endpoints and require Shopify authentication. The price experiment endpoints are the most complex because they involve Shopify variant management. The sections below document their request bodies in full. Other experiment types follow a similar pattern.

Price experiments

ABConvert offers two strategies for price testing, each with its own endpoint.

v1 — Duplicate variant strategy

Creates a price experiment by duplicating existing product variants and assigning the new price to the duplicate. Compatible with all Shopify plans.
POST /api/price-experiments/v1/create

Request body

name
string
required
A descriptive name for the experiment, shown in the ABConvert dashboard.
products
array
required
One or more products to enroll in the experiment.
testGroups
array
required
Traffic split configuration. Weights must sum to 100.
settings
object
Optional experiment settings such as start date, end date, and targeting rules.

Example request

curl -X POST "https://app.abconvert.io/api/price-experiments/v1/create" \
  -H "Authorization: Bearer <shopi...en>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Blue Shirt Price Test",
    "products": [
      {
        "productId": "7654321098765",
        "variants": [
          {
            "variantId": "43210987654321",
            "price": "24.99",
            "compareAtPrice": "39.99"
          }
        ]
      }
    ],
    "testGroups": [
      { "name": "Control", "weight": 50 },
      { "name": "Variant A", "weight": 50 }
    ],
    "settings": {
      "startDate": "2024-02-01T00:00:00.000Z"
    }
  }'

v2 — Cart transform strategy (Shopify Plus)

Creates a price experiment using Shopify Functions cart transforms to apply price changes at checkout. Requires Shopify Plus.
POST /api/price-experiments/v2/create

Request body

name
string
required
A descriptive name for the experiment.
products
array
required
Products to enroll. Same structure as v1 without variant-level pricing — the price change is computed from priceChangeType and priceChange.
priceChangeType
string
required
How to compute the price change. Either "PERCENTAGE" or "FIXED".
priceChange
number
required
The magnitude of the price change. For PERCENTAGE, provide a value like 10 for a 10% reduction. For FIXED, provide the monetary amount.
testGroups
array
required
Traffic split configuration — same structure as v1.

Example request

curl -X POST "https://app.abconvert.io/api/price-experiments/v2/create" \
  -H "Authorization: Bearer <shopi...en>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "10% Off Cart Transform Test",
    "products": [
      { "productId": "7654321098765" }
    ],
    "priceChangeType": "PERCENTAGE",
    "priceChange": 10,
    "testGroups": [
      { "name": "Control", "weight": 50 },
      { "name": "Variant A", "weight": 50 }
    ]
  }'
Cart transform experiments (v2) require Shopify Plus and an active cart-transformer Shopify Function extension. ABConvert handles function deployment automatically.

Other experiment types

Each experiment type below has its own creation endpoint. They all accept a name, testGroups, and settings field at minimum, plus type-specific parameters.
curl -X POST "https://app.abconvert.io/api/content-experiments/create" \
  -H "Authorization: Bearer <shopi...en>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Product Image A/B Test",
    "products": [{ "productId": "7654321098765" }],
    "testGroups": [
      { "name": "Control", "weight": 50 },
      { "name": "Variant A", "weight": 50 }
    ]
  }'

Creation endpoints reference

Experiment typeEndpoint
Price (duplicate variant)POST /api/price-experiments/v1/create
Price (cart transform, Plus)POST /api/price-experiments/v2/create
Content / imagePOST /api/content-experiments/create
Shipping ratePOST /api/shipping-experiments/create
URL redirectPOST /api/redirect-experiments/create
Page templatePOST /api/template-experiments/create
ThemePOST /api/theme-experiments/create
Checkout UIPOST /api/checkout-experiments/create

Responses

All creation endpoints return "success" on success, or a standard error envelope on failure.
"success"
{
  "status": "error",
  "message": "Product not found"
}