Skip to main content
GET
/
v1
/
businesses
/
{businessId}
/
reports
/
profit-and-loss
/
lines
Fetch P&L line items
curl --request GET \
  --url https://sandbox.layerfi.com/v1/businesses/{businessId}/reports/profit-and-loss/lines \
  --header 'Authorization: Bearer <token>'
{
  "business_id": "550e8400-e29b-41d4-a716-446655440000",
  "start_date": "2024-01-01T00:00:00Z",
  "end_date": "2024-12-31T23:59:59.999Z",
  "pnl_structure_line_item_name": "operating_expenses",
  "pnl_structure_line_item_display_name": "Operating Expenses",
  "reporting_basis": "ACCRUAL",
  "pnl_structure": "DEFAULT",
  "tag_filter": {
    "key": "<string>",
    "value": [
      "<string>"
    ]
  },
  "lines": [
    {
      "id": "li_abc123def456",
      "entry_id": "550e8400-e29b-41d4-a716-446655440000",
      "account": {
        "id": {
          "type": "AccountId",
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
        },
        "name": "Current Assets",
        "account_number": "4000",
        "stable_name": {
          "type": "StableName",
          "stable_name": "CURRENT_ASSETS"
        },
        "normality": "CREDIT",
        "account_type": {
          "value": "ASSET",
          "display_name": "Asset"
        },
        "account_subtype": {
          "value": "BANK_ACCOUNTS",
          "display_name": "Current Assets"
        }
      },
      "amount": 125050,
      "direction": "CREDIT",
      "date": "2024-03-15T14:30:00Z",
      "source": {
        "transaction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "external_id": "<string>",
        "account_name": "<string>",
        "date": "2023-11-07T05:31:56Z",
        "amount": 123,
        "direction": "CREDIT",
        "counterparty": "<string>",
        "entity_name": "Bank Transaction",
        "display_description": "Generated display description based on account name and date"
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Content-Type
string

Content-Type must be set to application/json

Path Parameters

businessId
string
required

The UUID of the business to fetch the P&L line items for

Query Parameters

start_date
string<date-time>
required

Start date for the line item report (ISO 8601 format)

end_date
string<date-time>
required

End date for the line item report (ISO 8601 format)

line_item_name
string
required

Name of the specific line item to fetch details for

reporting_basis
enum<string>

Accounting basis for the report

Available options:
ACCRUAL,
CASH
structure
string

P&L structure template to use

Response

P&L line item detail report

Detailed report for a specific P&L line item showing all ledger entries that contribute to it

business_id
string<uuid>
required

UUID of the business for this report

Example:

"550e8400-e29b-41d4-a716-446655440000"

start_date
string<date-time>
required

Start date of the report period (ISO 8601 timestamp)

Example:

"2024-01-01T00:00:00Z"

end_date
string<date-time>
required

End date of the report period (ISO 8601 timestamp)

Example:

"2024-12-31T23:59:59.999Z"

pnl_structure_line_item_name
string
required

Internal name of the P&L structure line item

Example:

"operating_expenses"

pnl_structure_line_item_display_name
string
required

Display-friendly name of the P&L structure line item

Example:

"Operating Expenses"

reporting_basis
enum<string>
required
Available options:
ACCRUAL,
CASH
lines
object[]
required

List of ledger line items that contribute to this P&L line item

pnl_structure
enum<string>

Optional P&L template structure used for this report

Available options:
DEFAULT,
TRUCKING,
MEDSPA,
MEDSPA_NO_LICENSING,
CITRUS,
CITRUS_NO_LICENSING,
FLORIST
tag_filter
object

Optional tag filter applied to this report