API Reference
Accept Documents

Accept Docuements

Description

This endpoint is used to accept document from customer.

POST {BaseURL}/api/v1/docoument/accept
Content-Type: application/json
Authorization: Bearer {access_token}
{
    "document_ids": [
        "df5dcf78-e78b-4396-87bb-2d2a44c1302e",
        "33444323-e78b-4396-87bb-234232344423",
        "24442432-e78b-4396-87bb-334553344533"
    ]
}

Method

POST

Authentication

Bearer token authentication is required with the access token provided.

Request Body

FieldTypeDescription
document_idsstring[]list of accepted document id

Example Request Body

{
    "document_ids": [
        "df5dcf78-e78b-4396-87bb-2d2a44c1302e",
        "33444323-e78b-4396-87bb-234232344423",
        "24442432-e78b-4396-87bb-334553344533"
    ]
}

Response

HTTP Status 200 (OK)

FieldDescription
accepted_documentslist of document id that accepted
failed_documentslist failure document with the failure message

Example

{
    "accepted_documents": [
        "df5dcf78-e78b-4396-87bb-2d2a44c1302e",
        "33444323-e78b-4396-87bb-234232344423",
    ],
    "failed_documents": [
        {
            "document_id": "24442432-e78b-4396-87bb-334553344533",
            "failure_message": "Document not found"
        }
    ]
}
 

HTTP Status 422 (Unprocessable Entity)

This response occurs when the provided data are missing