Skip to main content

Approve Document

Method: PATCH
/api/v1/documents/{documentId}/approve


Description​

This endpoint approves a specific document. It allows updating the document’s status and provides a reason for the status change.


πŸ”‘ Authentication​

This endpoint requires authentication via headers.

ParamValueType
userId{{userId}}string
tenantId{{tenantId}}string

Path Parameters​

NameTypeDescription
documentIdstringThe unique ID of the document to approve.

Request Body​

{
"status": "APPROVED",
"statusReason": "string"
}

Request Body Explanation​

NameTypeDescription
statusstringThe status of the document (e.g., "APPROVED").
statusReasonstringThe reason for the status change (optional).

Response: 200​

{
"message": "Document approved successfully.",
"documentId": "12345",
"status": "APPROVED",
"statusReason": "Document meets all approval criteria."
}

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request PATCH \ 
--url /api/v1/documents/{documentId}/approve \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


Click Try It! to start a request and see the response here!