Add admin/manager booking profile update API
All checks were successful
build-and-deploy / build-deploy (push) Successful in 37s

This commit is contained in:
androidlover5842
2026-02-07 21:45:55 +05:30
parent 1f770c37e2
commit c5dc32d9af
2 changed files with 177 additions and 0 deletions

View File

@@ -1879,6 +1879,56 @@ BOOKING APIS
- 409 Conflict (booking closed)
- Update booking profile API is this one:
POST /properties/{propertyId}/bookings/{bookingId}/profile
What it does:
- Updates booking profile fields at any booking stage (OPEN, CHECKED_IN, CHECKED_OUT, CANCELLED, NO_SHOW).
- Supports partial updates for these fields only:
- transportMode
- childCount
- maleCount
- femaleCount
- fromCity
- toCity
- memberRelation
- If a provided field value is null, that field is cleared.
- Recomputes adultCount and totalGuestCount when any of maleCount/femaleCount/childCount is updated.
Request body:
{
"transportMode": "CAR",
"childCount": 1,
"maleCount": 1,
"femaleCount": 1,
"fromCity": "Varanasi",
"toCity": "Lucknow",
"memberRelation": "SELF"
}
- Allowed roles: ADMIN, MANAGER
- superAdmin can also access.
Error Codes
- 400 Bad Request
- Invalid request body
- Unknown fields
- At least one field is required
- Unknown transport mode
- Transport mode disabled
- Unknown member relation
- childCount/maleCount/femaleCount must be integer or null
- childCount/maleCount/femaleCount must be >= 0
- fromCity/toCity/memberRelation/transportMode type invalid
- 401 Unauthorized
- 403 Forbidden
- 404 Not Found
- Booking check-out API is this one:
POST /properties/{propertyId}/bookings/{bookingId}/check-out