Getting started

Quickstart

From zero to a submitted order in a few minutes — get a key, install an SDK, and route your first order.

This walks you from an API key to a submitted order. Everything here works against sandbox, which resolves only to synthetic patients — so you can build the whole integration before any agreement is in place.

1. Get an API key#

Sign in to the dashboard, open Developers → API keys, and create a key. You'll get two kinds:

Prefix Environment Resolves to
nk_sandbox_… Sandbox Synthetic patients + a mock pharmacy
nk_live_… Live Real patients (requires an active agreement)

Keep keys server-side. Never ship them in a browser or mobile app.

2. Install an SDK#

# Node / TypeScript
npm install @neolifehealth/sdk

# Python
pip install neolife

Prefer HTTP? Every example has a curl equivalent — the API is a plain REST surface documented in the API reference.

3. Submit an order#

import { Neolife } from "@neolifehealth/sdk";

const neolife = new Neolife({ apiKey: process.env.NEOLIFE_API_KEY! }); // nk_sandbox_…

const order = await neolife.orders.submit("ord_123", {
  // A stable key makes this retry-safe — see /concepts/idempotency
  idempotencyKey: "3f1b0c2a-9d6e-4a51-8b2f-1c7e5a9d0e42",
});

console.log(order.status); // "submitted"

The same call with curl:

curl -X POST https://api.neolife.health/v1/orders/ord_123/submit \
  -H "Authorization: Bearer $NEOLIFE_API_KEY" \
  -H "Idempotency-Key: 3f1b0c2a-9d6e-4a51-8b2f-1c7e5a9d0e42"

An order must be provider-approved before it can be submitted. In a full flow the patient completes a compliance intake, a licensed provider approves it, and only then is the order eligible for submission. The API refuses to submit an unapproved order.

4. Track it#

Fulfillment status flows back over webhooks and events — PHI-free, so your callback endpoint stays out of PHI scope. You hydrate order and patient detail over authenticated GETs when you need it (the PHI boundary).

Next steps#