Travel agencies and online travel platforms often reach a point where local hotel contracts are no longer enough. Customers want more destinations, competitive rates, accurate availability and a smooth booking experience. Managing that inventory manually becomes difficult as the business grows.
A Stuba API connection gives travel businesses a way to bring Stuba hotel inventory into their own booking platform. Instead of sending customers to a separate supplier website, an OTA or B2B portal can search hotel availability, display room options, validate a selected rate and complete supported booking operations from its own system.
Stuba describes its API as a hotel distribution API that can be connected to travel websites, mobile apps, loyalty platforms and content-management systems.
For travel companies evaluating Stuba API integration, the main question is therefore not simply whether an API connection is possible. The bigger questions are which Stuba API format fits the platform, how availability and booking work, and how the integration will be managed after launch.
What is the Stuba API?
The Stuba API allows approved travel businesses to connect Stuba hotel inventory and booking services with their own software.
It is mainly relevant to OTAs, travel agencies, B2B portals, tour operators and other professional travel sellers that already have or plan to build a hotel booking workflow.
Stuba currently exposes multiple integration options through its developer portal. Its registration process specifically lists HAPI (JSON), Content API and XML API V1.28 as available API types.
That distinction is important because older Stuba implementations may be built around XML, while newer development teams may evaluate the JSON-based HAPI.
A booking platform still needs much more than supplier access. Search pages, markup rules, checkout, booking records, payment handling and back-office operations have to work around the supplier connection. PHPTRAVELS explains this wider architecture in its hotel API booking system guidance.
What is the difference between Stuba XML API and Stuba HAPI?
Stuba XML API uses XML-based requests, while HAPI provides a JSON-based interface with API-key authentication. Both are designed to support hotel-booking connectivity, but their technical implementation differs.
Stuba's current XML API V1.28 documentation uses agency credentials including organization, user, password and currency. Requests can be sent as XML, and the documentation also describes SOAP/WSDL support.
By comparison, HAPI sends JSON payloads and uses an AuthApiKey header. Its documented operations include hotel and region search, booking preparation, confirmation, cancellation and booking retrieval.

| Area | Stuba XML API | Stuba HAPI |
|---|---|---|
| Main format | XML | JSON |
| Authentication | Agency credentials | API key |
| Availability | Supported | HotelSearch / RegionSearch |
| Rate validation | Booking workflow operation | BookingPrepare |
| Booking | Supported booking operations | BookingConfirm |
| Post-booking | Depends on supported XML operations | Query and cancellation endpoints |
| Best consideration | Existing XML integrations | Modern JSON-based development |
How does Stuba hotel availability search work?
A Stuba hotel API search sends stay and passenger criteria and returns matching accommodation and room options that can continue into the booking process.
In HAPI, Stuba documents both HotelSearch and RegionSearch. Search criteria can include hotel or region, arrival date, number of nights, room occupancy and traveler nationality.
The response can include hotel information, room options, meal types, prices and cancellation-policy status. Importantly, Stuba also returns a Quote ID associated with an available option. That Quote ID is then used in the next stage of the booking flow.
A simplified process is:
Traveler search → Stuba availability request → Hotel and room results → Quote ID → Rate validation → Booking confirmation
This is why the search result should not be treated as a permanent price. The selected option needs to move through the required validation step before confirmation.
For platforms combining several accommodation suppliers rather than Stuba alone, PHPTRAVELS' guide to getting global hotel inventory and selling it online explains why aggregation and supplier management become important as inventory grows. The sitemap confirms this supporting hotel-inventory content is already part of the site architecture.
How does the Stuba hotel booking workflow work?
The HAPI booking journey moves from availability search to BookingPrepare and then BookingConfirm.
This is one of the most important parts of a reliable Stuba hotel booking API integration.
After a traveler selects an available hotel rate, the Quote ID from the search result is passed to BookingPrepare. Stuba describes BookingPrepare as a mandatory step that validates current availability, price, cancellation policy and relevant rate-specific information before confirmation.
Once the booking is ready to proceed, BookingConfirm finalizes the selected booking and returns the booking response.
The practical workflow is therefore:
- Search hotels or a destination.
- Display available hotel and room options.
- Store the selected Quote ID.
- Run BookingPrepare.
- Show updated price, cancellation terms and important rate notes.
- Collect required traveler details.
- Send BookingConfirm.
- Store the returned supplier and booking references.
The important lesson for an OTA is that search and booking are not one operation.
Your system must keep track of the state of the booking between these steps. Otherwise a user could proceed with information that has changed since the original search.
Why is BookingPrepare important?
BookingPrepare helps prevent the platform from confirming a booking using stale price, availability or cancellation information.
Hotel availability changes constantly. A room visible during the original search may have different conditions by the time the customer reaches checkout.
Stuba states that BookingPrepare checks current booking details, availability, price, full cancellation policy and rate-specific notes before confirmation.
A hotel booking engine should therefore clearly handle situations where:
- the rate changes;
- availability is no longer valid;
- cancellation conditions change;
- new hotel or rate notes are returned.
The customer should see relevant updated information before the final booking action.
This type of workflow is also why a supplier API needs to sit inside a properly designed hotel booking engine, rather than being treated as a simple hotel-search feed.
How are cancellations and existing bookings handled?
Stuba HAPI includes separate operations for retrieving and cancelling bookings.
BookingQuery retrieves an existing booking using its booking ID. The returned information can include booking status and cancellation-related data.
For cancellations, Stuba documents a BookingCancel operation that uses the Stuba Booking ID and returns information about applicable cancellation charges.
This matters operationally because a successful hotel integration does not end when a reservation is created.
An OTA or B2B travel agency also needs to think about booking lookup, support requests, cancellations, supplier references, refunds where applicable, and how agents can understand booking status from the back office.
How do you get a Stuba API key and go live?
Stuba's published onboarding flow is registration, API access, certification and go-live.
The Stuba developer portal describes four stages: register, receive API keys after approval, certify the integration with Stuba's API team, and then go live.
Stuba also states that businesses need an existing Stuba account before registering for API integration. Its registration form asks which API will be integrated and requests information about the technical contact and the platform where the Stuba feed will be used.
So a sensible Stuba API integration plan is:
Commercial account → API registration → Credentials/API key → Development → Testing → Certification → Production
Do not build the entire project around guessed credentials or production access. Confirm the required Stuba environment and API type early in the project.
Developers who need endpoint-level technical details should use the official Stuba Developer Portal as the authoritative reference for current API specifications.
What common problems should a Stuba integration handle?
Most integration problems happen around booking logic and data handling rather than the ability to send an API request.
A production booking platform should be prepared for changing rates, unavailable rooms, incomplete searches, supplier timeouts, cancellation-policy differences and booking responses that need additional operational attention.
Search performance also deserves planning. Stuba notes that HAPI availability response time can vary depending on the search criteria, which means the user interface should be designed for real supplier response behavior rather than assuming an instant static database lookup.
Hotel content is another consideration. A platform that combines several suppliers needs mapping and deduplication so the same property is not presented repeatedly.
That becomes especially important when Stuba is used alongside other bed banks. PHPTRAVELS already has supporting content on B2B hotel suppliers, which the sitemap lists as a separate supplier-selection topic rather than a Stuba integration page.
Can Stuba be combined with other hotel APIs?
Yes. A travel platform can be designed to work with multiple hotel suppliers, provided its aggregation, pricing and booking logic can manage them correctly.
A multi-supplier architecture can improve inventory options, but it also adds more responsibility. The platform has to normalize supplier responses, control markups, map properties, manage cancellation rules and record which supplier owns each booking.
PHPTRAVELS' travel XML API suppliers resources and general API integration capabilities are more appropriate for that broader architecture question, while this article should remain focused on Stuba.
How does Stuba integrate with PHPTRAVELS?
PHPTRAVELS provides a native Stuba supplier module that can connect Stuba inventory with a PHPTRAVELS hotel booking platform.
The current PHPTRAVELS Stuba documentation says the module can fetch and sell Stuba hotel inventory through the website and provides configuration fields for Stuba credentials in the administration area.
For travel businesses, the API is only the supplier connection. The wider hotel booking software still needs to manage the customer journey, pricing rules, booking records and administration.
PHPTRAVELS' broader hotel API booking system also describes supplier credential setup, hotel-content mapping, markups, cancellation policies and checkout as separate parts of implementing a hotel API.
That means a typical architecture can be understood as:
Stuba → API connection → PHPTRAVELS hotel module → pricing/business rules → B2C or B2B booking interface → booking management
Businesses already using PHPTRAVELS can also review the dedicated Stuba module documentation for product-specific configuration.
Is Stuba API suitable for your travel business?
Stuba API is most relevant when you already have a genuine hotel-selling workflow and need supplier connectivity inside that platform.
An OTA may use it to show hotel inventory directly to travelers. A B2B travel portal may use it to let sub-agents search and book while the agency applies its own commercial rules. A tour operator can use accommodation inventory as one component of a wider travel product.
However, supplier access alone does not create a complete booking business.
Before integration, define who will search, who will book, where markups are applied, how bookings are supported and what should happen when availability or price changes.
That preparation usually matters more than simply getting the first API response working.
Frequently Asked Questions about Stuba API
What is Stuba API used for?
What is Stuba HAPI?
Does Stuba still provide an XML API?
What does Stuba HotelSearch return?
Is rate validation required before a Stuba booking?
Does Stuba require API certification?
Can Stuba API work with PHPTRAVELS?
Final Answer: How should you approach Stuba API integration?
A successful Stuba API integration is not simply about connecting an endpoint. It requires the booking platform to handle search, current pricing, Quote IDs, validation, booking confirmation and post-booking operations correctly.
For existing XML implementations, Stuba XML API remains part of the available integration landscape. For teams evaluating newer development options, Stuba HAPI provides a JSON-based workflow with API-key authentication and documented search, preparation, confirmation and post-booking endpoints.
The best approach is to confirm your API option and access with Stuba first, then design the complete customer and operational workflow around it.
For businesses that do not want to build every hotel-booking component from scratch, PHPTRAVELS can provide the booking-system layer around the supplier connection through its hotel booking software, hotel API architecture and native Stuba module.