> For the complete documentation index, see [llms.txt](https://docs.channex.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.channex.io/api-v.1-documentation/room-types-collection/get-room-type-api.md).

# Get Room Type API

## Retrieve a room type

> Retrieve a room type by its identifier.

```json
{"openapi":"3.1.0","info":{"title":"Channex.io — Public API","version":"0.0.0"},"tags":[{"name":"Room Types","description":"Manage Room Types — the accommodation inventory (rooms, villas, dormitory beds) of a Property."}],"servers":[{"url":"https://app.channex.io/api/v1","description":"Production server","variables":{}},{"url":"https://staging.channex.io/api/v1","description":"Staging server","variables":{}}],"security":[{"UserApiKeyAuth":[]}],"components":{"securitySchemes":{"UserApiKeyAuth":{"type":"apiKey","in":"header","name":"user-api-key","description":"API key for programmatic access, sent in the `user-api-key` header."}},"schemas":{"Common.Scalars.id":{"type":"string","format":"uuid"},"RoomTypes.RoomTypeResource":{"type":"object","required":["type","id","attributes","relationships"],"properties":{"type":{"type":"string","enum":["room_type"]},"id":{"$ref":"#/components/schemas/Common.Scalars.id"},"attributes":{"$ref":"#/components/schemas/RoomTypes.RoomType"},"relationships":{"$ref":"#/components/schemas/RoomTypes.RoomTypeRelationships"}},"description":"A room type as returned in responses."},"RoomTypes.RoomType":{"type":"object","required":["id","position","title","count_of_rooms","occ_adults","occ_children","occ_infants","default_occupancy","room_kind","capacity","codes","meta","content"],"properties":{"id":{"allOf":[{"$ref":"#/components/schemas/Common.Scalars.id"}],"description":"Unique room type identifier."},"position":{"allOf":[{"$ref":"#/components/schemas/Common.Scalars.nonNegativeInt"}],"description":"Zero-based display position of the room type. Set with the `update_positions` endpoint."},"title":{"type":"string","maxLength":255,"description":"Room type title, as shown in the system. Unique within the property."},"count_of_rooms":{"allOf":[{"$ref":"#/components/schemas/Common.Scalars.positiveInt"}],"description":"Number of rooms (units) of this type available to sell. Affects billing for vacation rentals."},"occ_adults":{"allOf":[{"$ref":"#/components/schemas/Common.Scalars.positiveInt"}],"description":"Number of adult bed spaces in the room type."},"occ_children":{"allOf":[{"$ref":"#/components/schemas/Common.Scalars.nonNegativeInt"}],"description":"Number of child-only bed spaces. Children may also sleep in adult beds; set to 0 if there are no child-only beds."},"occ_infants":{"allOf":[{"$ref":"#/components/schemas/Common.Scalars.nonNegativeInt"}],"description":"Number of infant cots available in the room type."},"default_occupancy":{"allOf":[{"$ref":"#/components/schemas/Common.Scalars.positiveInt"}],"description":"Guests accommodated by default without extra spaces. Defaults to `occ_adults` and is silently lowered to it when a larger value is sent. Lowering `occ_adults` lowers this too.","deprecated":true},"room_kind":{"allOf":[{"$ref":"#/components/schemas/RoomTypes.RoomKind"}],"description":"Kind of room type. Defaults to `room`."},"capacity":{"anyOf":[{"type":"integer","format":"int32"},{"type":"null"}],"description":"Number of beds in a single physical room, used for `dorm` room types. Stored and returned whatever the `room_kind`; `null` until set."},"codes":{"anyOf":[{"type":"object","unevaluatedProperties":{}},{"type":"null"}],"description":"Free-form object stored for the client's own use, or null. The platform neither reads nor writes it: an object sent here comes back unchanged."},"meta":{"anyOf":[{"type":"object","unevaluatedProperties":{}},{"type":"null"}],"description":"Free-form object stored for the client's own use, or null. The platform neither reads nor writes it: an object sent here comes back unchanged."},"content":{"$ref":"#/components/schemas/RoomTypes.RoomTypeContent"}},"description":"A room type (an accommodation inventory unit — a room, villa, or dormitory bed) as returned in responses: every attribute is present."},"Common.Scalars.nonNegativeInt":{"type":"integer","format":"int32","minimum":0},"Common.Scalars.positiveInt":{"type":"integer","format":"int32","minimum":1},"RoomTypes.RoomKind":{"type":"string","enum":["room","dorm"],"description":"Kind of room type. A `dorm` sells beds within a shared physical room; a `room` sells the whole unit."},"RoomTypes.RoomTypeContent":{"type":"object","required":["description","photos"],"properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Room type description. Null by default."},"photos":{"type":"array","items":{"$ref":"#/components/schemas/Photos.Photo"},"description":"Photos attached to the room type. A room type holds at most 10 of them, counted separately from the property's own photos and from every other room type's. See the Photos resource for the full model and management endpoints."}},"description":"Room type content as returned in responses."},"Photos.Photo":{"type":"object","required":["id","property_id","room_type_id","kind","position","author","description","url"],"properties":{"id":{"allOf":[{"$ref":"#/components/schemas/Common.Scalars.id"}],"description":"Unique photo identifier."},"property_id":{"allOf":[{"$ref":"#/components/schemas/Common.Scalars.id"}],"description":"UUID of the Property the photo belongs to. Cannot be changed after the photo is created."},"room_type_id":{"anyOf":[{"$ref":"#/components/schemas/Common.Scalars.id"},{"type":"null"}],"description":"UUID of the Room Type the photo belongs to, or null when the photo is attached at property level. Cannot be changed after the photo is created."},"kind":{"allOf":[{"$ref":"#/components/schemas/Photos.PhotoKind"}],"description":"Kind of photo: `photo` for the property or room type itself, `ad` for an advertising image, `menu` for a restaurant menu. Defaults to `photo`."},"position":{"allOf":[{"$ref":"#/components/schemas/Common.Scalars.nonNegativeInt"}],"description":"Position in the photo list of the property or, for a room type photo, of that room type. Positions run from `0` without gaps and `0` designates the cover photo. On create the photo is inserted at this position, or appended when omitted; on update it is moved there. The other photos shift to keep the positions contiguous, and a value past the end places the photo last."},"author":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Photo author, or null. An empty string is stored as `null`."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Photo description, or null. An empty string is stored as `null`."},"url":{"type":"string","format":"uri","description":"URL of the image as served by Channex. The create response carries a placeholder image URL; once the source image has been fetched and stored, typically within a few seconds, the photo carries the URL of the stored copy — read the photo back to obtain it. A source image that cannot be fetched leaves the placeholder in place."}},"description":"A photo as returned in responses: every attribute is present."},"Photos.PhotoKind":{"type":"string","enum":["photo","ad","menu"],"description":"Kind of photo: `photo` for the property or room type itself, `ad` for an advertising image, `menu` for a restaurant menu. Defaults to `photo`."},"RoomTypes.RoomTypeRelationships":{"type":"object","required":["property","facilities"],"properties":{"property":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Common.Scalars.id"},"type":{"type":"string","enum":["property"]}},"required":["id","type"]}},"required":["data"],"description":"Property the room type belongs to."},"facilities":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Facilities.FacilityResource"}}},"required":["data"],"description":"Facilities associated with the room type. Each item is a facility resource carrying its `title` and `category`."}},"description":"Relationships of a room type resource."},"Facilities.FacilityResource":{"type":"object","required":["type","id","attributes"],"properties":{"type":{"type":"string","enum":["facility"]},"id":{"$ref":"#/components/schemas/Common.Scalars.id"},"attributes":{"$ref":"#/components/schemas/Facilities.Facility"}},"description":"A facility resource object (JSON:API), returned by both list and options endpoints."},"Facilities.Facility":{"type":"object","required":["id","category","title"],"properties":{"id":{"allOf":[{"$ref":"#/components/schemas/Common.Scalars.id"}],"description":"Unique facility identifier. Mirrors the resource `id`."},"category":{"type":"string","description":"Grouping code the facility belongs to, in lower snake case. The property and\nroom type dictionaries have separate vocabularies: a code valid for one is\nrejected by the other. `filter[category]` takes this value."},"title":{"type":"string","description":"Human-readable facility name."}},"description":"Attributes of a facility (amenity) available at a property or room type."},"Common.Errors.Unauthorized":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["unauthorized"]},"title":{"type":"string","enum":["Unauthorized"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"Authentication credentials are missing or invalid."},"Common.Errors.NotFound":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["resource_not_found"]},"title":{"type":"string","enum":["Resource Not Found"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The requested resource does not exist."},"Common.Errors.InvalidArguments":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.InvalidArgumentsObject"}},"description":"The request has missing or invalid arguments; `details` lists the messages per argument."},"Common.Errors.InvalidArgumentsObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["bad_request"]},"title":{"type":"string","enum":["Bad Request"]},"details":{"type":"object","unevaluatedProperties":{"type":"array","items":{"type":"string"}},"description":"Maps each invalid argument to the list of validation messages for that argument."}},"description":"Error object for invalid request arguments, adding per-argument messages."}}},"paths":{"/room_types/{id}":{"get":{"operationId":"RoomTypes_read","summary":"Retrieve a room type","description":"Retrieve a room type by its identifier.","parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Common.Scalars.id"}}],"responses":{"200":{"description":"The request has succeeded.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/RoomTypes.RoomTypeResource"}},"description":"JSON:API document wrapping a single resource."}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Unauthorized"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.NotFound"}}}},"422":{"description":"The request has missing or invalid arguments; `details` lists the messages per argument.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.InvalidArguments"}}}}},"tags":["Room Types"]}}}}
```
