Sample apps
Three complete apps built from the guides: a booking widget, an AI receptionist and payment posting.
| App | What it does | Language | Guides it uses |
|---|---|---|---|
| Booking widget | A web page that shows open times, takes the patient's details and books. Confirms the booking from the appointment_insertion webhook. | Node, no packages | Scheduling quickstart, Patients quickstart, Setting up webhooks |
| AI receptionist | A text conversation that finds the caller, offers open times and books once they say yes. A language model runs the conversation and calls four functions over the API. | Python | Scheduling quickstart, Patients configuration guide |
| Payment posting | A command that applies a payment to the patient's oldest charges, posts it to the ledger and waits for it to appear. | Node, no packages | Payments quickstart, Payments configuration guide |
What they have in common
- One place for credentials. Each app reads
NEX_API_KEY,NEX_SUBDOMAINandNEX_LOCATION_IDfrom the environment and trades the key for a bearer token itself. Tokens last 1 hour in production, so the two apps that keep running refresh theirs after 50 minutes. - Every call goes through one function that sets
Nex-Api-Version, adds the token, and turnscode: falseinto an error with the API's own message. - A write is not done at
201or202. The widget waits forappointment_insertion. The payment app pollsGET /paymentsbytransaction_id. See How a write reaches the health record system. - No duplicate patients. The widget creates with
return_existing_if_match, so a returning patient gets their existing record. The receptionist searches by phone and books only a patient it found.
Before you run one
- Get a sandbox key, subdomain and location ID from the Quickstart.
- Set the environment variables each page lists.
- Run the app against the sandbox first. Switch
NEX_API_KEYto a production key only after the Go-live checklist.
The apps use a stand-in NEX_BASE variable for the API host, so you can point them at a local test server. Leave it unset to call https://nexhealth.info.
Updated about 1 hour ago
Did this page help you?