Update Approval Policy API
Overview
Updates approval policy configuration and level rules.
- Endpoint:
/api/approval-policies/update - Method:
POST - Access: Corporate Admin
Request Body Schema
| Field | Type | Required | Description |
|---|---|---|---|
id | String (UUID) | Yes | Target approval policy ID |
name | String | No | Updated policy name |
autoApprovalLimit | Number | No | Updated auto-approval limit |
levels | Array | No | Updated level rules array |
Request Body Example
{
"id": "p123-uuid",
"autoApprovalLimit": 10000.00
}
Success Response (200 OK)
{
"success": true,
"message": "Approval Policy updated successfully",
"data": {
"id": "p123-uuid",
"name": "Standard Travel Policy",
"autoApprovalLimit": "10000.00"
}
}
Database Impact
- Tables:
approval_policies,approval_policy_levels - Operations:
UPDATEpolicy and optional replace of policy levels.