Api.Wrapi

<back to all web services

CreateBasket

This resource is used to manage baskets in HAPI.

The following routes are available for this service:
POST/basketAdd a new basket in HAPI.
CreateBasket Parameters:
NameParameterData TypeRequiredDescription
IdbodyGUIDNoThe WRAPI GUID to retrieve a cached session
FrombodystringYesThe Departure Airport Code e.g. LGW
TobodystringYesThe Destination Resort Code e.g. ATLE
PropertybodystringNoThe Property Code e.g. ATLE0104ACC. Supply either this or GIATA code
GiatabodystringNoThe GIATA Code e.g. 02137743. Supply either this or Property code
RoombodystringYesThe Room Code e.g. C4
BoardbodystringYesThe Room Board Code e.g. HB
WhenbodydateYesThe Departure Date e.g. 2019-02-23
NightsbodyintegerYesThe Duration e.g. 7
DateOffsetbodyintegerNoThe Date Offset - Used to extend the duration / adjust the accommodation start date for overnight flights
AdultsbodyintegerYesThe Number Of Adults e.g. 2
ChildrenbodyintegerNoThe Number Of Children e.g. 0
ChildAgebodyinteger[]NoThe Ages of the Children (if Children > 0) e.g. 1,2,3
AbstractRequest Parameters:
NameParameterData TypeRequiredDescription
BrandCodeformstringYesThe Brand Code e.g. INGH
CatalogueCodeformstringYesThe Catalogue Code e.g. 010
ProgramCodeformstringYesThe Program Code e.g. GBINA
CurrencyCodeformstringYesThe Currency Code e.g. GBP
AgentformstringNoThe Agent Code e.g. thomascook
WrapiBasket Parameters:
NameParameterData TypeRequiredDescription
IdformGuidNo
ShortCodeformstringNo
SessionformSessionNo
ContentsformBasketNo
FlightsformList<FlightPair>No
AccommodationformList<Offer>No
HasValidOrderformboolNo
AbstractResponse Parameters:
NameParameterData TypeRequiredDescription
ResponseStatusformResponseStatusNo
Session Parameters:
NameParameterData TypeRequiredDescription
AuthenticationIdformstringNo
AuthenticatedformboolNo
TokenformstringNo
ExpiresformDateTimeNo
BasketIdformstringNo
SearchIdformstringNo
ProductIdformstringNo
SenderformstringNo
MessageformMessageNo
OrderIdformstringNo
Message Parameters:
NameParameterData TypeRequiredDescription
TextformstringNo
TechnicalInfoformstringNo
ProviderMessageformProviderMessageNo
TypeformstringNo
ClassformstringNo
IdformstringNo
ProviderMessage Parameters:
NameParameterData TypeRequiredDescription
TextformstringNo
Basket Parameters:
NameParameterData TypeRequiredDescription
IdformstringNo
CurrencyformstringNo
LanguageformstringNo
ProductformProductNo
TravellersformTraveller[]No
DiscountsformDiscount[]No
PriceformPriceNo
PaymentConditionformPaymentConditionNo
PricePerPersonformdecimalNo
Product Parameters:
NameParameterData TypeRequiredDescription
IdformstringNo
ReferenceformstringNo
StatusformstringNo
BookOptionsformBookOptionsNo
TravellersformList<TravellerSummary>No
ServicesformList<Service>No
IncludedformList<IncludedDetail>No
BookOptions Parameters:
NameParameterData TypeRequiredDescription
BookformBookNo
OptionformOptionNo
QuoteformQuoteNo
Book Parameters:
NameParameterData TypeRequiredDescription
AllowedformboolNo
Option Parameters:
NameParameterData TypeRequiredDescription
AllowedformboolNo
SetToformstringNo
ValidityformValidityNo
ExtendValidityformExtendValidityNo
Validity Parameters:
NameParameterData TypeRequiredDescription
DateformstringNo
ExtendValidity Parameters:
NameParameterData TypeRequiredDescription
AllowedformboolNo
DateformstringNo
Quote Parameters:
NameParameterData TypeRequiredDescription
AllowedformboolNo
TravellerSummary Parameters:
NameParameterData TypeRequiredDescription
IdformstringNo
ReferenceformintNo
PriceformPriceNo
Price Parameters:
NameParameterData TypeRequiredDescription
AmountformdecimalNo
CurrencyformstringNo
Service Parameters:
NameParameterData TypeRequiredDescription
IdformstringNo
ParentIdformstringNo
ReferenceformstringNo
StatusformstringNo
TravellersformList<TravellerSummary>No
DestinationformDestinationNo
Destination Parameters:
NameParameterData TypeRequiredDescription
LocationformLocationNo
CountryformDestinationCountryNo
Location Parameters:
NameParameterData TypeRequiredDescription
CodeformstringNo
DescriptionformLongNo
Long Parameters:
NameParameterData TypeRequiredDescription
Textformstring[]No
DestinationCountry Parameters:
NameParameterData TypeRequiredDescription
CodeformstringNo
DescriptionformLongNo
IncludedDetail Parameters:
NameParameterData TypeRequiredDescription
CodeformstringNo
TravellerformList<TravellerSummary>No
DateformStartEndDateNo
DescriptionformIncludedDescriptionNo
PriceformServiceDetailPriceNo
PropertyformPropertyTypeNo
IsDiscountformbool?No
StartEndDate Parameters:
NameParameterData TypeRequiredDescription
StartformDateDateNo
EndformDateDateNo
DateDate Parameters:
NameParameterData TypeRequiredDescription
DateformstringNo
IncludedDescription Parameters:
NameParameterData TypeRequiredDescription
LongformLongNo
ServiceDetailPrice Parameters:
NameParameterData TypeRequiredDescription
PerTravellerformServiceDetailPerTavellerPrice[]No
TotalformPriceNo
ServiceDetailPerTavellerPrice Parameters:
NameParameterData TypeRequiredDescription
TravellerReferenceformintNo
AmountformdecimalNo
CurrencyformstringNo
PropertyType Parameters:
NameParameterData TypeRequiredDescription
TypeformstringNo
Traveller Parameters:
NameParameterData TypeRequiredDescription
SalutationformstringNo
TitleformstringNo
WrapiTitleformstringNo
GenderformstringNo
FirstNameformstringNo
LastNameformstringNo
DateOfBirthformstringNo
TravellerTypeformTravellerTypeNo
CalculatedAgeformintNo
AllocatedformboolNo
Discount Parameters:
NameParameterData TypeRequiredDescription
TypeformstringNo
CodeformstringNo
ReferenceformReferenceNo
Reference Parameters:
NameParameterData TypeRequiredDescription
TypeformstringNo
IdformstringNo
Price Parameters:
NameParameterData TypeRequiredDescription
SellformSellNo
Sell Parameters:
NameParameterData TypeRequiredDescription
AmountformdecimalNo
CurrencyformstringNo
PaymentCondition Parameters:
NameParameterData TypeRequiredDescription
OpenAmountformConditionSellNo
ImmediatelyformImmediatelyNo
ConditionsformList<Condition>No
AllowedPaymentMethodsformAllowedPaymentMethodsNo
ConditionSell Parameters:
NameParameterData TypeRequiredDescription
NullableAmountformstringNo
AmountformdecimalNo
CurrencyformstringNo
Immediately Parameters:
NameParameterData TypeRequiredDescription
PaymentAmountformConditionSellNo
PercentformdecimalNo
Condition Parameters:
NameParameterData TypeRequiredDescription
DueDateformDateTimeNo
PaymentAmountformConditionSellNo
PercentformdecimalNo
AllowedPaymentMethods Parameters:
NameParameterData TypeRequiredDescription
PaymentMethodsformPaymentMethod[]No
PaymentMethod Parameters:
NameParameterData TypeRequiredDescription
CreditCardformCreditCardNo
CreditCard Parameters:
NameParameterData TypeRequiredDescription
CardBrandformstringNo
FlightPair Parameters:
NameParameterData TypeRequiredDescription
KeyformstringNo
OutboundformTransportNo
InboundformTransportNo
ValueformdoubleNo
Transport Parameters:
NameParameterData TypeRequiredDescription
OriginformGatewayNo
DestinationformGatewayNo
DateformDateNo
FlightformFlightNo
PriceformTransportPriceNo
SurchargeformTransportSurchargeNo
RequiredActionformRequiredActionNo
SearchServiceIdformstringNo
StatusformTransportStatusNo
AvailableSeatsformintNo
SkiSeatsformintNo
FlightMessageformstringNo
Gateway Parameters:
NameParameterData TypeRequiredDescription
LocationformLocationNo
CountryformGatewayCountryNo
Location Parameters:
NameParameterData TypeRequiredDescription
CodeformstringNo
DescriptionformLongNo
GatewayCountry Parameters:
NameParameterData TypeRequiredDescription
CodeformstringNo
DescriptionformLongNo
Date Parameters:
NameParameterData TypeRequiredDescription
DepartureformDepartureNo
ArrivalformArrivalNo
DurationformintNo
Departure Parameters:
NameParameterData TypeRequiredDescription
DateformstringNo
TimeformstringNo
UtcformstringNo
Arrival Parameters:
NameParameterData TypeRequiredDescription
DateformstringNo
TimeformstringNo
UtcformstringNo
Flight Parameters:
NameParameterData TypeRequiredDescription
CarrierformCarrierNo
FlightNumberformstringNo
ClassformClassNo
BaggageformBaggageNo
RoutingformRoutingNo
PropertyformPropertyNo
CodeformstringNo
Carrier Parameters:
NameParameterData TypeRequiredDescription
CodeformstringNo
DescriptionformDescriptionNo
Description Parameters:
NameParameterData TypeRequiredDescription
Textformstring[]No
Class Parameters:
NameParameterData TypeRequiredDescription
BookingClassformstringNo
CabinClassformCabinClassNo
CabinClass Parameters:
NameParameterData TypeRequiredDescription
DescriptionformLongNo
CodeformstringNo
Baggage Parameters:
NameParameterData TypeRequiredDescription
TypeformstringNo
QuantityformstringNo
WeightformstringNo
UnitformstringNo
Routing Parameters:
NameParameterData TypeRequiredDescription
DepartureformRoutingDepartureNo
ArrivalformRoutingArrivalNo
CarrierformCarrierNo
FlightNumberformstringNo
ClassformClassNo
DateformDateNo
AircraftTypeformAircraftTypeNo
BaggageformBaggageNo
OperationTypeformstringNo
RoutingDeparture Parameters:
NameParameterData TypeRequiredDescription
AirportformAirportNo
CityformCityNo
Airport Parameters:
NameParameterData TypeRequiredDescription
DestinationformLocationNo
CountryformGatewayCountryNo
City Parameters:
NameParameterData TypeRequiredDescription
DestinationformLocationNo
CountryformGatewayCountryNo
RoutingArrival Parameters:
NameParameterData TypeRequiredDescription
AirportformAirportNo
CityformCityNo
AircraftType Parameters:
NameParameterData TypeRequiredDescription
CodeformstringNo
DescriptionformLongNo
Property Parameters:
NameParameterData TypeRequiredDescription
TypeformstringNo
TransportPrice Parameters:
NameParameterData TypeRequiredDescription
AmountformAmountNo
Amount Parameters:
NameParameterData TypeRequiredDescription
TypeformstringNo
ValueformstringNo
ActualValueformdoubleNo
CurrencyformstringNo
TransportSurcharge Parameters:
NameParameterData TypeRequiredDescription
AmountformAmountNo
RequiredAction Parameters:
NameParameterData TypeRequiredDescription
ActionformstringNo
Offer Parameters:
NameParameterData TypeRequiredDescription
AccommodationformAccommodationNo
PriceformOfferPriceNo
OfferIdformstringNo
Accommodation Parameters:
NameParameterData TypeRequiredDescription
DestinationformDestinationNo
DateformDateNo
ProductformProductNo
RoomsformList<Room>No
PriceformAccommodationPriceNo
SurchargeformAccommodationSurchargeNo
RequiredActionformRequiredActionNo
AccommodationIdformstringNo
Destination Parameters:
NameParameterData TypeRequiredDescription
LocationformLocationNo
CountryformDestinationCountryNo
Location Parameters:
NameParameterData TypeRequiredDescription
CodeformstringNo
DescriptionformLongNo
DestinationCountry Parameters:
NameParameterData TypeRequiredDescription
CodeformstringNo
DescriptionformLongNo
Date Parameters:
NameParameterData TypeRequiredDescription
CheckInformCheckInNo
CheckOutformCheckInNo
DurationformDurationNo
CheckIn Parameters:
NameParameterData TypeRequiredDescription
DateformstringNo
Duration Parameters:
NameParameterData TypeRequiredDescription
EntityformstringNo
ValueformstringNo
Product Parameters:
NameParameterData TypeRequiredDescription
NameformstringNo
AddressformAddressNo
RatingformRatingNo
CodeformstringNo
Address Parameters:
NameParameterData TypeRequiredDescription
StructuredformStructuredNo
Structured Parameters:
NameParameterData TypeRequiredDescription
FirmformstringNo
NameformstringNo
AddressformStructuredAddressNo
StructuredAddress Parameters:
NameParameterData TypeRequiredDescription
ZipCodeformstringNo
CityformstringNo
CountryformCountryNo
Country Parameters:
NameParameterData TypeRequiredDescription
CodeformstringNo
DescriptionformLongNo
Rating Parameters:
NameParameterData TypeRequiredDescription
TypeformstringNo
ValueformstringNo
Room Parameters:
NameParameterData TypeRequiredDescription
DescriptionformDescriptionNo
OccupancyformOccupancyNo
PriceformAccommodationPriceNo
SurchargeformAccommodationSurchargeNo
BoardformList<Board>No
CodeformstringNo
RoomIdformstringNo
StatusformRoomStatusNo
AvailableRoomsformintNo
UnallocatedRoomsformintNo
TypeformstringNo
Description Parameters:
NameParameterData TypeRequiredDescription
ShortformShortNo
LongformRoomLongNo
Short Parameters:
NameParameterData TypeRequiredDescription
Textformstring[]No
RoomLong Parameters:
NameParameterData TypeRequiredDescription
Textformstring[]No
Occupancy Parameters:
NameParameterData TypeRequiredDescription
DefaultformintNo
MinimumformintNo
MaximumformintNo
MinNumOfAdultsformintNo
MaxNumOfAdultsformintNo
MaxNumOfInfantsformintNo
IncludeInfantsformboolNo
NoChildrenformboolNo
MinAgeformintNo
MaxAgeformintNo
MinChildAgeformintNo
MaxChildAgeformintNo
AccommodationPrice Parameters:
NameParameterData TypeRequiredDescription
AmountformAmountNo
Amount Parameters:
NameParameterData TypeRequiredDescription
TypeformstringNo
ValueformstringNo
CurrencyformstringNo
AccommodationSurcharge Parameters:
NameParameterData TypeRequiredDescription
AmountformAmountNo
Board Parameters:
NameParameterData TypeRequiredDescription
DescriptionformDescriptionNo
PriceformAccommodationPriceNo
SurchargeformAccommodationSurchargeNo
CodeformstringNo
SearchServiceIdformstringNo
DefaultformboolNo
OfferPrice Parameters:
NameParameterData TypeRequiredDescription
AmountformOfferPriceAmountNo
OfferPriceAmount Parameters:
NameParameterData TypeRequiredDescription
TypeformstringNo
BaseAmountformOfferPriceBaseAmountNo
MaxAmountformOfferPriceMaxAmountNo
OfferPriceBaseAmount Parameters:
NameParameterData TypeRequiredDescription
ValueformstringNo
CurrencyformstringNo
OfferPriceMaxAmount Parameters:
NameParameterData TypeRequiredDescription
ValueformstringNo
CurrencyformstringNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /basket HTTP/1.1 
Host: wrapi-api.dev.hotelplan.co.uk 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"from":"String","to":"String","property":"String","giata":"String","room":"String","board":"String","when":"0001-01-01T00:00:00.0000000","nights":0,"dateOffset":0,"adults":0,"children":0,"childAge":[0],"brandCode":"String","catalogueCode":"String","programCode":"String","currencyCode":"String","agent":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{Unable to show example output for type 'WrapiBasket' using the custom 'csv' filter}No parameterless constructor defined for this object.