> ## Documentation Index
> Fetch the complete documentation index at: https://developers.redo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# postPurchaseAbTests

> The store's post-purchase A/B tests, newest first, at most 50 at a time. For older ones, pass the last `id` as `before`.

**Required scopes:** [`checkout_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-checkout_read)

## Arguments

**before** `ID`

Return tests created before this one.

**first** `Int`

How many to return, up to 50.

## Returns

**postPurchaseAbTests** `[\[PostPurchaseAbTest!\]!](/docs/api-reference/v3/reference/checkout/post-purchase-ab-test)` *required*

An A/B test in the post-purchase flow. Add one by publishing a flow with a split step; end one with `postPurchaseAbTestConclude`.

**fields**

**controlTreatment** `[PostPurchaseAbTestTreatment](/docs/api-reference/v3/reference/checkout/post-purchase-ab-test-treatment)`

The arm the others are measured against.

**fields**

**id** `ID!` *required*

The treatment's id.

**name** `String!` *required*

Its name.

**weight** `Int!` *required*

Its share of orders, as a percentage of the test.

**createdAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When it was created.

**description** `String`

What it tests.

**endedAt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

When it ended.

**id** `ID!` *required*

The test's id.

**locked** `Boolean!` *required*

Whether post-purchase is locked for the store, which refuses writes.

**name** `String!` *required*

Its name.

**startedAt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

When it started.

**status** `[PostPurchaseAbTestStatus!](/docs/api-reference/v3/reference/checkout/post-purchase-ab-test-status)` *required*

Where it is in its life.

**treatments** `[\[PostPurchaseAbTestTreatment!\]!](/docs/api-reference/v3/reference/checkout/post-purchase-ab-test-treatment)` *required*

Its arms.

**fields**

**id** `ID!` *required*

The treatment's id.

**name** `String!` *required*

Its name.

**weight** `Int!` *required*

Its share of orders, as a percentage of the test.

**winningTreatment** `[PostPurchaseAbTestTreatment](/docs/api-reference/v3/reference/checkout/post-purchase-ab-test-treatment)`

The arm it concluded with.

**fields**

**id** `ID!` *required*

The treatment's id.

**name** `String!` *required*

Its name.

**weight** `Int!` *required*

Its share of orders, as a percentage of the test.

## Example

```graphql theme={null}
query {
  postPurchaseAbTests(before: "...", first: 10) {
    createdAt
    description
    endedAt
    id
    locked
    name
    startedAt
    status
    # ...
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.