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

# Fetch P&L report

> Returns a detailed profit and loss report for a specified time period. This endpoint provides comprehensive financial data including revenue, expenses, and net income calculations.



## OpenAPI

````yaml get /v1/businesses/{businessId}/reports/profit-and-loss
openapi: 3.0.1
info:
  title: API
  version: latest
servers: []
security:
  - BearerAuth: []
tags: []
externalDocs:
  url: /
paths:
  /v1/businesses/{businessId}/reports/profit-and-loss:
    get:
      tags: []
      summary: Fetch P&L report
      description: >-
        Returns a detailed profit and loss report for a specified time period.
        This endpoint provides comprehensive financial data including revenue,
        expenses, and net income calculations.
      operationId: business.reports.profit-and-loss.get
      parameters:
        - name: businessId
          in: path
          description: The UUID of the business to fetch the profit and loss for
          required: true
          schema:
            type: string
        - name: Content-Type
          in: header
          description: Content-Type must be set to application/json
          schema:
            type: string
        - name: start_date
          in: query
          description: Start date for the P&L report (ISO 8601 format)
          required: true
          schema:
            type: string
            format: date-time
        - name: end_date
          in: query
          description: End date for the P&L report (ISO 8601 format)
          required: true
          schema:
            type: string
            format: date-time
        - name: reporting_basis
          in: query
          description: Accounting basis for the report
          schema:
            type: string
            enum:
              - ACCRUAL
              - CASH
        - name: structure
          in: query
          description: P&L structure template to use
          schema:
            type: string
        - name: tag_filter
          in: query
          description: Filter results by tags
          schema:
            type: string
      responses:
        '200':
          description: Profit and loss report data
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiProfitAndLoss'
        '400':
          description: >-
            P&L not yet reconciled: one or more of the requested time periods is
            not closed or reconciled and cannot be displayed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: >-
            Business id is not found. This indicates the business id is invalid
            or the business has been archived.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      deprecated: false
components:
  schemas:
    ApiProfitAndLoss:
      type: object
      properties:
        start_date:
          type: string
          format: date-time
          description: Start date of the P&L period
        end_date:
          type: string
          format: date-time
          description: End date of the P&L period
        reporting_basis:
          type: string
          enum:
            - ACCRUAL
            - CASH
          description: Accounting basis used for the report
        line_items:
          type: array
          items:
            $ref: '#/components/schemas/ApiPnlLineItem'
          description: P&L line items
        total_revenue:
          type: integer
          description: Total revenue in cents
        total_expenses:
          type: integer
          description: Total expenses in cents
        net_income:
          type: integer
          description: Net income in cents
    ApiError:
      type: object
      properties: {}
      example: ''
      description: ''
    ApiPnlLineItem:
      type: object
      properties:
        account_name:
          type: string
          description: Name of the account
        amount:
          type: integer
          description: Amount in cents
        account_type:
          type: string
          description: Type of account
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````