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
Field | Type | Description | Required |
---|---|---|---|
documents | Array | An array containing document details. | Yes |
document_type | String | The type of document being submitted (e.g., INVOICE). | Yes |
document | String | The 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
Field | Description |
---|---|
valid_documents | List of successfully processed documents. |
failed_documents | List of documents that failed validation, with error details. |
index | The position of the document in the original request. |
document_id | Unique identifier of the validated document. |
verification_link | URL for verifying the document's authenticity. |
message | Error 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.