Read a laboratory certificate into its rows, each with its page, and check each row against a place's limits

A PDF certificate, or the laboratory's own export as XLSX, XLS or CSV / TSV, read by rules (no AI writes a row): each row the certificate prints with the sample, the parameter, the value as printed, its unit, a qualifier (<, >, ND), the detection limit and the page (or sheet) it was read from; a sample's date, matrix, lab ID and certificate in samples. With a place (best with a medium), every row with a value is checked by check_values itself; exceedances lists every row over a limit or under a floor, each limit once in limits with its cite. A result below detection is not compared (value.below_detection). checked_as is the printed name without the lab's decoration (Cuivre (Cu) a 2 -> Cuivre) when check_value holds that name. Rows page by max_rows / offset (the file is read again). Anything but a PDF, XLSX, XLS or CSV is refused format.not_handled before it is read. The file is read and discarded: it is not kept, and nothing is learned from it.

post/certificate

Request

  • Base URL: https://passage-data.com/api/v1
  • URL: https://passage-data.com/api/v1/certificate
  • Auth: one of:
    • none
    • HTTP bearer
    • API key in header x-api-key

Request body

content_base64string

The file's bytes, base64-encoded (at most 10 MB). Give this or file_url.

file_urlstring

An https address the file can be fetched from (not loopback or a private network). Give this or content_base64.

filenamestring
placestring

ISO 3166 code: US, US-OH, CA, CA-QC, DE, FR, IT, EU. Omit to read the rows without checking them.

medium'water_discharge' | 'surface_water' | 'groundwater' | 'drinking_water' | 'soil' | 'ambient_air' | 'air_emission' | 'sediment' | 'leachate'
statisticstring
max_rowsinteger

Certificate rows on this page; the summary and exceedances cover every row.

offsetinteger
call_idstring

Only after read.pending: collect the reading without sending the file again.

Response

The rows read, the summary and, with a place, the exceedances and the limits they name; or a refusal about the file (certificate.no_rows, certificate.not_results, page.missing)

queryobject
readobject

lab, certificates, samples, parameters, rows, and the pages (or sheets) rows were read from

checkedobject

places searched, or the place's own refused (the rows are still returned)

packed_asstring
refusalsobject

Each refusal code's sentence, once

sources_searchedobject[]
totalinteger
offsetinteger
returnedinteger
next_offsetinteger nullable
refusedobject

Changes

No recorded changes to this operation across all 1 revision of this API.