Swagger

openapi: 3.0.3
info:
  version: 1.0.1
  title: pmsx/core-api
  description: A set of tools to facilitate hotelier onboarding to a PmsXv2 partner
servers:
  - url: https://pmsx-core-api.dev.siteminderlabs.com
security:
  - basicAuth: []
paths:
  "/pmses/{pmsCode}/hotels/{hotelCode}/reservation-import":
    get:
      operationId: getReservations
      description: Triggers the import active reservations job for requested hotel. 
      tags:
        - Reservation Import
      parameters:
        - $ref: "#/components/parameters/traceToken"
        - $ref: "#/components/parameters/pmsCode"
        - $ref: "#/components/parameters/hotelCode"
      responses:
        "200":
          $ref: "#/components/responses/Success"
        400:
          $ref: "#/components/responses/BadRequest"
        401:
          $ref: "#/components/responses/Unauthorized"
        429:
          $ref: "#/components/responses/TooManyRequests"
        500:
          $ref: "#/components/responses/ServerError"
  "/pmses/{pmsCode}/hotels/{hotelCode}/room-rates":
    parameters:
      - $ref: "#/components/parameters/traceToken"
      - $ref: "#/components/parameters/pmsCode"
      - $ref: "#/components/parameters/hotelCode"
    get:
      operationId: getRoomRates
      description: returns all configured room rates for specified hotelier
      tags:
        - RoomRates
      responses:
        "200":
          description: OK
          headers:
            X-SM-TRACE-TOKEN:
              schema:
                $ref: '#/components/headers/X-SM-TRACE-TOKEN'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/RoomRate"
        400:
          $ref: "#/components/responses/BadRequest"
        401:
          $ref: "#/components/responses/Unauthorized"
        429:
          $ref: "#/components/responses/TooManyRequests"
        500:
          $ref: "#/components/responses/ServerError"
  
components:
  headers:
    X-SM-TRACE-TOKEN:
      schema:
        type: string
      description: trace token
  responses:
    Success:
      description: Success response
      headers:
        X-SM-TRACE-TOKEN:
          $ref: '#/components/headers/X-SM-TRACE-TOKEN'
    BadRequest:
      description: Invalid request
      headers:
        X-SM-TRACE-TOKEN:
          $ref: '#/components/headers/X-SM-TRACE-TOKEN'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Errors'
    Unauthorized:
      description: Unauthorized
      headers:
        X-SM-TRACE-TOKEN:
          $ref: '#/components/headers/X-SM-TRACE-TOKEN'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Errors'
    TooManyRequests:
      description: Too Many Requests
      headers:
        X-SM-TRACE-TOKEN:
          $ref: '#/components/headers/X-SM-TRACE-TOKEN'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Errors'
    ServerError:
      description: Unexpected error occurred
      headers:
        X-SM-TRACE-TOKEN:
          $ref: '#/components/headers/X-SM-TRACE-TOKEN'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Errors'
  schemas:
    RoomRate:
      type: object
      allOf:
        - type: object
          required:
            - roomTypeCode
            - roomTypeName
          properties:
            ratePlanName:
              type: string          
            ratePlanCode:
              type: string
            roomTypeName:
              type: string 
            roomTypeCode:
              type: string
            includedAdultOccupancy:
              type: integer  
    Errors:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: "#/components/schemas/Error"
    Error:
          type: 'object'
          properties:
            code:
              type: string
            message:
              type: string
  parameters:
    traceToken:
      name: X-SM-TRACE-TOKEN
      in: header
      description: traceToken is logged with every log messages for this request
      required: true
      schema:
        type: string
    hotelCode:
      in: path
      name: hotelCode
      description: hotelCode used to identify the hotelier 
      required: true
      schema:
        type: string
        minLength: 1
    pmsCode:
      in: path
      name: pmsCode
      description: pmsCode used to identify the pmsx partner
      schema:
        type: string
        minLength: 1
      required: true
  securitySchemes:
    basicAuth:  
      type: http
      scheme: basic

Last updated