Get list of Room Types API
List room types. Results are paginated and ordered by title, ascending, by default; the meta block carries the page, limit, total and ordering.
Authorizations
user-api-keystringRequired
API key for programmatic access, sent in the user-api-key header.
Query parameters
filter[property_id]string · uuidOptionalExample:
Return only room types of this property.
716305c4-561a-4561-a187-7f5b8aeb5920pagination[page]integer · int32 · min: 1Optional
Page to return, counted from 1.
pagination[limit]integer · int32 · min: 1 · max: 100Optional
Number of items per page. Maximum is 100.
order[title]string · enumOptionalPossible values:
Sort direction for list results.
order[position]string · enumOptionalPossible values:
Sort direction for list results.
order[inserted_at]string · enumOptionalPossible values:
Sort direction for list results.
Responses
200
The request has succeeded.
application/json
JSON:API document wrapping a collection of resources with pagination meta.
401
Authentication credentials are missing or invalid.
application/json
422
The request has missing or invalid arguments; details lists the messages per argument.
application/json
get/room_types
GET /api/v1/room_types HTTP/1.1
Host: app.channex.io
user-api-key: YOUR_API_KEY
Accept: */*
{
"data": [
{
"type": "room_type",
"id": "716305c4-561a-4561-a187-7f5b8aeb5920",
"attributes": {
"id": "994d1375-dbbd-4072-8724-b2ab32ce781b",
"position": 0,
"title": "Standard Room",
"count_of_rooms": 20,
"occ_adults": 3,
"occ_children": 0,
"occ_infants": 0,
"room_kind": "room",
"capacity": 4,
"codes": {
"pms": "RT-42"
},
"meta": {},
"content": {
"description": "text",
"photos": [
{
"id": "cc673f90-8d65-498d-9ee7-b4b39f8df3ee",
"property_id": "52397a6e-c330-44f4-a293-47042d3a3607",
"room_type_id": "716305c4-561a-4561-a187-7f5b8aeb5920",
"kind": "photo",
"position": 0,
"author": "John Doe",
"description": "Room View",
"url": "https://images.channex.io/1747b751-28c0-47db-742a-40f62a186a00/"
}
]
}
},
"relationships": {
"property": {
"data": {
"id": "716305c4-561a-4561-a187-7f5b8aeb5920",
"type": "property"
}
},
"facilities": {
"data": [
{
"type": "facility",
"id": "716305c4-561a-4561-a187-7f5b8aeb5920",
"attributes": {
"id": "864d91a6-3a40-4098-a880-84b841e11adb",
"category": "general",
"title": "24-hour front desk"
}
}
]
}
}
}
],
"meta": {
"page": 1,
"limit": 10,
"total": 1,
"order_by": "inserted_at",
"order_direction": "desc"
}
}Last updated