Skip to main content

Set accounts for a resource

Set the Account references recorded in the resource's Ovok metadata. This route updates one resource and is restricted to project administrators. For propagation from a Patient to its compartment, use the Patient-specific operation and propagate=true.

MethodPath
POST/fhir/R4/:type/:id/$set-accounts

Request​

Send a FHIR Parameters resource with one or more accounts references.

curl --request POST \
--url "https://api.sandbox.ovok.com/fhir/R4/Encounter/${ENCOUNTER_ID}/\$set-accounts" \
--header "Authorization: Bearer ${OVOK_TOKEN}" \
--header 'Content-Type: application/fhir+json' \
--data "{\"resourceType\":\"Parameters\",\"parameter\":[{\"name\":\"accounts\",\"valueReference\":{\"reference\":\"Account/${ACCOUNT_ID}\"}}]}"
ParameterTypeDescription
:typePathFHIR resource type.
:idPathID of the resource to update.
accountsReference, repeatedAccount references to assign. An empty list clears the account association.

Successful response​

The synchronous response is a FHIR Parameters resource with a resourcesUpdated integer, normally 1 for this single-resource operation.

Response parameterTypeDescription
resourcesUpdatedintegerNumber of resources updated.

The server rejects requests from callers without the required project administration permission.