If you are an AI coding agent
Build in the stage order below. Every recipe names the exact/v0.1 path, the request body and the response shape, and the check that keeps it true. Key answers by link_id, return option codings as given, use provider_price_id at checkout, and treat a 201 as “accepted”, not “correct”. Read Known gaps and staging before deciding an empty collection is a bug. Order status is not a read: it arrives as prescription webhook events at an endpoint you register with OpenLoop (by arrangement), so do not build an order-polling loop. Recipe headings are numbered by stage on the seven stage pages (## Recipe 3.2 · …, where 3 is the stage) and unnumbered on the six When things go wrong pages (## Recipe · …), because a failure recipe belongs to a situation rather than to a stage.
What you’ll do
Build the stages in this order. Each is independently useful, and each assumes the one before it works.1 · Start here
Authenticate, reach the API, and confirm your tenant is provisioned
2 · Intake
Create a patient, administer the right form, and submit it
3 · Payment
Take payment for a treatment. The order itself follows the clinician’s prescription
4 · Status and tracking
Status and tracking: prescription webhook events (by arrangement), and the clinician’s encounter note read by the encounter id your submit returned
5 · Scheduling
Offer availability and book visits
6 · Refills
Let a patient reapply, and track the resulting prescription
7 · Growth
Sell add-ons, upgrade a subscription, and run retention
Lab ordering
By arrangement, outside the stages: order lab tests for a patient you have already created
When things go wrong
Six pages that interrupt the stages above: payment failure, not eligible, cancel/pause/refund,
order exceptions, retries and idempotency, and the error envelope itself
Recipe 1.1 · Day one
Read three pages, in this order:- Getting started — hosts, credentials, the token exchange, and the response conventions every call shares
- Integration flow — the whole journey as a sequence diagram, plus the first-leg slice if you are staging your build
- Questionnaire workflow — who defines the questions and who controls presentation. Read this before you design any intake UI
If 3, 4 or 5 comes back empty, stop. That is not a fault in your code — your environment is
not seeded yet. Raise it before writing anything, because everything downstream depends on it.
Known gaps and staging explains what to ask for.
Locked by check
day-one-five-calls.What comes back
Four envelopes carry every answer in this cookbook. Learn these once and every page reads the same way.Reference, when you need it
Gotchas
Four things worth knowing before you start. The partner surface is/v0.1, including authentication at /v0.1/auth/token. Other version
prefixes are not for partners.
Collections return items; writes return data. Two different envelopes, and pagination
differs by resource; the product catalogue does not page yet. Getting started has the detail.
Log
request_id on every call. It is on every response, success or failure, and it is the
fastest way for us to find your exact request.What this cookbook is
Each page states what we have verified and what we have not. Where the published API reference and this cookbook disagree, tell us — we would rather fix it than have you work around it. Where a page says to ask your OLH implementation contact, that is a real handoff, not a deflection: some things are provisioned per customer and cannot be self-served yet. Those are called out explicitly rather than left for you to discover.Related
Getting started
Hosts, credentials, the token exchange, and the response conventions every call shares
Integration flow
The whole journey as a sequence diagram, plus the first-leg slice to build first
When things go wrong
The six failure pages, starting with the error envelope every endpoint shares

