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

# View advertising performance by channel

> Returns a paginated JSON summary of advertising performance grouped by channel for the selected store and date range. Values are currency-adjusted based on the store's country and the provided currency context.



## OpenAPI

````yaml /api-reference/openapi.json post /reports/view/advertisingByChannels
openapi: 3.0.1
info:
  title: MerchantSpring Public API
  version: 1.0.0
servers:
  - url: https://mm-api.merchantspring.io
    description: Production
  - url: https://mm-api-staging.merchantspring.io
    description: Staging
security: []
tags:
  - name: channel
    x-group: Channel
  - name: content-change
    x-group: Content Change
  - name: custom-group
    x-group: Custom Group
  - name: order
    x-group: Order
  - name: report
    x-group: Report
  - name: tag
    x-group: Tag
  - name: profitability
    x-group: Profitability
paths:
  /reports/view/advertisingByChannels:
    post:
      tags:
        - report
      summary: View advertising performance by channel
      description: >-
        Returns a paginated JSON summary of advertising performance grouped by
        channel for the selected store and date range. Values are
        currency-adjusted based on the store's country and the provided currency
        context.
      operationId: getAdvertisingByChannels
      requestBody:
        description: Advertising by channels criteria
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetAdvertisingByChannelsRequest'
        required: true
      responses:
        '200':
          description: Successful operation
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAdvertisingByChannelsResponse'
        '400':
          description: Invalid input
          content: {}
      security:
        - api_key: []
components:
  schemas:
    GetAdvertisingByChannelsRequest:
      type: object
      properties:
        reportOptions:
          allOf:
            - $ref: '#/components/schemas/CommonReportOptions'
            - type: object
              required:
                - fromDate
                - toDate
                - priorFromDate
                - priorToDate
                - timezone
          description: >-
            Common reporting options that determine the reporting and comparison
            ranges
          example:
            fromDate: 1711843200
            toDate: 1714448800
            priorFromDate: 1711843200
            priorToDate: 1714448800
            timezone: America/Los_Angeles
        includeTax:
          type: boolean
          description: Whether tax should be included in sales figures
          example: false
        vendorRevenueType:
          type: string
          enum:
            - orderedRevenue
            - shippedRevenue
          description: >-
            Determine whether the revenue type of a vendor should be retrieved
            by ordered or shipped revenue
          example: orderedRevenue
        currentCurrency:
          type: string
          description: >-
            3-letter currency code for the current view (e.g. USD, AUD). Used
            for exchange conversion.
          example: USD
        orderBy:
          type: string
          description: The field to sort by (defaults to 'impressions')
          example: impressions
        pageIndex:
          type: integer
          description: Zero-based page index (defaults to 0)
          example: 0
        pageSize:
          type: integer
          description: The number of results to return per page (max 100) (defaults to 10)
          example: 10
        filter:
          type: object
          description: >-
            Optional filters applied when selecting stores to include in the
            report
          properties:
            marketplaces:
              type: array
              description: Marketplace identifiers to include (e.g. 'amazon', 'ebay')
              items:
                type: string
            countries:
              type: array
              description: ISO 3166-1 alpha-2 country codes to include
              items:
                type: string
            tags:
              type: array
              description: Store tags to include
              items:
                type: string
        searchText:
          type: string
          description: >-
            Optional text to match store names or marketplace identifiers when
            selecting stores
          example: Amazon US
      required:
        - reportOptions
        - currentCurrency
      description: Criteria to view advertising performance by channel
    GetAdvertisingByChannelsResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
            - error
        data:
          type: object
          properties:
            items:
              type: array
              items:
                $ref: '#/components/schemas/AdvertisingByChannelsItem'
            pageIndex:
              type: integer
            pageSize:
              type: integer
            totalItems:
              type: integer
            totalPages:
              type: integer
        error:
          type: string
      description: Paginated advertising performance by channel
      example:
        status: success
        data:
          items:
            - store: Acme AU
              countryCode: AUS
              adsales: '1200.25'
              priorAdsales: '-'
              spend: '300.10'
              priorSpend: '-'
              acos: '25.01'
              priorAcos: '-'
              roas: '3.99'
              priorRoas: '-'
              tacos: '5.00'
              priorTacos: '-'
              troas: '20.00'
              priorTroas: '-'
              impressions: 200000
              clicks: 5200
              ctr: '2.60'
              cpc: '0.58'
              conv: '3.40'
              orders: 176
              units: 220
              NTB_sales: '400.00'
              pecentage_sales_NTB: '33.33'
              NTB_orders: 60
              percentage_orders_NTB: '34.09'
              NTB_units: 70
              percentage_units_NTB: '31.82'
              marketplace_id: AUS-MKT
              seller_id: SELLER-123
              attributed_units_ordered_same_sku: 50
          pageIndex: 0
          pageSize: 10
          totalItems: 1
          totalPages: 1
    CommonReportOptions:
      type: object
      properties:
        fromDate:
          type: number
          description: >-
            Unix epoch time (seconds) representing the start of the reporting
            period
        toDate:
          type: number
          description: >-
            Unix epoch time (seconds) representing the end of the reporting
            period
        priorFromDate:
          type: number
          description: >-
            Unix epoch time (seconds) representing the start of the comparison
            period
        priorToDate:
          type: number
          description: >-
            Unix epoch time (seconds) representing the end of the comparison
            period
        timezone:
          type: string
          description: >-
            The timezone string you wish to see the report in (e.g.
            'America/Los_Angeles') see
            https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
    AdvertisingByChannelsItem:
      type: object
      properties:
        store:
          type: string
          description: Store display name
        countryCode:
          type: string
          description: Marketplace country code
        adsales:
          type: string
          description: Attributed advertising sales (converted to current currency)
        priorAdsales:
          type: string
          description: Attributed advertising sales for the prior comparison period
        spend:
          type: string
          description: Advertising spend (converted to current currency)
        priorSpend:
          type: string
          description: Advertising spend for the prior comparison period
        acos:
          type: string
          description: Advertising cost of sales (%)
        priorAcos:
          type: string
          description: Prior period ACOS (%)
        roas:
          type: string
          description: Return on ad spend
        priorRoas:
          type: string
          description: Prior period ROAS
        tacos:
          type: string
          description: Total advertising cost of sales (%)
        priorTacos:
          type: string
          description: Prior period TACOS (%)
        troas:
          type: string
          description: Total return on ad spend
        priorTroas:
          type: string
          description: Prior period TROAS
        impressions:
          type: number
        clicks:
          type: number
        ctr:
          type: string
          description: Click-through rate (%)
        cpc:
          type: string
          description: Cost per click (converted)
        conv:
          type: string
          description: Conversion rate (%)
        orders:
          type: number
        units:
          type: number
        NTB_sales:
          type: string
          description: New-to-brand attributed sales (converted)
        percentage_sales_NTB:
          type: string
          description: Percentage of sales from new-to-brand customers (%)
        NTB_orders:
          type: number
        percentage_orders_NTB:
          type: string
        NTB_units:
          type: number
        percentage_units_NTB:
          type: string
        marketplace_id:
          type: string
        seller_id:
          type: string
        attributed_units_ordered_same_sku:
          type: number
      description: One row of advertising performance metrics for a store/channel
  securitySchemes:
    api_key:
      type: apiKey
      name: x-api-key
      in: header

````