> ## Documentation Index
> Fetch the complete documentation index at: https://developer.tripedge.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a pre-booking



## OpenAPI

````yaml get /prebook/{sessionId}/{hotelId}/{rateId}/{paymentMethod}
openapi: 3.0.0
info:
  title: Hotel Booking API
  version: 1.0.0
servers:
  - url: /api
    description: API server
security:
  - ApiKeyAuth: []
paths:
  /prebook/{sessionId}/{hotelId}/{rateId}/{paymentMethod}:
    get:
      summary: Create a pre-booking
      operationId: createPreBooking
      parameters:
        - in: path
          name: sessionId
          schema:
            type: string
            format: uuid
          required: true
        - in: path
          name: hotelId
          schema:
            type: string
          required: true
        - in: path
          name: rateId
          schema:
            type: string
            format: uuid
          required: true
        - in: path
          name: paymentMethod
          schema:
            type: string
            enum:
              - creditCard
              - account
          required: true
      responses:
        '200':
          description: Pre-booking created
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Indicates if the request was successful
                  message:
                    type: string
                    nullable: true
                    description: Response message, null if successful
                  data:
                    type: object
                    properties:
                      search:
                        type: object
                        properties:
                          destinationId:
                            type: string
                          checkIn:
                            type: string
                          checkOut:
                            type: string
                          rooms:
                            type: array
                            items:
                              type: object
                              properties:
                                adults:
                                  type: number
                                children:
                                  type: number
                                childrenAges:
                                  type: array
                                  items:
                                    type: number
                              required:
                                - adults
                                - children
                                - childrenAges
                        required:
                          - destinationId
                          - checkIn
                          - checkOut
                          - rooms
                      hotel:
                        type: object
                        properties:
                          id:
                            type: number
                          name:
                            type: string
                          stars:
                            type: number
                            minimum: 1
                            maximum: 5
                          coordinates:
                            type: array
                            items:
                              type: number
                            minItems: 2
                            maxItems: 2
                          address:
                            type: object
                            properties:
                              address:
                                type: string
                              city:
                                type: string
                              country:
                                type: string
                              countryCode:
                                type: string
                          rating:
                            type: number
                            minimum: 0
                            maximum: 5
                          reviews:
                            type: number
                            minimum: 0
                          pricePerNight:
                            type: string
                          priceChargeable:
                            type: string
                          pricePerRoom:
                            type: string
                          pricePerRoomPerNight:
                            type: string
                          priceBeforeFees:
                            type: string
                          priceFees:
                            type: string
                          priceDueAtHotel:
                            type: string
                          priceInclusive:
                            type: string
                          amenities:
                            type: array
                            items:
                              type: string
                          location:
                            type: string
                          images:
                            type: array
                            items:
                              type: string
                              format: uri
                          exclusive:
                            type: boolean
                          type:
                            type: string
                        required:
                          - id
                          - name
                          - stars
                          - address
                          - rating
                          - reviews
                          - pricePerNight
                          - priceChargeable
                          - pricePerRoom
                          - pricePerRoomPerNight
                          - priceBeforeFees
                          - priceFees
                          - priceDueAtHotel
                          - priceInclusive
                          - amenities
                          - location
                          - images
                          - exclusive
                          - type
                      booking:
                        type: object
                        properties:
                          lines:
                            type: array
                            items:
                              type: object
                              properties:
                                lineText:
                                  type: string
                                type:
                                  type: string
                                  enum:
                                    - room
                                    - fee
                                    - payAtHotel
                                amount:
                                  type: string
                              required:
                                - lineText
                                - type
                                - amount
                          pricePerNight:
                            type: string
                          priceFees:
                            type: string
                          priceDueAtHotel:
                            type: string
                          priceInclusive:
                            type: string
                          priceChargeable:
                            type: string
                          pricePerRoom:
                            type: string
                          pricePerRoomPerNight:
                            type: string
                          priceBeforeFees:
                            type: string
                          currency:
                            type: string
                          remarks:
                            type: string
                          roomType:
                            type: string
                          cancellationPolicy:
                            type: string
                          cancellationPolicyDate:
                            type: string
                        required:
                          - lines
                          - pricePerNight
                          - priceFees
                          - priceDueAtHotel
                          - priceInclusive
                          - priceChargeable
                          - pricePerRoom
                          - pricePerRoomPerNight
                          - priceBeforeFees
                          - currency
                          - remarks
                          - roomType
                          - cancellationPolicy
                          - cancellationPolicyDate
                    required:
                      - search
                      - hotel
                      - booking
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: API key for authentication

````