Api.Wrapi

<back to all web services

GetQuoteByShortCode

This resource is used to manage baskets in HAPI.

The following routes are available for this service:
GET/checkout/quote/code/{shortcode}Retrieve a quote from the WRAPI cache.
GetQuoteByShortCode Parameters:
NameParameterData TypeRequiredDescription
ShortCodepathstringYesThe WRAPI short url code to retrieve a cached quote
WrapiOrder Parameters:
NameParameterData TypeRequiredDescription
ContentsformOrderNo
Order Parameters:
NameParameterData TypeRequiredDescription
IdformstringNo
NumberformstringNo
CurrencyformstringNo
LanguageformstringNo
StatusformstringNo
ProcessingStatusformstringNo
CustomerIdformstringNo
ProductformProductNo
TravellersformTraveller[]No
AttributesformAttribute[]No
PriceformPriceNo
PaymentConditionformPaymentConditionNo
CustomerformCustomerNo
PaymentformPaymentNo
CardFullIdformstringNo
Product Parameters:
NameParameterData TypeRequiredDescription
IdformstringNo
ReferenceformstringNo
NumberformstringNo
StatusformstringNo
BookOptionsformBookOptionsNo
ProviderformProviderNo
TravellersformList<TravellerSummary>No
ServicesformList<Service>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
Provider Parameters:
NameParameterData TypeRequiredDescription
SourceformProviderTypeNo
CodeformstringNo
CatalogueformstringNo
BrandformstringNo
ProgramformstringNo
CurrencyformstringNo
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
Traveller Parameters:
NameParameterData TypeRequiredDescription
SalutationformstringNo
TitleformstringNo
WrapiTitleformstringNo
GenderformstringNo
FirstNameformstringNo
LastNameformstringNo
DateOfBirthformstringNo
TravellerTypeformTravellerTypeNo
CalculatedAgeformintNo
AllocatedformboolNo
Attribute Parameters:
NameParameterData TypeRequiredDescription
AttributeIdformstringNo
AttributeRefformstringNo
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
Customer Parameters:
NameParameterData TypeRequiredDescription
IdformstringNo
NumberformstringNo
SalutationformstringNo
TitleformstringNo
WrapiTitleformstringNo
GenderformstringNo
FirstNameformstringNo
LastNameformstringNo
DateOfBirthformstringNo
LanguageformstringNo
AddressformAddressNo
PhoneformPhoneNo
EmergencyContactformPhoneNo
EmailformEmailNo
InsuranceformboolNo
AdvertisingformList<AdvertisingOption>No
CommentsformstringNo
AdditionalInformationformstringNo
Address Parameters:
NameParameterData TypeRequiredDescription
TypeformstringNo
AddressIdformstringNo
AddressLine1formstringNo
AddressLine2formstringNo
PostCodeformstringNo
CityformstringNo
CountryformCountryNo
Country Parameters:
NameParameterData TypeRequiredDescription
CodeformstringNo
DescriptionformLongNo
Phone Parameters:
NameParameterData TypeRequiredDescription
CountryformstringNo
NumberformstringNo
Email Parameters:
NameParameterData TypeRequiredDescription
AddressformstringNo
AdvertisingOption Parameters:
NameParameterData TypeRequiredDescription
TypeformstringNo
OptOutformboolNo
Payment Parameters:
NameParameterData TypeRequiredDescription
AmountformPaymentAmountNo
DateformDateTimeNo
DetailformPaymentDetailNo
PaymentAmount Parameters:
NameParameterData TypeRequiredDescription
Amountformdecimal?No
currencyformstringNo
PaymentDetail Parameters:
NameParameterData TypeRequiredDescription
CreditCardformPaymentDetailCreditCardNo
PaymentDetailCreditCard Parameters:
NameParameterData TypeRequiredDescription
CardBrandformstringNo

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

GET /checkout/quote/code/{shortcode} HTTP/1.1 
Host: wrapi-api.dev.hotelplan.co.uk 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"contents":{"id":"String","number":"String","currency":"String","language":"String","status":"String","processingStatus":"String","customerId":"String","product":{"id":"String","reference":"String","number":"String","status":"String","bookOptions":{"book":{"allowed":false},"option":{"allowed":false,"setTo":"String","validity":{"date":"String"},"extendValidity":{"allowed":false,"date":"String"}},"quote":{"allowed":false}},"provider":{"source":"Hub","code":"String","catalogue":"String","brand":"String","program":"String","currency":"String"},"travellers":[{"id":"String","reference":0,"price":{"amount":0,"currency":"String"}}],"services":[{"id":"String","parentId":"String","reference":"String","status":"String","travellers":[{"id":"String","reference":0,"price":{"amount":0,"currency":"String"}}],"destination":{"location":{"code":"String","description":{"text":["String"]}},"country":{"code":"String","description":{"text":["String"]}}}}]},"travellers":[{"salutation":"String","title":"String","wrapiTitle":"String","gender":"String","firstName":"String","lastName":"String","dateOfBirth":"String","travellerType":"Infant","calculatedAge":0,"id":"String","reference":0,"price":{"amount":0,"currency":"String"}}],"attributes":[{"attributeId":"String","attributeRef":"String"}],"price":{"sell":{"amount":0,"currency":"String"}},"paymentCondition":{"openAmount":{"nullableAmount":"String","amount":0,"currency":"String"},"immediately":{"paymentAmount":{"nullableAmount":"String","amount":0,"currency":"String"},"percent":0},"conditions":[{"dueDate":"0001-01-01T00:00:00.0000000","paymentAmount":{"nullableAmount":"String","amount":0,"currency":"String"},"percent":0}],"allowedPaymentMethods":{"paymentMethods":[{"creditCard":{"cardBrand":"String"}}]}},"customer":{"id":"String","number":"String","salutation":"String","title":"String","wrapiTitle":"String","gender":"String","firstName":"String","lastName":"String","dateOfBirth":"String","language":"String","address":{"type":"String","addressId":"String","addressLine1":"String","addressLine2":"String","postCode":"String","city":"String","country":{"code":"String","description":{"text":["String"]}}},"phone":{"country":"String","number":"String"},"emergencyContact":{"country":"String","number":"String"},"email":{"address":"String"},"insurance":false,"advertising":[{"type":"String","optOut":false}],"comments":"String","additionalInformation":"String"},"payment":{"amount":{"amount":0,"currency":"String"},"date":"0001-01-01T00:00:00.0000000","detail":{"creditCard":{"cardBrand":"String"}}},"cardFullId":"String"}}