API Reference
Submit Documents

Submit Document

Description

This endpoint is used to submit documents for processing.

POST {BaseURL}/api/v1/document
Content-Type: application/json
 
{
    "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..."
        }
    ]
}

Response

HTTP Status 200 (OK)

{
    "data": [
        {
            "document_id": "df5dcf78-e78b-4396-87bb-2d2a44c1302e",
            "verification_link": "https://.../verification?data=df5dcf78-e78b-4396-87bb-2d2a44c1302e"
        },
        {
            "document_id": "df5dcf78-e78b-4396-87bb-2d2a44c13w2e",
            "verification_link": "https://.../verification?data=df5dcf78-e78b-4396-87bb-2d2a44c1302e"
        }
    ]
}

Response Fields

FieldDescription
document_idThe unique identifier assigned to the submitted document.
verification_linkA link for verifying the document's authenticity.

HTTP Status 422 (Unprocessable Entity)

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

Notes

  • If multiple documents are submitted, the response indicates that the document processing is in progress.
  • The processing may be asynchronous, and the results will be sent via webhook.