Room Type
Overview
The Room Type endpoint returns the list of room types configured for the property. Room types are master data used for categorizing physical rooms by their configurations and amenities.
This master data is commonly used for availability display, rate management, and operational dashboards.
Request Endpoint
- HTTP Method:
POST - Secure URL Path:
{{base_url}}/api/room-type
Authorization
Requires the following permission:
- Permission:
integration-room-type
Payload Construction and Schema Definition
The request payload is submitted as form-data fields.
Request Body Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
username | string | Yes | API account username provided by GuestPro. | demo_user |
password | string | Yes | API account password provided by GuestPro. | •••••••• |
company_code | string | Yes | Property/company identifier bound to your API account. | gusadidev |
offset | number | No | Pagination offset/page start (backend-specific). | 0 |
limit | number | No | Page size (backend-specific). | 10 |
Response Body Fields
| Field | Type | Always present | Description |
|---|---|---|---|
error | boolean | Yes | Indicates whether the request failed. false means success. |
status | string | Yes | Status string. On success the example returns "ok". |
message | string | Yes | Human-readable message. Often empty on success. |
data | array<object> | Yes (on success) | Array of room type objects. |
total | number | Yes (on success) | Total number of room types in the property (independent from the current page size). |
Response data Fields
| Field | Type | Description | Example |
|---|---|---|---|
id | string | Room type identifier. | 123fe740-3869-11eb-a57f-950037ff4988 |
name | string | Room type name/label. | Deluxe Villa |
description | string (nullable) | Room type description. | Spacious villa with ocean view |
max_occupancy | number | Maximum number of guests allowed in this room type. | 4 |
createdAt | string | Creation timestamp. | 2022-05-03 10:02:15 |
Expected System Responses
The system responds with HTTP 200 OK.
{
"error": false,
"status": "ok",
"message": "",
"data": [
{
"id": "123fe740-3869-11eb-a57f-950037ff4988",
"name": "Deluxe Villa",
"description": "Spacious villa with ocean view",
"max_occupancy": 4,
"createdAt": "2022-05-03 10:02:15"
},
{
"id": "b0cb41b0-ac2f-11ed-a9ac-a72e59437084",
"name": "2 Bedroom",
"description": null,
"max_occupancy": 6,
"createdAt": "2023-02-14 14:23:24"
}
],
"total": 15
}