Skip to main content
GET
/
api
/
reports
/
profit-loss-sheet
Get profit/loss statement report
curl --request GET \
  --url https://api.example.com/api/reports/profit-loss-sheet \
  --header 'Authorization: <authorization>' \
  --header 'accept: <accept>' \
  --header 'organization-id: <organization-id>'
{
  "query": {
    "display_columns_type": "total",
    "display_columns_by": "day",
    "from_date": "<string>",
    "to_date": "<string>",
    "number_format": {
      "precision": 2,
      "divideOn1000": false,
      "showZero": true,
      "formatMoney": "total",
      "negativeFormat": "parentheses"
    },
    "none_zero": true,
    "none_transactions": true,
    "basis": "cash",
    "accounts_ids": [
      123
    ],
    "percentage_column": true,
    "percentage_row": true,
    "percentage_income": true,
    "percentage_expense": true,
    "previous_period": true,
    "previous_period_amount_change": true,
    "previous_period_percentage_change": true,
    "previous_year": true,
    "previous_year_amount_change": true,
    "previous_year_percentage_change": true
  },
  "data": [
    {
      "id": {},
      "name": "<string>",
      "node_type": "ACCOUNTS",
      "total": {
        "amount": 123,
        "formattedAmount": "<string>",
        "currencyCode": "<string>",
        "date": {}
      },
      "type": "<string>",
      "horizontal_totals": [
        {
          "amount": 123,
          "formattedAmount": "<string>",
          "currencyCode": "<string>",
          "date": {}
        }
      ],
      "percentage_income": {
        "amount": 123,
        "formattedAmount": "<string>"
      },
      "percentage_expense": {
        "amount": 123,
        "formattedAmount": "<string>"
      },
      "percentage_row": {
        "amount": 123,
        "formattedAmount": "<string>"
      },
      "percentage_column": {
        "amount": 123,
        "formattedAmount": "<string>"
      },
      "previous_period": {
        "amount": 123,
        "formattedAmount": "<string>",
        "currencyCode": "<string>",
        "date": {}
      },
      "previous_period_change": {
        "amount": 123,
        "formattedAmount": "<string>",
        "currencyCode": "<string>",
        "date": {}
      },
      "previous_period_percentage": {
        "amount": 123,
        "formattedAmount": "<string>"
      },
      "previous_year": {
        "amount": 123,
        "formattedAmount": "<string>",
        "currencyCode": "<string>",
        "date": {}
      },
      "previous_year_change": {
        "amount": 123,
        "formattedAmount": "<string>",
        "currencyCode": "<string>",
        "date": {}
      },
      "previous_year_percentage": {
        "amount": 123,
        "formattedAmount": "<string>"
      },
      "code": "<string>",
      "index": 123,
      "children": "<array>"
    }
  ],
  "meta": {
    "organizationName": "<string>",
    "baseCurrency": "<string>",
    "dateFormat": "<string>",
    "isCostComputeRunning": true,
    "sheetName": "<string>",
    "formatted_from_date": "<string>",
    "formatted_to_date": "<string>",
    "formatted_date_range": "<string>"
  }
}

Headers

Authorization
string
required

Value must be 'Bearer ' where is an API key prefixed with 'bc_' or a JWT token.

Example:

"Bearer bc_1234567890abcdef"

organization-id
string
required

Required if Authorization is a JWT token. The organization ID to operate within.

accept
string
required

Query Parameters

basis
string
required

The basis for the profit and loss sheet

precision
number

Number of decimal places to display

Example:

2

divideOn1000
boolean

Whether to divide the number by 1000

Example:

false

showZero
boolean

Whether to show zero values

Example:

true

formatMoney
enum<string>

How to format money values

Available options:
total,
always,
none
Example:

"total"

negativeFormat
enum<string>

How to format negative numbers

Available options:
parentheses,
mines
Example:

"parentheses"

noneZero
boolean

Whether to exclude zero values

noneTransactions
boolean

Whether to exclude transactions

accountsIds
string[]

Array of account IDs to include

displayColumnsType
enum<string>
required

Type of columns to display

Available options:
total,
date_periods
displayColumnsBy
string
required

How to display columns

percentageColumn
boolean

Whether to show percentage column

percentageRow
boolean

Whether to show percentage row

percentageIncome
boolean

Whether to show income percentage

percentageExpense
boolean

Whether to show expense percentage

previousPeriod
boolean

Whether to include previous period

previousPeriodAmountChange
boolean

Whether to show previous period amount change

previousPeriodPercentageChange
boolean

Whether to show previous period percentage change

previousYear
boolean

Whether to include previous year

previousYearAmountChange
boolean

Whether to show previous year amount change

previousYearPercentageChange
boolean

Whether to show previous year percentage change

Response

Profit & loss statement

query
object
required

Query parameters used to generate the report

data
object[]
required

Hierarchical profit/loss data

meta
object
required

Report metadata