Apply operator corrections to an extraction
const url = 'https://example.com/v1/corrections';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"extraction":{},"corrections":[{"tract":1,"call":1,"field":"distance","before":"example","after":"example","kind":"boundary","by":"","at":"","note":""}],"adjust":[1],"by":""}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/corrections \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "extraction": {}, "corrections": [ { "tract": 1, "call": 1, "field": "distance", "before": "example", "after": "example", "kind": "boundary", "by": "", "at": "", "note": "" } ], "adjust": [ 1 ], "by": "" }'Correct what we misread, or fit courses that do not close — and re-sign, so the deliverable survives the edit.
Two different acts, and the response keeps them apart:
A correction says the document reads something else and we got it
wrong. That is a better reading of the same document, so the verdicts
come back recomputed over the corrected values and mean exactly what
they always meant. The tract’s verdict carries corrected: true.
An adjustment (adjust: [0]) distributes a tract’s misclosure by
compass rule. The verdict does not move. It judges the recorded
description, which still miscloses, and the adjusted figure is a
drawing and export aid — the geometry changes, status,
closure_ratio and the reasons do not. Never automatic: you ask for it
per tract.
Nothing is overwritten. The extraction comes back carrying the
corrected values and a corrections log naming every field, what it
read before, who changed it and why, plus an adjustments list
carrying the misclosure each fit distributed. The certificate prints
both. That log is inside the attestation, so it cannot be stripped from
a certified payload without breaking the signature.
Stateless and free, like /v1/locate and /v1/certificate: you post
back the response you already hold, nothing here stores it, and the
document was paid for once already.
A correction whose before disagrees with what the extraction
currently holds is refused as stale_correction rather than applied —
that is a client editing a document somebody else has since
re-extracted, and overwriting there would discard a value the operator
never saw. Every corrections, adjustments and corrected/adjusted
flag on the posted body is discarded before anything is computed, for
the same reason /v1/locate drops incoming positions.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”A request to correct an extraction you already hold, or to adjust it.
object
A /v1/extract (or /v1/corrections) response, exactly as the API returned it. Its attestation is verified before anything is computed, and any corrections, adjustments or corrected/adjusted flags it carries are discarded rather than trusted.
object
Field-level corrections to apply. The verdicts are recomputed over the corrected values.
One field an operator changed, and what it read before.
The extraction is never overwritten. A correction rides beside it as an attributed log, the certificate prints the diff, and the attestation covers both — so a reader downstream can always see what a person changed and what the document as extracted actually said.
before is load-bearing twice over: it is what makes the certificate diff
reconstructible without a second copy of the extraction, and it is the
staleness guard. A client holding an old copy of a re-extracted document
names a before that no longer matches and is refused rather than
silently overwriting a value nobody saw.
object
Index into extraction.tracts.
Index into that tract’s calls (or tie_calls).
What the field read before. Must match the current value or the correction is refused as stale.
What it should read. Same shape as before.
Which list call indexes.
Who made the change. Recorded, never verified.
When, ISO 8601 UTC. Server-stamped if omitted.
Why — e.g. “source text reads 149.5”.
Indices of tracts to close by compass rule, after the verdicts are computed. Never automatic: an adjustment nobody asked for is the silent version by another name.
Who is making these changes. Applied to any correction or adjustment that does not name its own.
Responses
Section titled “Responses”Successful Response
The posted extraction, corrected and re-signed.
object
object
How many tracts were recomputed over a correction.
How many tracts had geometry fitted.
Examplegenerated
{ "extraction": {}, "corrected": 1, "adjusted": 1}Missing, unknown, or revoked API key
object
object
Example
{ "error": { "documents_used": 200, "message": "Monthly document quota reached: 200 of 200 documents used this month. The cap resets on 2026-08-01. Email sales@easting.ai to raise it.", "monthly_cap": 200, "resets_on": "2026-08-01", "type": "quota_exceeded" }}The attestation is missing or does not match, a correction names a value the extraction no longer holds, or there is nothing to do
object
object
Example
{ "error": { "documents_used": 200, "message": "Monthly document quota reached: 200 of 200 documents used this month. The cap resets on 2026-08-01. Email sales@easting.ai to raise it.", "monthly_cap": 200, "resets_on": "2026-08-01", "type": "quota_exceeded" }}