Overview
The Stays API provides a unified interface to search, book and manage accommodation bookings across millions of properties worldwide. This guide will walk you through integrating our search and booking flow into your product.Prerequisites
Before you begin, you’ll need to:Create an account
Create an account
Contact your account manager to request access to the Tripedge API. If you don’t have a contact at Tripedge, reach out to us at https://tripedge.com/contact.
Get your API key
Get your API key
Create a test access token from the “Access tokens” page in your Dashboard. These are your Sandbox credentials.
Integration Steps
There are five main steps to search and book accommodation with the Stays API:1. Search for a Destination
First, search for your desired destination to get location details. When you subsequently search for accommodation results, you’ll use thedestinationId returned in the response.
2. Search for Accommodation
Once you have the destination details, search for available properties by providing:- Number of guests
- Number of rooms
- Check-in and check-out dates
- Search location (coordinates + radius) or specific property IDs
sessionId that caches your search results. This enables:
- Instant redisplay of results when users refresh their page
- Server-side filtering and sorting of results by passing the
sessionIdin subsequent requests
3. Get Hotel Details
Retrieve detailed information about a hotel from your search results. You’ll display hotel images, name, address, amenities, available room types and rates, and other details to the user.4. Create Prebook
Create a pre-booking to verify availability and rates before final booking. Here, you’ll need to display the rate remarks present in the response to the user, in addition to cancellation policy details and dates. At this stage, you’ll need to specify the payment method:creditCard: The end user will pay directly with their credit cardaccount: The booking amount will be deducted from your deposit balance with us
