Skip to content

Update Case

Updates a case and returns the updated record.

Endpoint

PATCH /v2/cases/{spry_case_id}

Path Parameters

Parameter Type Required Description
spry_case_id string Yes The case's business key.

Request Body

Parameter Type Required Description
title string No A short label for the episode of care.
speciality string No The record's primary speciality.
body_parts array of string No Body parts treated on this case. Plain names; laterality isn't modelled.
icd_codes array of string No ICD-10 codes; an unknown code rejects the write with 400.
date_of_injury string (date) No YYYY-MM-DD.
date_of_surgery string (date) No YYYY-MM-DD.
referring_physician_id string or null No Id from List Referring Physicians. Create the registry record first, then reference it here. An explicit null clears the slot.
direct_access boolean No The patient is treated without a physician referral. Attaching a referring physician to a case that has none turns it off, even in the same request, and so does certifying its plan of care.
treating_provider_ids array of string No Providers treating this case.
primary_coverage_id string or null No Id of one of the patient's coverages.
secondary_coverage_id string or null No Id of a second coverage to bill this episode against. null when unset; an explicit null on PATCH clears the slot.
payment_mode string No Who pays for this episode of care. The case's lead takes its payment mode from here (INSURANCE_PAY shows as INSURANCE on the lead). One of SELF_PAY, INSURANCE_PAY.
deny_scheduling boolean No true turns scheduling off for this case; false turns it back on.
scheduling_denied_reason string or null No Why scheduling is turned off. Optional; null clears it.
status string No One of ACTIVE, DISCHARGED, DROPPED.

Request

curl --location '{base_url}/v2/cases/SPRY-63120-2' \
  --request PATCH \
  --header 'Authorization: Bearer JWT_TOKEN' \
  --header 'Content-Type: application/merge-patch+json' \
  --data '{
  "title": "L Knee Post-Op",
  "speciality": "PHYSICAL_THERAPY",
  "body_parts": [
    "KNEE"
  ],
  "icd_codes": [
    "M25.562"
  ],
  "date_of_injury": "2026-08-27",
  "date_of_surgery": "2026-08-27",
  "referring_physician_id": "3377",
  "direct_access": false,
  "treating_provider_ids": [
    "2094"
  ],
  "primary_coverage_id": "90455",
  "secondary_coverage_id": null,
  "payment_mode": "INSURANCE_PAY",
  "deny_scheduling": false,
  "scheduling_denied_reason": null,
  "status": "ACTIVE"
}'

Response

Success Response

Code: 200 OK

{
  "spry_case_id": "SPRY-63120-2",
  "patient_id": "63120",
  "title": "L Knee Post-Op",
  "speciality": "PHYSICAL_THERAPY",
  "status": "ACTIVE",
  "body_parts": [
    "KNEE"
  ],
  "icd_codes": [
    "M25.562"
  ],
  "date_of_injury": "2026-08-27",
  "date_of_surgery": "2026-08-27",
  "referring_physician_id": "3377",
  "referring_therapist_id": "2187",
  "direct_access": false,
  "treating_provider_ids": [
    "2094"
  ],
  "primary_coverage_id": "90455",
  "secondary_coverage_id": null,
  "payment_mode": "INSURANCE_PAY",
  "deny_scheduling": false,
  "scheduling_denied_reason": null,
  "visit_count": null,
  "visit_limit": null,
  "authorization_required": true,
  "authorization_status": null,
  "created_at": "2026-08-27T14:30:00Z",
  "updated_at": "2026-08-27T14:30:00Z"
}

Response Fields

Field Type Description
spry_case_id string The case's business key.
patient_id string The patient. Correlate on this — it's a stable id, and there's no external-reference field.
title string A short label for the episode of care.
speciality string or null The record's primary speciality.
status string One of ACTIVE, DISCHARGED, DROPPED.
body_parts array of string Body parts treated on this case. Plain names; laterality isn't modelled.
icd_codes array of string
date_of_injury string (date) or null YYYY-MM-DD.
date_of_surgery string (date) or null YYYY-MM-DD.
referring_physician_id string or null Id from List Referring Physicians. Create the registry record first, then reference it here. An explicit null clears the slot.
referring_therapist_id string or null The provider who referred the patient: the patient's, read with the case. null for none. Read-only, and left out of a create's response.
direct_access boolean The patient is treated without a physician referral. Attaching a referring physician to a case that has none turns it off, even in the same request, and so does certifying its plan of care.
treating_provider_ids array of string Providers treating this case.
primary_coverage_id string or null
secondary_coverage_id string or null Id of a second coverage to bill this episode against. null when unset; an explicit null on PATCH clears the slot.
payment_mode string or null Who pays for this episode of care; null until set. The case's lead takes its payment mode from here (INSURANCE_PAY shows as INSURANCE on the lead). One of SELF_PAY, INSURANCE_PAY.
deny_scheduling boolean true when scheduling is turned off for this case; false when it never was.
scheduling_denied_reason string or null Why scheduling is turned off, as staff wrote it.
visit_count integer or null
visit_limit integer or null
authorization_required boolean
authorization_status string or null
created_at string (date-time) or null
updated_at string (date-time) or null

Error Response

Code: 400 Bad Request

{
  "code": "bad_request",
  "message": "Validation failed",
  "errors": [
    {
      "field": "patient_id",
      "message": "must be a string"
    }
  ]
}

Every error has the same shape — a machine-readable code, a message, and an errors[] array that's empty when there's nothing field-specific to report. The HTTP status is authoritative.

Status code Meaning
400 Bad Request bad_request The request body or parameters failed validation. errors[] names the offending fields.
401 Unauthorized unauthorized The access token is missing, malformed or expired.
403 Forbidden forbidden The request references a resource outside the token's organisation or clinic scope.
404 Not Found not_found No such resource, or it's outside your scope.
429 Too Many Requests rate_limited Rate limit exceeded. Back off and retry.
500 Internal Server Error internal_error Unexpected server error.
502 Bad Gateway upstream_error Upstream service failed or timed out.

Notes

  • PATCH is a JSON Merge Patch (RFC 7386): an omitted field is left alone, an explicit null clears it, and an array replaces the existing one wholesale.
  • This is how you attach a referring physician or set the coverage pointers: PATCH referring_physician_id, primary_coverage_id or secondary_coverage_id. An explicit null clears a slot.
  • payment_mode can't be cleared once set, and direct_access takes only true or false.
  • status: "DROPPED" marks a case that ended before treatment began; dropping the case's lead sets it too.
  • deny_scheduling: true turns scheduling off for the case, with an optional scheduling_denied_reason; send false and null to turn it back on.