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

# Profit and Loss Details object

The Profit and Loss Details object provides a detailed view of the transactions and ledger entries that contribute to a business's profit and loss statement for a specific reporting period.

### Attributes

<ParamField body="cash_transactions" type="Array of Cash Transaction Effect objects">
  An array of [Cash Transaction Effect](/api-reference/reports/pnl/pnl-details#cash-transaction-effect-object) objects, detailing individual transactions and their corresponding ledger entries affecting the profit and loss statement.
</ParamField>

<ParamField body="profit_and_loss_details_body" type="Profit and Loss Details Body object">
  A [Profit and Loss Details Body](/api-reference/reports/pnl/pnl-details#profit-and-loss-details-body-object) object, containing a detailed breakdown of income, expenses, and net results for the report period.
</ParamField>

<ParamField body="balances" type="Array of Line Item Input objects">
  A list of Line Item Input objects representing the aggregated balance of accounts impacted within the reporting period.
</ParamField>

#### Cash Transaction Effect object

<ParamField body="transaction" type="Bank Transaction object">
  The basic data of the [Bank Transaction Object](/api-reference/bank-transaction/bank-transaction).
</ParamField>

<ParamField body="ledger_entries" type="Array of LedgerEntry objects">
  An array of ledger entries related to the [Bank Transaction Object](/api-reference/bank-transaction/bank-transaction).
</ParamField>

<ParamField body="combined_result" type="Array of Line Item objects">
  An array of [Line Item](/api-reference/reports/pnl/pnl#line-item-object) objects representing the combined results of the transaction's effects on different accounts.
</ParamField>

#### Profit and Loss Details Body object

<ParamField body="business_id" type="string">
  ID of the Business the report was generated for.
</ParamField>

<ParamField body="start_date" type="ISO8601 timestamp">
  Start date for data included in the report.
</ParamField>

<ParamField body="end_date" type="ISO8601 timestamp">
  End date for data included in the report.
</ParamField>

<ParamField body="income" type="Line Item With Details object">
  Income [Line Item With Details](/api-reference/reports/pnl/pnl-details#line-item-with-details-object) objects.
</ParamField>

<ParamField body="cost_of_goods_sold" type="Line Item With Details object">
  Cost of goods sold [Line Item With Details](/api-reference/reports/pnl/pnl-details#line-item-with-details-object) objects.
</ParamField>

<ParamField body="gross_profit" type="integer">
  Gross profit.
</ParamField>

<ParamField body="expenses" type="Line Item With Details object">
  Expense [Line Item With Details](/api-reference/reports/pnl/pnl-details#line-item-with-details-object) objects.
</ParamField>

<ParamField body="profit_before_taxes" type="integer">
  Profit before taxes.
</ParamField>

<ParamField body="taxes" type="Line Item With Details object">
  Tax [Line Item With Details](/api-reference/reports/pnl/pnl-details#line-item-with-details-object) objects.
</ParamField>

<ParamField body="net_profit" type="integer">
  Net profit after taxes.
</ParamField>

<ParamField body="fully_categorized" type="boolean">
  Whether all transactions within the period are fully categorized.
</ParamField>

#### Line Item With Details object

<ParamField body="name" type="string">
  Name identifier for the line item.
</ParamField>

<ParamField body="display_name" type="string">
  Display name for the line item.
</ParamField>

<ParamField body="value" type="integer">
  The value of the line item in cents.
</ParamField>

<ParamField body="line_items" type="Array of Line Item With Details objects">
  Child [Line Item With Details](/api-reference/reports/pnl/pnl-details#line-item-with-details-object) objects, if any.
</ParamField>

<ParamField body="is_contra" type="boolean">
  Indicates if the line item is a contra account.
</ParamField>

<ParamField body="entries" type="Array of Ledger Line Item With Source objects">
  Ledger entries associated with the line item.
</ParamField>

#### Ledger Line Item With Source

<ParamField body="id" type="string">
  Unique identifier for the line item.
</ParamField>

<ParamField body="entry_id" type="string">
  Identifier of the ledger entry to which this line item belongs.
</ParamField>

<ParamField body="account" type="Single Api Chart Account object">
  The account affected by this line item.
</ParamField>

<ParamField body="amount" type="integer">
  The monetary amount of the line item in cents.
</ParamField>

<ParamField body="direction" type="enum">
  Direction of the transaction, either 'IN' for inflows or 'OUT' for outflows.
</ParamField>

<ParamField body="date" type="ISO8601 timestamp">
  Date when the line item was recorded.
</ParamField>

<ParamField body="source" type="Ledger Entry Source object">
  The [Ledger Entry Source](/api-reference/reports/pnl/pnl#ledger-entry-source-object), detailed by the specific subtype which includes context-specific fields.
</ParamField>

<ResponseExample>
  ```json Response theme={null}
  {
      "data": {
          "type": "Profit_And_Loss_Details",
          "cash_transactions": [
              {
                  "transaction": {
                      "id": "0e603dc0-e140-4d7a-8f16-99d1aa5a8ad2",
                      "business_id": "f9baa8fd-9413-4bcf-810b-6d32604de649",
                      "source": "UNIT",
                      "source_transaction_id": "12345-FakeCorp-1234-expense-199",
                      "source_account_id": "1234",
                      "imported_at": "2024-05-23T03:51:15.836137Z",
                      "date": "2024-03-01T20:00:00Z",
                      "direction": "DEBIT",
                      "amount": 250000,
                      "counterparty_name": "WeWork",
                      "description": null,
                      "account_name": "Layer Demo Banking",
                      "categorization_status": "CATEGORIZED"
                  },
                  "ledger_entries": [
                      {
                          "id": "08bd0b04-89fe-406e-b5f7-6b0fb65cc799",
                          "business_id": "f9baa8fd-9413-4bcf-810b-6d32604de649",
                          "ledger_id": "0f4bb90e-1c43-4994-81e8-aac4dcd6e380",
                          "agent": "LAYER_AUTO",
                          "entry_type": "EXPENSE",
                          "date": "2024-05-23T03:52:54.880652Z",
                          "entry_at": "2024-03-01T20:00:00Z",
                          "reversal_of_id": null,
                          "reversal_id": null,
                          "line_items": [
                              {
                                  "id": "079444d8-cf57-49ac-955e-6edc97d746d5",
                                  "entry_id": "08bd0b04-89fe-406e-b5f7-6b0fb65cc799",
                                  "account": {
                                      "id": "50edc310-66ab-4380-b1de-0d52c24821b2",
                                      "name": "Rent",
                                      "stable_name": "RENT_EXPENSE",
                                      "normality": "DEBIT",
                                      "account_type": {
                                          "value": "EXPENSE",
                                          "display_name": "Expenses"
                                      },
                                      "account_subtype": {
                                          "value": "OPERATING_EXPENSES",
                                          "display_name": "Operating Expenses"
                                      }
                                  },
                                  "amount": 250000,
                                  "direction": "DEBIT",
                                  "entry_at": "2024-03-01T20:00:00Z",
                                  "createdAt": "2024-05-23T03:52:54.880652Z"
                              },
                              {
                                  "id": "8ac6683e-db36-4dd3-a35c-a7adb3e62066",
                                  "entry_id": "08bd0b04-89fe-406e-b5f7-6b0fb65cc799",
                                  "account": {
                                      "id": "5c114ae2-0e6f-4798-8e9a-f7e1c892e2fa",
                                      "name": "Layer Demo Banking",
                                      "stable_name": null,
                                      "normality": "DEBIT",
                                      "account_type": {
                                          "value": "ASSET",
                                          "display_name": "Assets"
                                      },
                                      "account_subtype": {
                                          "value": "BANK_ACCOUNTS",
                                          "display_name": "Bank Accounts"
                                      }
                                  },
                                  "amount": 250000,
                                  "direction": "CREDIT",
                                  "entry_at": "2024-03-01T20:00:00Z",
                                  "createdAt": "2024-05-23T03:52:54.880652Z"
                              }
                          ]
                      }
                  ],
                  "combined_result": [
                      {
                          "account": {
                              "account_id": {
                                  "id": "50edc310-66ab-4380-b1de-0d52c24821b2"
                              },
                              "name": "Rent",
                              "stable_name": {
                                  "stable_name": "RENT_EXPENSE"
                              },
                              "account_normality": "DEBIT",
                              "account_type": "EXPENSE",
                              "account_subtype": "OPERATING_EXPENSES"
                          },
                          "amount": 250000,
                          "direction": "DEBIT"
                      },
                      {
                          "account": {
                              "account_id": {
                                  "id": "5c114ae2-0e6f-4798-8e9a-f7e1c892e2fa"
                              },
                              "name": "Layer Demo Banking",
                              "stable_name": null,
                              "account_normality": "DEBIT",
                              "account_type": "ASSET",
                              "account_subtype": "BANK_ACCOUNTS"
                          },
                          "amount": 250000,
                          "direction": "CREDIT"
                      }
                  ]
              },
              // more transactions omitted for brevity
          ],
          "profit_and_loss_details": {
              "business_id": "f9baa8fd-9413-4bcf-810b-6d32604de649",
              "start_date": "2024-03-01T05:00:00Z",
              "end_date": "2024-04-01T04:00:00Z",
              "income": {
                  "name": "Revenue",
                  "display_name": "Revenue",
                  "value": 2730000,
                  "line_items": [
                      {
                          "name": "SERVICES_REVENUE",
                          "display_name": "Service Revenue",
                          "value": 2730000,
                          "line_items": [],
                          "is_contra": false,
                          "entries": [
                              {
                                  "id": "allocation-f61a2686-2085-4fe1-96a3-2103c93f9074-f61a2686-2085-4fe1-96a3-2103c93f9074-0",
                                  "entry_id": "allocation-f61a2686-2085-4fe1-96a3-2103c93f9074-f61a2686-2085-4fe1-96a3-2103c93f9074",
                                  "account": {
                                      "id": "59d427f8-4681-4a8c-926e-3c3963b24e8f",
                                      "name": "Service Revenue",
                                      "stable_name": "SERVICES_REVENUE",
                                      "normality": "CREDIT",
                                      "account_type": {
                                          "value": "REVENUE",
                                          "display_name": "Revenue"
                                      },
                                      "account_subtype": {
                                          "value": "SALES",
                                          "display_name": "Sales"
                                      }
                                  },
                                  "amount": 420000,
                                  "direction": "CREDIT",
                                  "date": "2024-03-01T20:00:00Z",
                                  "source": {
                                      "type": "Invoice_Ledger_Entry_Source",
                                      "invoice_id": "679b689f-0a29-47f1-84cf-c4cef492ef5b",
                                      "external_id": null,
                                      "invoice_number": null,
                                      "recipient_name": "FakeCorp 94720",
                                      "date": "2024-03-01T20:00:00Z",
                                      "amount": 420000,
                                      "entity_name": "Invoice",
                                      "display_description": "Invoice (March 1)"
                                  }
                              },
                          ]
                      }
                  ],
                  "is_contra": false,
                  "entries": []
              },
              "cost_of_goods_sold": {
                  "name": "Cost of Goods Sold",
                  "display_name": "Cost of Goods Sold",
                  "value": 428940,
                  "line_items": [],
                  "is_contra": false,
                  "entries": []
              },
              "gross_profit": 2301060,
              "expenses": {
                  "name": "Expenses",
                  "display_name": "Expenses",
                  "value": 560695,
                  "line_items": [],
                  "is_contra": false,
                  "entries": []
              },
              "profit_before_taxes": 1740365,
              "taxes": {
                  "name": "Taxes",
                  "display_name": "Taxes",
                  "value": 0,
                  "line_items": [],
                  "is_contra": false,
                  "entries": []
              },
              "net_profit": 1740365,
              "fully_categorized": true
          },
          "balances": [
              {
                  "account": {
                      "account_id": {
                          "id": "50edc310-66ab-4380-b1de-0d52c24821b2"
                      },
                      "name": "Rent",
                      "stable_name": {
                          "stable_name": "RENT_EXPENSE"
                      },
                      "account_normality": "DEBIT",
                      "account_type": "EXPENSE",
                      "account_subtype": "OPERATING_EXPENSES"
                  },
                  "amount": 250000,
                  "direction": "DEBIT"
              },
              {
                  "account": {
                      "account_id": {
                          "id": "5c114ae2-0e6f-4798-8e9a-f7e1c892e2fa"
                      },
                      "name": "Layer Demo Banking",
                      "stable_name": null,
                      "account_normality": "DEBIT",
                      "account_type": "ASSET",
                      "account_subtype": "BANK_ACCOUNTS"
                  },
                  "amount": 1712350,
                  "direction": "DEBIT"
              },
          ]
      }
  }
  ```
</ResponseExample>
