Add Product API Reference
POST |
book/product/reservationworkbench/{workbenchID}/shoppingcart/products/buildfromproducts For {workbenchID} send the workbench identifier returned in ReservationResponse/Identifer/value in the workbench create response. Base path: Pre-production https://api.pp.travelport.com/11/air/ Production https://api.travelport.com/11/air/ |
Related Content: Booking Guide
As an alternative to not only the usual booking workflow but also the JSON API minimum required workflow, you can send Add Product instead of Add Offer. This alternative flow allows you to start with booking and skip the Search and AirPrice steps; however, you must already have full details for the itinerary to book. This full payload request is best suited for corporate customers who frequently travel the same itinerary and do not need or want to check price or alternative options. The request sends flight and class of service data as sourced from outside the JSON APIs.
Add Product is sent in the booking workflow instead of the Add Offer step: Initiate Workbench > Add Product > Add Traveler > Workbench Commit
Request
Also see Authorization and Common Headers.
Query Parameters
None.
Request Body
Object |
Description |
Required/Optional |
---|---|---|
ProductQueryBuildFromProducts |
Top level object. Includes PassengerCriteria and ProductCriteriaAir. |
Required |
PassengerCriteria |
Array. Defines the type of passenger/s on the itinerary. Send one instance for each passenger type code (PTC). Up to 9 total passengers across all PTCs are supported.
|
Required |
|
String. The passenger type code for the passengers on the itinerary. Common PTCs are:
See Downloads to download a full list of PTCs. |
Required |
|
Number. The number of passengers with this PTC. |
Required |
ProductCriteriaAir |
Array. Top level object. Send one instance for each leg of the itinerary to price. Includes SpecificFlightCriteria. |
Required |
|
The sequence number of this leg of the itinerary. For example, on a round-trip itinerary, the sequence number of the outbound leg is 1 and the inbound leg is 2. |
Required for itineraries with multiple legs |
SpecificFlightCriteria |
Array. Flight details. Send one instance for each flight on this leg of the itinerary. |
Required |
carrier |
IATA airline code. |
Required |
flightNumber |
Carrier flight number. |
Required |
departureDate |
String. Date of departure in YYYY-MM-DD format (e.g., departureDate="2022-12-06"). |
Required |
arrivalDate |
String. Date of arrival in YYYY-MM-DD format (e.g., arrivalDate="2023-12-09"). |
Required |
from |
IATA airport code for departure airport. |
Required |
to |
IATA airport code for arrival airport. |
Required |
classOfService |
IATA class of service code. |
Required |
cabin |
IATA cabin class code. |
Required |
segmentSequence |
When sending multiple flights for this leg, specify the sequence of each in the leg. Note that the segmentSequence value for connecting flights is the same; for example, for two connecting flights on the outbound or first leg of the itinerary, both flights have the segmentSequence value 1. For example, for connecting flights MSP>ATL>DEN on the outbound leg, send both MSP>ATL and ATL>DEN with a segmentSequence value of 1. |
Required when multiple flights on leg |
Response
Object |
Description |
---|---|
ProductListResponse |
Top level object. Includes Product. |
Product |
Top level object. Includes Identifier. |
Identifier |
Returns system-assigned identifier for this product. Key value pairs:
|
Example Request
{
"ProductQueryBuildFromProducts": {
"PassengerCriteria": [
{
"number": 1,
"passengerTypeCode": "ADT"
}
],
"ProductCriteriaAir": [
{
"SpecificFlightCriteria": [
{
"carrier": "QF",
"flightNumber": "402",
"departureDate": "2023-02-24",
"arrivalDate": "2023-02-24",
"from": "MEL",
"to": "SYD",
"classOfService": "Q"
}
]
}
]
}
}
Example Response
{
"ProductListResponse": {
"Product": [
{
"@type": "ProductAir",
"Identifier": {
"value": "e23ef774-30a8-4c4a-80d8-0592ba2a28fa",
"authority": "Travelport"
}
}
]
}
}