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

# Price index for a specific retailer over time

> Compute a normalized price index (retailer avg / category avg) for a specific retailer day-by-day versus its category baseline. Points report insufficient_sample below sample_threshold products plus stable_avg_price over the products priced every day — read trends from the stable series.



## OpenAPI

````yaml https://api.syntalic.com/openapi.json get /v1/analyst/retailer-index
openapi: 3.1.0
info:
  title: 'Syntalic — Data Analytics for Agentic Commerce '
  version: 1.0.0
  contact:
    name: Syntalic
    email: support@syntalic.com
    url: https://syntalic.com
  description: >-
    Competitive pricing data across US and Canadian e-commerce retailers
    (Amazon, Walmart, Target, Best Buy, Home Depot, etc.). Serves price
    comparisons, deal alerts, brand tracking, promotional intelligence, and
    market analytics to AI agents via x402 and MPP micropayments.
  x-guidance: >-
    This API has three endpoint groups organized by use case:


    **Shopper endpoints** ($0.01/query): Use these for price comparisons and
    deal hunting. Start with /v1/shopper/best-price?q=<product> to find the
    cheapest option across retailers. Use
    /v1/shopper/deal-finder?category=<category> to find discounted products. Use
    /v1/shopper/price-drop-alert?q=<product> to check for recent price drops.


    **Marketing endpoints** ($0.01/query): Use these for competitive analysis.
    /v1/marketing/competitive-landscape?category=<category> shows all products
    in a category with pricing. /v1/marketing/brand-tracker?brand=<brand> tracks
    a brand's pricing over time.
    /v1/marketing/share-of-shelf?category=<category> shows brand market share.


    **Analyst endpoints** ($0.02/query): Use these for market-level insights.
    /v1/analyst/inflation?category=<category> shows price trends over time.
    /v1/analyst/price-dispersion?category=<category> shows price spread across
    retailers.


    All endpoints accept an optional 'country' parameter (us or ca, defaults to
    us). Query parameters use 'q' for free-text search and 'category' for
    category-level queries.


    Marketing and analyst responses carry a `meta` block (served_from,
    freshness_seconds, schema_version) for staleness budgeting and a `resolved`
    block describing how the category input was matched against the taxonomy.
    Every response also sends an X-Data-Freshness-Hours header.


    **Free pre-payment rejection:** requests that cannot be served are rejected
    BEFORE any payment challenge — invalid params (400 INVALID_PARAMS),
    retailers that are not serving-eligible (404 RETAILER_NOT_SERVING_ELIGIBLE,
    with the catalog quality status and the serving_eligible_retailers list in
    error.details), and shopper queries that resolve to nothing in the catalog
    (404 NO_RESULTS). You only pay when the API can actually execute your query.
    Retailer values are case-insensitive (amazon == Amazon).
servers:
  - url: https://api.syntalic.com
security: []
paths:
  /v1/analyst/retailer-index:
    get:
      tags:
        - Analyst
      summary: Price index for a specific retailer over time
      description: >-
        Compute a normalized price index (retailer avg / category avg) for a
        specific retailer day-by-day versus its category baseline. Points report
        insufficient_sample below sample_threshold products plus
        stable_avg_price over the products priced every day — read trends from
        the stable series.
      operationId: getRetailerIndex
      parameters:
        - name: retailer
          in: query
          required: true
          schema:
            type: string
          description: Retailer platform key (e.g., amazon, walmart)
          example: amazon
        - name: country
          in: query
          required: false
          schema:
            type: string
            enum:
              - us
              - ca
            default: us
          description: Country (us or ca)
          example: us
        - name: category
          in: query
          required: false
          schema:
            type: string
            minLength: 1
          description: >-
            Product category in the Shopify product taxonomy. Accepts a display
            path (e.g. 'Electronics > Computers > Laptops'), its slug form (e.g.
            'electronics/computers/laptops'), a single path segment (e.g.
            'laptops', 'headphones'), or an everyday shelf name (e.g. 'apparel',
            'beauty', 'grocery'); matched against the catalog's category tree
            (exact node, subtree, or whole path segment). Also accepts a GS1 GPC
            code (exactly 8 digits, e.g. '10001159') to filter by PRODUCT TYPE
            instead of by shelf placement — the same product type is shelved
            under different categories by different retailers, so a category
            filter answers from a fraction of the data while a GPC code spans
            them. Coarser codes (class/family/segment) match every brick beneath
            them. Resolve a phrase to a code with /v1/reference/classify?q=... ;
            when a code is used, resolved.match_source is 'gpc'. For analyst
            endpoints, supply either `category` or `department`; both may be
            supplied to narrow the scope.
          example: electronics
        - name: department
          in: query
          required: false
          schema:
            type: string
            minLength: 1
          description: >-
            Top-level department (root category), e.g. 'Electronics', 'Beauty',
            'Home & Kitchen'. Case-insensitive; matched against the category
            tree's root segment. For analyst endpoints, supply either `category`
            or `department`; both may be supplied to narrow the scope.
          example: Electronics
        - name: time_window
          in: query
          required: false
          schema:
            type: string
            enum:
              - last_30_days
              - last_60_days
              - last_90_days
              - month_to_date
              - previous_month
              - month_over_month
              - quarter_to_date
              - custom
          description: >-
            Historical window preset. Explicit `from`/`to` takes precedence and
            is reported as `custom`; `time_window=custom` requires both `from`
            and `to`. Date-only ranges use UTC calendar boundaries with
            inclusive `from` and exclusive `to`.
          example: last_60_days
        - name: from
          in: query
          required: false
          schema:
            type: string
            format: date
          description: Start date (ISO 8601, defaults to 30 days ago)
          example: '2026-05-01'
        - name: to
          in: query
          required: false
          schema:
            type: string
            format: date
          description: End date (ISO 8601, defaults to now)
          example: '2026-06-01'
      responses:
        '200':
          description: Retailer index data
          content:
            application/json:
              schema:
                type: object
                properties:
                  retailer:
                    type: string
                  category:
                    type: string
                  department:
                    type: string
                    nullable: true
                  country:
                    type: string
                  currency:
                    type: string
                  window:
                    type: object
                    properties:
                      preset:
                        type: string
                      from:
                        type: string
                        format: date
                      to:
                        type: string
                        format: date
                      granularity:
                        type: string
                        nullable: true
                      comparison_from:
                        type: string
                        format: date
                        nullable: true
                      comparison_to:
                        type: string
                        format: date
                        nullable: true
                      timezone:
                        type: string
                        example: UTC
                    additionalProperties: true
                  sample_threshold:
                    type: integer
                  insufficient_sample_points:
                    type: integer
                  insufficient_sample:
                    type: boolean
                    description: >-
                      True when any series point has a basket below
                      sample_threshold.
                  stable_basket_size:
                    type: integer
                    nullable: true
                    description: >-
                      Products priced in every period of the series (the basis
                      of stable_avg_price). Null for single-point series.
                  time_series:
                    type: array
                    items:
                      type: object
                      properties:
                        date:
                          type: string
                          format: date
                        period:
                          type: string
                        avg_price:
                          type: number
                          nullable: true
                        min_price:
                          type: number
                          nullable: true
                        max_price:
                          type: number
                          nullable: true
                        median_price:
                          type: number
                          nullable: true
                        product_count:
                          type: integer
                        observation_count:
                          type: integer
                        change_pct:
                          type: number
                          nullable: true
                        matched_basket_size:
                          type: integer
                        method:
                          type: string
                          nullable: true
                        in_stock_count:
                          type: integer
                        promo_count:
                          type: integer
                        retailer_avg_price:
                          type: number
                          nullable: true
                        category_avg_price:
                          type: number
                          nullable: true
                        price_index:
                          type: number
                          nullable: true
                        stable_avg_price:
                          type: number
                          nullable: true
                          description: >-
                            Average over only the stable basket (products priced
                            in EVERY period of the series) — immune to
                            basket-composition shifts. Null when no product
                            spans the whole series.
                        insufficient_sample:
                          type: boolean
                          description: >-
                            True when product_count is below sample_threshold —
                            treat the point as anecdote, not trend.
                        sample_threshold:
                          type: integer
                      additionalProperties: true
                  resolved:
                    type: object
                    properties:
                      input:
                        type: string
                      category_path:
                        type: string
                        nullable: true
                      department:
                        type: string
                        nullable: true
                      match_source:
                        type: string
                        nullable: true
                      match_confidence:
                        type: number
                        nullable: true
                      alternates:
                        type: array
                        items:
                          type: object
                          additionalProperties: true
                    additionalProperties: true
                  meta:
                    type: object
                    properties:
                      served_from:
                        type: string
                      freshness_seconds:
                        type: number
                      schema_version:
                        type: string
                      computed_at:
                        type: string
                        format: date-time
                      price_observed_at_min:
                        type: string
                        format: date-time
                        nullable: true
                      price_observed_at_max:
                        type: string
                        format: date-time
                        nullable: true
                    additionalProperties: true
        '400':
          description: >-
            Invalid query parameters or unsupported enum values. Rejected by
            preflight BEFORE the payment challenge — no payment is requested or
            charged for malformed requests.
          content:
            application/problem+json:
              schema:
                type: object
                required:
                  - type
                  - title
                  - status
                properties:
                  type:
                    type: string
                    format: uri-reference
                  title:
                    type: string
                    example: Bad Request
                  status:
                    type: integer
                    const: 400
                  detail:
                    type: string
                  instance:
                    type: string
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties: true
                    additionalProperties: true
                additionalProperties: true
        '402':
          description: Payment challenge required before executing paid work
          content:
            application/problem+json:
              schema:
                type: object
                required:
                  - type
                  - title
                  - status
                properties:
                  type:
                    type: string
                    format: uri-reference
                  title:
                    type: string
                    example: Payment Required
                  status:
                    type: integer
                    const: 402
                  detail:
                    type: string
                  instance:
                    type: string
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties: true
                    additionalProperties: true
                additionalProperties: true
        '404':
          description: >-
            No matching result. error.code distinguishes the cases: NO_RESULTS
            (the query resolves to nothing in the catalog),
            RETAILER_NOT_SERVING_ELIGIBLE (the requested retailer exists but is
            not serving-eligible — error.details carries its catalog
            quality_status and the serving_eligible_retailers list to retry
            against), or NOT_PUBLISHED (a social rollup the current publish run
            does not compute yet — a gap in what we publish, not a finding about
            the category). Structurally-unservable requests are rejected by
            preflight before any payment challenge.
          content:
            application/problem+json:
              schema:
                type: object
                required:
                  - type
                  - title
                  - status
                properties:
                  type:
                    type: string
                    format: uri-reference
                  title:
                    type: string
                    example: Not Found
                  status:
                    type: integer
                    const: 404
                  detail:
                    type: string
                  instance:
                    type: string
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties: true
                    additionalProperties: true
                additionalProperties: true
        '429':
          description: Rate limit exceeded
          content:
            application/problem+json:
              schema:
                type: object
                required:
                  - type
                  - title
                  - status
                properties:
                  type:
                    type: string
                    format: uri-reference
                  title:
                    type: string
                    example: Too Many Requests
                  status:
                    type: integer
                    const: 429
                  detail:
                    type: string
                  instance:
                    type: string
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties: true
                    additionalProperties: true
                additionalProperties: true
        '500':
          description: Unexpected server error
          content:
            application/problem+json:
              schema:
                type: object
                required:
                  - type
                  - title
                  - status
                properties:
                  type:
                    type: string
                    format: uri-reference
                  title:
                    type: string
                    example: Internal Server Error
                  status:
                    type: integer
                    const: 500
                  detail:
                    type: string
                  instance:
                    type: string
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties: true
                    additionalProperties: true
                additionalProperties: true

````

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