---
title: "Hotelbeds API Integration (XML / JSON) | PHPTRAVELS"
description: "Hotelbeds API integration explained: Content API download and hotel mapping, Booking API availability, rate checks, bookings and cancellations in PHPTRAVELS."
source: https://phptravels.com/hotelbeds-api-xml-integration
---

Hotel supplier integration

# Hotelbeds API integration : content, mapping and live booking

A Hotelbeds API integration is two jobs, not one. You download and store hotel content, then you book against live rates. PHPTRAVELS does both inside its hotel module, with your own Hotelbeds contract and keys.

- Content API sync
- Booking API flow
- BOOKABLE and RECHECK rates
- Hotel mapping

How the Hotelbeds APIs fit together

## Hotelbeds API integration: content on one side, booking on the other

Hotelbeds splits its hotel APIs in two. The Content API returns static data: descriptions, images, facilities, boards and rooms. The Booking API returns live availability and prices and takes the booking. Pick a step in the middle to see which calls it uses.

### Content API

- Hotel list hotels · from=1&to=1000 Every hotel in your portfolio, in pages of up to 1,000 hotels per request.
- Facilities, boards and rooms facilities · boards · rooms The code tables that turn Booking API codes into words your guests understand.
- Images photos.hotelbeds.com/giata/ Partial image paths, joined to the Hotelbeds photo host in the size you need.
- Daily changes lastUpdateTime After the first load, one request a day with lastUpdateTime returns only what changed.

Request flow

### Booking API

- Availability POST /hotels Rooms, boards, prices and cancellation fees for your hotel codes, dates and occupancy.
- Check rate POST /checkrates Updated price and conditions for a rate marked RECHECK, plus upselling options.
- Booking POST /bookings Confirms the chosen rateKey with the holder and guest names, and returns the reference.
- Cancellation DELETE /bookings · simulate Simulates a cancellation to show the fee, or cancels the booking for real.

Sample screen. Calls as documented on developer.hotelbeds.com; the flow is how PHPTRAVELS uses them.

Most failed Hotelbeds projects mix the two sides up. They call the Content API during a guest search, which is slow and, as Hotelbeds warns, can get your credentials blocked. Or they search live without stored codes and cannot show images or facilities. PHPTRAVELS keeps the two apart: content is synced in the background, and only availability, check rate and booking calls run while a guest waits.

If you want the supplier itself, its products and how to open an account, read the [Hotelbeds supplier profile](https://phptravels.com/providers/hotelbeds). This page is about the technical integration.

Rate types

## The four rate fields that change your checkout

Every Hotelbeds rate carries a few attributes that decide whether you can book it straight away, what price you may show and who takes the money. These are the ones your engine must read on every result.

| Field | First case | Second case | What PHPTRAVELS does |
| Bookable or recheck rateType | BOOKABLE The rate is up to date. You can book it without another call. | RECHECK You must call check rate first to get the updated price and conditions. | Runs check rate before the payment step for RECHECK rates and shows the guest any change. |
| Net or commissionable net · sellingRate | net Net model: prices are net, so you add your own margin. | sellingRate Commissionable model: the commission is already inside sellingRate, and that price is final. | Applies your markup rules to net rates and sells commissionable rates at sellingRate. |
| Fixed selling price hotelMandatory | true hotelMandatory is true: you must sell at sellingRate. | false · null False or empty on a net rate: you may set your own margin. | Locks the displayed price to sellingRate when the hotel requires it, whatever the markup rule says. |
| When the guest pays paymentType | AT_WEB Payment is taken when the booking is made, through your site. | AT_HOTEL The guest pays the hotel directly. | Labels the rate pay now or pay at hotel, and routes checkout to match. |

Which pricing model you get depends on your Hotelbeds contract. As Hotelbeds states, your sales manager recommends the model for your business.

Hotel mapping

## Match Hotelbeds hotels to the hotels you already sell

If you have your own contracts or a second supplier, the same hotel will arrive under different codes. Mapping links them, so a guest sees one hotel with the best rate, not three copies.

### How mapping works in PHPTRAVELS

After each content sync, PHPTRAVELS compares Hotelbeds hotels with your hotel list by name, address, city and coordinates. Close matches are linked automatically. Doubtful ones wait for a person to confirm, and hotels with no match can be imported as new properties or ignored.

Mapped hotels share one page, one gallery and one review score in the [Stays](https://phptravels.com/features/stays), while each supplier keeps its own rates and rules. The same mapping is used by your public site and your [B2B travel portal](https://phptravels.com/b2b-travel-portal).

Hotel mapping

- Harbour View Hotel Lisbon 482913 97% Matched
- Old Town Suites Prague 117354 92% Matched
- Palm Court Resort Dubai 662018 74% Review
- Casa Azul Boutique Seville – 0% No match
- Northern Lights Lodge Tromsø 905227 66% Review
- Riverside Apartments Budapest 330761 98% Matched

Sample screen with made-up hotels and codes.

Hotelbeds XML or JSON

## Every request is signed, and testing starts small

Teams still search for Hotelbeds XML, but the current documentation shows JSON requests. Either way it is the same set of operations, and each request carries two headers.

availability-request.sh (sample)

Two headers

Api-key with your key, and X-Signature: a SHA256 hash of your key, your secret and the current time in seconds.

Test host

As Hotelbeds states, the test servers match production, but bookings there are not real and cards are not charged.

50 requests a day

New keys open an evaluation environment with a quota of 50 requests a day. More comes with certification.

No live content calls

Hotelbeds warns that calling the Content API in real time can get credentials blocked. PHPTRAVELS never does.

Content sync planner

## How many Content API calls your hotel list needs

As Hotelbeds states, the hotel list comes in pages of up to 1,000 hotels, and after the first load a daily lastUpdateTime request returns only the changes. Enter your numbers to plan the sync.

Requests for the first full load

20

Requests per daily update

3

Days to load once on the evaluation quota

1

Estimate only, for the hotel list. Code tables and images add a few more calls. On the evaluation quota of 50 requests a day, test with one destination first.

Go-live checklist

## What to have ready before you switch to live

Hotelbeds moves you from evaluation to certification and then to live keys through its dashboard. These are the points a Hotelbeds API integration should cover first, and how PHPTRAVELS covers them.

- Evaluation keys added in the admin, test host selected
- Content API synced to your database, with a daily update scheduled
- Hotels mapped to your list, doubtful matches reviewed
- RECHECK rates go through check rate before payment
- sellingRate respected when hotelMandatory is true
- Rate comments and cancellation fees shown before the guest pays
- Voucher shows the Hotelbeds reference and the rate comments
- Cancellation simulated first, then confirmed, with the fee recorded

Certification steps and live access are set by Hotelbeds for your contract and market.

Cost

## One licence for the engine, your own contract with Hotelbeds

PHPTRAVELS is a one-time licence with the source code. Hotelbeds is a separate agreement between you and Hotelbeds, so the net rates and the keys stay yours.

Startup

[Custom quote](https://phptravels.com/pricing)

one-time licence

Agency

[Custom quote](https://phptravels.com/pricing)

one-time licence

Enterprise

[Custom quote](https://phptravels.com/pricing)

one-time licence

Hotelbeds is one of several hotel sources you can run side by side. See how it sits with [RateHawk](https://phptravels.com/integrations/ratehawk-api-integration) in the [travel APIs](https://phptravels.com/travel-apis) overview, or compare suppliers in the [XML supplier list](https://phptravels.com/travel-xml-api-suppliers-list).

FAQ

## Hotelbeds API integration questions

What developers and travel companies ask before they connect Hotelbeds.

Two parts. A background sync with the Content API that stores hotels, images, facilities, boards and rooms in your database, and a live flow with the Booking API for availability, check rate, booking and cancellation. PHPTRAVELS runs both in its hotel module.

People still call it Hotelbeds XML, but the current Hotelbeds documentation shows JSON requests and responses. The operations are the same either way, and PHPTRAVELS handles the format for you.

A BOOKABLE rate is already up to date and can be booked straight away. A RECHECK rate needs a check rate call first, which returns the current price and conditions. PHPTRAVELS makes that call before the payment step.

It is slow, and Hotelbeds warns that using the Content API in real time can lead to blocked credentials. Content should be downloaded in pages, stored, and updated once a day with lastUpdateTime, which is how PHPTRAVELS works.

Yes. You register with Hotelbeds, sign the contract and receive your own API key and secret. New keys work on an evaluation environment with 50 requests a day until you complete certification.

Yes. Hotel mapping links the same property across sources, so guests see one hotel with the best available rate, while each source keeps its own markup and rules.

PHPTRAVELS plans start as a one-time licence with the source code. Your Hotelbeds contract is separate and agreed directly with Hotelbeds. See the pricing page or ask sales for a quote.

Keep exploring

## More from the platform

Reviewed by [Qasim Hussain](https://phptravels.com/author/qasim-hussain), Founder & CEO, PHPTRAVELS · Updated October 12, 2026

- [Hotels API Bedbank, OTA, GDS and direct hotel APIs explained](https://phptravels.com/hotels-api)
- [Hotelbeds supplier profile Who Hotelbeds is and how to connect it to PHPTRAVELS](https://phptravels.com/providers/hotelbeds)
- [Bedsonline integration Bedsonline hotels and agent rates in your engine](https://phptravels.com/bedsonline-integration)
- [Hotel booking engine Direct bookings on your own hotel website](https://phptravels.com/hotel-booking-engine)
- [Stays Bedbanks and direct contracts](https://phptravels.com/features/stays)
- [RateHawk API integration RateHawk hotels in your booking engine, ready connector](https://phptravels.com/integrations/ratehawk-api-integration)
