Gallantree Developer API

API versioning

The version is in the URL. Not in an Accept header, not in a query parameter, not implied by the auth flow. When you write /api/v1/…, you're calling v1 — permanently.

URL structure

https://developers.gallantreecapital.com/api/v1/<resource>[/<id>]

Anything outside /api/v1/* is internal to the platform and may change at any time without notice. Do not build against /api/* routes that aren't inside /api/v1/*.

Version compatibility promise

Within a version (v1, v2, …):

Deprecation header

When a v1 endpoint is being retired in a future version, its response carries:

Deprecation: true
Sunset: 2027-01-15T00:00:00Z
Link: <https://developers.gallantreecapital.com/api/v2/loans>; rel="successor-version"

Watch for these headers in your integration's logs — the Sunset date is when the endpoint is removed, not when the deprecation was announced.

Pagination

Every list endpoint uses the same query-parameter shape:

Parameter Type Default Notes
page integer 1 1-indexed
limit integer 20 Min 1, max 100. Values outside that range return 400.

Results are returned newest first, by creation time. There is no sort parameter, and unrecognised query parameters (for example sort) are silently ignored, not rejected. Don't rely on result order between pages for anything that changes while you page.

Filtering

The list endpoints for records you can create (/loans, /organisations, /collaterals, /capital-programs, /products) also accept:

Parameter Type Notes
externalId string Only the record with this externalId: your own identifier, as sent when you created it. Every record in these responses carries an externalId field (null for records created inside the platform).
updatedSince ISO 8601 date-time Only records updated at or after this time. Use it to reconcile with your system after downtime, alongside webhooks.

/loans also accepts:

Parameter Type Notes
status comma-separated list Loans in any of these statuses, e.g. status=current,arrears30. See Loans → Status lifecycle.
mainStatus comma-separated list Loans in any of these main statuses: pending, active, closed, withdrawn and so on.

Filters combine with AND, and only ever narrow results to your own lender's records. An unrecognised status or mainStatus value, or an updatedSince that isn't a date, returns 400 rather than an empty list.

Shell
# Find your loan by your own id
curl -sS -H "x-api-key: $KEY" "https://developers.gallantreecapital.com/api/v1/loans?externalId=loan-001"

# Everything that changed since your last sync, in arrears or not
curl -sS -H "x-api-key: $KEY" "https://developers.gallantreecapital.com/api/v1/loans?updatedSince=2026-11-14T00:00:00Z&limit=100"

Every list response wraps the array in a data field and includes a pagination object:

JSON
{
  "data": [ ... ],
  "pagination": {
    "page": 2,
    "limit": 20,
    "total": 132,
    "totalPages": 7
  }
}

Iterate by incrementing page until page > totalPages, or track total yourself.

Content negotiation

Runnable example — walk every page

Shell
page=1
while : ; do
  body=$(curl -sS "https://developers.gallantreecapital.com/api/v1/loans?page=$page&limit=100" \
    -H "x-api-key: $GALLANTREE_API_KEY")
  echo "$body" | jq -r '.data[].id'
  totalPages=$(echo "$body" | jq -r '.pagination.totalPages')
  if [ "$page" -ge "$totalPages" ]; then break; fi
  page=$((page + 1))
done
Was this page helpful?

Built with Token Gesture