Service workspaces

Execute a scoped clinical or operational action

Persists a change and records team attribution. Action permissions depend on site, resource visibility and current state; not every action type is valid at every site. For editing, use resourceId and the latest expectedVersion. Signed hospital notes accept addenda only. Clinical orders, discharge/document processing, pharmacy stock/supplier/basket operations, appointments and messaging all use this endpoint. See the complete Action schema. CIS2 tokens do not grant team API access.

post/api/sites/{site}/actions

Request

  • Base URL
    https://sim.animahealth.com
  • Auth
    • HTTP bearer
    • or HTTP bearer
    • or API key in cookie sim_session

Path parameters

site'control' | 'gp' | 'hospital' | 'community' | 'pharmacy' | 'diagnostics' | 'referrals' | 'wearables' | 'patient' required

Service scope. control requires an operator token. legacy is browser-only.

Query parameters

worldstring

Operator only: world to inspect or mutate. Team keys always use their own world.

Headers

Idempotency-Keystring

Stable unique value for retries of the same action. Reuse it after an uncertain response; use a new value for a new action. Takes precedence over body clientRequestId.

Request body

type'hospital_note' | 'save_discharge_summary' | 'process_document' | 'messaging_action' | 'place_pharmacy_order' | 'update_pharmacy_basket' | 'remove_pharmacy_basket_line' | 'checkout_pharmacy_basket' | 'cancel_pharmacy_order' | 'receive_pharmacy_order' | 'receive_pharmacy_referral' | 'update_pharmacy_referral' | 'receive_stock' | 'update_stock_price' | 'link_prescription_stock' | 'register_attendance' | 'update_attendance' | 'connect_device' | 'create_task' | 'create_referral' | 'order_test' | 'draft_prescription' | 'book_appointment' | 'create_appointment_session' | 'set_appointment_slot' | 'arrive_appointment' | 'cancel_appointment' | 'save_consultation' | 'save_problem' | 'save_allergy' | 'send_message' | 'schedule_visit' | 'dispatch_robot' | 'review' | 'accept' | 'complete' | 'reject' | 'dispense' | 'collect' | 'share_record' | 'report_absence' | 'restore_staff' | 'allocate_shift' required
clientRequestIdstring uuid
documentTagsstring[]
documentCommand'send' | 'assign' | 'review' | 'file' | 'annotate'
patientIdstring
resourceIdstring
titlestring
target'control' | 'gp' | 'hospital' | 'community' | 'pharmacy' | 'diagnostics' | 'referrals' | 'wearables' | 'legacy'
expectedVersioninteger
textstring
consultationStatus'draft' | 'saved'
allergyStatus'active' | 'inactive'
reactionstring
sourceAllergyKeystring
problemStatus'active' | 'resolved'
problemCodestring
onsetDatestring date
sourceProblemKeystring
startsAtinteger
endsAtinteger
slotMinutesinteger
sessionIdstring
sessionVersioninteger
slotCommand'block' | 'unblock'
durationMinutesinteger
productIdstring
quoteIdstring
quoteVersioninteger
requiredUnitsinteger
quantityinteger
costPenceinteger
pricePenceinteger
reorderLevelinteger
pharmacyPathway'Sinusitis' | 'Sore throat' | 'Acute otitis media' | 'Infected insect bites' | 'Impetigo' | 'Shingles' | 'Uncomplicated UTI' | 'Minor illness' | 'Urgent medicine supply'
referralSource'gp' | 'hospital' | 'patient' | 'referrals'
pharmacyCommand'accept' | 'consult' | 'complete'
hospitalCommand'assign' | 'assess' | 'refer' | 'admit' | 'discharge'
acuity'1' | '2' | '3' | '4' | '5'
locationstring
dispositionstring
clinicianstring
mode'in-person' | 'telephone' | 'video' | 'online'

Response

Success

idstring required
patientIdstring
kindstring required
titlestring required
statusstring required
ownerstring required
visibleTostring[] required
priority'routine' | 'urgent' required
createdAtnumber required

Simulation Unix timestamp in milliseconds.

dueAtnumber

Simulation Unix timestamp in milliseconds.

dataobject required

Kind-specific payload. Hospital notes, medication orders and blood-test orders use the named schemas; the full workspace payload is returned without projection.

versioninteger required

Changes

No recorded changes to this operation across all 1 revision of this API.