Submit Approval Action API
Overview
Allows a designated manager (Manager 1, Manager 2, or Manager 3) to submit an APPROVED or REJECTED decision on a pending booking request.
[!IMPORTANT] First Responder Logic: Only one approval is needed to book the request. If any manager (even if it's an escalated Manager 2 or 3) clicks
APPROVED, the request is instantly fully approved and no further manager action is needed.
- Endpoint:
/api/approval-policies/action - Method:
POST - Access: Approving Manager / Corporate Admin
Request Body Schema
| Field | Type | Required | Description |
|---|---|---|---|
bookingId | String (UUID) | Yes | Target booking ID |
approverId | String (UUID) | Yes | User ID of the approving manager |
action | Enum | Yes | APPROVED or REJECTED |
comments | String | No | Optional comments or justification |
Request Body Example
{
"bookingId": "b1234567-89ab-cdef-0123-456789abcdef",
"approverId": "u1234567-89ab-cdef-0123-456789abcdef",
"action": "APPROVED",
"comments": "Approved by Manager 1"
}
Success Response (200 OK)
{
"success": true,
"message": "Booking request fully approved",
"data": {
"status": "APPROVED",
"message": "Booking request fully approved"
}
}
Database Impact
- Tables:
approval_journeys,approval_histories,bookings - Operations: Updates active
ApprovalHistoryandApprovalJourneystatus. UpdatesBookingstatus toAPPROVEDorCANCELLED.