Skip to content
Hermes Health API
GuidesOpenAPI spec

Endpoints

Fees

POST/v0/fees/browse

Browse fees

Queries the fees charged to your company: one row per charge, with its feeType, amount, status and the patient, project and record request it was charged for. Read-only, and scoped to your own company; a sandbox API key sees only the fees on sandbox projects. Uses the shared browse syntax described in Browsing tables and returns the { table, aggregate, total } envelope as JSON, or the selected columns as CSV when you send Accept: text/csv. To match each search to what it was billed, see Reconciling search fees.

Request bodyapplication/json

Optional parameters

  • selectobject
  • select.feeobject

    Which of the fee's columns to return.

  • select.fee.idboolean

    The unique id of the fee.

  • select.fee.feeTypeboolean

    What the fee was charged for, such as `PatientHistoriesPlus` for a Patient Histories run that found new lab results.

  • select.fee.amountboolean

    The amount charged, in US dollars. A search fee is the per-search rate multiplied by the number of last names searched. A discount's amount is negative.

  • select.fee.statusboolean

    The billing status of the fee, such as `pending` before it is invoiced.

  • select.fee.invoiceIdboolean

    The invoice the fee was billed on, once it has been invoiced.

  • select.fee.createdAtboolean

    When the fee was charged.

  • select.fee.updatedAtboolean

    When the fee was last changed.

  • select.fee.apiKeyModeboolean

    The kind of credential whose request incurred the fee. Null when none was recorded.

  • select.fee.resourceSuffixboolean

    For a fee charged on a file, such as a document read or an authorization checked, the path of the file beneath the patient.

  • select.fee.siteChargedboolean

    For a fee a site charged for a record request's records, what the site charged, in US dollars. The amount you are billed is no more than what is left of the record request's fee limit, so it can be less than this. Null for other fees.

  • select.fee.documentDeletedAtboolean

    When the auth-check document this fee was billed for was permanently deleted at the customer's request. Null while the document still exists, and for every other fee type.

  • select.fee.companyIdboolean

    The company the fee was charged to.

  • select.fee.projectIdboolean

    The project the fee was charged under, when it was charged for work in a project.

  • select.fee.patientIdboolean

    The patient the fee was charged for, when it was charged for a search or a record of one patient.

  • select.fee.requestIdboolean

    The record request the fee was charged for, when it was charged for a request.

  • select.fee.userIdboolean

    The user whose action incurred the fee, when one did.

  • select.fee.documentExistsboolean

    Whether an invoice file is attached to the fee.

  • select.fee.receiptExistsboolean

    Whether a receipt file is attached to the fee.

  • select.fee.documentDownloadUrlboolean

    A short-lived link to download the invoice file attached to the fee. Null when no invoice is attached.

  • select.fee.receiptDownloadUrlboolean

    A short-lived link to download the receipt file attached to the fee. Null when no receipt is attached.

  • select.fee.authCheckDownloadUrlboolean

    For an authorization-check fee, a short-lived link to download the exact version of the document that was checked. Null for other fees, and null once the customer has deleted the document (see `documentDeletedAt`).

  • select.fee.filenameboolean

    For an authorization-check fee, the name of the file that was checked.

  • select.fee.etagboolean

    For an authorization-check fee charged before file versions were recorded, a fingerprint of the file that was checked. Null for newer fees and other fee types.

  • select.fee.versionIdboolean

    For an authorization-check fee, the version of the file that was checked.

  • select.fee.nameboolean

    For a site-finder fee, the facility name that was looked up.

  • select.fee.addressboolean

    For a site-finder fee, the street address that was looked up.

  • select.fee.cityboolean

    For a site-finder fee, the city that was looked up.

  • select.fee.stateboolean

    For a site-finder fee, the state that was looked up.

  • select.fee.zipboolean

    For a site-finder fee, the ZIP code that was looked up.

  • select.fee.resolvedSiteIdboolean

    For a site-finder fee, the site the lookup matched. Null when it matched none.

  • select.fee.siteIdboolean

    For an AI research fee, the site that was researched.

  • select.fee.siteNameboolean

    For an AI research fee, the name of the site that was researched.

  • select.fee.inboundFaxJobIdboolean

    The fax job whose document is this fee's invoice.

  • select.fee.earningFeeIdboolean

    For a clinical data bundle discount, the fee of the run that completed the pair and earned the discount.

  • select.fee.counterpartFeeIdboolean

    For a clinical data bundle discount, the fee of the other run in the pair.

  • select.fee.callIdboolean

    For an AI voice fee, the voice call whose completion was billed.

  • select.companyobject & object

    Which of the joined company's columns to return. Absent when the row has no company.

  • select.projectobject & object

    Which of the joined project's columns to return. Absent when the row has no project.

  • select.patientobject & object

    Which of the joined patient's columns to return. Absent when the row has no patient.

  • select.requestobject & object

    Which of the joined request's columns to return. Absent when the row has no request.

  • select.userobject & object

    Which of the joined user's columns to return. Absent when the row has no user.

  • whereobject
  • where.feeobject

    Filters on the fee's columns.

  • where.fee.idobject | object | object | object | object | object | object | string[]

    The unique id of the fee.

  • where.fee.feeTypeobject | object | object | object | string[]

    What the fee was charged for, such as `PatientHistoriesPlus` for a Patient Histories run that found new lab results.

  • where.fee.amountobject | object | object | object | object | object | object | object | string[]

    The amount charged, in US dollars. A search fee is the per-search rate multiplied by the number of last names searched. A discount's amount is negative.

  • where.fee.statusobject | object | object | object | object | object | object | string[]

    The billing status of the fee, such as `pending` before it is invoiced.

  • where.fee.invoiceIdobject | object | object | object | object | object | object | string[]

    The invoice the fee was billed on, once it has been invoiced.

  • where.fee.createdAtobject | object | object | object | object | object | object | object | string[]

    When the fee was charged.

  • where.fee.updatedAtobject | object | object | object | object | object | object | object | string[]

    When the fee was last changed.

  • where.fee.resourceSuffixobject | object | object | object | object | object | object | string[]

    For a fee charged on a file, such as a document read or an authorization checked, the path of the file beneath the patient.

  • where.fee.siteChargedobject | object | object | object | object | object | object | object | string[]

    For a fee a site charged for a record request's records, what the site charged, in US dollars. The amount you are billed is no more than what is left of the record request's fee limit, so it can be less than this. Null for other fees.

  • where.fee.documentDeletedAtobject | object | object | object | object | object | object | object | string[]

    When the auth-check document this fee was billed for was permanently deleted at the customer's request. Null while the document still exists, and for every other fee type.

  • where.fee.companyIdobject | object | object | object | object | object | object | object | string[]

    The company the fee was charged to.

  • where.fee.projectIdobject | object | object | object | object | object | object | string[]

    The project the fee was charged under, when it was charged for work in a project.

  • where.fee.patientIdobject | object | object | object | object | object | object | string[]

    The patient the fee was charged for, when it was charged for a search or a record of one patient.

  • where.fee.requestIdobject | object | object | object | object | object | object | string[]

    The record request the fee was charged for, when it was charged for a request.

  • where.fee.userIdobject | object | object | object | object | object | object | string[]

    The user whose action incurred the fee, when one did.

  • where.fee.documentExistsobject | object | object | object | string[]

    Whether an invoice file is attached to the fee.

  • where.fee.receiptExistsobject | object | object | object | string[]

    Whether a receipt file is attached to the fee.

  • where.fee.documentDownloadUrlobject | object | object | object | object | object | object | string[]

    A short-lived link to download the invoice file attached to the fee. Null when no invoice is attached.

  • where.fee.receiptDownloadUrlobject | object | object | object | object | object | object | string[]

    A short-lived link to download the receipt file attached to the fee. Null when no receipt is attached.

  • where.fee.authCheckDownloadUrlobject | object | object | object | object | object | object | string[]

    For an authorization-check fee, a short-lived link to download the exact version of the document that was checked. Null for other fees, and null once the customer has deleted the document (see `documentDeletedAt`).

  • where.fee.filenameobject | object | object | object | object | object | object | string[]

    For an authorization-check fee, the name of the file that was checked.

  • where.fee.etagobject | object | object | object | object | object | object | string[]

    For an authorization-check fee charged before file versions were recorded, a fingerprint of the file that was checked. Null for newer fees and other fee types.

  • where.fee.versionIdobject | object | object | object | object | object | object | string[]

    For an authorization-check fee, the version of the file that was checked.

  • where.fee.nameobject | object | object | object | object | object | object | string[]

    For a site-finder fee, the facility name that was looked up.

  • where.fee.addressobject | object | object | object | object | object | object | string[]

    For a site-finder fee, the street address that was looked up.

  • where.fee.cityobject | object | object | object | object | object | object | string[]

    For a site-finder fee, the city that was looked up.

  • where.fee.stateobject | object | object | object | object | object | object | string[]

    For a site-finder fee, the state that was looked up.

  • where.fee.zipobject | object | object | object | object | object | object | string[]

    For a site-finder fee, the ZIP code that was looked up.

  • where.fee.resolvedSiteIdobject | object | object | object | object | object | object | string[]

    For a site-finder fee, the site the lookup matched. Null when it matched none.

  • where.fee.siteIdobject | object | object | object | object | object | object | string[]

    For an AI research fee, the site that was researched.

  • where.fee.siteNameobject | object | object | object | object | object | object | string[]

    For an AI research fee, the name of the site that was researched.

  • where.fee.inboundFaxJobIdobject | object | object | object | object | object | object | string[]

    The fax job whose document is this fee's invoice.

  • where.fee.earningFeeIdobject | object | object | object | object | object | object | string[]

    For a clinical data bundle discount, the fee of the run that completed the pair and earned the discount.

  • where.fee.counterpartFeeIdobject | object | object | object | object | object | object | string[]

    For a clinical data bundle discount, the fee of the other run in the pair.

  • where.fee.callIdobject | object | object | object | object | object | object | string[]

    For an AI voice fee, the voice call whose completion was billed.

  • where.companystring | object & object

    Filters on the joined company's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a company.

  • where.projectstring | object & object

    Filters on the joined project's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a project.

  • where.patientstring | object & object

    Filters on the joined patient's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a patient.

  • where.requeststring | object & object

    Filters on the joined request's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a request.

  • where.userstring | object & object

    Filters on the joined user's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a user.

  • aggregateobject
  • aggregate.feeobject
  • aggregate.fee.countboolean

    When true, return the number of rows that match the filter.

  • aggregate.fee.sumobject

    Numeric columns to total across the rows that match the filter.

  • aggregate.fee.avgobject

    Numeric columns to average across the rows that match the filter.

  • aggregate.fee.minobject

    Numeric columns to find the smallest value of across the rows that match the filter.

  • aggregate.fee.maxobject

    Numeric columns to find the largest value of across the rows that match the filter.

  • aggregate.companyobject & object
  • aggregate.projectobject & object
  • aggregate.patientobject & object
  • aggregate.requestobject & object
  • aggregate.userobject & object
  • orderByobject | object | object | object | object | object[]
  • searchstring
  • takeinteger
  • skipinteger

ReturnsTyped browse response for FeeBrowseResponse

Conditional attributes

  • tableobject[]
  • table[].feeobject & object & object

    The fee's columns, as selected by the request.

  • table[].companyobject & object & object & object

    The joined company's columns, as selected by the request. Absent when the row has no company.

  • table[].projectobject & object & object

    The joined project's columns, as selected by the request. Absent when the row has no project.

  • table[].patientobject & object & object

    The joined patient's columns, as selected by the request. Absent when the row has no patient.

  • table[].requestobject & object & object

    The joined request's columns, as selected by the request. Absent when the row has no request.

  • table[].userobject & object

    The joined user's columns, as selected by the request. Absent when the row has no user.

  • aggregateobject
  • aggregate.feeobject
  • aggregate.fee.countinteger

    Number of rows that match the filter. Present when `count` was requested.

  • aggregate.fee.sumobject

    Total of each requested numeric column across the rows that match the filter.

  • aggregate.fee.avgobject

    Average of each requested numeric column across the rows that match the filter.

  • aggregate.fee.minobject

    Smallest value of each requested numeric column across the rows that match the filter.

  • aggregate.fee.maxobject

    Largest value of each requested numeric column across the rows that match the filter.

  • aggregate.companyobject & object
  • aggregate.projectobject & object
  • aggregate.patientobject & object
  • aggregate.requestobject & object
  • aggregate.userobject & object
  • totalinteger

Errors

400401500

GET/v0/fees/{fee_id}

Retrieve a fee

Returns one fee your company was charged: its feeType, amount, status, the patient, project and record request it was charged for, and download links to its invoice and receipt files. Read-only, and scoped to your own company; a sandbox API key sees only the fees on sandbox projects. To list or filter fees, use POST /v0/fees/browse; see Reconciling search fees.

Parameters

  • fee_idstringpath, required

    The fee's id, as returned in the `id` column of `POST /v0/fees/browse`.

ReturnsSuccess

  • feeobject

    The fee.

  • fee.idstring

    The fee's unique id.

  • fee.feeTypestring

    What the fee was charged for. See [Reconciling search fees](#reconciling-search-fees) for the search fee types.

  • fee.companyIdinteger

    The company the fee was charged to.

    The numeric id of the company (tenant) a resource belongs to.

  • fee.amountstring

    The amount charged, in US dollars. A search fee is the per-search rate multiplied by the number of last names searched. A discount's amount is negative.

  • fee.createdAtstring

    When the fee was charged.

  • fee.updatedAtstring

    When the fee was last changed.

  • fee.statusstring

    The fee's billing status, such as `pending` before it is invoiced.

  • invoiceobject

    A short-lived download link to the fee's invoice file. Its `downloadUrl` is null when no invoice is attached, and its `uploadUrl` is always null: the invoice cannot be replaced through this API.

  • invoice.uploadHeadersobject

    Extra headers to send with the upload. Normally empty.

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

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

  • invoice.looseFiles[].urlstring

    Short-lived presigned URL to download the file.

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

  • invoice.looseFiles[].keystring

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

  • invoice.looseFiles[].sizeinteger

    The file's size in bytes.

  • invoice.looseFiles[].lastModifiedstring

    When the file was last written.

  • receiptobject

    A short-lived download link to the fee's receipt file. Its `downloadUrl` is null when no receipt is attached, and its `uploadUrl` is always null: the receipt cannot be replaced through this API.

  • receipt.uploadHeadersobject

    Extra headers to send with the upload. Normally empty.

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

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

  • receipt.looseFiles[].urlstring

    Short-lived presigned URL to download the file.

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

  • receipt.looseFiles[].keystring

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

  • receipt.looseFiles[].sizeinteger

    The file's size in bytes.

  • receipt.looseFiles[].lastModifiedstring

    When the file was last written.

Conditional attributes

  • fee.invoiceIdstring

    The invoice the fee was billed on, once it has been invoiced.

  • fee.projectIdstring

    The project the fee was charged under, when it was charged for a project's work.

  • fee.patientIdstring

    The patient the fee was charged for, when it was charged for a patient's search or record.

  • fee.requestIdstring

    The record request the fee was charged for, when it was charged for a request.

  • fee.resourceSuffixstring

    For a fee charged on a file, such as a document read or an authorization checked, the file's path beneath the patient.

  • fee.userIdstring

    The user whose action incurred the fee, when one did.

  • fee.siteChargedstring

    For a fee a site charged for a record request's records, what the site charged, in US dollars. `amount` is what you are billed: no more than what was left of the record request's fee limit, so it can be less than this. Null for other fees.

  • fee.detailobject

    Extra details that depend on the fee type, such as the file an authorization check analyzed or the site a site-finder lookup resolved to. Null for fee types that carry none.

  • fee.documentDeletedAtstring

    When the auth-check document this fee was billed for was permanently deleted at the customer's request. Null while the document still exists, and for every other fee type. Read-only.

  • invoice.downloadUrlstring

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

  • invoice.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. Present only when the caller may write the file; null when it may not, or when this response only offers a download.

  • invoice.extractionobject

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

  • invoice.verdictsobject

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

  • invoice.verdictCountsobject

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

  • invoice.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. It is required to read the result with `GET /v0/auth-check/<filename>?token=...`, whether or not you embed the UI. Null when no patient context was supplied; mint one with that `POST` before reading the result.

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

  • receipt.downloadUrlstring

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

  • receipt.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. Present only when the caller may write the file; null when it may not, or when this response only offers a download.

  • receipt.extractionobject

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

  • receipt.verdictsobject

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

  • receipt.verdictCountsobject

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

  • receipt.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. It is required to read the result with `GET /v0/auth-check/<filename>?token=...`, whether or not you embed the UI. Null when no patient context was supplied; mint one with that `POST` before reading the result.

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

Errors

401404500