API Reference
Submit Documents

Submit Documents

Description

This endpoint is used to submit documents for validation. On success, it will return a unique ID for all documents submitted.

POST {BaseURL}/api/v1/document
Content-Type: application/json
Authorization: Bearer {access_token}
 
{
    "documents": [
        {
            "document_type": "INVOICE",
            "document": "PEludm9pY2UgeG1sbnM6Y2FjPSJ1cm46b2FzaXM6bmFtZXM6c3BlY2lmaWNhdGlvbjp1Ymw6c2NoZW1hOn..."
        }
    ]
}

Method

POST

Headers

  • Content-Type: application/json
  • Authorization: Bearer {access_token}

Request Parameters

FieldTypeDescriptionRequired
documentsArrayAn array containing document details.Yes
document_typeStringThe type of document being submitted (e.g., INVOICE).Yes
documentStringThe UBL XML content document encoded as a Base64 string.Yes

Example Request Body

{
    "documents": [
        {
            "document_type": "INVOICE",
            "document": "PEludm9pY2UgeG1sbnM6Y2FjPSJ1cm46b2FzaXM6bmFtZXM6c3BlY2lmaWNhdGlvbjp1Ymw6c2NoZW1hOn..."
        },
        {
            "document_type": "INVOICE",
            "document": "PEludm9pY2UgeG1sbnM6Y2FjPSJ1cm46b2FzaXM6bmFtZXM6c3BlY2lmaWNhdGlvbjp1Ymw6c2NoZW1hOn..."
        },
        {
            "document_type": "INVOICE",
            "document": "PEludm9pY2UgeG1sbnM6Y2FjPSJ1cm46b2FzaXM6bmFtZXM6c3BlY2lmaWNhdGlvbjp1Ymw6c2NoZW1hOn..."
        }
    ]
}

Response

HTTP Status 200 (OK)

{
    "valid_documents": [
        {
            "index": 1,
            "document_id": "df5dcf78-e78b-4396-87bb-2d2a44c1302e",
            "verification_link": "https://.../verification?data=df5dcf78-e78b-4396-87bb-2d2a44c1302e"
        },
        {   
            "index": 2,
            "document_id": "df5dcf78-e78b-4396-87bb-2d2a44c13w2e",
            "verification_link": "https://.../verification?data=df5dcf78-e78b-4396-87bb-2d2a44c1302e"
        }
    ],
    "failed_documents": [
        {
            "index": 3,
            "message": "Error EKYB Validation"
        }
    ]
}

Response Fields

FieldDescription
valid_documentsList of successfully processed documents.
failed_documentsList of documents that failed validation, with error details.
indexThe position of the document in the original request.
document_idUnique identifier of the validated document.
verification_linkURL for verifying the document's authenticity.
messageError message explaining the validation failure.

HTTP Status 422 (Unprocessable Entity)

This response occurs when the provided data is missing or invalid.

Notes

  • Processing is asynchronous, and results will be delivered through a webhook notification.