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

# Fetch P&L summary

> Returns a profit and loss summary for a single arbitrary date range. Unlike the monthly summaries endpoint which returns per-month breakdowns, this endpoint aggregates the entire specified period into one summary. Both date bounds are optional: omitting start_date uses the business activation date, and omitting end_date uses the current time. Omitting both returns an all-time summary. This endpoint is useful for dashboard cards showing aggregate financial metrics like total revenue, expenses, net profit, and uncategorized transaction counts.



## OpenAPI

````yaml get /v1/businesses/{businessId}/reports/profit-and-loss-summary
openapi: 3.0.1
info:
  title: API
  version: latest
servers: []
security:
  - BearerAuth: []
tags: []
externalDocs:
  url: /
paths:
  /v1/businesses/{businessId}/reports/profit-and-loss-summary:
    get:
      tags: []
      summary: Fetch P&L summary
      description: >-
        Returns a profit and loss summary for a single arbitrary date range.
        Unlike the monthly summaries endpoint which returns per-month
        breakdowns, this endpoint aggregates the entire specified period into
        one summary. Both date bounds are optional: omitting start_date uses the
        business activation date, and omitting end_date uses the current time.
        Omitting both returns an all-time summary. This endpoint is useful for
        dashboard cards showing aggregate financial metrics like total revenue,
        expenses, net profit, and uncategorized transaction counts.
      operationId: business.reports.profit-and-loss-summary.get
      parameters:
        - name: businessId
          in: path
          description: The UUID of the business to fetch the profit and loss summary 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: >-
            The start of the period (ISO 8601 instant, e.g.
            2024-01-01T00:00:00Z). If omitted, defaults to the business
            activation date.
          required: false
          schema:
            type: string
            format: date-time
        - name: end_date
          in: query
          description: >-
            The end of the period (ISO 8601 instant, e.g. 2024-12-31T23:59:59Z).
            If omitted, defaults to the current time.
          required: false
          schema:
            type: string
            format: date-time
        - name: reporting_basis
          in: query
          description: >-
            Accounting basis for the report. Defaults to the business default or
            ACCRUAL if not set.
          schema:
            type: string
            enum:
              - ACCRUAL
              - CASH
        - name: structure
          in: query
          description: P&L structure template to use.
          schema:
            type: string
        - name: tag_key
          in: query
          description: Tag key to filter results by (use together with tag_values).
          schema:
            type: string
        - name: tag_values
          in: query
          description: >-
            Comma-separated tag values to filter results by (use together with
            tag_key).
          schema:
            type: string
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/PnlSummary'
                required:
                  - data
        '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:
    PnlSummary:
      type: object
      description: >-
        A profit and loss summary for an arbitrary date range. Unlike
        MonthlyPnlSummary which represents a single calendar month, this object
        can represent any time period including all-time when both dates are
        null.
      properties:
        type:
          type: string
          description: Resource type. Value will be `Pnl_Summary`.
          example: Pnl_Summary
        start_date:
          type: string
          format: date-time
          nullable: true
          description: >-
            The start of the period (ISO 8601 instant). Null indicates all-time
            from business activation.
          example: '2024-01-01T00:00:00Z'
        end_date:
          type: string
          format: date-time
          nullable: true
          description: >-
            The end of the period (ISO 8601 instant). Null indicates up to the
            current time.
          example: '2024-12-31T23:59:59Z'
        income:
          type: integer
          format: int64
          description: The business's total income for the period, in cents.
          example: 1050000
        costOfGoodsSold:
          type: integer
          format: int64
          description: The business's cost of goods sold for the period, in cents.
          example: 350000
        grossProfit:
          type: integer
          format: int64
          description: >-
            The business's gross profit for the period, in cents. Calculated as
            income minus cost of goods sold.
          example: 700000
        operatingExpenses:
          type: integer
          format: int64
          description: The business's operating expenses for the period, in cents.
          example: 300000
        profitBeforeTaxes:
          type: integer
          format: int64
          description: The business's pre-tax profit for the period, in cents.
          example: 400000
        taxes:
          type: integer
          format: int64
          description: The business's taxes for the period, in cents.
          example: 100000
        netProfit:
          type: integer
          format: int64
          description: The business's net profit for the period, in cents.
          example: 300000
        totalExpenses:
          type: integer
          format: int64
          description: >-
            The sum of all business expenses (cost of goods sold + operating
            expenses + taxes) for the period, in cents.
          example: 750000
        uncategorizedInflows:
          type: integer
          format: int64
          description: >-
            The sum of positive uncategorized transactions for the period, in
            cents.
          example: 500
        uncategorizedOutflows:
          type: integer
          format: int64
          description: >-
            The sum of negative uncategorized transactions for the period, in
            cents.
          example: 300
        fullyCategorized:
          type: boolean
          description: Whether all transactions within the period have been categorized.
          example: false
        uncategorized_transactions:
          type: integer
          format: int32
          description: The count of uncategorized transactions within the period.
          example: 5
        categorized_transactions:
          type: integer
          format: int32
          description: The count of categorized transactions within the period.
          example: 42
    ApiError:
      type: object
      description: An error object returned in API error responses.
      properties:
        type:
          $ref: '#/components/schemas/ApiErrorType'
          description: >-
            A fixed category for the error, helpful for categorizing and
            processing errors.
        description:
          type: string
          description: A human-readable error description.
        error_enum:
          $ref: '#/components/schemas/ApiEnumErrorType'
          description: >-
            A stable, machine-readable identifier for programmatically handling
            specific error conditions. Only present for 4xx client errors—not
            included for 5xx server errors. Use this instead of parsing the
            description field, as enum values remain stable across API versions.
          nullable: true
        meta:
          type: object
          description: Optional additional information about the error.
          nullable: true
      required:
        - type
        - description
    ApiErrorType:
      type: string
      enum:
        - ResourceArchived
        - AuthFailure
        - Plaid
        - Stripe
        - InvalidState
        - ResourceNotFound
        - InvalidParameters
        - JsonSerialization
        - Unknown
        - BadRequest
        - PaginationCursor
        - Conflict
        - LedgerOperationFailed
    ApiEnumErrorType:
      type: string
      description: >-
        Stable enum values for programmatic error handling. Only present in 4xx
        error responses.
      enum:
        - AccessCodeInvalid
        - BalanceSheetDoesNotBalance
        - BalanceSheetMissingAccount
        - BankStatementParserError
        - BillStateError
        - BulkCategorizeFailure
        - BulkMatchFailure
        - BusinessTaskAlreadyCompleted
        - BusinessTaskDeleted
        - CalendlyOAuthError
        - CallBookingError
        - CantUpdateTransactionInCustomerPayout
        - CantUpdateTransactionInVendorPayout
        - CheckPayrollConfigNotFound
        - CheckPayrollServiceNotFound
        - ClerkUserAlreadyExists
        - ConflictingQueryParams
        - CustomAccountAlreadyExists
        - CustomTransactionCsvParsingError
        - CustomTransactionUploadFailure
        - CustomerPayoutInputFormatError
        - DoesNotMatchExistingEntity
        - EmptyBatchRequest
        - ExpenseParserError
        - ExternalAccountBalanceReconciliationError
        - ExternalIdConflict
        - InvalidCategory
        - InvalidEffectiveDate
        - InvalidLedgerOperation
        - InvalidMonthlyAverageRange
        - InvalidMultiPartRequest
        - InvalidPaginationCursor
        - InvalidPayload
        - InvoiceDeleted
        - InvoiceNotFound
        - InvoiceReferenceMismatch
        - InvoiceStateError
        - ManualRateLimit
        - MultipleTagKeyFiltersUnsupported
        - NoCognitoUserFound
        - NoOpeningBalanceFound
        - NotYetReconciled
        - OnePasswordApiError
        - OnePasswordItemNotFound
        - OnePasswordVaultNotFound
        - OpenAICategorizationError
        - PaymentLinkInvalid
        - PayrollStateError
        - PeriodIsClosed
        - PeriodNotClosed
        - PhoneNumberAlreadyRegistered
        - PlaidApiError
        - PlaidConnectionBroken
        - PlaidCreateLinkTokenError
        - PlaidCredentialsNotConfigured
        - PlaidExchangePublicTokenError
        - PlaidGetInstitutionByIdError
        - PlaidGetItemError
        - PlaidInvalidEnvironment
        - PlaidItemAlreadyExists
        - PlaidItemNotFound
        - PlaidProcessorApiError
        - PlaidUnlinkItemError
        - QueryParamFormat
        - QueryParamMissing
        - QuickbooksBrokenConnection
        - QuickbooksConnectionAlreadyExists
        - QuickbooksConnectionAlreadySyncing
        - QuickbooksConnectionMissing
        - QuickbooksConnectionNotActivated
        - QuickbooksInvalidRequest
        - QuickbooksInvalidState
        - QuickbooksNoMatchingAccount
        - QuickbooksNonPostingAccountType
        - QuickbooksNotConfigured
        - QuickbooksOAuthCallbackInvalid
        - QuickbooksOAuthError
        - QuickbooksTokenExpired
        - ResourceArchived
        - ScheduleCNotConfigured
        - SmsNotEnabled
        - SpecifiedBadRequest
        - SpecifiedIdNotFound
        - SplitTransactionError
        - StepEvaluationBadRequest
        - StripeConnectAccountIdNotFound
        - StripeCredentialsNotConfigured
        - StripeGetBalanceForConnectAccountFailure
        - StripeRedirectOrRefreshUrlNotConfigured
        - TagFilterNotFound
        - UnexpectedQueryParam
        - UnitAccountsInUse
        - WrongAnswerType
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````