The API
Endpoints
Every v1 endpoint, its SDK method, and what it does.
All paths live under your environment's API host (https://api.lab.palamond.dev here). Every call needs a patient bearer token, except the public GET /v1/config the SDK reads before a session exists. The endpoint tree now follows the same namespaces as PalamondClient, so the HTTP surface and SDK read the same way (GET /v1/patient/profile ↔ palamond.patient.profile(), POST /v1/tasks/{id}/complete ↔ palamond.tasks.complete(...)). Use the SDK when you can and let it own the URLs and bodies. The OpenAPI document at /v1/openapi.json carries the full request and response schemas; this page is the map.
| Endpoint | SDK method | What it does |
|---|
GET /v1/patient/profile | patient.profile() | The signed-in Patient. The canonical session check. |
POST /v1/patient/home | (used by patient.register(...)) | Assign a self-registered patient to their organization. register runs this for you; there is no separate call to make. |
GET /v1/config | (used by patient.register(...)) | Public per-environment configuration (the project id). Read automatically during registration; no session required. |
| Endpoint | SDK method | What it does |
|---|
GET /v1/protocols | protocols.list() | The care catalog: enrollable protocols and startable assessments. |
POST /v1/assessments | assessments.start(...) | Start (or resume) an assessment. See Complete an Assessment. |
POST /v1/enrollments | enrollments.create(...) | Enroll in a protocol (creates the draft plan). See Enroll in a Care Plan. |
POST /v1/enrollments/{id}/activate | enrollments.activate(id) | Start the draft plan: issues its tasks and visits. |
DELETE /v1/enrollments/{id} | enrollments.end(id) | Unenroll. Revokes the plan and cancels its open tasks. |
POST /v1/requests | requests.create(...) | Propose a medication, protocol, or treatment option for clinician review. |
| Endpoint | SDK method | What it does |
|---|
POST /v1/tasks/{id}/complete | tasks.complete(id, ...) | Complete one of the patient's tasks with the payload matching its kind: a QuestionnaireResponse reference, inline measurements, or a medication proposal (or decline). |
POST /v1/orders/{id}/decisions | orders.decide(id, ...) | Accept or decline each item of a proposed order, with a fulfilment method. See Decide an Order. |
| Endpoint | SDK method | What it does |
|---|
GET /v1/availability | availability.list(...) | Open visit slots for a care team or practitioner (or per-day counts for a calendar). |
POST /v1/appointments/{id}/reschedule | appointments.reschedule(id, ...) | Move a visit: cancels the original and books a linked replacement. Slot validation is server-side; a stale slot answers 409. |
POST /v1/appointments/{id}/cancel | appointments.cancel(id) | Cancel a visit. |
GET /v1/appointments/{id}/segments | appointments.segments(id) | What a visit is made of: each contact with its purpose, status and position, in declared order. |
POST /v1/appointments/{id}/encounter | appointments.startEncounter(id, ...) | Start (or resume) a visit segment. Omit the segment to start the next unfinished one. Idempotent. |
| Endpoint | SDK method | What it does |
|---|
GET /v1/agreements/requirements | agreements.requirements(...) | Which agreements are still unmet, for an optional context (service, plan, task). |
POST /v1/agreements/acceptances | agreements.accept(...) | Record acceptances. Clickwrap proof is stamped server-side. |
POST /v1/agreements/withdrawals | agreements.withdraw(...) | Withdraw an agreement. Withdrawing a required one demands explicit acknowledgement. |
| Endpoint | SDK method | What it does |
|---|
POST /v1/documents | documents.upload(...) | Upload a file (the raw bytes are the body). Returns an attachment ready for a valueAttachment answer. |
The FHIR plane has no wrapper methods of its own; the SDK's typed FHIR helpers (searchResources, readResource, createResource, ...) target it directly.
| Endpoint | What it does |
|---|
GET /v1/fhir/{ResourceType} | FHIR search over the patient's record; returns a Bundle. |
GET /v1/fhir/{ResourceType}/{id} | Read one resource. |
PUT /v1/fhir/Patient/{id} | Update the patient's own demographics. |
POST /v1/fhir/QuestionnaireResponse | Create the patient's own questionnaire answers (PUT updates them). |