Gallantree Developer API

Your first request

This quickstart calls GET /api/v1/loans and shows you the response shape. Total time: about two minutes.

Prerequisites

The sandbox environment ships with a small seeded dataset so you'll get a real response even before you have any loans of your own.

1. Set your key as a shell variable

Shell
export GALLANTREE_API_KEY="gt_..."

Replace the placeholder with the full key the portal showed you. Every developer key starts with the gt_ prefix followed by a random suffix. Whether a key routes to sandbox or production is a property of the app it belongs to, not the key string — always confirm the environment pill in the portal before you copy a key into config.

2. Make the call

Shell
curl -sS https://developers.gallantreecapital.com/api/v1/loans \
  -H "x-api-key: $GALLANTREE_API_KEY"

You should get a 200 OK and a JSON body that looks roughly like this:

JSON
{
  "data": [
    {
      "id": "65f3a8b1d5c9e4f2a1b3c4d5",
      "name": "Sandbox Loan #1",
      "category": "cre",
      "status": "current",
      "mainStatus": "active",
      "principalAmount": 1250000,
      "currency": "AUD",
      "capitalProgramId": "65f3a8b1d5c9e4f2a1b3c4d0",
      "createdAt": "2026-07-14T02:11:00.000Z",
      "updatedAt": "2026-08-02T09:42:11.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 8,
    "totalPages": 1
  }
}

Each loan above is trimmed for space; the full shape is in Loans. The list is paginated (default page size: 20). Add ?page=2&limit=50 to page through larger result sets — see pagination for the full parameter set.

3. Check the rate-limit headers

Every response carries three headers you can watch to stay under your tier's quota:

x-ratelimit-limit: 60
x-ratelimit-remaining: 59
x-ratelimit-reset: 1755267600

x-ratelimit-reset is a Unix timestamp — the point at which your window resets. See Rate limits for the tier table and back-off recommendations.

4. Handle a failure

Change your key to garbage and re-run the request:

Shell
curl -sS https://developers.gallantreecapital.com/api/v1/loans \
  -H "x-api-key: nope" -i | head -20

You'll get a 401 Unauthorized with a body of:

JSON
{ "message": "The API key you provided is not valid." }

The response is deliberately generic — it never tells you whether the key exists, is expired, or belongs to another environment. That's an anti-enumeration measure, not a bug. See Error model for the full list of shapes.

Where to go next

Was this page helpful?

Built with Token Gesture