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

# Get a store profit and loss

> Get a "store profit and loss"



## OpenAPI

````yaml /api-reference/openapi.json post /profitability/storeProfitAndLoss
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/storeProfitAndLoss:
    post:
      tags:
        - profitability
      summary: Get a store profit and loss
      description: Get a "store profit and loss"
      operationId: getStoreProfitAndLoss
      requestBody:
        description: Store profit and loss criteria
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetStoreProfitAndLossRequest'
        required: true
      responses:
        '200':
          description: Successful operation
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetStoreProfitAndLossResponse'
        '400':
          description: Invalid input
          content: {}
      security:
        - api_key: []
components:
  schemas:
    GetStoreProfitAndLossRequest:
      type: object
      properties:
        channelId:
          type: string
        merchantId:
          type: string
        reportOptions:
          $ref: '#/components/schemas/GetStoreProfitLossReportOptions'
          type: object
      required:
        - channelId
        - merchantId
        - reportOptions
      description: Fetch a stores profit and loss in raw json
    GetStoreProfitAndLossResponse:
      type: object
      properties:
        totalRevenue:
          type: number
        totalExpenses:
          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
      description: Fetch a store's profit and loss in raw json
    GetStoreProfitLossReportOptions:
      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 edn of the reporting
            period
        timezone:
          type: string
        includeTax:
          type: boolean
      required:
        - fromDate
        - toDate
        - includeTax
        - timezone
  securitySchemes:
    api_key:
      type: apiKey
      name: x-api-key
      in: header

````