Document forgery api (1.5.0)

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:

  1. Creating document submission
  2. Uploading the file
  3. Fetching analysis result

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.

Authentication

ApiKey

Security Scheme Type API Key
Header parameter name: Authorization

createSubmission

Authorizations:
Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "query_id": "string",
  • "pipeline_configuration": "FRAUD_ONLY"
}

Response samples

Content type
application/json
{
  • "upload_url": "string",
  • "submission_id": "string"
}

getFraud

Authorizations:
path Parameters
submission_id
required
string

Responses

Response samples

Content type
application/json
Example
{
  • "analysis_time": "2019-08-24T14:15:22Z",
  • "file_type": "unsupported",
  • "mime_type": "string",
  • "status_code": 200,
  • "sample_id": {
    },
  • "risk": 100,
  • "trust": 100,
  • "score": "NORMAL",
  • "deployment_version": "string",
  • "query_id": "string",
  • "sample_metadata": {
    },
  • "indicators": [
    ],
  • "document_class": {
    }
}

getContent

Authorizations:
path Parameters
submission_id
required
string

Responses

Response samples

Content type
application/json
{
  • "contents": [
    ]
}

createPresignedUrl

Authorizations:
path Parameters
submission_id
required
string
Request Body schema: application/json
expiration
required
integer (Expiration) [ 1 .. 604800 ]

Expiration period of presigned token in seconds

Responses

Request samples

Content type
application/json
{
  • "expiration": 1
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "presigned_url": "string"
}

getQuality

Authorizations:
path Parameters
submission_id
required
string

Responses

Response samples

Content type
application/json
Example
{
  • "status_code": 500,
  • "message": "string",
  • "deployment_version": "string",
  • "analysis_time": "2019-08-24T14:15:22Z",
  • "file_type": "unsupported",
  • "mime_type": "string",
  • "query_id": "string"
}