👷Jobs
The endpoints that are use for facial and document verification are asynchronous. Use the endpoints in this section to consult their result.
The different status responses a job can have are:
Queued
The job is currently on the waiting line to be processed by the pipeline.
0
In Progress
The job is currently being processed in the designated workflow.
1
Succeeded
The job has passed all of the required validations of its designated workflow.
2
Failed
The job did not pass the required validations of its designated workflow.
3
Invalid
The job is missing critical information and the validations could not be started.
4
Start Job
POST https://api.tagshelf.com/v1/2face/jobs/start/:workflowName
This endpoint allows the application to start a job by specifying the affected workflow and desired parameters.
Path Parameters
workflowName*
string
Name of the workflow you want to execute.
Headers
X-Tagshelf-Session*
string
Session Token
User-Agent*
string
User Agent
Request Body
<field>
String
Any field that it's required by the workflow, which is defined at the workflow when the workflow is created
{
"code": 200,
"result": "62a736d6de4b359377f73450" //Job ID
}{
"code": 404,
"result": {
"msg": "No workflow found by name: <workflow_name>"
}
}{
"code": 500,
"result": {
"msg": "Invalid payload. It must contain 'faceA', 'faceB' and 'threshold'."
}
}{
"code": 403,
"result": {
"msg": "Invalid token."
}
}Get by ID
GET https://api.tagshelf.com/v1/2face/jobs/:id
Returns the information of a specific job given its ID. This endpoint is useful for implementations that require polling.
Path Parameters
*
string
id of the requested user.
Headers
Authorization*
string
API Key
User-Agent*
string
User Agent
{
"code": 200,
"result": {
"status": 2,
"output": { <job/endpoint resoponse> } }
}{
"code": 404,
"result": {
"msg": "No entity found by ID: 62788b3bd69719bec16af83d"
}
}{
"code": 500,
"result": {
"msg": "Invalid payload. It must contain 'faceA', 'faceB' and 'threshold'."
}
}{
"code": 403,
"result": {
"msg": "Invalid token."
}
}{
"code": 200,
"result": {
"status": 3,
"output": {
"failedAt": "detect_faces",
"reason": {
"count": 0
}
}
}
}Last updated
Was this helpful?