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

# Get storefront reporting

> Get reporting metrics for every media buy the Merchandising Agent participates in through the Storefront inventory sources. The Storefront does not own the underlying media buys; reporting is visible because the Merchandising Agent is the ADCP party to those transactions. Hierarchy: advertiser → media buy → package (no campaign level).



## OpenAPI

````yaml /v2/storefront-api-v2.yaml get /reporting/metrics
openapi: 3.0.0
info:
  title: Scope3 Storefront API
  version: 2.0.0
  description: |-
    REST API for partners to manage storefronts, inventory sources, and billing.

    ## Authentication

    All endpoints require a Bearer token in the Authorization header:
    ```
    Authorization: Bearer your-api-key
    ```

    ## Base URL

    `https://api.interchange.io/api/v2/storefront`

    ## For AI Agents

    AI agents can use the MCP endpoint at `/mcp/v2/storefront` with three tools:
    - `initialize`: Start an MCP session
    - `api_call`: Make REST API calls
    - `ask_about_capability`: Learn about API features
servers:
  - url: https://api.interchange.io/api/v2/storefront
    description: Production server
security: []
tags:
  - name: Account
    description: Account management, service tokens, and preferences
  - name: Storefront
    description: Manage storefront and inventory sources
  - name: Storefront Agents
    description: List and manage registered sales, signals, and outcomes agents
  - name: Storefront Activity
    description: Audit log of configuration and inventory changes on the storefront
  - name: Storefront Billing
    description: Payout bank details and billing configuration for storefronts
  - name: AI Usage
    description: Storefront AI token usage visibility by model
  - name: MCP
    description: Model Context Protocol endpoints
paths:
  /reporting/metrics:
    get:
      tags:
        - Reporting
      summary: Get storefront reporting
      description: >-
        Get reporting metrics for every media buy the Merchandising Agent
        participates in through the Storefront inventory sources. The Storefront
        does not own the underlying media buys; reporting is visible because the
        Merchandising Agent is the ADCP party to those transactions. Hierarchy:
        advertiser → media buy → package (no campaign level).
      operationId: getStorefrontReportingMetrics
      parameters:
        - in: query
          name: inventorySourceId
          schema:
            description: >-
              Filter to media buys flowing through a single inventory source
              (storefront_inventory_source.source_id). When omitted, includes
              every inventory source on the storefront.
            type: string
          description: >-
            Filter to media buys flowing through a single inventory source
            (storefront_inventory_source.source_id). When omitted, includes
            every inventory source on the storefront.
        - in: query
          name: startDate
          schema:
            description: Start date in ISO format (YYYY-MM-DD)
            example: '2026-01-01'
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
          description: Start date in ISO format (YYYY-MM-DD)
        - in: query
          name: endDate
          schema:
            description: End date in ISO format (YYYY-MM-DD)
            example: '2026-01-31'
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
          description: End date in ISO format (YYYY-MM-DD)
        - in: query
          name: days
          schema:
            description: 'Number of days to include (default: 7, min: 1, max: 90).'
            example: 7
            default: 7
            type: integer
            minimum: 1
            maximum: 90
          description: 'Number of days to include (default: 7, min: 1, max: 90).'
        - in: query
          name: view
          schema:
            description: >-
              Response format: "summary" for hierarchical
              advertiser/media-buy/package breakdown, "timeseries" for flat
              per-day rows.
            default: summary
            type: string
            enum:
              - summary
              - timeseries
          description: >-
            Response format: "summary" for hierarchical
            advertiser/media-buy/package breakdown, "timeseries" for flat
            per-day rows.
        - in: query
          name: download
          schema:
            description: >-
              When true, generates a CSV file and returns a signed download URL
              instead of JSON data
            default: false
            type: boolean
          description: >-
            When true, generates a CSV file and returns a signed download URL
            instead of JSON data
        - in: query
          name: demo
          schema:
            description: >-
              When true, returns auto-generated demo data instead of querying
              real data sources
            default: false
            type: boolean
          description: >-
            When true, returns auto-generated demo data instead of querying real
            data sources
      responses:
        '200':
          description: Get storefront reporting
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StorefrontReportingMetricsResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    StorefrontReportingMetricsResponse:
      description: >-
        Hierarchical storefront reporting response: advertiser → media buy →
        package
      type: object
      properties:
        advertisers:
          description: Advertiser-level reporting data
          type: array
          items:
            $ref: '#/components/schemas/StorefrontAdvertiserReporting'
        totals:
          description: Aggregated totals across all advertisers
          allOf:
            - $ref: '#/components/schemas/ReportingMetrics'
        periodStart:
          description: Start of the reporting period (YYYY-MM-DD)
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}$
        periodEnd:
          description: End of the reporting period (YYYY-MM-DD)
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}$
      required:
        - advertisers
        - totals
        - periodStart
        - periodEnd
      additionalProperties: false
    ErrorResponse:
      description: Standard error response
      type: object
      properties:
        data:
          type: string
          nullable: true
          enum:
            - null
        error:
          $ref: '#/components/schemas/ApiError'
      required:
        - data
        - error
      additionalProperties: false
    StorefrontAdvertiserReporting:
      description: >-
        Advertiser-level reporting metrics with media buy breakdown (no campaign
        level)
      type: object
      properties:
        advertiserId:
          description: Advertiser identifier
          type: string
        advertiserName:
          description: Advertiser name
          type: string
        metrics:
          $ref: '#/components/schemas/ReportingMetrics'
        mediaBuys:
          description: Media buy-level breakdown
          type: array
          items:
            $ref: '#/components/schemas/StorefrontMediaBuyReporting'
      required:
        - advertiserId
        - advertiserName
        - metrics
        - mediaBuys
      additionalProperties: false
    ReportingMetrics:
      description: Raw and calculated reporting metrics
      type: object
      properties:
        impressions:
          description: Total impressions
          type: integer
          minimum: 0
          maximum: 9007199254740991
        spend:
          description: >-
            Total spend, denominated in the advertiser's primary currency (every
            campaign and buy is stamped in that currency; USD only for USD
            advertisers). On BUYER surfaces spend is GROSS (fee-inclusive):
            seller-reported net delivered spend is grossed up at read time at
            each buy's own pinned terms (a buy without pinned terms reports net
            as stored). On STOREFRONT surfaces spend stays NET as the seller
            reported it.
          type: number
          minimum: 0
        clicks:
          description: Total clicks
          type: integer
          minimum: 0
          maximum: 9007199254740991
        views:
          description: >-
            Viewable impressions (the MRC-viewable subset of impressions, per
            AdCP). For viewability rate, divide by impressions.
          type: integer
          minimum: 0
          maximum: 9007199254740991
        completedViews:
          description: >-
            Video/audio completions (qualified by view_duration_seconds when set
            on the goal)
          type: integer
          minimum: 0
          maximum: 9007199254740991
        conversions:
          description: Total conversions
          type: integer
          minimum: 0
          maximum: 9007199254740991
        leads:
          description: Total leads
          type: integer
          minimum: 0
          maximum: 9007199254740991
        videoCompletions:
          description: Total video completions
          type: integer
          minimum: 0
          maximum: 9007199254740991
        ecpm:
          description: >-
            Effective CPM: (spend * 1000) / impressions, derived from spend in
            this surface's denomination (gross fee-inclusive on buyer surfaces);
            null when impressions is 0
          nullable: true
          type: number
        cpc:
          description: >-
            Cost per click: spend / clicks, derived from spend in this surface's
            denomination (gross fee-inclusive on buyer surfaces); null when
            clicks is 0
          nullable: true
          type: number
        ctr:
          description: 'Click-through rate: clicks / impressions'
          nullable: true
          type: number
        completionRate:
          description: >-
            Completion rate: completedViews / impressions (completions per paid
            impression; impressions is the paid unit for CPM video)
          nullable: true
          type: number
      required:
        - impressions
        - spend
        - clicks
        - views
        - completedViews
        - conversions
        - leads
        - videoCompletions
        - ecpm
        - cpc
        - ctr
        - completionRate
      additionalProperties: false
    ApiError:
      description: Structured error object
      type: object
      properties:
        code:
          description: Machine-readable error code
          type: string
        message:
          description: Human-readable error message
          type: string
        field:
          description: Field path associated with the error
          type: string
        details:
          description: Additional error context
          type: object
          additionalProperties: {}
      required:
        - code
        - message
      additionalProperties: false
    StorefrontMediaBuyReporting:
      description: Media buy-level reporting metrics with package breakdown
      type: object
      properties:
        mediaBuyId:
          description: Media buy identifier
          type: string
        name:
          description: Media buy name
          type: string
        status:
          description: Media buy status
          type: string
        budget:
          description: >-
            Total allocated budget for this media buy (sum of product budgets),
            null if no budget set
          nullable: true
          type: number
        inventorySourceId:
          description: >-
            Storefront inventory source this media buy flows through
            (storefront_inventory_source.source_id), or null when no source
            matched.
          nullable: true
          type: string
        metrics:
          $ref: '#/components/schemas/ReportingMetrics'
        packages:
          description: Package-level breakdown
          type: array
          items:
            $ref: '#/components/schemas/StorefrontPackageReporting'
      required:
        - mediaBuyId
        - name
        - status
        - budget
        - inventorySourceId
        - metrics
        - packages
      additionalProperties: false
    StorefrontPackageReporting:
      description: Package-level reporting metrics
      type: object
      properties:
        packageId:
          description: Package identifier
          type: string
        productId:
          description: Product identifier for this package
          nullable: true
          type: string
        productName:
          description: Human-readable product name for this package
          nullable: true
          type: string
        metrics:
          $ref: '#/components/schemas/ReportingMetrics'
      required:
        - packageId
        - productId
        - productName
        - metrics
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key or access token

````