openapi: 3.0.1
info:
  title: PMS Integration API
  description: PMS Integration API
  version: v1
servers:
  - url: https://l89hmcdo52.execute-api.eu-south-2.amazonaws.com/default/api/v1
    description: Sandbox Test Server
paths:
  /reservation/checkin:
    post:
      tags:
        - Reservation
      summary: Creates a check-in Request
      parameters:
        - name: api-version
          in: query
          schema:
            type: string
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CheckInRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/CheckInRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CheckInRequest'
      responses:
        '201':
          description: Created
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: Internal Server Error
  /reservation/checkout:
    post:
      tags:
        - Reservation
      summary: Creates a check-out Request
      parameters:
        - name: api-version
          in: query
          schema:
            type: string
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CheckOutRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/CheckOutRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CheckOutRequest'
      responses:
        '201':
          description: Created
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: Internal Server Error
components:
  schemas:
    CheckInRequest:
      required:
        - checkInDateTime
        - clcHotelId
        - expectedCheckOutDateTime
        - folio
        - guestFirstName
        - guestLastName
        - hotelConfirmationNumber
        - numberOfNights
        - occupancy
        - roomNumber
        - roomType
        - source
      type: object
      properties:
        hotelConfirmationNumber:
          minLength: 1
          type: string
          description: Confirmation number provided to CLC for the stay
          example: '13212'
        clcHotelId:
          type: integer
          description: CLC Hotel ID
          format: int32
          example: 776655
        employeeIdentifier:
          type: string
          description: Employee identifier (Badge Number, Member ID, or Card ID)
          nullable: true
          example: '999999'
        supplierReservationId:
          type: string
          description: Supplier reservation id
          nullable: true
          example: 19457856A3
        source:
          minLength: 1
          type: string
          description: Source of the reservation
          example: HOS
        checkInDateTime:
          type: string
          description: Check-in date and time (in hotel timezone with UTC offset)
          format: date-time
          example: '2026-10-17T14:30:00-05:00'
        expectedCheckOutDateTime:
          type: string
          description: Expected check-out date and time (in hotel timezone with UTC offset)
          format: date-time
          example: '2026-10-19T14:30:00-05:00'
        roomNumber:
          minLength: 1
          type: string
          description: Room number
          example: '201'
        folio:
          minLength: 1
          type: string
          description: Folio number
          example: '201'
        guestFirstName:
          minLength: 1
          type: string
          description: Guest first name
          example: Adam
        guestLastName:
          minLength: 1
          type: string
          description: Guest last name
          example: Addams
        roomType:
          minLength: 1
          type: string
          description: Room type (Single or Double)
          example: Single
        occupancy:
          type: integer
          description: Number of guests in room
          format: int32
          example: 1
        loyalty:
          type: boolean
          description: Whether loyalty was used
          nullable: true
          example: true
        numberOfNights:
          type: integer
          description: Number of nights for the stay
          format: int32
          example: 2
        reservationInformation:
          type: string
          description: Additional reservation information
          nullable: true
          example: Reservation details
      additionalProperties: false
    CheckOutRequest:
      type: object
      properties:
        reservationId:
          type: string
          description: CLC reservation id
          nullable: true
          example: RES-1234
        checkOutDate:
          type: string
          description: Check-out date and time
          format: date-time
          example: '2025-08-10T15:00:00-04:00'
      additionalProperties: false
      description: Check-out request model matching CLC API specification
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
    RequestDataResponse:
      type: object
      properties:
        requestId:
          type: string
        payload:
          type: object
          additionalProperties: {}
      additionalProperties: false
    RequestDataResponsePagedResultResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/RequestDataResponse'
        pageNumber:
          type: integer
          format: int32
        pageSize:
          type: integer
          format: int32
        total:
          type: integer
          format: int32
      additionalProperties: false
