Submitting a Document
Guide to submitting a document in Inscribe
A document object is a core component of Inscribe’s product. A document is a PDF or image that can be uploaded and associated with a customer object. When documents are uploaded, they are automatically analyzed by Inscribe's fraud detection and credit analysis systems.
Prerequisites
- Retrieve your API key as detailed here .
- Create a Customer to associate the open banking with.
- Retrieve the Customer ID to incorporate into your request
Supported Documents
Inscribe fraud detection has coverage over all document types and languages. Credit Analysis, however, is only available on a subset of documents. For more information, see our FAQs.
Submitting a Document
A document object is created when a document is uploaded to the /documents
endpoint. The customer ID must be included as a parameter in the URL. You will have received this Customer ID upon creation of the customer object.
Tags
When uploading a document, there is an option to assign an associated tag
. Tags are string values chosen by the user and can be used to group documents together across customers.
Verification
Inscribe can run verification checks against a document. Verification checks can be added in the document upload request. The supported document verification requests are:
- Name
- Address
- ID Number
- Company
Inscribe also supports the customisation of verification checks. Customized verification checks must be included under the strings
field, as seen in the verify_entities
variable in the snippet below.
import os
import json
import requests
customer_id = "CUSTOMER_ID"
url = f"<https://api.inscribe.ai/api/v2/customers/{customer_id}/documents>"
headers = {
"Authorization": "Inscribe ..."
}
verify_entities = [{
"name": "Jane Customer",
"address": "1000 Walnut Kansas City MO",
"company": "Smith & Sons",
"id_number": "58329574",
"strings": [{"key": "phone", "input": "353-8661-016"}]
}]
tags = [{"text": "submitting_a_document"}, {"text": "january"}]
with open("DOCUMENT_FILE_PATH", "rb+") as document:
filename = os.path.basename(document.name)
files = {
"verify_entities": (
None, json.dumps(verify_entities), 'application/json'
),
"tags": (None, json.dumps(tags), 'application/json'),
"file": (filename, document, "application/octet-stream")
}
response = requests.request("POST", url, files=files, headers=headers)
print(response.message)
Submitting Multiple Documents
Multiple documents can be uploaded for each customer, across multiple combine multiple document types (i.e. both bank statements and payslips can be submitted for a single customer).
Updated over 1 year ago