Skip to main content

Method

GET /v1/ref/room-categories/:id

Description

Returns a single room category record by its UUID. This endpoint is useful when you need the full details of a specific room category after obtaining its ID from the list endpoint.

Headers

This endpoint is public and does not require authentication.

Path Parameters

id
string
required
The UUID of the room category to retrieve.

Response

{
  "id": "01234567-89ab-cdef-0123-456789abcdef",
  "code": "standard",
  "name": "Standard Room",
  "description": "Standard accommodation room",
  "displayOrder": 1,
  "isActive": true,
  "createdAt": "2024-01-01T00:00:00.000Z",
  "updatedAt": "2024-01-01T00:00:00.000Z"
}

Error Responses

{
  "error": "Invalid ID format"
}
{
  "message": "Room category not found"
}
{
  "error": "Failed to retrieve room category"
}

Response Fields

id
string
required
UUID v7 identifier for the room category.
code
string
required
Unique code identifier (e.g., “standard”, “deluxe”, “suite”).
name
string
required
Human-readable name of the room category.
description
string
Optional description of the room category.
displayOrder
number
Order for display purposes (lower numbers appear first).
isActive
boolean
required
Whether the room category is currently active.
createdAt
string
required
ISO 8601 timestamp of when the record was created.
updatedAt
string
required
ISO 8601 timestamp of when the record was last updated.

Notes

  • This endpoint returns both active and inactive room categories (unlike the list endpoint)
  • The ID must be a valid UUID format
  • If the room category does not exist, a 404 error is returned