Reextract Document Job Endpoint
const url = 'http://localhost:8080/v1/documents/example/reextract';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"template_id":"example","template_name":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8080/v1/documents/example/reextract \ --header 'Content-Type: application/json' \ --data '{ "template_id": "example", "template_name": "example" }'Re-run extraction against the job’s stored canonical — no re-OCR.
The cheap path for “the template changed, re-extract this document”:
only the extraction stage (LLM call + judge + validation) runs, and
the result row / status / review queue update in place. Requires a
terminal job with a persisted canonical in extraction mode. Body
is optional; {} re-applies the job’s current template, or pass
template_id / template_name to swap. Use /reprocess when
the document itself (or the processing mode / page range) changed.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Request Body
Section titled “Request Body ”Body for POST /v1/documents/{job_id}/reextract.
Both selectors omitted → re-apply the job’s previously resolved
(else requested) template. At most one of template_id /
template_name may be supplied (the service 400s on both).
Example generated
{ "template_id": "example", "template_name": "example"}Responses
Section titled “ Responses ”Successful Response
Validation Error
object
object
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}