Skip to main content
PATCH
Update an encounter
Some EMR configurations approve an encounter automatically when it is signed; others leave it unapproved. The encounter.created webhook tells you which: when approved is false, call this endpoint to approve the encounter. Updates are processed asynchronously. We return a success response as soon as the request is accepted, then send a webhook when the update has been applied in the EMR.

Path Parameters

  • id (string, required): The Cobalt encounter_id returned when the encounter was created.

Request Parameters

Required Fields

  • approved (boolean, required): Must be true. Approves the encounter. Unapproving is not supported. If the encounter was already approved in the EMR before your request (for example, approved by a user in the EMR), nothing is changed and the encounter.updated webhook has already_approved: true.

Optional Fields

  • callback_urls (array of strings, optional): URLs to receive the completion webhook for this update, in addition to your account webhook.

Example Request

Example Response

Error Responses

Missing Approved

Encounter Not Found

Encounter Not Created Yet

Update Already In Progress

Unsupported EMR

Webhook Notifications

Success

The webhook data includes:
  • encounter_id: The Cobalt encounter ID.
  • emr_encounter_id: The encounter id in the EMR.
  • emr_status: The encounter status in the EMR.
  • approved: true once the encounter is approved.
  • already_approved: true if the encounter was already approved in the EMR before your request, so nothing was changed. false if this request approved it.
  • patient_mrn: The patient’s medical record number.

Failure

A failed update is not retried automatically; send the request again once the cause is fixed. Common failure_reason values:
  • Service <id> cannot be approved by this account (no Approve button on the visit view). — the connected EMR user does not have rights to approve this encounter.
  • Approve did not persist for service <id> ... — the EMR did not record the approval. Retry the request.

Authorizations

client_id
string
header
required
client_secret
string
header
required
access_token
string
header
required

Path Parameters

id
string
required

Cobalt encounter ID (UUID, with or without dashes).

Body

application/json
approved
enum<boolean>
required

Set to true to approve the encounter in the EMR. An encounter that is already approved is left as is.

Available options:
true
Example:

true

callback_urls
string[]

URLs to receive the completion webhook for this update, in addition to the account webhook.

Response

Encounter update queued for processing

success
boolean
required
message
string
required
encounter_id
string
required
job_id
integer
required