Download OpenAPI specification:Download
Resistant Document provides API which is well-suited to programmatically interact with document analysis engine. The API integration consists of three steps:
In the first step, the submission_id
is generated using submit
endpoint. The submission_id
uniquely identifies the analyzed document through whole analysis process and is used to fetch the analysis reports later.
Next to the submission_id
the submit
endpoint returns upload_url
containing pre-signed URL which should be used to upload the actual document that will be analyzed. Please note that the document has to be uploaded using HTTP PUT method with Content-Type
HTTP header set to application/octet-stream
.
In the last step client should repeatedly poll results using the result
endpoint with submission_id
obtained in step 1 as parameter. The best practice is to use exponential back-off to reduce load.
query_id | string or null (Query ID) User-defined ID of analyzed file - typically refers to internal ID of analyzed document in customer's CMS. |
pipeline_configuration | string (Pipeline configuration enum) Default: "FRAUD_ONLY" Enum: "FRAUD_ONLY" "QUALITY_ONLY" "CONTENT_ONLY" "QUALITY_AND_FRAUD" "FRAUD_AND_CONTENT" "FRAUD_AFTER_QUALITY" "CONTENT_AFTER_FRAUD" "CONTENT_AFTER_FRAUD_AFTER_QUALITY" Configuration of pipeline within workflow trigged after file upload |
{- "query_id": "string",
- "pipeline_configuration": "FRAUD_ONLY"
}
{- "upload_url": "string",
- "submission_id": "string"
}
{- "analysis_time": "2019-08-24T14:15:22Z",
- "file_type": "unsupported",
- "mime_type": "string",
- "status_code": 200,
- "sample_id": {
- "customer_id": "string",
- "batch_id": "string",
- "timestamp": 0,
- "uuid": "string"
}, - "risk": 100,
- "trust": 100,
- "score": "NORMAL",
- "deployment_version": "string",
- "query_id": "string",
- "sample_metadata": {
- "producer": "string",
- "creator": "string",
- "creation_date": "2019-08-24T14:15:22Z",
- "mod_date": "2019-08-24T14:15:22Z",
- "author": "string",
- "title": "string",
- "keywords": "string",
- "subject": "string"
}, - "indicators": [
- {
- "indicator_id": "string",
- "type": "RISK",
- "category": "string",
- "title": "string",
- "description": "string",
- "score": 100,
- "confidence": 100,
- "metadata": {
- "property1": null,
- "property2": null
}
}
], - "document_class": {
- "id": "string",
- "type": "mixed",
- "document_class_type": "DocumentClass"
}
}
{- "contents": [
- {
- "card_generation": "UNKNOWN",
- "issuing_country": "str",
- "id_card_type": "CzeBack2012",
- "content_type": "IdCard",
- "personal_no": "string",
- "machine_readable_summary": {
- "raw_lines": [
- "string"
], - "date_of_birth_str": "string",
- "date_of_expiration_str": "string",
- "card_no": 0,
- "last_name": "string",
- "first_name": "string",
- "nationality": "str",
- "sex": "string"
}, - "barcode_str": "string",
- "permanent_stay": "string",
- "academic_degree": "string",
- "issued_by": "string",
- "marital_status": "UNKNOWN"
}
]
}
submission_id required | string |
expiration required | integer (Expiration) [ 1 .. 604800 ] Expiration period of presigned token in seconds |
{- "expiration": 1
}
{- "id": "string",
- "presigned_url": "string"
}
{- "status_code": 500,
- "message": "string",
- "deployment_version": "string",
- "analysis_time": "2019-08-24T14:15:22Z",
- "file_type": "unsupported",
- "mime_type": "string",
- "query_id": "string"
}