Concepts

Orders & fulfillment

The order lifecycle — from intake and provider approval to routing, dispatch, and shipment.

An order is the unit of fulfillment: one or more prescriptions for one patient, routed to a pharmacy. neolife owns the order as the system of record, so its status is authoritative even when the underlying pharmacy only pushes updates.

Lifecycle#

Status Meaning
draft Created but not yet complete (patient/fields pending).
pending_approval Ready for a licensed provider to review.
approved A provider approved it. Eligible for submission.
submitting Claimed for a single dispatch (a safety lock — see below).
submitted Accepted by the pharmacy.
shipped In transit — a shipment with tracking exists.
delivered Delivered to the patient.
rejected A pharmacy declined it (with a reason).

Provider approval is mandatory#

There is no path that submits a clinical order without a licensed provider's approval — the API refuses to submit an unapproved order, and this is enforced server-side. In a typical flow:

  1. The patient completes a compliance intake questionnaire.
  2. A licensed provider reviews and approves (or rejects) it.
  3. The approved order becomes eligible for submission to a pharmacy.

Single dispatch#

When you submit an order, neolife atomically claims it for exactly one dispatch before contacting the pharmacy. A concurrent or duplicate submit — a manual retry racing an automatic one, an at-least-once queue redelivery — cannot produce a second physical shipment. Pair this with an Idempotency-Key on your side and retries are always safe.

Submitting#

curl -X POST https://api.neolife.health/v1/orders/ord_123/submit \
  -H "Authorization: Bearer $NEOLIFE_API_KEY" \
  -H "Idempotency-Key: <uuid>"

On success the order moves to submitted; you'll then receive order.submitted, order.shipped, and delivery events over webhooks.

Routing & failover#

Which pharmacy an order goes to is decided by your routing policy. If the chosen pharmacy rejects the order and your policy allows it, neolife automatically reroutes to an alternate and retries once — no double dispatch, no manual intervention.