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

# Get Campaign Analytics

> Read the same imported-order campaign analytics as the application. Monetary totals are partitioned by currency. Optional analyticsWindow selects one campaign window; voucher utilisation limitations are explicit.

Requires promotions:read. API keys and delegated Computer credentials resolve organization scope without browser cookies; optional organizationId must match that scope.



## OpenAPI

````yaml /openapi.json get /api/v1/campaigns/{campaignId}/analytics
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.ai
    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: branding
    description: branding
    x-group: Branding
  - name: campaigns
    description: Campaign briefs, offer windows, and marketplace runs
    x-group: Campaigns
  - name: commerce
    description: commerce
    x-group: Commerce
  - name: developer-platform
    description: Authenticated developer platform APIs
    x-group: Developer Platform
  - name: documents
    description: Knowledge base document uploads
    x-group: Knowledge Base
  - name: inventory
    description: Inventory quantities, planning signals, and marketplace listing absence
    x-group: Inventory
  - 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: scripts
    description: scripts
    x-group: Scripts
  - name: settlements
    description: settlements
    x-group: Settlements
  - name: ucp
    description: Universal Commerce Protocol
    x-group: UCP
paths:
  /api/v1/campaigns/{campaignId}/analytics:
    get:
      tags:
        - campaigns
      summary: Get Campaign Analytics
      description: >-
        Read the same imported-order campaign analytics as the application.
        Monetary totals are partitioned by currency. Optional analyticsWindow
        selects one campaign window; voucher utilisation limitations are
        explicit.


        Requires promotions:read. API keys and delegated Computer credentials
        resolve organization scope without browser cookies; optional
        organizationId must match that scope.
      operationId: get_v1_campaigns_by_campaignid_analytics
      parameters:
        - name: campaignId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: organizationId
          in: query
          required: false
          schema:
            description: >-
              Required for session auth. Optional for an API key, which already
              identifies the organization.
            type: string
            minLength: 1
            maxLength: 120
        - name: analyticsWindow
          in: query
          required: false
          schema:
            type: string
            maxLength: 200
      responses:
        '200':
          description: >-
            Canonical operation result. Inspect aggregate and per-target success
            and marketplace delivery evidence.
          content:
            application/json:
              schema:
                type: object
                properties:
                  campaignId:
                    type: string
                  revision:
                    type: number
                  generatedAt:
                    type: string
                  timezone:
                    type: string
                  filters:
                    type: object
                    properties:
                      analyticsWindow:
                        type: string
                  scope:
                    type: string
                  windows:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        startsAt:
                          anyOf:
                            - type: string
                            - type: 'null'
                        endsAt:
                          anyOf:
                            - type: string
                            - type: 'null'
                      required:
                        - id
                        - name
                        - startsAt
                        - endsAt
                  incompleteWindowIds:
                    type: array
                    items:
                      type: string
                  totals:
                    type: array
                    items:
                      type: object
                      properties:
                        currency:
                          anyOf:
                            - type: string
                            - type: 'null'
                        sales:
                          anyOf:
                            - type: number
                            - type: 'null'
                        units:
                          type: number
                        orders:
                          type: number
                      required:
                        - currency
                        - sales
                        - units
                        - orders
                  units:
                    type: number
                  orders:
                    type: number
                  bucketSeconds:
                    type: number
                  trend:
                    type: array
                    items:
                      type: object
                      properties:
                        currency:
                          anyOf:
                            - type: string
                            - type: 'null'
                        sales:
                          anyOf:
                            - type: number
                            - type: 'null'
                        units:
                          type: number
                        orders:
                          type: number
                        at:
                          type: string
                      required:
                        - currency
                        - sales
                        - units
                        - orders
                        - at
                  skus:
                    type: array
                    items:
                      type: object
                      properties:
                        currency:
                          anyOf:
                            - type: string
                            - type: 'null'
                        sales:
                          anyOf:
                            - type: number
                            - type: 'null'
                        units:
                          type: number
                        orders:
                          type: number
                        productId:
                          anyOf:
                            - type: string
                            - type: 'null'
                        sku:
                          type: string
                        name:
                          type: string
                        marketplace:
                          type: string
                        storeId:
                          type: string
                      required:
                        - currency
                        - sales
                        - units
                        - orders
                        - productId
                        - sku
                        - name
                        - marketplace
                        - storeId
                  skuCount:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  inventory:
                    type: array
                    items:
                      type: object
                      properties:
                        productId:
                          type: string
                        sku:
                          type: string
                        name:
                          type: string
                        available:
                          anyOf:
                            - type: number
                            - type: 'null'
                      required:
                        - productId
                        - sku
                        - name
                        - available
                  inventoryCount:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  stores:
                    type: array
                    items:
                      type: object
                      properties:
                        marketplace:
                          type: string
                          enum:
                            - shopee
                            - lazada
                            - tiktok
                            - shopify
                            - whatsapp
                            - zalora
                            - amazon
                            - ebay
                        storeId:
                          type: string
                        country:
                          type: string
                        orderSales:
                          type: boolean
                        importedOrders:
                          type: number
                        latestOrderImportedAt:
                          anyOf:
                            - type: string
                            - type: 'null'
                        limitation:
                          type: string
                      required:
                        - marketplace
                        - storeId
                        - country
                        - orderSales
                        - importedOrders
                        - latestOrderImportedAt
                        - limitation
                  utilisation:
                    type: object
                    properties:
                      status:
                        type: string
                        const: unavailable
                      reason:
                        type: string
                    required:
                      - status
                      - reason
                required:
                  - campaignId
                  - revision
                  - generatedAt
                  - timezone
                  - filters
                  - scope
                  - windows
                  - incompleteWindowIds
                  - totals
                  - units
                  - orders
                  - bucketSeconds
                  - trend
                  - skus
                  - skuCount
                  - inventory
                  - inventoryCount
                  - stores
                  - utilisation
        '400':
          description: Invalid input or domain validation failed.
        '401':
          description: Missing or expired credentials.
        '403':
          description: >-
            Insufficient current organization, store, operation or OAuth
            permissions.
      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.