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

# Get Booking Status

> Retrieve the current lightweight unified status for one booking.

Use this endpoint to poll a booking after
[Create Booking](/api-reference/create-booking) or
[Cancel Booking](/api-reference/cancel-booking). It returns the current
unified state without retrieving the full itinerary payload.

## Request Example

<RequestExample>
  ```bash theme={null}
  curl "$UNIFYSTAYS_BASE_URL/hotels/book/ubk_eGQ0dW9uV1Vi" \
    -H "x-api-key: $UNIFYSTAYS_API_KEY" \
    -H "language: en"
  ```
</RequestExample>

## Polling Guidance

<Steps>
  <Step title="Save the booking ID">
    Store `data.booking_id` from the booking creation response.
  </Step>

  <Step title="Read the current state">
    Display `data.status` to the customer or support user.
  </Step>

  <Step title="Stop when final">
    Use `data.is_terminal` to decide when the operation is complete.
  </Step>

  <Step title="Load the itinerary when needed">
    Use [Get Booking Details](/api-reference/get-booking-details) for confirmed
    itineraries, support views, and reconciliation.
  </Step>
</Steps>

After a cancellation request, `CANCELLATION_PENDING` means the supplier is
still processing it. Continue polling until the status becomes `CANCELLED` or
the response indicates a final state.

The OpenAPI section below contains the status response and error contract.


## OpenAPI

````yaml reference/openapi.json GET /hotels/book/{booking_id}
openapi: 3.0.0
info:
  title: Unifystays API
  description: >-
    One unified hotel API across suppliers. Integrate once, then enable and
    manage suppliers from the Unifystays portal.
  version: '1.0'
  contact: {}
servers:
  - url: https://api-sandbox.unifystays.com
    description: Sandbox
  - url: https://api.unifystays.com
    description: Production
security:
  - x-api-key: []
tags: []
paths:
  /hotels/book/{booking_id}:
    get:
      tags:
        - Hotels
      summary: Get booking status (lightweight)
      description: Returns current unified booking state. Use for polling.
      operationId: HotelBookingController_getBooking
      parameters:
        - name: booking_id
          required: true
          in: path
          schema:
            type: string
            example: ubk_eGQ0dW9uV1Vi
        - name: language
          description: Enter language code(ex. en)
          in: header
          schema: {}
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HotelBookingResponseDto'
        '404':
          description: Booking not found.
components:
  schemas:
    HotelBookingResponseDto:
      type: object
      properties:
        success:
          type: boolean
          example: true
        message:
          type: string
          example: Booking request accepted and is being processed.
        data:
          $ref: '#/components/schemas/BookingStatusDataDto'
      required:
        - success
        - message
        - data
    BookingStatusDataDto:
      type: object
      properties:
        booking_id:
          type: string
          example: ubk_eGQ0dW9uV1Vi
        status:
          type: string
          enum:
            - PROCESSING
            - CONFIRMED
            - ON_HOLD
            - FAILED
            - CANCELLATION_PENDING
            - CANCELLED
          example: PROCESSING
        is_terminal:
          type: boolean
          example: false
        provider:
          $ref: '#/components/schemas/BookingProviderStatusDto'
        next_poll_after_ms:
          type: object
          description: Client hint to re-check booking status. Null when terminal.
          example: 5000
          nullable: true
        created_at:
          type: string
          example: '2026-04-15T12:12:11.000Z'
        updated_at:
          type: string
          example: '2026-04-15T12:12:11.000Z'
        metadata:
          type: object
          additionalProperties: true
          nullable: true
      required:
        - booking_id
        - status
        - is_terminal
        - provider
        - created_at
        - updated_at
    BookingProviderStatusDto:
      type: object
      properties:
        code:
          type: string
          example: TBO
        booking_id:
          type: object
          example: FL1IMA
          nullable: true
        booking_code:
          type: object
          example: REZ6A5A81E9
          nullable: true
        hotel_confirmation_number:
          type: object
          example: HCN-482910
          nullable: true
        hotel_confirmation_status:
          type: object
          example: Confirmed
          nullable: true
        hotel_confirmation_note:
          type: object
          nullable: true
        hotel_contact_phone:
          type: object
          nullable: true
        hotel_contact_name:
          type: object
          nullable: true
        raw_status:
          type: object
          example: SUCCESS
          nullable: true
        message:
          type: object
          example: Booking confirmed by supplier.
          nullable: true
      required:
        - code
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key
      description: Environment-specific API key created in the Unifystays portal

````