> ## 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 traffic and conversion report

> Create a "traffic and conversion" report. The generated report CSV contains the columns defined in the `TrafficAndConversionReportColumns` schema. When the 'view' option is set to 'skus', additional columns 'sku' and 'brand' are included. Use the /reports/status/{reportId} endpoint to check report status and obtain the download URL.



## OpenAPI

````yaml /api-reference/openapi.json post /reports/create/trafficAndConversion
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/trafficAndConversion:
    post:
      tags:
        - report
      summary: Create a traffic and conversion report
      description: >-
        Create a "traffic and conversion" report. The generated report CSV
        contains the columns defined in the `TrafficAndConversionReportColumns`
        schema. When the 'view' option is set to 'skus', additional columns
        'sku' and 'brand' are included. Use the /reports/status/{reportId}
        endpoint to check report status and obtain the download URL.
      operationId: createTrafficAndConversionReport
      requestBody:
        description: Report criteria
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTrafficAndConversionReportRequest'
        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/TrafficAndConversionReportColumns'
        '400':
          description: Invalid input
          content: {}
      security:
        - api_key: []
components:
  schemas:
    CreateTrafficAndConversionReportRequest:
      type: object
      properties:
        channelId:
          type: string
        merchantId:
          type: string
        reportOptions:
          $ref: '#/components/schemas/CreateTrafficAndConversionReportOptions'
    CreateReportResponse:
      type: object
      properties:
        reportId:
          type: string
        reportType:
          type: string
        status:
          type: string
    TrafficAndConversionReportColumns:
      type: object
      description: >-
        Columns present in the downloadable Traffic and Conversion report CSV.
        When the 'view' option is set to 'skus' (child view), additional columns
        'sku' and 'brand' are included.
      properties:
        title:
          type: string
          description: Product title
        productSku:
          type: string
          description: Product SKU (e.g. ASIN)
        sku:
          type: string
          description: Seller SKU (included only in child/SKU view)
        brand:
          type: string
          description: Brand name (included only in child/SKU view)
        pageViews:
          type: number
          description: Number of page views in the current period
        priorPageViews:
          type: number
          description: Number of page views in the prior comparison period
        orderedRevenue:
          type: number
          description: Ordered revenue in the current period
        priorOrderedRevenue:
          type: number
          description: Ordered revenue in the prior comparison period
        orderedUnits:
          type: number
          description: Units ordered in the current period
        priorOrderedUnits:
          type: number
          description: Units ordered in the prior comparison period
        price:
          type: number
          description: Product price
        unitsPerView:
          type: number
          description: 'Conversion rate: units ordered per page view'
        priorUnitsPerView:
          type: number
          description: Prior period units per page view
        unitsPerSession:
          type: number
          description: Units ordered per session
        priorUnitsPerSession:
          type: number
          description: Prior period units per session
        sessions:
          type: number
          description: Total sessions in the current period
        priorSessions:
          type: number
          description: Total sessions in the prior period
        mobileSessionsPercentage:
          type: number
          description: Percentage of sessions from mobile devices
        priorMobileSessionsPercentage:
          type: number
          description: Prior period mobile sessions percentage
        buyboxWinPercentage:
          type: number
          description: Buy Box win percentage
        priorBuyboxWinPercentage:
          type: number
          description: Prior period Buy Box win percentage
    CreateTrafficAndConversionReportOptions:
      allOf:
        - $ref: '#/components/schemas/CommonReportOptions'
        - type: object
          properties:
            view:
              type: string
              enum:
                - parents
                - skus
              description: >-
                The level at which you wish to view product metrics - either
                'parents' or 'skus'
    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
  securitySchemes:
    api_key:
      type: apiKey
      name: x-api-key
      in: header

````