Skip to main content
GET
/
api
/
end_users
/
{end_user_id_or_heron_id}
/
positions
Get positions summary for end user
curl --request GET \
  --url https://app.herondata.io/api/end_users/{end_user_id_or_heron_id}/positions \
  --header 'x-api-key: <api-key>'
import requests

url = "https://app.herondata.io/api/end_users/{end_user_id_or_heron_id}/positions"

headers = {"x-api-key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};

fetch('https://app.herondata.io/api/end_users/{end_user_id_or_heron_id}/positions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://app.herondata.io/api/end_users/{end_user_id_or_heron_id}/positions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://app.herondata.io/api/end_users/{end_user_id_or_heron_id}/positions"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("x-api-key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://app.herondata.io/api/end_users/{end_user_id_or_heron_id}/positions")
.header("x-api-key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://app.herondata.io/api/end_users/{end_user_id_or_heron_id}/positions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "llm_summary": "<string>",
  "positions": [
    {
      "group": "<string>",
      "heron_id": "<string>",
      "inflow_metrics": {
        "count": 123,
        "max_amount": {
          "amount": "1234.56",
          "currency": "USD"
        },
        "max_timestamp": "2023-11-07T05:31:56Z",
        "min_amount": {
          "amount": "1234.56",
          "currency": "USD"
        },
        "min_timestamp": "2023-11-07T05:31:56Z",
        "total_amount": {
          "amount": "1234.56",
          "currency": "USD"
        }
      },
      "investment_transactions": [
        {
          "amount": {
            "amount": "1234.56",
            "currency": "USD"
          },
          "description": "<string>",
          "heron_id": "<string>",
          "timestamp": "2023-11-07T05:31:56Z"
        }
      ],
      "is_active": true,
      "is_renewal": true,
      "llm_summary": "<string>",
      "merchant": "<string>",
      "missed_payments": [
        "2023-12-25"
      ],
      "nsf_fees": [
        {
          "amount": 123,
          "date": "2023-12-25",
          "merchant": "<string>"
        }
      ],
      "outflow_metrics": {
        "changed_in_last_90_days": true,
        "confidence_reasons": [
          "<string>"
        ],
        "count": 123,
        "duration_days": 123,
        "estimated_monthly_amount": {
          "amount": "1234.56",
          "currency": "USD"
        },
        "estimated_remaining_balance": {
          "amount": "1234.56",
          "currency": "USD"
        },
        "estimated_right_to_receive_amount": {
          "amount": "1234.56",
          "currency": "USD"
        },
        "fallback_estimated_monthly_amount": {
          "amount": "1234.56",
          "currency": "USD"
        },
        "has_repayment_modifications": true,
        "latest_estimated_monthly_amount": {
          "amount": "1234.56",
          "currency": "USD"
        },
        "latest_repayment_amount": {
          "amount": "1234.56",
          "currency": "USD"
        },
        "max_amount": {
          "amount": "1234.56",
          "currency": "USD"
        },
        "max_timestamp": "2023-11-07T05:31:56Z",
        "mean_amount": {
          "amount": "1234.56",
          "currency": "USD"
        },
        "mean_interval_days": 123,
        "min_amount": {
          "amount": "1234.56",
          "currency": "USD"
        },
        "min_timestamp": "2023-11-07T05:31:56Z",
        "mode_interval_days": 123,
        "payments_per_month": 123,
        "remaining_repayment_duration_days": 123,
        "std_dev_amount": {
          "amount": "1234.56",
          "currency": "USD"
        },
        "total_amount": {
          "amount": "1234.56",
          "currency": "USD"
        },
        "total_expected_duration_days": 123,
        "total_expected_payments_to_date": 123
      },
      "parent_position_heron_id": "<string>",
      "repayment_transactions": [
        {
          "amount": {
            "amount": "1234.56",
            "currency": "USD"
          },
          "description": "<string>",
          "heron_id": "<string>",
          "timestamp": "2023-11-07T05:31:56Z"
        }
      ],
      "reversal_transactions": [
        {
          "amount": {
            "amount": "1234.56",
            "currency": "USD"
          },
          "description": "<string>",
          "heron_id": "<string>",
          "timestamp": "2023-11-07T05:31:56Z"
        }
      ],
      "reversals": [
        {
          "amount": 123,
          "date": "2023-12-25",
          "merchant": "<string>"
        }
      ],
      "stop_payments": [
        {
          "amount": 123,
          "date": "2023-12-25",
          "merchant": "<string>"
        }
      ]
    }
  ]
}

Authorizations

x-api-key
string
header
required

Path Parameters

end_user_id_or_heron_id
string
required

The end user ID or heron ID

Query Parameters

account_ids
string[]

Account IDs to filter positions by

include_transactions
boolean
default:false

If true, include investment/repayment/reversal transactions on each position

Response

Positions summary retrieved successfully

llm_summary
string | null
positions
object[]