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

# Get Traffic Analytics

> Impressions, page views, visitors, add-to-cart, and conversion, with the funnel, a daily trend, products ranked by lost conversion, diagnostics, and the videos that drive traffic. Matches the Traffic page. Requires `analytics:read`.

Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.



## OpenAPI

````yaml /openapi.json get /api/v1/analytics/traffic
openapi: 3.1.0
info:
  title: OmniCommerce API
  version: 1.0.0
  license:
    name: Proprietary
    url: https://omnicommerce.sg/terms
  description: >-
    OmniCommerce API surface for agents and developer integrations. Includes
    public endpoints (merchant discovery, product search, compare, catalog, ACO
    retrieval) and authenticated endpoints (product management via API key
    Bearer tokens).
servers:
  - url: https://omnicommerce.sg
    description: Production
  - url: http://localhost:3000
    description: Local development
security: []
tags:
  - name: agentic-checkout
    description: Merchant-fulfilled agentic checkout
    x-group: Agentic Checkout
  - name: agents
    description: agents
    x-group: Agents
  - name: analytics
    description: Sales performance across marketplaces
    x-group: Analytics
  - name: aops
    description: Agent operating procedures
    x-group: AOPs
  - name: campaigns
    description: Campaign briefs, offer windows, and marketplace runs
    x-group: Campaigns
  - name: developer-platform
    description: Authenticated developer platform APIs
    x-group: Developer Platform
  - name: looks
    description: AI-styled product looks
    x-group: Looks
  - name: oauth
    description: OAuth token endpoints
    x-group: OAuth
  - name: orders
    description: Workspace and agentic orders
    x-group: Orders
  - name: organizations
    description: Organization management
    x-group: Organizations
  - name: price-books
    description: Marketplace list-price markup rules
    x-group: Price Books
  - name: products
    description: Product CRUD, bulk import, enrichment, publish, and delist
    x-group: Products
  - name: promotions
    description: Central promotions and marketplace sync
    x-group: Promotions
  - name: public-agent
    description: Public agent discovery and catalog APIs
    x-group: Public Agent
  - name: returns
    description: returns
    x-group: Returns
  - name: reviews
    description: Marketplace product reviews and seller replies
    x-group: Reviews
  - name: settlements
    description: settlements
    x-group: Settlements
  - name: ucp
    description: Universal Commerce Protocol
    x-group: UCP
paths:
  /api/v1/analytics/traffic:
    get:
      tags:
        - analytics
      summary: Get Traffic Analytics
      description: >-
        Impressions, page views, visitors, add-to-cart, and conversion, with the
        funnel, a daily trend, products ranked by lost conversion, diagnostics,
        and the videos that drive traffic. Matches the Traffic page. Requires
        `analytics:read`.


        Amounts are in `data.filters.currency`. Only orders in that currency are
        counted; nothing is converted. A range covers at most 366 days.
      operationId: get_v1_analytics_traffic
      parameters:
        - name: organizationId
          in: query
          required: false
          description: >-
            Required for session auth. API keys already belong to one
            organization.
          schema:
            type: string
            maxLength: 160
        - name: from
          in: query
          required: false
          description: >-
            First day of the range (YYYY-MM-DD). Defaults to 29 days before
            `to`.
          schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
        - name: to
          in: query
          required: false
          description: Last day of the range, inclusive (YYYY-MM-DD). Defaults to today.
          schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
        - name: timeZone
          in: query
          required: false
          description: >-
            IANA time zone that defines each day, for example
            `Asia/Kuala_Lumpur`. Defaults to Asia/Singapore.
          schema:
            type: string
            maxLength: 80
        - name: marketplace
          in: query
          required: false
          description: Comma-separated marketplaces, for example `shopee,lazada`.
          schema:
            type: string
            maxLength: 200
        - name: country
          in: query
          required: false
          description: Comma-separated countries. One country selects its currency.
          schema:
            type: string
            maxLength: 200
        - name: store
          in: query
          required: false
          description: >-
            Comma-separated store (account) ids from `GET
            /api/v1/marketplaces/connected`.
          schema:
            type: string
            maxLength: 1000
        - name: currency
          in: query
          required: false
          description: >-
            ISO currency. Only orders in this currency are counted; amounts are
            not converted. Defaults to the single country's currency, otherwise
            SGD.
          schema:
            type: string
            maxLength: 3
      responses:
        '200':
          description: Get Traffic Analytics
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  apiVersion:
                    type: string
                    const: developer_v1
                  operationId:
                    type: string
                  status:
                    type: string
                    enum:
                      - accepted
                      - completed
                      - failed
                  jobId:
                    type: string
                  productId:
                    type: string
                  warnings:
                    type: array
                    items:
                      type: string
                  recommendations:
                    type: array
                    items:
                      type: string
                  links:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties:
                      type: string
                  data:
                    type: object
                    properties:
                      filters:
                        type: object
                        properties:
                          from:
                            type: string
                          to:
                            type: string
                          marketplace:
                            type: string
                          country:
                            type: string
                          store:
                            type: string
                          currency:
                            type: string
                            description: Currency of every amount in the response.
                          timeZone:
                            type: string
                        required:
                          - from
                          - to
                          - marketplace
                          - country
                          - store
                          - currency
                          - timeZone
                      previousFrom:
                        type: string
                      previousTo:
                        type: string
                      kpis:
                        type: object
                        properties:
                          impressions:
                            anyOf:
                              - type: number
                              - type: 'null'
                          impressionsChangePercent:
                            anyOf:
                              - type: number
                              - type: 'null'
                            description: >-
                              Change against the previous period of equal
                              length. Null without a baseline.
                          pageviews:
                            anyOf:
                              - type: number
                              - type: 'null'
                          pageviewsChangePercent:
                            anyOf:
                              - type: number
                              - type: 'null'
                            description: >-
                              Change against the previous period of equal
                              length. Null without a baseline.
                          visitors:
                            anyOf:
                              - type: number
                              - type: 'null'
                          visitorsChangePercent:
                            anyOf:
                              - type: number
                              - type: 'null'
                            description: >-
                              Change against the previous period of equal
                              length. Null without a baseline.
                          clicks:
                            anyOf:
                              - type: number
                              - type: 'null'
                          atcUsers:
                            anyOf:
                              - type: number
                              - type: 'null'
                            description: Visitors who added to cart.
                          atcUsersChangePercent:
                            anyOf:
                              - type: number
                              - type: 'null'
                            description: >-
                              Change against the previous period of equal
                              length. Null without a baseline.
                          orders:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          ordersChangePercent:
                            anyOf:
                              - type: number
                              - type: 'null'
                            description: >-
                              Change against the previous period of equal
                              length. Null without a baseline.
                          netSales:
                            type: number
                          ctr:
                            anyOf:
                              - type: number
                              - type: 'null'
                          viewToOrderCvr:
                            anyOf:
                              - type: number
                              - type: 'null'
                          viewToOrderCvrChangePercent:
                            anyOf:
                              - type: number
                              - type: 'null'
                            description: >-
                              Change against the previous period of equal
                              length. Null without a baseline.
                          visitToAtc:
                            anyOf:
                              - type: number
                              - type: 'null'
                          revenuePerVisitor:
                            anyOf:
                              - type: number
                              - type: 'null'
                          paidTrafficShare:
                            anyOf:
                              - type: number
                              - type: 'null'
                            description: Share of traffic from ads, 0 to 1.
                          funnelMode:
                            description: >-
                              `click` when unique visitors are unavailable and
                              conversion uses clicks or page views.
                            type: string
                            enum:
                              - visit
                              - click
                          cvrDenominatorLabel:
                            type: string
                        required:
                          - impressions
                          - impressionsChangePercent
                          - pageviews
                          - pageviewsChangePercent
                          - visitors
                          - visitorsChangePercent
                          - clicks
                          - atcUsers
                          - atcUsersChangePercent
                          - orders
                          - ordersChangePercent
                          - netSales
                          - ctr
                          - viewToOrderCvr
                          - viewToOrderCvrChangePercent
                          - visitToAtc
                          - revenuePerVisitor
                          - paidTrafficShare
                      funnel:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            label:
                              type: string
                            value:
                              anyOf:
                                - type: number
                                - type: 'null'
                            covered:
                              type: boolean
                            rateFromPrevious:
                              anyOf:
                                - type: number
                                - type: 'null'
                            rateLabel:
                              anyOf:
                                - type: string
                                - type: 'null'
                          required:
                            - id
                            - label
                            - value
                            - covered
                        description: Page views, visitors, potential buyers, buyers.
                      dailyTrend:
                        type: array
                        items:
                          type: object
                          properties:
                            date:
                              type: string
                            impressions:
                              type: number
                            pageviews:
                              type: number
                            visitors:
                              type: number
                            atcUsers:
                              type: number
                            clicks:
                              type: number
                            orders:
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                          required:
                            - date
                            - impressions
                            - pageviews
                            - visitors
                            - atcUsers
                            - clicks
                            - orders
                      products:
                        type: array
                        items:
                          type: object
                          properties:
                            productId:
                              anyOf:
                                - type: string
                                - type: 'null'
                            variantId:
                              anyOf:
                                - type: string
                                - type: 'null'
                            productName:
                              type: string
                            platform:
                              anyOf:
                                - type: string
                                - type: 'null'
                            externalProductId:
                              anyOf:
                                - type: string
                                - type: 'null'
                            sku:
                              anyOf:
                                - type: string
                                - type: 'null'
                            thumbnailUrl:
                              anyOf:
                                - type: string
                                - type: 'null'
                            impressions:
                              type: number
                            pageviews:
                              type: number
                            visitors:
                              type: number
                            clicks:
                              type: number
                            atcUsers:
                              type: number
                            orders:
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            netSales:
                              type: number
                            ctr:
                              anyOf:
                                - type: number
                                - type: 'null'
                            viewToOrderCvr:
                              anyOf:
                                - type: number
                                - type: 'null'
                            visitToAtc:
                              anyOf:
                                - type: number
                                - type: 'null'
                            viewToOrder:
                              anyOf:
                                - type: number
                                - type: 'null'
                            netSalesPerVisitor:
                              anyOf:
                                - type: number
                                - type: 'null'
                            diagnosis:
                              type: string
                            opportunityScore:
                              type: number
                              description: Higher means fix first.
                            leak:
                              type: string
                              enum:
                                - high_traffic_low_cvr
                                - zero_orders
                                - healthy
                                - no_traffic
                          required:
                            - productId
                            - variantId
                            - productName
                            - platform
                            - externalProductId
                            - sku
                            - thumbnailUrl
                            - impressions
                            - pageviews
                            - visitors
                            - clicks
                            - atcUsers
                            - orders
                            - netSales
                            - ctr
                            - viewToOrderCvr
                            - visitToAtc
                            - viewToOrder
                            - netSalesPerVisitor
                            - diagnosis
                            - opportunityScore
                            - leak
                      diagnostics:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            severity:
                              type: string
                              enum:
                                - info
                                - warn
                                - critical
                                - opportunity
                            title:
                              type: string
                            summary:
                              type: string
                            metricLabel:
                              type: string
                            metricValue:
                              type: string
                          required:
                            - id
                            - severity
                            - title
                            - summary
                            - metricLabel
                            - metricValue
                      contentDrivers:
                        type: array
                        items:
                          type: object
                          properties:
                            externalContentId:
                              anyOf:
                                - type: string
                                - type: 'null'
                            contentType:
                              type: string
                            title:
                              type: string
                            platform:
                              anyOf:
                                - type: string
                                - type: 'null'
                            productId:
                              anyOf:
                                - type: string
                                - type: 'null'
                            externalProductId:
                              anyOf:
                                - type: string
                                - type: 'null'
                            productName:
                              anyOf:
                                - type: string
                                - type: 'null'
                            productThumbnailUrl:
                              anyOf:
                                - type: string
                                - type: 'null'
                            views:
                              type: number
                            productClicks:
                              type: number
                            orders:
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            gmv:
                              type: number
                            clickRate:
                              anyOf:
                                - type: number
                                - type: 'null'
                            orderRate:
                              anyOf:
                                - type: number
                                - type: 'null'
                          required:
                            - externalContentId
                            - contentType
                            - title
                            - platform
                            - productId
                            - externalProductId
                            - productName
                            - productThumbnailUrl
                            - views
                            - productClicks
                            - orders
                            - gmv
                            - clickRate
                            - orderRate
                      leakCount:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      coverage:
                        type: object
                        properties:
                          sales:
                            type: boolean
                          traffic:
                            type: boolean
                          ads:
                            type: boolean
                          content:
                            type: boolean
                          inventory:
                            type: boolean
                          profit:
                            type: boolean
                          market:
                            type: boolean
                        required:
                          - sales
                          - traffic
                          - ads
                          - content
                          - inventory
                          - profit
                          - market
                        description: Which data sources have data for this range.
                    required:
                      - filters
                      - previousFrom
                      - previousTo
                      - kpis
                      - funnel
                      - dailyTrend
                      - products
                      - diagnostics
                      - contentDrivers
                      - leakCount
                      - coverage
                required:
                  - ok
                  - apiVersion
                  - operationId
                  - status
                  - warnings
                  - recommendations
                  - links
                  - data
        '400':
          description: Invalid request
        '401':
          description: Unauthorized
        '403':
          description: Missing the `analytics:read` scope
        '429':
          description: Rate limit exceeded
        '500':
          description: Internal Server Error
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        Bearer API key for server-to-server access. Session auth is also
        supported in first-party UI flows.

````

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