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

# Retrieve single or multiple product profit and loss details

> Retrieve single or multiple product profit and loss details



## OpenAPI

````yaml /api-reference/openapi.json post /profitability/productProfitAndLoss
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:
  /profitability/productProfitAndLoss:
    post:
      tags:
        - profitability
      summary: Retrieve single or multiple product profit and loss details
      description: Retrieve single or multiple product profit and loss details
      operationId: getProductProfitAndLoss
      requestBody:
        description: Product profit and loss criteria
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetProductProfitAndLossRequest'
        required: true
      responses:
        '200':
          description: Successful operation
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetProductProfitAndLossResponse'
        '400':
          description: Invalid input
          content: {}
      security:
        - api_key: []
components:
  schemas:
    GetProductProfitAndLossRequest:
      type: object
      properties:
        channelId:
          type: string
        merchantId:
          type: string
        reportOptions:
          $ref: '#/components/schemas/GetProductProfitLossReportOptions'
          type: object
      required:
        - channelId
        - merchantId
        - reportOptions
      description: Request a single or multiple products profit and loss details.
    GetProductProfitAndLossResponse:
      type: object
      properties:
        productEvents:
          type: array
          items:
            type: object
            properties:
              sellerSku:
                type: string
              productSku:
                type: string
              title:
                type: string
              totalRevenue:
                type: number
              totalExpenses:
                type: number
              totalProfit:
                type: number
              sales:
                type: number
              advertisingSpend:
                type: number
              sellingFees:
                type: number
              shippingFees:
                type: number
              refunds:
                type: number
              reimbursements:
                type: number
              otherIncome:
                type: number
              promotions:
                type: number
              refundsAndReturnsOverheads:
                type: number
              cogs:
                type: number
              otherExpenses:
                type: number
        count:
          type: number
      description: Response for a single or multiple products profit and loss details
    GetProductProfitLossReportOptions:
      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
        includeTax:
          type: boolean
          description: Whether to include tax in the report
        sellerSkus:
          type: array
          items:
            type: string
          description: The list of skus to filter by, max 50
        pageSize:
          type: integer
          description: The size of the current page, max 50
        pageIndex:
          type: integer
          description: The index of the current page
      required:
        - fromDate
        - toDate
        - includeTax
  securitySchemes:
    api_key:
      type: apiKey
      name: x-api-key
      in: header

````