Skip to main content

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​

FieldTypeRequiredDescription
idString (UUID)YesTarget approval policy ID
nameStringNoUpdated policy name
maxLevelsNumberNoUpdated max approval levels (1-5)
autoApprovalLimitNumberNoUpdated auto-approval limit
escalationTimeMinutesNumberNoUpdated escalation time in minutes
activeBooleanNoActive status toggle
levelsArrayNoUpdated level rules array

Request Body Example​

{
"id": "p123-uuid",
"name": "Updated Travel Policy",
"maxLevels": 3,
"autoApprovalLimit": 10000.00,
"escalationTimeMinutes": 30,
"active": true
}

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: UPDATE policy and optional replace of policy levels.