📄Documents
This section is a collection of endpoints related to document classification and data extraction operations.
Validate Document Type
POST https://api.tagshelf.com/v1/2face/documents/validate-document-type
(ASYNC) Validates that a provided image is whether a valid CEDULA or PASSPORT. Validate the front and back side of documents by specifying the side field in the body.
Headers
X-Tagshelf-Session*
string
Session Token
User-Agent*
string
User Agent
Request Body
file*
Object
Binary data representing the image file
documentType*
string
Accepted Values: PASSPORT | CEDULA
side
string
Accepted Values: FRONT | BACK (default is FRONT)
{
"code": 200,
"result": true
}{
"code": 400,
"result": {
"msg": "'documentType' must be one of the following: CEDULA, PASSPORT"
}
}{
"code": 500,
"result": {
"msg": "Invalid payload. It must contain 'faceA', 'faceB' and 'threshold'."
}
}{
"code": 403,
"result": {
"msg": "Invalid token."
}
}Validate Identity
POST https://api.tagshelf.com/v1/2face/documents/validate-identity
(ASYNC) Validates a document ID with a document photo. Makes sure that the document photo matches the expected document ID and if so, returns true.
Headers
X-Tagshelf-Session*
string
Session Token
User-Agent*
string
User Agent
Request Body
file*
Object
Binary data representing the image file.
documentType*
string
Accepted Values: PASSPORT | CEDULA
documentId*
string
Document Id to validate against.
{
"code": 200,
"result": true
}{
"code": 400,
"result": {
"msg": "'documentType' must be one of the following: CEDULA, PASSPORT"
}
}{
"code": 500,
"result": {
"msg": "Invalid payload. It must contain 'faceA', 'faceB' and 'threshold'."
}
}{
"code": 403,
"result": {
"msg": "Invalid token."
}
}Last updated
Was this helpful?