Guest Get
Get Guest by ID
Retrieve a specific guest's information by their unique ID. Note: Guests are created automatically when making bookings through the Booking Create API.
Endpoint
GET /api/v1/client/guests/{guestId}Example curl
curlcurl "/api/v1/client/guests/f1b2c3d4-5678-49ab-9cde-112233445566" \
-H "accept: application/json" \
-H "origin: https://docs.hostelmate.co"Response (200 OK)
{
"guestId": "f1b2c3d4-5678-49ab-9cde-112233445566",
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"phone": "+971500000000",
"country_code": "AE",
"address": {
"line1": "Sheikh Zayed Rd",
"city": "Dubai",
"postal_code": "00000",
"country_code": "AE"
},
"date_of_birth": "1990-05-15",
"nationality": "US",
"preferences": {
"language": "en",
"newsletter": true,
"marketing": false
},
"createdAt": "2025-10-02T09:20:17Z",
"updatedAt": "2025-10-02T11:05:13Z",
"bookings": {
"total": 3,
"lastBooking": "2025-09-15T14:30:00Z"
}
}Search Guests
Search for guests using various criteria with pagination support.
Endpoint
Query Parameters
email
string
Search by exact email address.
phone
string
Search by phone number (partial match).
name
string
Search by first or last name (partial match).
country_code
string
Filter by country code.
nationality
string
Filter by nationality.
created_after
string
Filter guests created after this date (YYYY-MM-DD).
created_before
string
Filter guests created before this date (YYYY-MM-DD).
page
integer
Page number for pagination (default: 1).
limit
integer
Number of results per page (default: 20, max: 100).
Example curl
curlResponse (200 OK)
Validation Rules
pagemust be a positive integer (minimum: 1).limitmust be between 1 and 100.created_afterandcreated_beforemust be valid dates in YYYY-MM-DD format.country_codeandnationalitymust be valid ISO 3166-1 alpha-2 codes if provided.Search parameters are case-insensitive.
Error Codes
400
bad_request
Invalid query parameters (e.g., invalid date format, invalid pagination values).
404
guest_not_found
No guest with the specified guestId (for single guest requests).
422
invalid_country_code
Invalid country code or nationality in query parameters.
500
server_error
Unexpected error.
Last updated
Was this helpful?