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.
| Param | Value | Type |
|---|---|---|
userId | {{userId}} | string |
tenantId | {{tenantId}} | string |
Path Parametersβ
| Name | Type | Description |
|---|---|---|
documentId | string | The unique ID of the document to approve. |
Request Bodyβ
{
"status": "APPROVED",
"statusReason": "string"
}
Request Body Explanationβ
| Name | Type | Description |
|---|---|---|
status | string | The status of the document (e.g., "APPROVED"). |
statusReason | string | The reason for the status change (optional). |
Response: 200β
{
"message": "Document approved successfully.",
"documentId": "12345",
"status": "APPROVED",
"statusReason": "Document meets all approval criteria."
}
LANGUAGE
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!