Environments
The Developer API is available in two environments. They are fully isolated — separate databases, separate credentials, and different data lifecycles.
| Environment | Base URL | Purpose | Data |
|---|---|---|---|
| Sandbox | https://developers.gallantreecapital.com |
Integration testing, sample dashboards, CI runs against a stable seed dataset | Synthetic (obviously-fake lender + loan names, safe to leak in screenshots or bug reports) |
| Production | https://developers.gallantreecapital.com (once your lender is provisioned) |
Real integrations against real data | Real lender data — every request is audited |
One host, two environments
Both environments share the developer host developers.gallantreecapital.com. What separates them is your API key: sandbox keys route to the sandbox database, production keys route to the production database. You cannot cross the boundary — a sandbox key on a production route returns 401, and vice versa.
This is deliberate: it means the URLs you copy from these docs work in both environments without change. The only thing you swap when you go live is the key.
How to tell them apart
- In the portal. Every app and every key has a coloured environment pill. Sandbox is yellow; production is red. Look at the pill before you copy a key into a config vault.
- In your app's environment field. The
environmentproperty on the app resource issandboxorproduction. Query it programmatically if you need to guard-rail an environment mismatch at boot time. - All keys share the
gt_prefix. The prefix does not encode the environment — that's a property of the app the key belongs to. Use the portal pill or the app'senvironmentfield to be sure.
Data lifecycle
- Sandbox is re-seeded on demand — the dataset is designed to demonstrate every response shape you'll see in production, but the specific records may change between releases. Do not build regression tests that pin on specific sandbox IDs.
- Production is durable. Records never disappear silently; deletions are audited and often soft.
Webhooks
Webhook subscriptions are scoped to an app, so a sandbox subscription only ever fires from sandbox events, and vice versa. This lets you develop against a sandbox receiver without any risk of picking up a production payload. See Subscribe to events.
Going live
When your integration is ready for production:
- Register a production app in the portal (against your real lender).
- Generate a production API key; store it separately from your sandbox key.
- Update your app's config so the base URL stays the same but the key swaps.
- Re-run your smoke tests against production before wiring it into live traffic.
Because both environments live at the same host, there is no infra change on your side. It's a credential swap.
What's in the sandbox
The sandbox is seeded with a small, deterministic dataset so your integration has something realistic to talk to from day one. Every record uses obviously-synthetic names — screenshots are safe to share.
- Two demo lenders,
Sandbox Lender AlphaandSandbox Lender Beta. Each has its own copy of the data below, and neither can see the other's: a key for an Alpha app never returns a Beta record. - Two demo developer apps on Lender Alpha: one read-only (all Tier 1 read scopes), one full-access (writes and webhooks). Create your own app for real integration work; the demo apps are there so a fresh visitor can watch a response come back before they register.
- Two capital programs per lender, a senior debt fund and a construction warehouse, each with its fees.
- Three products per lender (a 5-year CRE senior loan, a 24-month construction facility and a 12-month residual stock loan), each with its fees: application, establishment, line, variation and discharge fees between them.
- Six loans per lender across those programs and products, each secured by one property, with three borrower organisations and a director for each. Names start with
Sandbox …orTest …, emails end inexample.com, and addresses are made up.
Every seeded loan is in draft, the status every loan created through the API starts in.
The seed creates these records through the same import as POST /api/v1/loans, so they look exactly like records your integration creates. Their externalIds (loan-001…loan-006, product-cre-senior-5yr, program-senior-debt and so on) are stable, so query by externalId rather than id: the sandbox is re-seeded on demand and its ids may change between releases.
No webhook subscriptions are seeded. Register your own against a receiver you control; see Subscribe to events.
How the sandbox host reaches the sandbox app
You don't need to know this to use the sandbox — but if you're curious:
developers.gallantreecapital.com is a Cloudflare-routed host. Requests to /, /getting-started/*, /guides/* etc. serve from the GitBook space (the docs you're reading). Requests to /api/v1/*, /api/auth/oauth/*, and /api/health are forwarded to a dedicated sandbox deployment. Everything else falls through to GitBook, which returns a static 404 — so an unenumerated path can never accidentally reach the API.
The rules that decide this live in the platform repository under deploy/cloudflare/developers/ — reviewable, versioned, and applied to Cloudflare by an operator on merge.