Skip to main content
POST
curl

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Idempotency-Key
string

Optional key that makes a retry safe. Generate one value per logical operation (8 to 128 ASCII letters, digits, underscores or hyphens) and resend the same value on every retry. A repeat of a completed request returns its original status with Idempotent-Replayed: true and a short body of state, resource_ids and response_hash; read the resources to recover their content. Reusing a key with a different request returns 422 idempotency_key_reuse; a request still running returns 409 idempotency_in_progress. Keys are kept for 30 days. See https://docs.hi-doctor.ai/api-reference/idempotency.

Pattern: ^[A-Za-z0-9_-]{8,128}$

Body

multipart/form-data
file
file
required

Multipart file bytes; use a synthetic upload fixture when testing.

kind
enum<string>
default:other

Document or PDF variant selected by the endpoint.

Available options:
prescription,
lab_result,
photo,
other
note
string
default:""

Optional note attached to the resource. Maximum 500 characters.

Maximum string length: 500
consultation_id
string<uuid> | null

Identifier of the related consultation. May be null when unavailable.

Response

Successful create a health document.

id
string<uuid>
required
read-only

Unique identifier of this resource. Returned by the server; not writable.

url
string<uri>
required
read-only

URL returned for this resource; provider links may expire. Returned by the server; not writable.

filename
string
required
read-only

Filename for this patient document. Returned by the server; not writable.

content_type
string
required

Content type for this patient document. Maximum 100 characters.

Maximum string length: 100
size_bytes
integer
required

Size bytes for this patient document.

consultation
string<uuid> | null
required
read-only

Consultation for this patient document. Returned by the server; not writable. May be null when unavailable.

consultation_summary
required

Consultation summary for this patient document. Returned by the server; not writable. May be null when unavailable.

uploaded_at
string<date-time>
required
read-only

Uploaded at timestamp in ISO 8601 format. Returned by the server; not writable.

kind
enum<string>

Document or PDF variant selected by the endpoint.

Available options:
prescription,
lab_result,
photo,
other
note
string

Optional note attached to the resource. Maximum 500 characters.

Maximum string length: 500