Add Test Document
POST
/v1/extractors/{name}/test-documents
const url = 'https://api.deskew.dev/v1/extractors/example/test-documents';const form = new FormData();form.append('file', 'binary');form.append('job_id', 'example');form.append('expected', 'example');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
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://api.deskew.dev/v1/extractors/example/test-documents \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form file=binary \ --form job_id=example \ --form expected=exampleUpload a sample (multipart file) or copy the original of an existing job (job_id).
expected is an optional JSON object of the correct output data.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”name
required
Name
string
Request Body
Section titled “Request Body”Responses
Section titled “Responses”Successful Response
Media typeapplication/json
Response Add Test Document V1 Extractors Name Test Documents Post
object
key
additional properties
any
Example generated
{}Validation Error
Media typeapplication/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": {} } ]}