Skip to main content
POST
Upload one file to a profile. Send it as multipart/form-data. Without extract_results, Aniva only stores the file. With extract_results: true, Aniva also reads the lab values out of the file. You do not say what kind of report the file is. Aniva decides. A file without lab results, such as a doctor’s letter, ends as stored and is not an error. Read the values with Get Document Results. You do not need to poll: subscribe to the document.results.* webhooks. Requires the documents_upload scope on a profile group of the profile. extract_results: true also requires the documents_extract_results scope on the same group. Ask Aniva to add them. The document belongs to that group: keys with results_view on it read the document and its results. Send an optional Idempotency-Key header to make the upload safe to retry. See Idempotency.

What extraction does

With extract_results: true:
  1. Aniva sends the file to its OCR and AI subprocessors to read the values.
  2. The values appear in the member’s Aniva app, like every other result.
  3. Each value carries origin: partner_upload and the same status as every other result. A value Aniva’s automatic check doubts has status likely_wrong.
Without it, the file goes to no outside service when you also send document_date.
  • Automated reading can misread a value, a unit or a date. The original file stays the source of truth. Check a value against it before you use it for a medical decision. Extracted values are not a diagnosis.
  • The subprocessors are Mistral AI (OCR, EU) and Google Cloud Vertex AI, reached through the Vercel AI Gateway (extraction, may process outside the EU). They process the file only to read it.
  • You need a legal basis to upload a member’s health data, normally the member’s explicit consent. You are responsible for it.

Request

Form fields

file
required
The file. PDF, DOC, DOCX, PNG or JPEG, at most 4 MB.
string
required
UUID of the profile the document belongs to.
boolean
default:"false"
true to read the lab values out of the file. Send true or false.
string
The sample date in YYYY-MM-DD format, when you know it. Without it, Aniva reads the date from the file.

Response

The API returns 201 Created when it only stored the file, and 202 Accepted when extraction runs.
string
required
Document ID (UUID). Use it with Get Document Results and Download Document.
string
required
processing while Aniva extracts the values, or stored when the file is only stored.
string
required
The profile the document belongs to.
string
The sample date you sent, or the one Aniva read from a stored file. May be null.
string
required
The Get Document Results URL of this document.
string
required
File name for display, the same one Download Document sends.
string
required
The file name you uploaded.
string
required
Always partner_upload.
string
required
Media type of the file, e.g. application/pdf.
string
Version of the file content. May be null.
integer
File size in bytes. May be null.
string
Always null for an uploaded document.

Error responses