Skip to main content

Profit And Loss

Overview

The Profit And Loss endpoint returns financial data used to review profit and loss information for the selected company and reporting period. The response includes tax and service totals for the current period and year, together with income accounts and their related account details.

Each income account provides debit, credit, yearly totals, account hierarchy information, and budget values. This endpoint is commonly used to review income performance, compare current and yearly financial values, and support profit and loss reporting.

Request Endpoint

  • Method: POST
  • Path: {{base_url}}/api/reports/profit-and-loss

Payload Construction and Schema Definition

The request payload is submitted as form-data fields.

Request Body Fields

FieldTypeRequiredDescription
company_idstringYesCompany identifier.
eom_idstringYesEnd-of-month period identifier.
pl_setting_department_header_idstringyesProfit and loss department setting header identifier.

Response Body Fields

FieldTypeAlways presentDescription
errorbooleanYesIndicates whether the request failed. false means success.
statusstringYesStatus string. On success the example returns "ok".
messagestringYesHuman-readable message. Often empty on success.
dataarray of objectYes (on success)Profit and loss report data.

Response data Fields

FieldTypeDescriptionExample
taxes_serviceobjectTax and service totals for the current period and year ( see below ).{ ... }
list_incomearray of objectsList of income accounts and their financial details ( see below ).[ ... ]

Response data.taxes_service Fields

FieldTypeDescriptionExample
total_taxesnumberTotal tax amount for the current period.1803636.3636363621
total_servicesnumberTotal service charge amount for the current period.1639669.4214876022
total_taxes_yearnumberTotal tax amount for the current year.5008723.303030295
total_services_yearnumberTotal service charge amount for the current year.4543350.193821323

Response data.list_income Fields

FieldTypeDescriptionExample
idstringIncome account group identifier.4.1.01
level1stringLevel 1 parent account identifier.4.0.00
namestringIncome account group name.4.1.01 - Income
account_detailarray of objectsList of accounts included in the income group ( see below ).[ ... ]

Response data.list_income.account_detail Fields

FieldTypeDescriptionExample
idstringIncome account identifier.890bb240-b33f-...
debitnumberDebit amount for the current period.0
creditnumberCredit amount for the current period.1128099.1735537054
total_creditnumberTotal credit value for the current period.1128099.1735537054
total_debitnumberTotal debit value for the current period.-1128099.1735537054
debit_yearnumberDebit amount for the current year.0
credit_yearnumberCredit amount for the current year.4566042.994883824
total_credit_yearnumberTotal credit value for the current year.4566042.994883824
total_debit_yearnumberTotal debit value for the current year.-4566042.994883824
namestringName of the income account.3.1 - Restaurant Revenue
labelstringDisplay label of the income account.3.1 - Restaurant Revenue
level3stringLevel 3 parent account identifier.4.1.01
level1stringLevel 1 parent account identifier.4.0.00
codestringIncome account code.3.1
budgetnumberBudget value for the current period.0
budget_yearnumberBudget value for the current year.0

Expected System Responses

The system responds with HTTP 200 OK.

{
"error": false,
"status": "ok",
"message": "",
"data": {
"taxes_service": {
"total_taxes": 1803636.3636363621,
"total_services": 1639669.4214876022,
"total_taxes_year": 5008723.303030295,
"total_services_year": 4543350.193821323
},
"list_income": [
{
"id": "4.1.01",
"level1": "4.0.00",
"name": "4.1.01 - Income",
"account_detail": [
{
"id": "890bb240-b33f-11ed",
"debit": 0,
"credit": 1128099.1735537054,
"total_credit": 1128099.1735537054,
"total_debit": -1128099.1735537054,
"debit_year": 0,
"credit_year": 4566042.994883824,
"total_credit_year": 4566042.994883824,
"total_debit_year": -4566042.994883824,
"name": "3.1 - Restaurant Revenue",
"label": "3.1 - Restaurant Revenue",
"level3": "4.1.01",
"level1": "4.0.00",
"code": "3.1",
"budget": 0,
"budget_year": 0
},
]
},
]
}
}