Skip to content

Create Case

Creates a case — an episode of care for a patient.

Endpoint

POST /v2/cases

Request Body

Parameter Type Required Description
patient_id string Yes The patient. Correlate on this — it's a stable id, and there's no external-reference field.
title string Yes 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.
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.

Request

curl --location '{base_url}/v2/cases' \
  --header 'Authorization: Bearer JWT_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
  "patient_id": "63120",
  "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",
  "treating_provider_ids": [
    "2094"
  ],
  "primary_coverage_id": "90455",
  "secondary_coverage_id": null
}'

Response

Success Response

Code: 201 Created

{
  "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",
  "treating_provider_ids": [
    "2094"
  ],
  "primary_coverage_id": "90455",
  "secondary_coverage_id": 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"
}

The Location header carries the URL of the created resource.

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.
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.
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.
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

  • Physicians are referenced by id: referring_physician_id (a registry record) and treating_provider_ids. Inline physician objects aren't accepted — create the registry record first.