Skip to main content

List Company Confirmed Bookings

Retrieve paginated CONFIRMED bookings scoped to either a company (Company Admin view) or a manager's direct subordinates (Manager view). The scope is determined automatically based on the managerId field or the caller's auth token role.

Endpoint​

GET / POST /api/booking-requests/company-confirmed-bookings


Case 1 — Company Admin​

Returns all confirmed bookings for the specified company.

Scope determination: No managerId is provided and the token role is not MANAGER / TEAM_LEAD.

Request Parameters (Query or Body)​

FieldTypeRequiredDescription
companyIdstringNo*Company UUID. Required if not embedded in the auth token (req.companyId).
travelTypestringNoFilter: FLIGHT | HOTEL | CAB | INSURANCE | FOREX
pagenumberNoPage number. Default 1.
limitnumberNoRecords per page. Default 20, max 100.

Example Request (GET)​

GET /api/booking-requests/company-confirmed-bookings?companyId=COMPANY_UUID&travelType=HOTEL&page=1&limit=20
Authorization: Bearer <token>

Case 2 — Manager (Subordinates)​

Returns all confirmed bookings made by employees who are direct subordinates of the given manager (resolved via UserManagerMap).

Scope determination: managerId is explicitly passed, or the token role is MANAGER / TEAM_LEAD (in which case the token's userId is used as the manager ID).

Request Parameters (Body for POST)​

FieldTypeRequiredDescription
managerIdstringNo*Manager's user UUID. Defaults to token userId if role is MANAGER / TEAM_LEAD.
companyIdstringNoOptionally scope to a specific company as well.
travelTypestringNoFilter: FLIGHT | HOTEL | CAB | INSURANCE | FOREX
pagenumberNoPage number. Default 1.
limitnumberNoRecords per page. Default 20, max 100.

Example Request (POST)​

POST /api/booking-requests/company-confirmed-bookings
Authorization: Bearer <token>
Content-Type: application/json

{
"managerId": "MANAGER_USER_UUID",
"companyId": "OPTIONAL_COMPANY_UUID",
"travelType": "HOTEL",
"page": 1,
"limit": 20
}

Headers​

KeyValueRequired
AuthorizationBearer <token>Yes

Response Example​

{
"success": true,
"data": [
{
"id": "booking-uuid",
"bookingRefNumber": "BK-HOTEL-L12345678",
"companyId": "cmp-uuid",
"userId": "user-uuid",
"travelType": "HOTEL",
"status": "CONFIRMED",
"pnr": "PNR-XXXXX",
"isLocalProperty": false,
"totalCost": "15000.00",
"requestRaisedRate": "15000.00",
"currentRate": "15000.00",
"approvedCost": "15000.00",
"user": {
"id": "user-uuid",
"firstName": "Jane",
"lastName": "Smith",
"email": "jane@example.com",
"phone": "+919876543210"
},
"company": {
"id": "cmp-uuid",
"name": "Acme Corp"
},
"hotelDetails": [
{
"hotelName": "Hotel Property",
"checkIn": "2026-10-07T00:00:00.000Z",
"checkOut": "2026-10-08T00:00:00.000Z",
"ratePerNight": "15000.00",
"confirmationNumber": "PNR-XXXXX"
}
],
"flightDetails": [],
"cabDetails": []
}
],
"message": "Confirmed bookings for company retrieved successfully",
"pagination": {
"totalItems": 1,
"totalPages": 1,
"currentPage": 1,
"pageSize": 20
}
}

For the manager scope the message will read:
"Confirmed bookings for manager's subordinates retrieved successfully"


Error Responses​

StatusCondition
400companyId missing when in company-admin scope and not in token
400managerId missing when in manager scope and not in token
200Manager has no subordinates — returns empty array with 0 pagination data