Getting Started with the Xeni Activities APIHow to Book an ActivityHow to Browse Activity Tags and CategoriesHow to Cancel an Activity BookingHow to Check Activity AvailabilityHow to Get Activity DetailsHow to Retrieve Activity Booking DetailsHow to Search for Activities with FiltersHow to Search for Activity DestinationsCar Rental API - Getting StartedCar Rental API - Understanding Response FieldsHow to Book a Car RentalHow to Get Rental Car Details and Equipment Add-OnsHow to Retrieve or Cancel a Car Rental BookingHow to Search for Available Rental CarsHow to Search for Pickup LocationsHow to Use Car Rental Search FiltersDeals API Best Practices for IntegrationDeals API Frequently Asked QuestionsGetting Started with the Xeni Deals APIDeals API Request Parameters and Headers ReferenceDeals API Supported Currencies and LocalizationHow to Display Deals in Your ApplicationHow to Fetch Hotel Deals by LocationFlights API Error Codes and TroubleshootingGetting Started with the Xeni Flights APIHow to Book a FlightHow to Check Flight Availability and PricingHow to Confirm or Cancel a Flight BookingHow to Retrieve Fare Rules for a FlightHow to Retrieve Flight Booking DetailsHow to Search for Airports Using AutocompleteHow to Search for FlightsHow to Use Flight Search Filters, Sorting, and PaginationHow to Check Room Availability and PricingHow to Filter Vacation Rental ResultsHow to Get Resort Property Details, Amenities, and AccessibilityHow to Hold and Confirm a Resort BookingHow to Release a Resort HoldHow to Retrieve Resort Booking DetailsHow to Search for Available ResortsHow to Search for Resort DestinationsHow to Search for Vacation Rental LocationsHow to Search for Vacation RentalsHow to Use Resort Search Filters and SortingGetting Started with the Xeni Resorts APIResorts API: Understanding Booking Statuses and PoliciesGetting Started with the Vacation Rentals APIVacation Rentals Frequently Asked QuestionsVacation Rentals Supported Property TypesUnderstanding Async Search for Vacation RentalsAuthentication & API SignaturesBooking Hotels — Direct API & SSO CheckoutError Handling, Rate Limits & Best PracticesGetting Started with the Xeni Hotels APIManaging Bookings: Status, Retrieval & CancellationPricing Confirmation & Token LifecycleRetrieving Hotel Details & Room AvailabilitySearching for Hotels: Locations, Filters & PaginationSearching for HotelsSession Management & Correlation IDsAPI authentication and getting your API keys

Deals API Request Parameters and Headers Reference

Last updated: 2026-03-03

Deals API Request Parameters and Headers Reference

This article provides a detailed reference for every query parameter and HTTP header accepted by the Deals API endpoint. Understanding each field helps you construct precise requests and get the most relevant results.

Query Parameters

lat (required)

  • Type: float
  • Example: 34.0522
The latitude of the location to search for deals. Values range from -90.0 (South Pole) to 90.0 (North Pole). The API uses this coordinate, along with long, to determine which hotel deals to return based on proximity.

Use at least four decimal places for accurate results. Four decimal places provide precision to approximately 11 meters, which is more than sufficient for deal searches.

lat=48.8566    ← Paris, France
lat=35.6762    ← Tokyo, Japan
lat=-33.8688   ← Sydney, Australia

long (required)

  • Type: float
  • Example: -118.2437
The longitude of the location to search for deals. Values range from -180.0 (west) to 180.0 (east).
long=2.3522     ← Paris, France
long=139.6503   ← Tokyo, Japan
long=151.2093   ← Sydney, Australia

currency (required)

  • Type: string
  • Example: USD
An ISO 4217 three-letter currency code. All deal prices in the response will be converted to and displayed in this currency. Common values include:
CodeCurrency
USDUS Dollar
EUREuro
GBPBritish Pound Sterling
CADCanadian Dollar
AUDAustralian Dollar
MXNMexican Peso
JPYJapanese Yen
BRLBrazilian Real
See Supported Currencies and Localization for the full list and details on how currency conversion works.

top_destination (optional)

  • Type: boolean
  • Default: false
  • Example: true
When set to true, the API returns deals for popular travel destinations near the provided coordinates rather than strictly the closest properties. This is useful for building "Top Destinations" or "Trending Deals" sections where you want to highlight well-known locations rather than the nearest available hotel.

When omitted or set to false, the API returns deals based purely on proximity to the given coordinates.

# Proximity-based deals (default)
?lat=40.7128&long=-74.0060&currency=USD

Top destination deals

?lat=40.7128&long=-74.0060&currency=USD&top_destination=true

HTTP Headers

accept (required)

  • Value: application/json
Specifies that the client expects a JSON response. Always set this to application/json.

accept-language (recommended)

  • Value: Language tag (e.g., en, es, fr, de)
  • Default behavior: en if omitted
Controls the language used for localized content in the response, such as property names, descriptions, and deal labels. Use a standard BCP 47 language tag.
accept-language: en       ← English
accept-language: es       ← Spanish
accept-language: fr       ← French
accept-language: de       ← German
accept-language: pt-BR    ← Brazilian Portuguese

origin (recommended)

  • Value: Your application's origin URL
  • Example: https://yourdomain.com
The origin of the requesting application. While not strictly required for the request to succeed, including this header is recommended for proper CORS handling and request attribution.

referer (recommended)

  • Value: The full URL of the page making the request
  • Example: https://yourdomain.com/deals
The referring page URL. Like origin, this aids in request tracking and analytics.

timezone (recommended)

  • Value: IANA timezone identifier
  • Example: America/Los_Angeles
The user's timezone. This allows the API to return time-relevant deal information, such as deal expiry times or check-in windows, adjusted to the user's local time. Use a valid IANA timezone string.

Common timezone values:

TimezoneRegion
America/NewYorkUS Eastern
America/ChicagoUS Central
America/DenverUS Mountain
America/LosAngelesUS Pacific
Europe/LondonUnited Kingdom
Europe/ParisCentral Europe
Asia/TokyoJapan
Australia/SydneyEastern Australia

You can detect the user's timezone programmatically in JavaScript:

JAVASCRIPT
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
// e.g., "America/Los_Angeles"

x-correlation-id (required)

  • Value: UUID v4
  • Example: 550e8400-e29b-41d4-a716-446655440000
A unique identifier for the individual request. This is used for distributed tracing and debugging. Generate a new UUID for each API call.
JAVASCRIPT
const correlationId = crypto.randomUUID();

If you need to contact Xeni support about a specific request, provide the x-correlation-id value so the team can trace it through the system.

x-session-id (required)

  • Value: UUID v4
  • Example: 6fa459ea-ee8a-3ca4-894e-db77e160355e
A session identifier that groups related requests from the same user session. Unlike x-correlation-id which changes per request, x-session-id should remain the same throughout a single user session.

This helps the API optimize results and allows Xeni to track user journeys for analytics purposes.

JAVASCRIPT
// Generate once per session and reuse
if (!sessionStorage.getItem('xeniSessionId')) {
  sessionStorage.setItem('xeniSessionId', crypto.randomUUID());
}
const sessionId = sessionStorage.getItem('xeniSessionId');

Complete Request Example

Putting all parameters and headers together:

BASH
curl -X GET "https://travelapi.ai/hotels/api/v2/deals?lat=51.5074&long=-0.1278&currency=GBP&top_destination=true" \
  -H "accept: application/json" \
  -H "accept-language: en" \
  -H "origin: https://myapp.com" \
  -H "referer: https://myapp.com/travel-deals" \
  -H "timezone: Europe/London" \
  -H "x-correlation-id: d290f1ee-6c54-4b01-90e6-d701748f0851" \
  -H "x-session-id: 7c9e6679-7425-40de-944b-e07fc1f90ae7"

Was this article helpful?