GET
/
api
/
end_users
/
{end_user_id_or_heron_id}
/
profit_and_loss
curl --request GET \
  --url https://app.herondata.io/api/end_users/{end_user_id_or_heron_id}/profit_and_loss \
  --header 'Authorization: Basic <encoded-value>'
{
  "dates": [
    "2023-12-25"
  ],
  "sections": [
    {
      "metrics": [
        {
          "confidence": 123,
          "indent": 123,
          "is_ratio": true,
          "name": "<string>",
          "values": [
            123
          ]
        }
      ],
      "name": "<string>",
      "slug": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Path Parameters

end_user_id_or_heron_id
string
required

Query Parameters

currency
enum<string> | null

ISO 4217 currency code for balance

Available options:
GBP,
USD,
EUR
Example:

"USD"

to_date
string | null

The latest transaction timestamp date to use

Example:

"2022-01-31"

dates_ascending
boolean
default:false

If true, dates are sorted left to right by ascending order. False by default, i.e., by default sorted in descending date order so more recent dates are first

from_date
string | null

The earliest transaction timestamp date to use

Example:

"2022-01-01"

Response

200 - application/json
OK
dates
string[]

Ordered list of dates representing the columns of the P&L table

sections
object[]

Ordered list of P&L sections

Was this page helpful?