Create PnL
Header Parameters
Authorizationstring
x-client-idstring
x-timestampstring
x-signaturestring
Content-Typestring
Query Parameters
startDatestring
endDatestring
currencystring
reportTypestring
transactionStatusstring
accountsstring
accountTypestring
tagsstring
vendorsstring
customersstring
projectsstring
projectIdstring
isPnLByTagboolean
includeNoTagboolean
Body Parameters
saveboolean
reportTitlestring
Response
200
Object
{
"status": "success",
"message": "Success on generating pnl report.",
"data": {
"summary": {
"totalIncome": 150000.00,
"totalExpenses": 95000.00,
"grossProfit": 105000.00,
"netIncome": 55000.00,
"netProfitMargin": 36.67,
"currency": "USD"
},
"income": [
{
"id": 1001,
"accountNumber": "4000",
"name": "Sales Revenue",
"type": "Income",
"subType": "Operating Revenue",
"amount": 120000.00,
"percentage": 80.0,
"parentId": null,
"level": 1,
"hasChildren": false
}
],
"costOfGoodsSold": [
{
"id": 1500,
"accountNumber": "5000",
"name": "Cost of Goods Sold",
"type": "Cost of Goods Sold",
"subType": "Direct Costs",
"amount": 45000.00,
"percentage": 30.0,
"parentId": null,
"level": 1,
"hasChildren": false
}
],
"expenses": [
{
"id": 2001,
"accountNumber": "6000",
"name": "Operating Expenses",
"type": "Expenses",
"subType": "Operating Expenses",
"amount": 50000.00,
"percentage": 52.63,
"parentId": null,
"level": 1,
"hasChildren": true
}
],
"calculations": {
"totalRevenue": 150000.00,
"totalCOGS": 45000.00,
"grossProfit": 105000.00,
"grossProfitMargin": 70.0,
"totalOperatingExpenses": 50000.00,
"operatingIncome": 55000.00,
"operatingMargin": 36.67,
"totalNonOperatingExpenses": 0.00,
"netIncome": 55000.00,
"netProfitMargin": 36.67
},
"filters": {
"startDate": "2024-01-01",
"endDate": "2024-12-31",
"reportType": "accrual",
"currency": "USD",
"transactionStatus": "all",
"tags": [],
"accounts": [],
"accountTypes": [],
"vendors": [],
"customers": [],
"projects": []
},
"metadata": {
"generatedAt": "2024-12-31T23:59:59Z",
"organizationId": 12345,
"organizationName": "Acme Corporation",
"reportId": 98765,
"reportTitle": "Annual P&L 2024",
"fiscalYear": 2024,
"comparisonPeriod": null
}
}
}
400
Object
{
"status": "error",
"message": "Invalid date format. Use ISO 8601 format (YYYY-MM-DD)"
}
401
Object
{
"status": "error",
"message": "Invalid or expired access token"
}
426
Object
{
"status": "error",
"message": "Rate limit exceeded. Please try again later.",
"retryAfter": 30
}
Was this section helpful?
Response
Was this section helpful?