Test Template Endpoint
POST
/v1/templates/{template_id}/test
const url = 'http://localhost:8080/v1/templates/example/test';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"ocr_markdown":"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/templates/example/test \ --header 'Content-Type: application/json' \ --data '{ "ocr_markdown": "example" }'Dry-run a template against sample OCR markdown.
Runs the extraction engine and returns the parsed output plus
validation flags, without persisting anything to the database or
artefact storage. See also the unified POST /v1/templates/test
endpoint for draft + ad-hoc variants (Modes B + C).
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” template_id
required
Template Id
string
Request Body required
Section titled “Request Body required ” Media type application/json
TemplateTestPayload
Dry-run body for POST /v1/templates/{id}/test.
We accept OCR markdown directly (rather than a fresh file upload)
because the pipeline runs in the worker process and the API is
deliberately thin. Callers can either paste sample markdown for
template-authoring iteration, or reuse the canonical.markdown
returned by a prior /v1/documents call.
object
ocr_markdown
required
Ocr Markdown
string
Example generated
{ "ocr_markdown": "example"}Responses
Section titled “ Responses ”Successful Response
Media type application/json
Response Test Template Endpoint V1 Templates Template Id Test Post
object
key
additional properties
any
Example generated
{}Validation Error
Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}