JSON API - SHOP
Returns pricing and availability for the requested product, dates, and occupancy
Input
Required Inputs
Key | Required | Type | Notes |
transtype | Y | string |
|
login | Y | string | API user login |
password | Y | string | API user password |
brandid | Y | string | Brand ID to shop |
productcode | Y | string | ProductCode to shop |
qcurrency | Y | string | Three-letter currency code for pricing to be returned (e.g. "USD") |
sellmethod | Y | string | The SellMethod to use for pricing. Typically "WEB" |
mask | Y | string | The guest/room configuration requested |
departuredate | Y | Date | The first date of services (e.g. check-in date for hotels) |
duration | Y for FIT, N for packages | integer | The duration of the trip to shop. Only required for FIT shops. For packages, the package's duration is used. |
Optional Inputs
Key | Required | Type | Notes |
ItemNumber | N | integer | Plan # if Product has more than 1 plan |
supplierid | N | string | When set to a specific supplier ID, will only return results provided by the requested supplier. If a SupplierID is not found, it will return all Suppliers. If left blank, returns services for all suppliers. |
servicetypes | N | string | Comma-separated list of service types to return. If left blank, returns all services. |
gateway | N | string | Three-letter airport/city code for the client's origination. |
shopair | N | boolean | "true" or "false" - When set to true, will perform a shop for flights based on the gateway parameter. The gateway will be the origination airport, and the destination airport will be based on the requested product. |
numservicesperseq | N | integer | Set to a number (1, 2, 3 etc.), will only return the n first services for each service group. Useful when shopping hotel lists, to only return the top 2 room categories per hotel for example. |
availableonly | N | string (Y/N) | When set to "Y", only returns available services. Any unavailable services will be skipped. |
Flight Search Inputs
If shopair
is set to true, you will have additional optional inputs available to help return relevant flight results.
Key | Required | Type | Notes |
aircabinclass | N | String (E, B, W, or F) | Returns flights with the selected cabin class. This input may support additional cabin classes depending on the GDS that is being queried for flights. Available values are "E" (Economy), "B" (Business), "W" (Premium Economy), and "F" (First Class). Only applicable if |
atime | N | String (10:00AM) | Only returns itineraries whose outbound flight arrives at the destination before the given time. |
dtime | N | String (1:00PM) | Only returns itineraries whose return flight departs after the given time. |
carrier | N | String (AA) | Two-letter code that only returns flights for the given airline. |
nonstop | N | String (Y or N) | Indicates whether to include non-stop flights - Defaults to "N" |
OvernightOK | N | String (Y or N) | Indicates whether to include overnight flights |
Notes
About Masks:
Masks represent rooms and occupancies in a request (SHOP or BOOK). In a mask, each "A" represents an adult, each "C" represents a child (must be followed by the child's age), and each "/" (forward slash) represents a new room.
Examples:
AA - Two adults in one room
AA/A - One room with two adults + one room with one adult
AAC5 - One room with two adults and one 5-year old child
Output
The response structure follows the standard response format. In addition, the response contains a single "ProductSearch" object property.
The ProductSearch object's structure:
ProductSearch
Header - General information about the requested product. Usually reflects the request parameters.
ProductCode
ProductName
ProductType
DepartureDate
ReturnDate
RequestedMask
Duration
QuoteCurrency
BrandID
SellMethod
ProductDescription
Adults
Children
Gateway
ShopAir
FlightOptions - Array of flight options (if the "shopair" request parameter is set)
AirLegs - Array of flights for this flight option
FromAirportCode
FromAirportName
ToAirportCode
ToAirportName
AirlineCode
AirlineName
FlightNumber
DepartureDate
DepartureTime
ArrivalDate
ArrivalTime
AdultPrice - Price per adult for this flight (excluding taxes)
AdultTax - Taxes per adult for this flight
ChildPrice - Price per child (2 - 12 years old) for this flight (excluding taxes)
ChildTax - Taxes per childfor this flight
InfantPrice - Price per infant (0 - 1 year old) for this flight (excluding taxes)
InfantTax - Taxes per infant for this flight
BookCommand
AirQuoteID - The AirQuote ID to use in order to book this flight option Note that AirQuoteIDs expire after 30 minutes by default. After 30 minutes, that AirQuoteID will not be bookable, and the BOOK command will fail when requesting an invalid or expired AirQuoteID.
ServiceGroups - Array of ServiceGroups/Plans
ParentItemNumber - The identifier for this ServiceGroup within the ProductSearch object
Services - Array of Services in the ServiceGroup
ProductCode
Seq
ISeq
ItemRole
RequestedMask
IsRemark
ServiceType
ServiceTypeName
IsUnavailable
UnavailableReason
ServiceDate
ServiceTime
DayNumber
ServiceDuration
SupplierID
ServiceID
Description - The description of this service. For example, hotel room category)
SupplierName - The name of the supplier for this service. In case of a hotel, this is the hotel name.
VoucherNotes
ItineraryDescription
Destination - The city code indicating where this service occurs. For transfers, this is the city code for pickup.
ToDestination - For transfers, the city code for dropoff
SupplierImage
SupplierThumbnail
SupplierDetail
VerboseDuration - The duration of the service in a user-friendly format (i.e. "6 Nights" or "3 Days")
VerboseQty - The qty of the service in a user-friendly format (i.e. "2 Double Rooms" or "1 Deluxe Cabin")
TotalPrice - The total price of the service (excluding Tax and GST)
TotalPriceTax - The total tax of the service
TotalPriceGST - The total GST/VAT of the service
TotalCommission - The total commission (to the agency, where applicable)
TotalQty
BookCommand - The command to send in a "BOOK" request in order to add this service to the booking (See BOOK request below)
ProductCode
BrandID
ItemNumber
InclusionNumber
DepartureDate
Duration
Mask
QCurrency
PriceItems - Array of PriceItems for this priced service If shopping two double rooms (mask AA/AA), will contain one price item with a quantity of 2. When shopping one double room + one single room (mask AA/A), will return two price items, each with a quantity of 1. The first price item will represent the double room, and the second price item will represent the single room.
Qty - The number of units returned
Unit - The unit for the qty (i.e. "Room", "Cabin", "Car")
Mask - The mask that was found (may not match the requested mask, for example for hotel rooms that don't have child rates, a RequestedMask of "AAC5" may return a room with mask "AAA")
RequestedMask - The original requested mask
Price - The price per unit (excluding Tax and GST/VAT)
PriceTax - The tax per unit
PriceGST - The GST/VAT per unit
Commission - The commission per unit (to the agency, where applicable)
CommissionPercentage - The commission percentage
VerboseQty - The qty of the service in a user-friendly format (i.e. "2 Double Rooms" or "1 Deluxe Cabin")