Update Room Type API
Update a room type by its identifier. Attributes absent from the request are left unchanged. The updated room type is returned.
Authorizations
user-api-keystringRequired
API key for programmatic access, sent in the user-api-key header.
Path parameters
idstring · uuidRequiredExample:
716305c4-561a-4561-a187-7f5b8aeb5920Query parameters
forcebooleanOptional
Remove occupancy options even when they are mapped to channels. Without it the request fails when channel mappings would be affected.
Body
Request body accepted when updating a room type.
Responses
200
The request has succeeded.
application/json
JSON:API document wrapping a single resource.
400
The request body could not be parsed as JSON.
application/json
401
Authentication credentials are missing or invalid.
application/json
404
The requested resource does not exist.
application/json
422
The request has missing or invalid arguments; details lists the messages per argument.
application/json
put/room_types/{id}
PUT /api/v1/room_types/{id} HTTP/1.1
Host: app.channex.io
user-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 534
{
"room_type": {
"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": {},
"property_id": "716305c4-561a-4561-a187-7f5b8aeb5920",
"facilities": [
"716305c4-561a-4561-a187-7f5b8aeb5920"
],
"content": {
"description": "text",
"photos": [
{
"id": "cc673f90-8d65-498d-9ee7-b4b39f8df3ee",
"url": "https://example.com/temporaryphotos/a66edb22-47da-4da8-bab5-3b6f4056256f.png",
"kind": "photo",
"author": "John Doe",
"description": "Room View",
"is_removed": true
}
]
}
}
}{
"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"
}
}
]
}
}
}
}Last updated