Channex Rate Plans API

Manage pricing plans for room types.

OpenAPI Specification

channex-rate-plans-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Channex ARI Rate Plans 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: Rate Plans
  description: Manage pricing plans for room types.
paths:
  /rate_plans:
    get:
      operationId: listRatePlans
      tags:
      - Rate Plans
      summary: List rate plans
      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 rate plans.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RatePlanList'
    post:
      operationId: createRatePlan
      tags:
      - Rate Plans
      summary: Create a rate plan
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RatePlanWriteRequest'
      responses:
        '201':
          description: The created rate plan.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RatePlanResponse'
  /rate_plans/options:
    get:
      operationId: listRatePlanOptions
      tags:
      - Rate Plans
      summary: List rate plan options
      responses:
        '200':
          description: Rate plan options.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OptionsList'
  /rate_plans/{id}:
    parameters:
    - $ref: '#/components/parameters/Id'
    get:
      operationId: getRatePlan
      tags:
      - Rate Plans
      summary: Get a rate plan
      responses:
        '200':
          description: The requested rate plan.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RatePlanResponse'
    put:
      operationId: updateRatePlan
      tags:
      - Rate Plans
      summary: Update a rate plan
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RatePlanWriteRequest'
      responses:
        '200':
          description: The updated rate plan.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RatePlanResponse'
    delete:
      operationId: deleteRatePlan
      tags:
      - Rate Plans
      summary: Delete a rate plan
      responses:
        '200':
          description: Rate plan 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:
    RatePlan:
      type: object
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
          example: rate_plan
        attributes:
          $ref: '#/components/schemas/RatePlanAttributes'
    RatePlanResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/RatePlan'
    RatePlanList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/RatePlan'
        meta:
          type: object
    RatePlanAttributes:
      type: object
      required:
      - property_id
      - room_type_id
      - title
      properties:
        property_id:
          type: string
          format: uuid
        room_type_id:
          type: string
          format: uuid
        title:
          type: string
          maxLength: 255
        sell_mode:
          type: string
          enum:
          - per_room
          - per_person
        rate_mode:
          type: string
          enum:
          - manual
          - derived
          - auto
          - cascade
        currency:
          type: string
          description: ISO 4217 currency code.
        children_fee:
          type: string
        infant_fee:
          type: string
        meal_type:
          type: string
        max_stay:
          type: array
          items:
            type: integer
        min_stay_arrival:
          type: array
          items:
            type: integer
        min_stay_through:
          type: array
          items:
            type: integer
        closed_to_arrival:
          type: array
          items:
            type: boolean
        closed_to_departure:
          type: array
          items:
            type: boolean
        stop_sell:
          type: array
          items:
            type: boolean
        options:
          type: array
          items:
            type: object
            properties:
              occupancy:
                type: integer
              is_primary:
                type: boolean
              rate:
                type: integer
        auto_rate_settings:
          type: object
    OptionsList:
      type: object
      properties:
        data:
          type: array
          items:
            type: array
            items:
              type: string
            description: A two-element [title, id] pair.
    RatePlanWriteRequest:
      type: object
      required:
      - rate_plan
      properties:
        rate_plan:
          $ref: '#/components/schemas/RatePlanAttributes'
  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.