Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Apply operator corrections to an extraction

POST
/v1/corrections
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.

Media typeapplication/json
CorrectRequest

A request to correct an extraction you already hold, or to adjust it.

object
extraction
required
Extraction

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
key
additional properties
any
corrections
Corrections

Field-level corrections to apply. The verdicts are recomputed over the corrected values.

Array<object>
Correction

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
tract
required
Tract

Index into extraction.tracts.

integer
call
required
Call

Index into that tract’s calls (or tie_calls).

integer
field
required
Field
string
Allowed values: distance chord_length radius arc_length bearing chord_bearing curve_direction
before
required
Before

What the field read before. Must match the current value or the correction is refused as stale.

after
required
After

What it should read. Same shape as before.

kind
Kind

Which list call indexes.

string
default: boundary
Allowed values: boundary tie
by
By

Who made the change. Recorded, never verified.

string
""
at
At

When, ISO 8601 UTC. Server-stamped if omitted.

string
""
note
Note

Why — e.g. “source text reads 149.5”.

string
""
adjust
Adjust

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.

Array<integer>
by
By

Who is making these changes. Applied to any correction or adjustment that does not name its own.

string
""

Successful Response

Media typeapplication/json
CorrectResponse

The posted extraction, corrected and re-signed.

object
extraction
required
Extraction
object
key
additional properties
any
corrected
required
Corrected

How many tracts were recomputed over a correction.

integer
adjusted
required
Adjusted

How many tracts had geometry fitted.

integer
Examplegenerated
{
"extraction": {},
"corrected": 1,
"adjusted": 1
}

Missing, unknown, or revoked API key

Media typeapplication/json
ErrorResponse
object
error
required
ErrorDetail
object
type
required
Type
string
message
required
Message
string
key
additional properties
any
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

Media typeapplication/json
ErrorResponse
object
error
required
ErrorDetail
object
type
required
Type
string
message
required
Message
string
key
additional properties
any
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"
}
}