Getting Started
Before you can call the BGT API you need a BGT account, a verified practitioner profile, an organisation, and API credentials. This guide walks through that setup end-to-end.
BGT runs two completely independent environments — staging and production. Each has its own accounts, organisations, billing, and API credentials. Keys issued in one environment do not work in the other.
You must complete this entire Getting Started process once per environment you intend to use:
| Environment | Sign up at | API base URL |
|---|---|---|
| Staging (build & test) | https://app.staging.bloodygoodtests.com.au | https://api.staging.bloodygoodtests.com.au |
| Production (live ordering) | https://app.bloodygoodtests.com.au | https://api.bloodygoodtests.com.au |
We recommend setting up and validating your integration in staging first, then repeating these steps in production when you're ready to go live.
If you already have a client_id and client_secret for the environment you're
targeting, skip ahead to Authentication.
1. Create an account
Go to the app for the environment you're setting up — staging (https://app.staging.bloodygoodtests.com.au) or production (https://app.bloodygoodtests.com.au) — and sign up. You can register with an email and password, or via Google sign-in.
Repeat every step below in each environment you plan to use; the resulting credentials are environment-specific.
2. Complete and verify your profile
After signing up, finish creating your profile and complete verification.
During verification you'll be asked what kind of practitioner you are. You must select a practitioner type to order tests through BGT. If you're unsure which option applies, choose Other.
You won't be able to create an organisation until your profile is verified.
3. Create an organisation
Once your profile is verified, create an organisation. Your organisation is the entity that owns your products, referrals, results, billing, and API credentials — all API access is scoped to it.
4. Enable the API
Inside your organisation, go to Settings → API Keys and follow the steps to
enable API access. When it's enabled you'll receive your client_id and
client_secret — the credentials used to authenticate (see
Authentication).
You must have a valid billing method on file before API access can be enabled.
In staging, you can use a Stripe test card (for example
4242 4242 4242 4242, any future expiry, any CVC). The staging environment never
charges a real card.
5. Make your first request
With your credentials in hand:
-
Exchange them for an access token using the Client Credentials flow.
-
Call an endpoint, including the token in the
Authorizationheader:GET https://api.bloodygoodtests.com.au/v1/tests
Authorization: Bearer YOUR_ACCESS_TOKEN
We recommend building and testing against staging
(https://api.staging.bloodygoodtests.com.au) before moving to production. For the big-picture flow of
how ordering and results delivery work together, see the
Workflow overview, then the
REST API reference for the full list of endpoints.
Next steps
- Authentication — exchange your credentials for tokens
- Workflow — end-to-end flow of ordering and results delivery
- REST API — referrals, results, tests, and bundles
- Webhooks — real-time result notifications
Need a hand? Contact the BGT API team.