JSON Hotel API (Open Travel 2.0)

The Links Rez JSON HOTEL REST API allows for five basic capabilities with a  variation of one capability; search for a hotel product, get availability for a hotel product, commit/book a hotel product, cancel a hotel booking, and a simple ping message to confirm service availability.  Details and samples are in each of the endpoint sections below.  Swagger can be downloaded here.  Sample code using swagger can be found here.

SEARCH API ENDPOINT

https://shotapi.linksrez.net/api/LK_HotelSearch

NOTES:

Minimally update:  Modify the highlighted items to tune your search.  Set “Username”: “userpass”,   “Password”: “userpass”

METHOD

POST

HEADERS

Content-Type: application/json’

REQUEST

{
   "hotelData": {
      "POS": [
         {
            "RequestorID": {
               "MessagePassword": null,
               "CompanyName": null,
               "URL": null,
               "Type": "1",
               "Instance": null,
               "ID_Context": "LINK"
            },
            "Position": null,
            "BookingChannel": null,
            "AgentSine": null,
            "PseudoCityCode": null,
            "ISOCountry": "US",
            "ISOCurrency": "USD",
            "AgentDutyCode": null,
            "AirlineVendorID": null,
            "AirportCode": null,
            "FirstDepartPoint": null,
            "ERSP_UserID": null,
            "TerminalID": null
         }
      ],
      "Criteria": {
         "Criterion": [
            {
               "MoreDataEchoToken": null,
               "InfoSource": null,
               "AlternateAvailabilitySpecified": false,
               "AddressSearchScopeSpecified": false,
               "HotelAmenity": [
                  {
                     "Code": "74",
                     "ComplimentaryIndSpecified": false,
                     "EquivalenceGroup": null
                  }
               ],
               "RoomAmenity": null,
               "HotelFeature": null,
               "Award": null,
               "Recreation": null,
               "Service": null,
               "Transportation": null,
               "StayDateRange": {
                  "Items": null,
                  "Start": "05/10/2017",
                  "Duration": "P1D",
                  "End": "05/11/2017"
               },
               "RateRange": null,
               "RatePlanCandidates": null,
               "Profiles": null,
               "RoomStayCandidates": null,
               "AcceptedPayments": null,
               "Media": null,
               "HotelMeetingFacility": null,
               "MealPlan": null,
               "RebatePrograms": null,
               "UserGeneratedContent": null,
               "TPA_Extensions": null,
               "Position": null,
               "Address": {
                  "SameCountryIndSpecified": false,
                  "AddressSearchScopeSpecified": false,
                  "StreetNmbr": null,
                  "BldgRoom": null,
                  "AddressLine": null,
                  "CityName": "New York",
                  "PostalCode": null,
                  "County": null,
                  "StateProv": {
                     "StateCode": "New York",
                     "Value": null
                  },
                  "CountryName": null,
                  "FormattedIndSpecified": false,
                  "ShareSynchIndSpecified": false,
                  "ShareMarketIndSpecified": false,
                  "Type": null,
                  "Remark": null
               },
               "Telephone": null,
               "RefPoint": null,
               "CodeRef": null,
               "HotelRef": [
                  {
                     "ChainCode": null,
                     "BrandCode": null,
                     "HotelCode": null,
                     "HotelCityCode": "New York",
                     "HotelName": null,
                     "HotelCodeContext": null,
                     "ChainName": null,
                     "BrandName": null,
                     "SegmentCategoryCode": null,
                     "PropertyClassCode": null,
                     "ArchitecturalStyleCode": null,
                     "SupplierIntegrationLevel": null,
                     "LocationCategoryCode": null,
                     "ExtendedCitySearchIndicatorSpecified": false
                  }
               ],
               "Radius": {
                  "Distance": "5",
                  "DistanceMeasure": "MILES",
                  "Direction": null,
                  "DistanceMax": null,
                  "UnitOfMeasureCode": null
               },
               "MapArea": null,
               "AdditionalContents": null,
               "ExactMatchSpecified": false,
               "ImportanceTypeSpecified": false,
               "Ranking": null
            }
         ],
         "AvailableOnlyIndicatorSpecified": false,
         "BestOnlyIndicatorSpecified": false,
         "TotalAfterTaxOnlyIndSpecified": false
      },
      "EchoToken": null,
      "TimeStampSpecified": false,
      "TargetSpecified": false,
      "TargetName": null,
      "Version": "0.0",
      "TransactionIdentifier": null,
      "SequenceNmbr": null,
      "TransactionStatusCodeSpecified": false,
      "RetransmissionIndicatorSpecified": false,
      "CorrelationID": null,
      "MaxResponses": null,
      "ResponseTypeSpecified": false,
      "SortOrderSpecified": false
   },
   "Username": "userpass",
   "Password": "userpass"
}

AVAILABILITY API ENDPOINT

https://shotapi.linksrez.net/api/LK_HotelAvail

NOTES:

Use the output of the Search to request availability and rates for a specific hotel.  See highlighted name/values.

METHOD

POST

HEADERS

Content-Type: application/json’

REQUEST

{
   "hotelData": {
      "POS": null,
      "AvailRequestSegments": {
         "MaximumWaitTimeSpecified": false,
         "AvailRequestSegment": [
            {
               "HotelSearchCriteria": {
                  "Criterion": [
                     {
                        "MoreDataEchoToken": null,
                        "InfoSource": null,
                        "AlternateAvailabilitySpecified": false,
                        "AddressSearchScopeSpecified": false,
                        "HotelAmenity": null,
                        "RoomAmenity": null,
                        "HotelFeature": null,
                        "Award": null,
                        "Recreation": null,
                        "Service": null,
                        "Transportation": null,
                        "StayDateRange": null,
                        "RateRange": null,
                        "RatePlanCandidates": null,
                        "Profiles": null,
                        "RoomStayCandidates": null,
                        "AcceptedPayments": null,
                        "Media": null,
                        "HotelMeetingFacility": null,
                        "MealPlan": null,
                        "RebatePrograms": null,
                        "UserGeneratedContent": null,
                        "TPA_Extensions": null,
                        "Position": null,
                        "Address": {
                           "SameCountryIndSpecified": false,
                           "AddressSearchScopeSpecified": false,
                           "StreetNmbr": null,
                           "BldgRoom": null,
                           "AddressLine": null,
                           "CityName": "",
                           "PostalCode": null,
                           "County": null,
                           "StateProv": {
                              "StateCode": "",
                              "Value": null
                           },
                           "CountryName": {
                              "Code": "US",
                              "Value": "US"
                           }
                        },
                        "Telephone": null,
                        "RefPoint": null,
                        "CodeRef": null,
                        "HotelRef": [
                           {
                              "ChainCode": null,
                              "BrandCode": "XS",
                              "HotelCode": "EWRWT",
                              "HotelCityCode": null,
                              "HotelName": null,
                              "HotelCodeContext": null,
                              "ChainName": null,
                              "BrandName": null,
                              "SegmentCategoryCode": null,
                              "PropertyClassCode": null,
                              "ArchitecturalStyleCode": null,
                              "SupplierIntegrationLevel": null,
                              "LocationCategoryCode": null,
                              "ExtendedCitySearchIndicatorSpecified": false
                           }
                        ],
                        "Radius": null,
                        "MapArea": null,
                        "AdditionalContents": null,
                        "ExactMatchSpecified": false,
                        "ImportanceTypeSpecified": false,
                        "Ranking": null
                     }
                  ],
                  "AvailableOnlyIndicatorSpecified": false,
                  "BestOnlyIndicatorSpecified": false,
                  "TotalAfterTaxOnlyIndSpecified": false
               },
               "StayDateRange": {
                  "Items": null,
                  "Start": "2017-06-25",
                  "Duration": "P1D",
                  "End": "2017-06-27"
               },
               "RateRange": null,
               "RatePlanCandidates": null,
               "Profiles": null,
               "RoomStayCandidates": [
                  {
                     "IsAlternateSpecified": false,
                     "GuestCounts": {
                        "GuestCount": [
                           {
                              "AgeQualifyingCode": 10,
                              "Age": null,
                              "Count": 1,
                              "AgeBucket": null,
                              "ResGuestRPH": null
                           }
                        ],
                        "IsPerRoomSpecified": false
                     },
                     "RoomAmenity": null,
                     "RoomType": null,
                     "RoomTypeCode": "",
                     "RoomCategory": null,
                     "RoomID": null,
                     "Floor": null,
                     "InvBlockCode": null,
                     "RoomLocationCode": null,
                     "RoomViewCode": null,
                     "BedTypeCode": null,
                     "NonSmokingSpecified": false,
                     "Configuration": null,
                     "SizeMeasurement": null,
                     "Quantity": 1,
                     "CompositeSpecified": false,
                     "RoomClassificationCode": null,
                     "RoomArchitectureCode": null,
                     "RoomGenderSpecified": false,
                     "SharedRoomIndSpecified": false,
                     "RPH": null,
                     "RatePlanCandidateRPH": null,
                     "BookingCode": null,
                     "EffectiveDateSpecified": false,
                     "ExpireDateSpecified": false,
                     "ExpireDateExclusiveIndicatorSpecified": false
                  }
               ],
               "TPA_Extensions": null,
               "AvailReqTypeSpecified": false,
               "MoreDataEchoToken": null,
               "ResponseTypeSpecified": false,
               "InfoSource": null
            }
         ]
      },
      "HotelReservationIDs": null,
      "EchoToken": null,
      "TimeStampSpecified": false,
      "TargetSpecified": false,
      "TargetName": null,
      "Version": 1,
      "TransactionIdentifier": null,
      "SequenceNmbr": null,
      "TransactionStatusCodeSpecified": false,
      "RetransmissionIndicatorSpecified": false,
      "CorrelationID": null,
      "SummaryOnlySpecified": false,
      "SortOrderSpecified": false,
      "AvailRatesOnlySpecified": false,
      "OnRequestIndSpecified": false,
      "BestOnlySpecified": false,
      "RateRangeOnlySpecified": false,
      "ExactMatchOnlySpecified": false,
      "AllowPartialAvailSpecified": false,
      "RequestedCurrency": null,
      "RequestedCurrencyIndicatorSpecified": false,
      "IsModifySpecified": false,
      "MaxResponses": null,
      "SearchCacheLevelSpecified": false,
      "HotelStayOnlySpecified": false,
      "RateDetailsIndSpecified": false,
      "MapRequiredSpecified": false,
      "MapHeight": null,
      "MapWidth": null,
      "DuplicateIndSpecified": false,
      "PricingMethodSpecified": false
   },
   "Username": "userpass",
   "Password": "userpass"
}

BOOK API ENDPOINT

https://shotapi.linksrez.net/api/LK_Hotel_Res_Commit

NOTES:

Use the output of the Availability request to create a committed booking, specifically the …..  See highlighted name/values.  Use the test credit card as shown below.

METHOD

POST

HEADERS

Content-Type: application/json’

REQUEST

{
   "hotelData": {
      "DonationInformation": null,
      "RebatePrograms": null,
      "POS": null,
      "UniqueID": null,
      "HotelReservations": {
         "HotelReservation": [
            {
               "RebatePrograms": null,
               "POS": null,
               "UniqueID": null,
               "RoomStays": [
                  {
                     "ResGuestRPHs": null,
                     "Memberships": null,
                     "Comments": null,
                     "SpecialRequests": null,
                     "ServiceRPHs": null,
                     "Reference": null,
                     "BookingRules": null,
                     "IndexNumber": null,
                     "RoomTypes": [
                        {
                           "RoomDescription": null,
                           "AdditionalDetails": null,
                           "Amenities": null,
                           "Occupancy": null,
                           "TPA_Extensions": null,
                           "NumberOfUnits": "1",
                           "IsRoomSpecified": false,
                           "IsConvertedSpecified": false,
                           "IsAlternateSpecified": false,
                           "ReqdGuaranteeType": null,
                           "RoomType": null,
                           "RoomTypeCode": "K1",
                           "RoomCategory": null,
                           "RoomID": null,
                           "Floor": null,
                           "InvBlockCode": null,
                           "RoomLocationCode": null,
                           "RoomViewCode": null,
                           "BedTypeCode": null,
                           "NonSmokingSpecified": false,
                           "Configuration": null,
                           "SizeMeasurement": null,
                           "Quantity": null,
                           "CompositeSpecified": false,
                           "RoomClassificationCode": null,
                           "RoomArchitectureCode": null,
                           "RoomGenderSpecified": false,
                           "SharedRoomIndSpecified": false
                        }
                     ],
                     "RatePlans": [
                        {
                           "Guarantee": null,
                           "CancelPenalties": null,
                           "RatePlanDescription": null,
                           "RatePlanInclusions": null,
                           "Commission": null,
                           "MealsIncluded": null,
                           "RestrictionStatus": null,
                           "AdditionalDetails": null,
                           "ModificationFee": null,
                           "BookingCode": "BAR",
                           "RatePlanCode": "LV0",
                           "EffectiveDateSpecified": false,
                           "ExpireDateSpecified": false,
                           "ExpireDateExclusiveIndicatorSpecified": false,
                           "RateIndicatorSpecified": false,
                           "RatePlanType1": null,
                           "RatePlanID": "LV0",
                           "RatePlanName": null,
                           "MarketCode": null,
                           "AvailabilityStatusSpecified": false,
                           "ID_RequiredIndSpecified": false,
                           "PriceViewableIndSpecified": false,
                           "QualificationType": null,
                           "AvailableQuantity": null,
                           "PrepaidIndicatorSpecified": false
                        }
                     ],
                     "RoomRates": null,
                     "GuestCounts": {
                        "GuestCount": [
                           {
                              "AgeQualifyingCode": null,
                              "Age": null,
                              "Count": "1",
                              "AgeBucket": null,
                              "ResGuestRPH": null
                           }
                        ],
                        "IsPerRoomSpecified": false
                     },
                     "TimeSpan": null,
                     "Guarantee": [],
                     "DepositPayments": null,
                     "CancelPenalties": null,
                     "Discount": null,
                     "Total": null,
                     "BasicPropertyInfo": {
                        "UserGeneratedContent": null,
                        "VendorMessages": null,
                        "Position": null,
                        "Address": null,
                        "ContactNumbers": null,
                        "Award": null,
                        "RelativePosition": null,
                        "HotelAmenity": null,
                        "HotelFeature": null,
                        "Recreation": null,
                        "Service": null,
                        "Policy": null,
                        "HotelMeetingFacility": null,
                        "ChainCode": null,
                        "HotelCode": "ORLDW",
                        "HotelCityCode": null,
                        "HotelName": null,
                        "HotelCodeContext": null,
                        "ChainName": null,
                        "BrandName": null,
                        "HotelSegmentCategoryCode": null,
                        "SupplierIntegrationLevel": null,
                        "MaxGroupRoomQuantity": null,
                        "CurrencyCode": null,
                        "MasterChainCode": null
                     },
                     "MapURL": null,
                     "TPA_Extensions": null,
                     "MarketCode": null,
                     "SourceOfBusiness": null,
                     "DiscountCode": null,
                     "PromotionCode": null,
                     "PromotionVendorCode": null,
                     "RoomStayStatus": null,
                     "WarningRPH": null,
                     "RoomStayLanguage": null
                  }
               ],
               "Services": null,
               "BillingInstructionCode": null,
               "ResGuests": [
                  {
                     "Profiles": [
                        {
                           "UniqueID": null,
                           "Profile": {
                              "Accesses": null,
                              "Customer": {
                                 "PersonName": [
                                    {
                                       "NamePrefix": null,
                                       "GivenName": [
                                          "Mary"
                                       ],
                                       "MiddleName": null,
                                       "SurnamePrefix": null,
                                       "Surname": "Smith",
                                       "NameSuffix": null,
                                       "NameTitle": null,
                                       "Document": null,
                                       "ShareSynchIndSpecified": false,
                                       "ShareMarketIndSpecified": false,
                                       "NameType": null
                                    }
                                 ],
                                 "Telephone": [
                                    {
                                       "EffectiveDateSpecified": false,
                                       "ExpireDateSpecified": false,
                                       "ExpireDateExclusiveIndicatorSpecified": false,
                                       "RPH": null,
                                       "TransferActionSpecified": false,
                                       "ParentCompanyRef": null
                                    }
                                 ],
                                 "Email": null,
                                 "Address": [
                                    {
                                       "CompanyName": null,
                                       "AddresseeName": null,
                                       "EffectiveDateSpecified": false,
                                       "ExpireDateSpecified": false,
                                       "ExpireDateExclusiveIndicatorSpecified": false,
                                       "ValidationStatusSpecified": false,
                                       "TransferActionSpecified": false,
                                       "ParentCompanyRef": null,
                                       "DefaultIndSpecified": false,
                                       "UseType": null,
                                       "RPH": null,
                                       "StreetNmbr": null,
                                       "BldgRoom": null,
                                       "AddressLine": [
                                          "123 main"
                                       ],
                                       "CityName": "Wayne",
                                       "PostalCode": "19087",
                                       "County": null,
                                       "StateProv": {
                                          "StateCode": "PA",
                                          "Value": null
                                       },
                                       "CountryName": {
                                          "Code": "US",
                                          "Value": null
                                       },
                                       "FormattedIndSpecified": false,
                                       "ShareSynchIndSpecified": false,
                                       "ShareMarketIndSpecified": false,
                                       "Type": null,
                                       "Remark": null
                                    }
                                 ],
                                 "URL": null,
                                 "CitizenCountryName": null,
                                 "PhysChallName": null,
                                 "PetInfo": null,
                                 "PaymentForm": null,
                                 "RelatedTraveler": null,
                                 "ContactPerson": null,
                                 "Document": null,
                                 "CustLoyalty": null,
                                 "EmployeeInfo": null,
                                 "EmployerInfo": null,
                                 "AdditionalLanguage": null,
                                 "TPA_Extensions": null,
                                 "GenderSpecified": false,
                                 "DeceasedSpecified": false,
                                 "LockoutType": null,
                                 "BirthDateSpecified": false,
                                 "CurrencyCode": null,
                                 "DecimalPlaces": null,
                                 "VIP_IndicatorSpecified": false,
                                 "Text": null,
                                 "Language": null,
                                 "CustomerValue": null,
                                 "MaritalStatusSpecified": false,
                                 "PreviouslyMarriedIndicatorSpecified": false,
                                 "ChildQuantity": null
                              },
                              "UserID": null,
                              "PrefCollections": null,
                              "CompanyInfo": null,
                              "Affiliations": null,
                              "Agreements": null,
                              "Comments": null,
                              "TPA_Extensions": null,
                              "ShareAllSynchIndSpecified": false,
                              "ShareAllMarketIndSpecified": false,
                              "ShareAllOptOutIndSpecified": false,
                              "ProfileType1": null,
                              "CreateDateTimeSpecified": false,
                              "CreatorID": null,
                              "LastModifyDateTimeSpecified": false,
                              "LastModifierID": null,
                              "PurgeDateSpecified": false,
                              "RPH": null,
                              "StatusCode": null
                           }
                        }
                     ],
                     "SpecialRequests": null,
                     "Comments": [
                        {
                           "CommentOriginatorCode": null,
                           "GuestViewableSpecified": false,
                           "Items": null,
                           "ItemsElementName": null,
                           "Name": null,
                           "ParagraphNumber": null,
                           "CreateDateTimeSpecified": false,
                           "CreatorID": null,
                           "LastModifyDateTimeSpecified": false,
                           "LastModifierID": null,
                           "PurgeDateSpecified": false,
                           "Language": null
                        }
                     ],
                     "ServiceRPHs": null,
                     "ProfileRPHs": null,
                     "ArrivalTransport": null,
                     "DepartureTransport": null,
                     "GuestCounts": null,
                     "InHouseTimeSpan": null,
                     "TPA_Extensions": null,
                     "ResGuestRPH": null,
                     "AgeQualifyingCode": null,
                     "ArrivalTimeSpecified": false,
                     "DepartureTimeSpecified": false,
                     "GroupEventCode": null,
                     "VIPSpecified": false,
                     "PrimaryIndicatorSpecified": false,
                     "Age": null,
                     "LocationCode": null,
                     "CodeContext": null,
                     "ActionSpecified": false
                  }
               ],
               "ResGlobalInfo": {
                  "HotelReservationIDs": null,
                  "RoutingHops": null,
                  "Profiles": null,
                  "BookingRules": null,
                  "GuestCounts": {
                     "GuestCount": [
                        {
                           "AgeQualifyingCode": "10",
                           "Age": null,
                           "Count": "1",
                           "AgeBucket": null,
                           "ResGuestRPH": null
                        },
                        {
                           "AgeQualifyingCode": "10",
                           "Age": null,
                           "Count": "1",
                           "AgeBucket": null,
                           "ResGuestRPH": null
                        }
                     ],
                     "IsPerRoomSpecified": false
                  },
                  "TimeSpan": {
                     "Increment": null,
                     "Items": null,
                     "Start": "2017-11-18",
                     "Duration": "P3D",
                     "End": "2017-11-21"
                  },
                  "ResGuestRPHs": null,
                  "Memberships": null,
                  "Comments": null,
                  "SpecialRequests": null,
                  "Guarantee": {
                     "GuaranteesAccepted": [
                        {
                           "DefaultSpecified": false,
                           "NoCardHolderInfoReqIndSpecified": false,
                           "NameReqIndSpecified": false,
                           "AddressReqIndSpecified": false,
                           "PhoneReqIndSpecified": false,
                           "InterbankNbrReqIndSpecified": false,
                           "BookingSourceAllowedIndSpecified": false,
                           "CorpDiscountNbrAllowedIndSpecified": false,
                           "Item": {
                              "PaymentCard": {
                                 "CardCode": "VI",
                                 "CardNumber": "4111111111111111",
                                 "CardType": "1",
                                 "ExpireDate": "1217"
                              }
                           },
                           "ShareSynchIndSpecified": false,
                           "ShareMarketIndSpecified": false,
                           "CostCenterID": null,
                           "RPH": null,
                           "PaymentTransactionTypeCodeSpecified": false,
                           "GuaranteeIndicatorSpecified": false,
                           "GuaranteeTypeCode": null,
                           "GuaranteeID": null,
                           "Remark": null
                        }
                     ],
                     "Deadline": null,
                     "Comments": null,
                     "GuaranteeDescription": null,
                     "RetributionTypeSpecified": false,
                     "GuaranteeCode": null,
                     "GuaranteeType1Specified": false,
                     "HoldTimeSpecified": false
                  },
                  "DepositPayments": null,
                  "CancelPenalties": null,
                  "Fees": null,
                  "Total": null
               },
               "WrittenConfInst": null,
               "Queue": null,
               "TPA_Extensions": null,
               "RoomStayReservationSpecified": false,
               "CreateDateTimeSpecified": false,
               "CreatorID": null,
               "LastModifyDateTimeSpecified": false,
               "LastModifierID": null,
               "PurgeDateSpecified": false,
               "ResStatus": null,
               "ForcedSellIndicatorSpecified": false,
               "ServiceOverrideIndicatorSpecified": false,
               "RateOverrideIndicatorSpecified": false,
               "WalkInIndicatorSpecified": false,
               "RoomNumberLockedIndicatorSpecified": false,
               "OriginalDeliveryMethodCode": null,
               "PassiveIndicatorSpecified": false
            }
         ],
         "RoutingHops": null,
         "WrittenConfInst": null,
         "TPA_Extensions": null
      },
      "EchoToken": null,
      "TimeStampSpecified": false,
      "TargetSpecified": false,
      "TargetName": null,
      "Version": "1.1",
      "TransactionIdentifier": null,
      "SequenceNmbr": null,
      "TransactionStatusCodeSpecified": false,
      "RetransmissionIndicatorSpecified": false,
      "CorrelationID": null,
      "ResStatusSpecified": false,
      "HoldDuration": "null       "
   },
   "Username": "userpass",
   "Password": "userpass"
}

CANCEL API ENDPOINT

https://shotapi.linksrez.net/api/LK_HotelCancel

NOTES:

METHOD

POST

HEADERS

Content-Type: application/json’

REQUEST

{
   "hotelData": {
      "CancelType": "0",
      "Target": "0",
      "TimeStamp": "0001-01-01T00:00:00",
      "UniqueID": [
         {
            "CompanyName": "MYTRAVEL",
            "ID": "12345",
            "Type": "5"
         }
      ],
      "Verification": {
         "PersonName": {
            "GivenName": "Ben",
            "Surname": "Smith"
         },
         "ReservationTimeSpan": {
            "Duration": "P3D",
            "Start": "2017-05-19"
         },
         "Vendor": [
            {
               "Code": "3",
               "Value": "HI"
            },
            {
               "Code": "4",
               "Value": "LONWA"
            }
         ]
      },
      "Version": 3
   },
   "Username": "userpass",
   "Password": "userpass"
}