---
title: "Build a hotel booking link"
method: GET
path: "/v1/hotels/{hotelId}/rates/{rateId}/booking-link"
tags: ["Hotels"]
---

# Build a hotel booking link

`GET /v1/hotels/{hotelId}/rates/{rateId}/booking-link`

## Request

- Base URL: `https://api.wego.com`
- URL: `https://api.wego.com/v1/hotels/{hotelId}/rates/{rateId}/booking-link`
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://auth.wego.com/user-auth/v2/users/oauth/authorize`
    - Token URL: `https://auth.wego.com/user-auth/v2/users/oauth/token`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/wego/apis/wego-api/docs/v1/hotels/:hotelId/rates/:rateId/booking-link/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns the wego.com checkout URL for a chosen rate. Pure build: no upstream call, no booking, no payment – only 400/401/429.

## Path parameters

- `hotelId` integer, required
- `rateId` string, required

## Query parameters

- `searchId` string
- `locale` string
- `guests` string
- `countryCode` string
- `siteCode` string

## Response `200`

The checkout URL, and the fact that it expires.

- object
  - `bookingUrl` string, required: The wego.com hotel checkout URL for the rate.
  - `expires` true, required: Always true: this link is search-scoped and stops working when the rate's search expires. A stale link loads an empty checkout page rather than erroring, so treat it as short-lived and re-price the rate to get a fresh one. To send someone a link that lasts, use the hotel's pageUrl.

## Other responses

- `400`: Invalid request parameters.
- `401`: Missing or invalid bearer token.
- `429`: Rate limit exceeded; retry after the `Retry-After` seconds.

## Changes

- **2026-08-25** `10fbc4e6f532`: 3 warning
  - added the new `rates_require_hotel_search` enum value to the `code` response property for the response status `400`
  - added the new `rates_require_hotel_search` enum value to the `code` response property for the response status `401`
  - added the new `rates_require_hotel_search` enum value to the `code` response property for the response status `429`

[Operation history](https://skmtc.dev/wego/apis/wego-api/changes/v1/hotels/:hotelId/rates/:rateId/booking-link/get.md)

---

[API](https://skmtc.dev/wego/apis/wego-api.md) - [All operations](https://skmtc.dev/wego/apis/wego-api/llms.txt) - [OpenAPI document](https://skmtc.dev/wego/apis/wego-api/revisions/e2d90f5b5694?raw)
