Skip to content
Hermes Health API
GuidesOpenAPI spec

Endpoints

Auth check

GET/v0/auth-check/{filename}

Retrieve a standalone auth check

Fetch the extraction, derived verdicts, and presigned URLs for a standalone auth-check upload.

token is required: an embed token minted for this same document via POST /v0/auth-check/<filename>/embed-token, which carries the patient data the patient-comparison checks (patientName, patientDateOfBirth, signerName, capability, minorAuthorization, deceasedAuthorization) compare against. A missing token, a token minted for a different document, or an expired or tampered token is rejected with 401. A filename that is not a single path segment of at most 255 bytes, starts with a dot, or has no name before its extension is rejected with 400.

A null field in verdicts means that check did not run — it does not mean the check passed. datesOfService is scoped to a record request and never runs here; a HITECH authorization type detected on the document clears the revocation / redisclosure / conditioning / sensitive-info verdicts; documentValidity is null when no supporting documents raise a concern. The exception is sensitiveInformation: a null category verdict there means that category was not requested, and noSensitiveInformationRequested is set only when none is. purposeAlignment needs the owning project’s purpose, which a standalone submission has none of, so it never runs here.

While the analysis is still running, verdicts is null as a whole. Poll on verdicts, not extraction: extraction can already be present, with empty data, before the analysis finishes.

The extraction schema evolves as we expand document-type and edge-case coverage. If you are rendering the result to end users, prefer the iframe embed over consuming this schema directly — see Embedding the auth-check UI.

This endpoint also returns a presigned uploadUrl. That is preserved for backwards compatibility — new integrations should use PUT /v0/auth-check/<filename> to obtain an upload URL, which avoids the extra S3 read-side work this endpoint performs.

Parameters

  • filenamestringpath, required

    The standalone auth-check document's file name, scoped to your user.

  • tokenstringquery, required

    Embed token minted for this document via `POST /v0/auth-check/{filename}/embed-token`; supplies the patient context the comparison verdicts run against.

ReturnsSuccess

  • uploadHeadersobject

    Extra headers to send with the upload. Normally empty.

  • expiresIninteger

    How long the URLs in this object stay valid, in seconds from when they were issued. Fetch a fresh object rather than caching one.

  • looseFilesobject[]

    Other files stored under this file's location that are not part of its own document set, such as separately uploaded scans, each with its own short-lived download URL. Empty when there are none or when this response only offers an upload.

  • looseFiles[].urlstring

    Short-lived presigned URL to download the file.

  • looseFiles[].fileNamestring

    The name a reader sees. For a record request's deliverables this is the unique name the shared presentation assigned (see `DeliverableView`), so it can differ from the object's own basename when two returns brought the same file name; everywhere else it IS the basename.

  • looseFiles[].keystring

    The file's full storage path, `/`-separated.

  • looseFiles[].sizeinteger

    The file's size in bytes.

  • looseFiles[].lastModifiedstring

    When the file was last written.

Conditional attributes

  • downloadUrlstring

    Short-lived presigned URL to download the file. Null when no file is stored yet, or when this response only offers an upload.

  • uploadUrlstring

    Short-lived presigned URL to upload the file: `PUT` the raw bytes to it exactly as issued, with no `Authorization` header. Uploading again replaces the file. Null when this response only offers a download.

  • extractionobject

    The document's extraction (form data under `data`, plus text and page count). Null for non-auth-check files.

  • verdictsobject

    The auth-check verdicts derived from `extraction`. Null for non-auth-check files or when the document hasn't been analyzed.

  • verdictCountsobject

    Tally of `verdicts` by status, a readability convenience for API consumers. Null exactly when `verdicts` is null.

  • embedTokenstring

    Standalone auth-check embed token, pre-minted on the upload path when the caller supplies patient context alongside the request for an upload URL. Equivalent to the token from `POST /v0/auth-check/<filename>/embed-token`, saving that round-trip. Null when no patient context was supplied.

  • looseFiles[].folderstring

    The display folder this file sits in, `/`-joined, relative to the listing root. Populated only where a listing presents a tree — a record request's deliverables — and omitted from the payload otherwise.

  • looseFiles[].uploadedByobject | object | object | object | object | object | object | object | object | object | object

    Who or what placed this file. Absent for older files recorded without attribution.

  • uploadedByobject | object | object | object | object | object | object | object | object | object | object

    Who or what placed this file. Absent when no attribution was recorded or when this endpoint does not report it.

Errors

400401500

PUT/v0/auth-check/{filename}

Mint an upload URL for an auth check

Request a presigned S3 upload URL for a standalone auth-check file.

Use this endpoint whenever you need to upload — previously customers had to call GET /v0/auth-check/<filename> and pluck the uploadUrl out of a combined read/write response. Prefer this route: it never touches S3 on the read path, so it is cheaper and returns faster.

You may optionally send the same patient-context body accepted by POST /v0/auth-check/<filename>/embed-token. When you do, the response carries a pre-minted embedToken for this document, saving that extra round-trip — fetch and embed can proceed as soon as the upload completes. Omit the body if you don’t yet have the patient context (e.g. the user uploads first and fills the form later); mint it separately when ready.

Patient context sent here is stored with the submission, so it stays reviewable in the auth-checker’s Submissions tab after the one-hour embed token expires. Uploading again under the same filename records a new submission with the patient context sent that time.

The body may also carry an optional referenceId: your own identifier for the patient (an MRN or account number), at most 255 characters, shown in the Submissions tab so the submission can be matched back to your patient. A blank value is treated as absent, and a longer one is rejected with 400. It is stored with the submission only, never in the embed token.

filename must be a single path segment of at most 255 bytes, must not start with a dot, and must have a name before its extension; anything else is rejected with 400.

After a successful PUT to the returned uploadUrl, call GET /v0/auth-check/<filename> to fetch the analysis payload and a presigned download URL for the uploaded object.

Parameters

  • filenamestringpath, required

    The standalone auth-check document's file name, scoped to your user.

Request bodyapplication/json

object & object

ReturnsSuccess

  • uploadHeadersobject

    Extra headers to send with the upload. Normally empty.

  • expiresIninteger

    How long the URLs in this object stay valid, in seconds from when they were issued. Fetch a fresh object rather than caching one.

  • looseFilesobject[]

    Other files stored under this file's location that are not part of its own document set, such as separately uploaded scans, each with its own short-lived download URL. Empty when there are none or when this response only offers an upload.

  • looseFiles[].urlstring

    Short-lived presigned URL to download the file.

  • looseFiles[].fileNamestring

    The name a reader sees. For a record request's deliverables this is the unique name the shared presentation assigned (see `DeliverableView`), so it can differ from the object's own basename when two returns brought the same file name; everywhere else it IS the basename.

  • looseFiles[].keystring

    The file's full storage path, `/`-separated.

  • looseFiles[].sizeinteger

    The file's size in bytes.

  • looseFiles[].lastModifiedstring

    When the file was last written.

Conditional attributes

  • downloadUrlstring

    Short-lived presigned URL to download the file. Null when no file is stored yet, or when this response only offers an upload.

  • uploadUrlstring

    Short-lived presigned URL to upload the file: `PUT` the raw bytes to it exactly as issued, with no `Authorization` header. Uploading again replaces the file. Null when this response only offers a download.

  • extractionobject

    The document's extraction (form data under `data`, plus text and page count). Null for non-auth-check files.

  • verdictsobject

    The auth-check verdicts derived from `extraction`. Null for non-auth-check files or when the document hasn't been analyzed.

  • verdictCountsobject

    Tally of `verdicts` by status, a readability convenience for API consumers. Null exactly when `verdicts` is null.

  • embedTokenstring

    Standalone auth-check embed token, pre-minted on the upload path when the caller supplies patient context alongside the request for an upload URL. Equivalent to the token from `POST /v0/auth-check/<filename>/embed-token`, saving that round-trip. Null when no patient context was supplied.

  • looseFiles[].folderstring

    The display folder this file sits in, `/`-joined, relative to the listing root. Populated only where a listing presents a tree — a record request's deliverables — and omitted from the payload otherwise.

  • looseFiles[].uploadedByobject | object | object | object | object | object | object | object | object | object | object

    Who or what placed this file. Absent for older files recorded without attribution.

  • uploadedByobject | object | object | object | object | object | object | object | object | object | object

    Who or what placed this file. Absent when no attribution was recorded or when this endpoint does not report it.

Errors

400401500

POST/v0/auth-check/{filename}/embed-token

Mint an auth-check embed token

Mint an embed token for iframing the auth-check UI.

The token encapsulates the patient info and PDF storage key so the read-only embed view at GET /ui/auth-check/embed?token=... can render without any session or DB lookup. Tokens are stateless, sealed with authenticated encryption (encrypt-then-MAC, keyed apart from the generic URL-query oracle), and expire one hour after minting. The pdfStorageKey is derived server-side from the authenticated user, so a caller cannot mint a token for another user’s document.

The same token is also required by the JSON endpoint GET /v0/auth-check/<filename>?token=..., which uses its patient info to run the patient-comparison verdicts.

The patient info is also stored with the submission, so it stays reviewable in the auth-checker’s Submissions tab after the token expires. Minting again for the same filename with different patient info corrects it.

The body may also carry an optional referenceId: your own identifier for the patient (an MRN or account number), at most 255 characters, shown in the Submissions tab beside the patient. It is stored with the submission only, never in the token. Minting again with a different referenceId replaces it. Minting for the same patient without one, or with a blank one, keeps the reference already recorded, so a recorded reference cannot be removed this way; minting for a different patient drops it unless a new one is sent, and re-uploading the document clears it. A longer referenceId is rejected with 400.

filename must be a single path segment of at most 255 bytes, must not start with a dot, and must have a name before its extension; anything else is rejected with 400.

This endpoint is for the standalone flow (a document uploaded outside any patient context — typically via the auth-checker UI). For patient- or record-request-scoped documents, PatientOutput and RecordRequestOutput responses include a pre-minted embedToken field and this extra round-trip is unnecessary.

See Embedding the auth-check UI for the full iframe integration guide.

Parameters

  • filenamestringpath, required

    The standalone auth-check document's file name, scoped to your user.

Request bodyapplication/json

object & object

ReturnsSuccess

  • tokenstring

    The embed token: an opaque encrypted string to pass to the embed as its `token` query parameter. It grants access to what it was minted for until it expires, so mint a fresh one rather than storing it.

Errors

400401500

POST/v0/auth-check/{filename}/retrigger

Re-run a standalone auth-check

Discards the document’s current analysis and queues it to be analyzed again. The call returns as soon as the re-run is queued; until it finishes, GET /v0/auth-check/{filename} reports verdicts as null. The document must already have been uploaded.

Parameters

  • filenamestringpath, required

    The standalone auth-check document's file name, scoped to your user.

ReturnsSuccess

Errors

400401500