Skip to content

Documents

Endpoints for interacting with documents

Limits

These are the limits for documents in the EyeDP platform.

Accepted document types

BankStatement, Passport, DrivingLicence, Payslip and UtilityBill

File limits

Files has a size limit of 15MB and must be one of jpg, jpeg, png, gif, bmp, tiff, webp or pdf

IMPORTANT

Bank Statements can only be submitted as PDFs. We are working on accepting image bank statements, please bare with us!

Auto-Detect

Auto detect will attempt to find the file type from out predefined list of supported files automatically.

If auto detect is true you do not need to supply a document type, any document type supplied whilst auto detect is true will be ignored.

If auto detect is false document type must be supplied.

If RejectAllIfAutoDetectFailure all file uploads on the request will fail if one fails. If it is flase or null file creation will continue with the errors returned in the response.

Bank statements still need to be PDF's, if auto detect finds a bank statement and the file is not PDF it will be rejected.

Upload documents

Upload documents to a case.

Like creating a case this endpoint receives a form data payload. It makes it easy to upload multiple documents at once but can be tricky to get going. You will need to check how to upload form data arrays in your chosen implementation.

Endpoint/api/cases/{caseId}/documents
MethodPOST
Content typemultipart/form-data

Request

FieldDescriptionRequiredLimits
documents[0].typeType of the document, Required IfOptionalSee the limits section
documents[0].filesFile of the documentYesSee the limits section
documents[0].autoDetectBoolean, Auto-Detect document typeOptionalSee the auto-detect section
rejectAllIfAutoDetectFailureBoolean, fail all documents if on fails auto-detectionOptional

Uploading documents in Postman:

Uploading multiple documents in Postman

Response

The response contains the ids of the successful uploaded documents. Along with any auto-detection failure reasons.

json
{
    "successDocumentIds": [
        1485
    ],
    "failureDocuments": [
        {
            "fileName": "example-bank.pdf",
            "error": "Unable to auto-detect document type."
        }
    ]
}

Get document

Gets a document based on it's id. The response includes the extracted information of the document.

Endpoint/api/cases/{caseId}/documents/{documentId}
MethodGET

Response example

Response of a document while content extraction is in progress

json
{
    "id": 123,
    "name": "Bank Statement #1",
    "documentType": "BankStatement",
    "extractionStatus": "Pending",
    "summary":"The **Bank Statement #1** for the case involving **Frank Tank** is currently undergoing both **tamper detection** and **content validation** checks, which are still in progress. Additionally, the **IDV** check has not been run yet. As a result, there are no risks generated at this time, leaving a gap in the risk assessment for this document.\n\nThe document is currently undergoing extraction, and the relevant information will be accessible soon. Please hold on as we finalize the details to ensure a comprehensive summary. Your patience is appreciated, and we will provide the necessary insights as soon as they become available.",
    "extract": {}
}

Response of a document when content extraction has finished

json

{
    "id": 123,
    "name": "Bank Statement #1",
    "documentType": "BankStatement",
    "extractionStatus": "Completed",
    "extract": {
        "bankStatement": {
            "fullName": "James Smith",
            "address1": "12 Golf Road",
            "address2": "",
            "address6": "Cardiff",
            "address7": "123 123",
            "address8": "GB",
            "periodStartDate": "2025-02-01T00:00:00",
            "periodEndDate": "2025-02-28T00:00:00",
            "openingBalance": 731.62,
            "closingBalance": 1392.29,
            "hasOverdraft": false,
            "bankName": "Monzo",
            "accountNumber": "99999999",
            "sortCode": "00-00-00",
            "currency": "GBP",
            "dailyBalances": [
                {
                    "date": "2025-02-01T00:00:00",
                    "balance": 853.50
                }
            ],
            "transactions": [
                {
                    "date": "2025-02-21T00:00:00",
                    "amount": -19.00,
                    "description": "Netflix subscription",
                    "category": "Entertainment",
                    "balance": 1313.72
                }}
            ]
        }
    }
}

Delete document

Deletes a document from the case.

Endpoint/api/cases/{caseId}/documents/{documentId}
MethodDELETE