> ## 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.

# Create a marketing by product report

> Create a "marketing by product" report. The generated report CSV contains the columns defined in the `MarketingByProductReportColumns` schema including ad sales, spend, ACOS, ROAS, TACOS, and new-to-brand metrics by store. Use the /reports/status/{reportId} endpoint to check report status and obtain the download URL.



## OpenAPI

````yaml /api-reference/openapi.json post /reports/create/marketingByProduct
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/create/marketingByProduct:
    post:
      tags:
        - report
      summary: Create a marketing by product report
      description: >-
        Create a "marketing by product" report. The generated report CSV
        contains the columns defined in the `MarketingByProductReportColumns`
        schema including ad sales, spend, ACOS, ROAS, TACOS, and new-to-brand
        metrics by store. Use the /reports/status/{reportId} endpoint to check
        report status and obtain the download URL.
      operationId: createMarketingByProductReport
      requestBody:
        description: Report criteria
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMarketingByProductReportRequest'
        required: true
      responses:
        '200':
          description: Successful operation
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateReportResponse'
            text/csv:
              schema:
                $ref: '#/components/schemas/MarketingByProductReportColumns'
        '400':
          description: Invalid input
          content: {}
      security:
        - api_key: []
components:
  schemas:
    CreateMarketingByProductReportRequest:
      type: object
      properties:
        channelId:
          type: string
        merchantId:
          type: string
        reportOptions:
          $ref: '#/components/schemas/CreateMarketingByProductReportOptions'
    CreateReportResponse:
      type: object
      properties:
        reportId:
          type: string
        reportType:
          type: string
        status:
          type: string
    MarketingByProductReportColumns:
      type: object
      description: >-
        Columns present in the downloadable Marketing by Product report CSV.
        This export uses product-level Amazon advertising rows.
      properties:
        seller_id:
          type: string
          description: Seller identifier
        marketplace_id:
          type: string
          description: Amazon marketplace code
        report_date:
          type: string
          description: Report date
        product_ad_status:
          type: string
          description: Product ad status
        product_id:
          type: string
          description: Product identifier
        product_title:
          type: string
          description: Product title
        image_url:
          type: string
          description: Product image URL
        link_url:
          type: string
          description: Product listing URL
        sku:
          type: string
          description: Seller SKU
        asin:
          type: string
          description: Amazon Standard Identification Number
        impressions:
          type: number
          description: Total impressions
        clicks:
          type: number
          description: Total clicks
        cost:
          type: number
          description: Total ad spend (in target currency)
        attributed_sales:
          type: number
          description: Total sales attributed to ads (in target currency)
        attributed_sales_same_sku:
          type: number
          description: Sales attributed to the same SKU (in target currency)
        attributed_conversions:
          type: number
          description: Total conversions attributed to ads
        attributed_conversions_same_sku:
          type: number
          description: Conversions attributed to the same SKU
        attributed_units_ordered:
          type: number
          description: Total units ordered attributed to ads
        attributed_units_ordered_same_sku:
          type: number
          description: Units ordered for the same SKU
        acos:
          type: number
          description: Advertising Cost of Sale (percentage)
        click_through_rate:
          type: number
          description: Click-through rate (percentage)
        cost_per_click:
          type: number
          description: Average cost per click (in target currency)
        conversion_rate:
          type: number
          description: Conversion rate (percentage)
        roas:
          type: number
          description: Return on Ad Spend
    CreateMarketingByProductReportOptions:
      allOf:
        - type: object
          properties:
            fromDate:
              type: integer
              description: >-
                Unix epoch time (seconds) representing the start of the
                reporting period
            toDate:
              type: integer
              description: >-
                Unix epoch time (seconds) representing the end of the reporting
                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
  securitySchemes:
    api_key:
      type: apiKey
      name: x-api-key
      in: header

````