REST API

DELETE /v1/patients/{patient_id}

Move a patient to the trash

DEL /v1/patients/{patient_id}

Sets the deleted flag — never a hard delete; POST .../restore undoes it.

Path parameters #

  • patient_id string required

    The patient's document id.

Responses #

  • 200 Successful Response

    • document_id string required
    • workspace_id string required
    • resource enum("patients" | "exams" | "templates") required
    • security_group_id string required
    • encrypted_keys object required
    • encrypted_index object
    • streams object
    • meta object
    • created_at string required
    • created_by string required
    • updated_at string required
    • updated_by object
    • is_archived boolean
    • is_deleted boolean
  • 400 The vault refused the request as invalid.

    • error object required

      The body of every non-2xx response: what went wrong, for a program and for a person.

  • 401 No client certificate, or the SDK session was rejected or expired (`session_expired`).

    • error object required

      The body of every non-2xx response: what went wrong, for a program and for a person.

  • 402 The workspace has no credit for this.

    • error object required

      The body of every non-2xx response: what went wrong, for a program and for a person.

  • 403 CN not allowed, permission denied, or no key for the data's security group (`group_key_unavailable`).

    • error object required

      The body of every non-2xx response: what went wrong, for a program and for a person.

  • 404 Not found — also a node read under a group it does not belong to.

    • error object required

      The body of every non-2xx response: what went wrong, for a program and for a person.

  • 409 A pending or newer version, a replay, or an upload that never reached storage.

    • error object required

      The body of every non-2xx response: what went wrong, for a program and for a person.

  • 422 The body or query failed validation (`invalid_request`).

    • error object required

      The body of every non-2xx response: what went wrong, for a program and for a person.

  • 429 Rate limited, after the SDK's own backoff gave up.

    • error object required

      The body of every non-2xx response: what went wrong, for a program and for a person.

  • 500 An envelope did not open (`crypto_error`, no detail on purpose).

    • error object required

      The body of every non-2xx response: what went wrong, for a program and for a person.

  • 502 The vault failed, or answered outside the protocol (`protocol_error`).

    • error object required

      The body of every non-2xx response: what went wrong, for a program and for a person.

curl --cert client.crt --key client.key \
  -X DELETE "https://api.imgexam.com/v1/patients/<patient_id>" \
  -H "Content-Type: application/json"
{
  "document_id": "string",
  "workspace_id": "string",
  "resource": "patients",
  "security_group_id": "string",
  "encrypted_keys": {},
  "encrypted_index": {},
  "streams": {},
  "meta": {},
  "created_at": "string",
  "created_by": "string",
  "updated_at": "string",
  "updated_by": {},
  "is_archived": false,
  "is_deleted": false
}