# Your first request This quickstart calls `GET /api/v1/loans` and shows you the response shape. Total time: about two minutes. ## Prerequisites - A [registered sandbox app](register-an-app.md) with an API key you can copy. - `curl` (or any HTTP client) available in your terminal. 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 ```bash 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 ```bash 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](../guides/resources/loans/object.md). The list is paginated (default page size: 20). Add `?page=2&limit=50` to page through larger result sets — see [pagination](../guides/versioning.md#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](../guides/rate-limits.md) for the tier table and back-off recommendations. ## 4. Handle a failure Change your key to garbage and re-run the request: ```bash 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](../guides/error-model.md) for the full list of shapes. ## Where to go next - **Reads:** The [API reference](../reference/openapi.md) lists every resource, filter, and response schema. - **Writes:** Read [Idempotency](../guides/idempotency.md) before you send a `POST`. - **Webhooks:** [Subscribe](../guides/webhooks/subscribe.md), then [verify signatures](../guides/webhooks/verify-signature.md).