Channex Room Types API

Manage room types under a property.

OpenAPI Specification

channex-room-types-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Channex ARI Room Types API
  description: 'Channex is a white-label hotel channel manager API. This specification describes the JSON-based REST API (v1) for managing properties, room types, rate plans, availability and restrictions (ARI), bookings, channels, and webhooks. Requests and responses use a resource envelope: response bodies carry a `data` (or `meta` / `errors`) root key, and `data` objects contain `type` and `attributes`. Write requests wrap their payload under a resource-type key (e.g. `property`, `room_type`, `rate_plan`).'
  termsOfService: https://channex.io/terms-of-service/
  contact:
    name: Channex Support
    email: support@channex.io
    url: https://docs.channex.io/
  version: '1.0'
servers:
- url: https://secure.channex.io/api/v1
  description: Production
- url: https://staging.channex.io/api/v1
  description: Staging / sandbox
security:
- userApiKey: []
tags:
- name: Room Types
  description: Manage room types under a property.
paths:
  /room_types:
    get:
      operationId: listRoomTypes
      tags:
      - Room Types
      summary: List room types
      parameters:
      - $ref: '#/components/parameters/Page'
      - $ref: '#/components/parameters/Limit'
      - name: filter[property_id]
        in: query
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: A list of room types.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoomTypeList'
    post:
      operationId: createRoomType
      tags:
      - Room Types
      summary: Create a room type
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RoomTypeWriteRequest'
      responses:
        '201':
          description: The created room type.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoomTypeResponse'
  /room_types/options:
    get:
      operationId: listRoomTypeOptions
      tags:
      - Room Types
      summary: List room type options
      responses:
        '200':
          description: Room type options.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OptionsList'
  /room_types/{id}:
    parameters:
    - $ref: '#/components/parameters/Id'
    get:
      operationId: getRoomType
      tags:
      - Room Types
      summary: Get a room type
      responses:
        '200':
          description: The requested room type.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoomTypeResponse'
    put:
      operationId: updateRoomType
      tags:
      - Room Types
      summary: Update a room type
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RoomTypeWriteRequest'
      responses:
        '200':
          description: The updated room type.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoomTypeResponse'
    delete:
      operationId: deleteRoomType
      tags:
      - Room Types
      summary: Delete a room type
      responses:
        '200':
          description: Room type deleted.
components:
  parameters:
    Limit:
      name: limit
      in: query
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 10
    Page:
      name: page
      in: query
      schema:
        type: integer
        minimum: 1
        default: 1
    Id:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    RoomTypeList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/RoomType'
        meta:
          type: object
    RoomTypeWriteRequest:
      type: object
      required:
      - room_type
      properties:
        room_type:
          $ref: '#/components/schemas/RoomTypeAttributes'
    RoomTypeResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/RoomType'
    RoomTypeAttributes:
      type: object
      required:
      - property_id
      - title
      - count_of_rooms
      - occ_adults
      - default_occupancy
      properties:
        property_id:
          type: string
          format: uuid
        title:
          type: string
          maxLength: 255
        count_of_rooms:
          type: integer
          minimum: 0
        occ_adults:
          type: integer
        occ_children:
          type: integer
        occ_infants:
          type: integer
        default_occupancy:
          type: integer
        room_kind:
          type: string
          enum:
          - room
          - dorm
        capacity:
          type: integer
        facilities:
          type: array
          items:
            type: string
        content:
          type: object
    OptionsList:
      type: object
      properties:
        data:
          type: array
          items:
            type: array
            items:
              type: string
            description: A two-element [title, id] pair.
    RoomType:
      type: object
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
          example: room_type
        attributes:
          $ref: '#/components/schemas/RoomTypeAttributes'
  securitySchemes:
    userApiKey:
      type: apiKey
      in: header
      name: user-api-key
      description: Channex API key passed in the `user-api-key` request header. Generate a key in the Channex application under your account settings.