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

# How long an A/B test on this collection would need

> From the collection's visitors and click rate over the last 28 days: the days a test with the given split needs before a 10% relative difference in click rate becomes visible, with 80% power at a two-sided 5% level. Read-only.



## OpenAPI

````yaml /api-reference/openapi/lite.json get /collections/{collection_id}/ab-test-duration-estimate
openapi: 3.1.0
info:
  title: Search & Merchandising API
  version: 1.0.0
  description: >-
    REST API behind Depict: Search & Merchandising, the native Shopify app:
    onboarding, collections, boost & bury, dashboards, A/B testing and
    multi-store management. Endpoints are served under the /api/lite prefix and
    are authenticated with the Shopify session token that App Bridge issues to
    the embedded app.
servers:
  - url: /api/lite
security:
  - ShopifySessionToken: []
paths:
  /collections/{collection_id}/ab-test-duration-estimate:
    get:
      summary: How long an A/B test on this collection would need
      description: >-
        From the collection's visitors and click rate over the last 28 days: the
        days a test with the given split needs before a 10% relative difference
        in click rate becomes visible, with 80% power at a two-sided 5% level.
        Read-only.
      operationId: collectionAbTestDurationEstimate
      parameters:
        - schema:
            type: string
            description: Numeric Shopify collection id.
          required: true
          description: Numeric Shopify collection id.
          name: collection_id
          in: path
        - schema:
            type: string
            description: Lite merchant id, e.g. `shopify-<shop id>`.
          required: true
          description: Lite merchant id, e.g. `shopify-<shop id>`.
          name: merchant_id
          in: query
        - schema:
            type: integer
            minimum: 10
            maximum: 90
            default: 50
            description: Percent of traffic that would go to variant B.
          required: false
          description: Percent of traffic that would go to variant B.
          name: traffic_split
          in: query
        - schema:
            type: string
            description: >-
              Comma-separated Shopify market ids the test would run in; absent
              means every market. The traffic read is scoped to them.
          required: false
          description: >-
            Comma-separated Shopify market ids the test would run in; absent
            means every market. The traffic read is scoped to them.
          name: markets
          in: query
      responses:
        '200':
          description: The estimate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionVersionAbTestDurationEstimate'
        '401':
          description: Not authenticated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
        '403':
          description: Authenticated, but this identity may not call the API.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
        '404':
          description: Merchant not found for this caller.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
        '500':
          description: Internal error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
components:
  schemas:
    CollectionVersionAbTestDurationEstimate:
      type: object
      properties:
        traffic_read:
          type: boolean
          description: >-
            False when the traffic read failed: the counts below are then zeros
            that say nothing about the collection.
        visitors_last_28_days:
          type: integer
        click_rate:
          type:
            - number
            - 'null'
          description: >-
            Share of those visitors who clicked a product; null without
            visitors.
        detectable_lift:
          type: number
        days_to_detect:
          type:
            - integer
            - 'null'
          description: >-
            Whole days a test at this traffic and split needs before a
            `detectable_lift` difference in click rate shows, readiness floor
            included. Null when the last 28 days give no pace or no clicks.
        min_days:
          type: integer
        min_visitors_per_variant:
          type: integer
      required:
        - traffic_read
        - visitors_last_28_days
        - click_rate
        - detectable_lift
        - days_to_detect
        - min_days
        - min_visitors_per_variant
    Detail:
      type: object
      properties:
        detail:
          type: string
      required:
        - detail
      description: 'Every 4xx/5xx body: `{detail}`.'
  securitySchemes:
    ShopifySessionToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        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.

````

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