Annotations
Create a annotation
Changed onCreate a annotation
post/v3/annotations
Request
- Base URLhttps://api.affinda.com
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"rectangles": [
{
"pageIndex": 1,
"x0": 2.43,
"y0": 4.55,
"x1": 4.56,
"y1": 6.32
}
],
"validationResults": [
{
"created": [
{
"id": 1,
"annotations": [
1,
2,
3
],
"passed": true,
"ruleSlug": "supplier-name-is-alphanumeric",
"message": "Expected 'ThisInputShouldMatch' to match regex pattern '[0-9]*"
}
],
"updated": [
{
"id": 1,
"annotations": [
1,
2,
3
],
"passed": true,
"ruleSlug": "supplier-name-is-alphanumeric",
"message": "Expected 'ThisInputShouldMatch' to match regex pattern '[0-9]*"
}
],
"deleted": [
{
"id": 1,
"annotations": [
1,
2,
3
],
"passed": true,
"ruleSlug": "supplier-name-is-alphanumeric",
"message": "Expected 'ThisInputShouldMatch' to match regex pattern '[0-9]*"
}
]
}
]
}Response
Successfully created a annotation.
Example response
{
"id": 1,
"rectangle": {
"pageIndex": 1,
"x0": 2.43,
"y0": 4.55,
"x1": 4.56,
"y1": 6.32
},
"rectangles": [
{
"pageIndex": 1,
"x0": 2.43,
"y0": 4.55,
"x1": 4.56,
"y1": 6.32
}
],
"confidence": 0.86,
"classificationConfidence": 0.95,
"textExtractionConfidence": 0.9,
"validationResults": [
{
"id": 1,
"annotations": [
1,
2,
3
],
"passed": true,
"ruleSlug": "supplier-name-is-alphanumeric",
"message": "Expected 'ThisInputShouldMatch' to match regex pattern '[0-9]*"
}
]
}Changes
- info
api tag
Annotationsadded - info
api tag
Document API - Annotationremoved
- info
- breaking
the response property
////became optional for the status - info
added the new optional request property
- info
the request property
became optional - info
added the optional property
////to the response with the status
- breaking