# Managing hotel loyalty programs Travelers can use their loyalty membership to pay for bookings and earn points. The Spotnana platform allows you to filter the search results based on specific loyalty programs supported by hotels. The membership details can be added to a traveler's Spotnana profile so that the loyalty ID is automatically linked to any relevant hotel bookings during checkout. The loyalty program details can also be added or modified during checkout. The following actions can be performed using Spotnana APIs: - [Adding membership details to a user's profile](#adding-loyalty-program-details-to-a-travelers-profile) - [Filtering hotels search results](#filtering-hotel-search-results) (based on loyalty membership) - [Booking a hotel using loyalty points](#booking-a-hotel-using-loyalty-points) ## Adding loyalty program details to a traveler's profile Use the [update membership information](/openapi/usersapi/users/updatemembershipinfo) or the [update user](/openapi/usersapi/users/updateuser) endpoints to add the loyalty program ID to a user profile. Once added to the traveler's profile, it'll be applied automatically during checkout (i.e., if the membership is applicable to the rate being offered). In the endpoints mentioned above, the request body requires the following information about the loyalty membership: | Fields | Description | | --- | --- | | `userId` | A unique identifier assigned to each [user profile](/spotnana/user_profile_concepts) on the Spotnana platform. | | `membershipInfos.appliedTo` | The list of hotel establishments where the loyalty program can be used. If this field is empty then the loyalty program can be used for all hotels within the specific chain mentioned in the `issuedBy` field. | | `membershipInfos.id` | The traveler's membership ID for the loyalty program. | | `membershipInfos.issuedBy` | The unique chain code of the hotel chain that's hosting this loyalty program. For example, for a Marriott Bonvoy membership, the `issuedBy` field will be set to `EM`. Here the **EM** represents the GDS chain code for the Marriott international chain of hotels. | | `membershipInfos.type` | The type of travel service for which the membership is applicable (e.g., `HOTEL`).> **Note:** You can use the same API endpoints to update membership details for air, rail, and car as well. | Adding the membership details directly to a traveler profile is useful because the details are then automatically applied to any relevant bookings. This also eliminates the need for the arrangers or travelers to add the loyalty information at checkout (see [hotel booking workflow](/spotnana/hotel_booking_workflow)). ## Filtering hotel search results Use the [hotel search](/openapi/hotelapi/hotel/hotelsearch) API to filter the results based on hotels that accept loyalty points as a form of payment and allow travelers to accrue points when a booking is made. In the request, set the `payByPoints` field as `true` to see only the hotels where travelers can pay using their loyalty points. You can also set `eligibleForLoyalty` field as `true` to display hotels that allow the traveler to earn reward points using an existing membership program. Here's a sample request payload in the hotel search API containing the filters: ```json /v2/hotel/search { // ... payload truncated for focus "filters": { "eligibleForLoyalty": true, "payByPoints": true }, } ``` To provide an autocomplete search experience, use the [hotel search autocomplete](/openapi/hotelapi/autocomplete/hotelsupplierautocomplete) API that returns the list of hotels supported by Spotnana matching the keyword entered in the `query` field. ## Booking a hotel using loyalty points To retrieve information about the loyalty points needed to make a hotel booking, use the `otherCoinage` field in the [create a new hotel booking](/openapi/hotelapi/hotel/hotelcreatepnr) API endpoint. See the [hotel booking workflow](/spotnana/hotel_booking_workflow) to learn more about the APIs involved in a hotel booking process. The `otherCoinage` field is used to hold the monetary value in alternate currencies like reward points, virtual cards, cash, etc. **Notes:** - Spotnana currently supports pay via points only for Brex rewards and Qantas Business Rewards program. If a traveler has a membership and points accrued on either of these programs, they can use it to pay for a hotel that accepts it as a form of payment. - Hotels that accept Qantas Business Reward points can be paid for using a combination of reward points and a credit card. However, this mixed payment option is not supported for any other hotel rewards program (i.e., the traveler has to pay either using points or via credit card). - Loyalty programs can't be used for Expedia and Booking.com rates (i.e., if `rateSource` is `EXPEDIA` or `BOOKING_COM`). The following are the parameters present within the `otherCoinage` object: | Fields | Description | | --- | --- | | `coinageCode` | The type of coinage used for booking. For example, if Brex points are used for booking then the `coinageCode` will be `BREX_POINTS`. **Note:** The `otherCoinage` object is also used when payment is made using cash, delayed invoicing, virtual cards, or flight pass. | | `amount` | The total number of loyalty points needed to book the hotel. For example, if the booking costs £ 800 and 1 Brex point equals £ 0.008, then the `amount` would be `100000`. This indicates the traveler needs to spend 100000 Brex points for the booking instead of the £ 800 monetary value. | | `conversionRate` | The monetary value of one unit of the coinage type (e.g., one loyalty point). For example, if 1 loyalty point is equal to 0.01 euros, then the `conversionRate` will be `0.01`. | | `preferredCurrencyConversionRate` | The monetary value of one unit of the coinage type in the user's preferred currency. The loyalty programs usually have an equivalent conversion rate for other currencies. For example, if 1 loyalty point is equal to 0.01 euros (assuming euros is their standard currency), a traveler who wants to book the hotel in USD might want to see the conversion in their native currency. So, 1 loyalty point could equal 0.02 USD and in this scenario the `preferredCurrencyConversionRate` will be `0.02`. | Here's a sample request payload in the [create new hotel booking](/openapi/hotelapi/hotel/hotelcreatepnr) API containing the `otherCoinage` data. ```json /v2/hotel/create-pnr // ... payload truncated for focus "amount": { "amount": 800.00, "currencyCode": "GBP", "convertedAmount": 1000.00, "convertedCurrency": "USD", "otherCoinage": [ { "coinageCode": "BREX_POINTS", "amount": 100000, "conversionRate": 0.008, "preferredCurrencyConversionRate": 0.01 } ] } ```