List Approval Policies API
Overview
Retrieves a list of approval policies for a company.
- Endpoint:
/api/approval-policies/list - Method:
GET - Access: Corporate Admin / Manager
Query Parameters (req.query)
| Parameter | Type | Required | Description |
|---|---|---|---|
companyId | String (UUID) | Yes | Target company ID |
search | String | No | Filter by policy name |
page | Number | No | Page number (Default: 1) |
limit | Number | No | Items per page (Default: 10) |
Query Example
GET /api/approval-policies/list?companyId=c478a846-993d-4c8d-bf8d-d77cb3370e01
Success Response (200 OK)
{
"success": true,
"message": "Approval Policies retrieved successfully",
"data": [
{
"id": "p123-uuid",
"name": "Standard Travel Policy",
"autoApprovalLimit": "7000.00",
"levels": [
{
"id": "pl1-uuid",
"level": 1,
"roleRequired": "COMPANY_MANAGER",
"minAmount": "7001.00"
}
]
}
],
"pagination": {
"totalItems": 1,
"currentPage": 1,
"totalPages": 1,
"pageSize": 10,
"hasNextPage": false,
"hasPreviousPage": false
}
}
Database Impact
- Tables:
approval_policies,approval_policy_levels - Operations:
SELECTwith levels ordering.