curl --request PUT \
--url https://app.herondata.io/api/end_users/{end_user_id_or_heron_id}/profit_and_loss_layout \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"category_labels": [
"Postage"
],
"section_slug": "operational_expenses"
}
'{
"sections": [
{
"labels": [
"<string>"
],
"metrics": [
{
"denominator": {
"labels": [
"<string>"
],
"sections": [
"<string>"
]
},
"indent": 123,
"is_growth": true,
"name": "<string>",
"numerator": {
"labels": [
"<string>"
],
"sections": [
"<string>"
]
}
}
],
"name": "<string>",
"slug": "<string>"
}
]
}Update the profit and loss layout for the end user, which determines how the profit and loss table is calculated
curl --request PUT \
--url https://app.herondata.io/api/end_users/{end_user_id_or_heron_id}/profit_and_loss_layout \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"category_labels": [
"Postage"
],
"section_slug": "operational_expenses"
}
'{
"sections": [
{
"labels": [
"<string>"
],
"metrics": [
{
"denominator": {
"labels": [
"<string>"
],
"sections": [
"<string>"
]
},
"indent": 123,
"is_growth": true,
"name": "<string>",
"numerator": {
"labels": [
"<string>"
],
"sections": [
"<string>"
]
}
}
],
"name": "<string>",
"slug": "<string>"
}
]
}OK
Ordered list of P&L sections
Show child attributes
The category labels associated with the section
An ordered list of metric layouts
Show child attributes
If the metric is a ratio, the denominator of the metric; otherwise this is just 1
Indentation level for formatting purposes
If true, calculates the % growth in the metric over time
Name of metric
Name of P&L section, e.g,. Operating Expenses
Slugified version of the name
Was this page helpful?