Partner API sandbox
Build lab testing into your product
Order tests for people and pets, follow each kit and sample, and receive results judged on MD4 Labs reference ranges. The sandbox gives you the full /v1 API over synthetic data, with a simulated lab you drive yourself.
Your access
Checking your sign-in...
How to start
-
Get invited
Access is by invitation. MD4 Labs sets up your organization and invites each of your developers by email; the email holds a temporary password. To ask for access, write to developers@md4labs.com.
-
Sign in
Sign in on this site with your email and the temporary password, then choose your own password. You can add an authenticator app for a second step.
-
Create an API key
In the console, create a key with the scopes your program needs. Sandbox keys start with
md4_test_, and each one is shown once: keep it in your secrets manager. -
Make your first call
Ask the API who your key belongs to:
export MD4_API=https://sandbox-api-dev.md4labs.com export MD4_KEY=md4_test_your_key_here curl "$MD4_API/v1/me" -H "Authorization: Bearer $MD4_KEY" -
Simulate the lab
Add a person or pet, order a test, then play the lab's side: ship the kit, receive the sample, release results. Each step changes the order exactly as the live lab will. See the order lifecycle and the walkthrough.
-
Receive webhooks
Register a public https URL and we'll post signed events to it as orders move:
order.updated,order.results_readyandorder.cancelled. Check every delivery in the console and send any one again. See webhooks.
What the sandbox is
Synthetic data only
Everything here is made up, and stays in its own database. Never send real patient or animal information to the sandbox.
A lab you drive
Orders move only when you say so, with POST /v1/sandbox/orders/{id}/simulate: kit shipped, delivered, sample received, results, corrections.
The same contract as live
Paths, fields, errors and webhooks are the ones the live API uses. Moving to live means a live key and a different base URL.
See what happened
The console shows every request your keys made, with status and request ID, and every webhook delivery with its attempts and payload.