Skip to main content
This endpoint requires authentication. Include a valid JWT token in the Authorization header.

Endpoint

GET /api/bookings/id?id={guid}
Retrieve detailed information about a specific booking by its unique identifier.

Query Parameters

id
string (uuid)
required
The unique identifier of the booking to retrieve.Example: 3fa85f64-5717-4562-b3fc-2c963f66afa6

Response

id
string (uuid)
Unique identifier for the booking.
userId
string (uuid)
Unique identifier of the user who made the booking.
apartmentId
string (uuid)
Unique identifier of the booked apartment.
status
integer
Current status of the booking.
  • 0 - Reserved
  • 1 - Confirmed
  • 2 - Rejected
  • 3 - Cancelled
  • 4 - Completed
priceAmount
number
Total accommodation price for the booking period.
priceCurrency
string
Currency code for the price (e.g., “USD”, “EUR”).
cleaningFeeAmount
number
One-time cleaning fee charged for the booking.
cleaningFeeCurrency
string
Currency code for the cleaning fee.
amenitiesUpChargeAmount
number
Additional charges for premium amenities.
amenitiesUpChargeCurrency
string
Currency code for amenities upcharge.
totalPriceAmount
number
Total amount to be paid (price + cleaning fee + amenities upcharge).
totalPriceCurrency
string
Currency code for the total price.
durationStart
string
Check-in date in ISO 8601 format (YYYY-MM-DD).
durationEnd
string
Check-out date in ISO 8601 format (YYYY-MM-DD).
createdOnUtc
string
Timestamp when the booking was created in ISO 8601 format.

Example Request

curl -X GET "https://api.bookify.com/api/bookings/id?id=3fa85f64-5717-4562-b3fc-2c963f66afa6" \
  -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..." \
  -H "Accept: application/json"

Example Response

{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "userId": "7b9c3d1e-4f2a-5c6d-8e9f-0a1b2c3d4e5f",
  "apartmentId": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d",
  "status": 1,
  "priceAmount": 750.00,
  "priceCurrency": "USD",
  "cleaningFeeAmount": 50.00,
  "cleaningFeeCurrency": "USD",
  "amenitiesUpChargeAmount": 25.00,
  "amenitiesUpChargeCurrency": "USD",
  "totalPriceAmount": 825.00,
  "totalPriceCurrency": "USD",
  "durationStart": "2024-06-15",
  "durationEnd": "2024-06-20",
  "createdOnUtc": "2024-03-10T14:30:00.000Z"
}

Error Responses

401 Unauthorized

Returned when the request lacks valid authentication credentials.
{
  "code": "Auth.Unauthorized",
  "message": "Authentication credentials are missing or invalid"
}

404 Not Found

Returned when the booking with the specified ID does not exist.
{
  "code": "Booking.NotFound",
  "message": "The booking with the specified identifier was not found"
}

500 Internal Server Error

Returned when an unexpected server error occurs.
{
  "code": "Server.Error",
  "message": "An unexpected error occurred while processing your request"
}

Usage Notes

  • Users can only retrieve bookings they have created (authorization is enforced)
  • The status field indicates the current state of the booking in its lifecycle
  • All monetary amounts are in the smallest currency unit (e.g., dollars, not cents)
  • The totalPriceAmount is the sum of all individual price components

Booking Status Values

ValueStatusDescription
0ReservedBooking request has been submitted
1ConfirmedBooking has been confirmed by the host
2RejectedBooking request was rejected
3CancelledBooking was cancelled
4CompletedStay has been completed

Build docs developers (and LLMs) love