I am trying to get hotel specific details using the following api:
/shopping/hotel-offers/by-hotel
how do I figure out the hotelId parameter? For example I want to use the aforementioned api, to get information about Pendry San Diego hotel, what would be the hotelId for this hotel.
Appreciate any help.
The Hotel Search API comes with 3 different endpoints:
Get the list of hotels for a specific location.
Get the hotel and rooms information for a specific hotel (by its hotel id).
Confirm the price and availability before booking.
To get the hotel id, you need to use the first endpoint to find the list of hotels for a given location, then you can use this hotel id with the second endpoint.
As of today, you cannot directly search by a hotel name to get a hotel id. We have this in our backlog but not a specific delivery date yet.
FYI, I searched for hotels in San Diego and retrieved the hotel with the name Pendry San Diego:
"hotelId": "MNSANPSH",
"name": "Pendry San Diego LVX"
Related
I am trying to use Census Bureau API to retrieve the United States population by zipcode.
I have a valid key and followed this link but I wasn't able to retrieve population result, it kept fails with 404.
Could anyone please help me to draft correct API URL to GET population response via zipcode input?
to retrieve population result via zipcode
So i have database where i store hotels and rooms to that hotels.
Now we are connecting Amadeus Hotel services with our database. There is no problem to connect hotel from Amadeus with our hotel. There is property code and Amadeus id.
The problem is with rooms. We can't find any tutorial about connecting rates (rooms) that are returned from MultiSingleAvailability with our rooms. We have in Amadeus response room_type, room_type_code, rate_plan_code but all of those codes can change as hotel is updating for example property code or doing other things. We need this connection as data that is returned about rooms is very poor and low quality.
Is there any safe way to connect rates with our rooms ?
room_type is returned to us from the hotel providers and corresponds to the type of the room, the quality varies depending on the provider behind.
Something that might help is the following field:
"typeEstimated": {
"category": "ACCESSIBLE_ROOM",
"beds": 1,
"bedType": "QUEEN"
},
Here we are attempting to extract better information about the room by combining the room code with parsing the room description. Of course, we cannot guarantee that this information is 100% accurate.
rateCode: A rate code comes from the provider but is represented in an Amadeus format. It cannot be used to identify a room. In fact, the same room can be offered using multiple rate codes.
For example: RAC is the public rate offered to everyone, while the hotel could for example offer a discounted price for government workers with the code GOV. A hotel offer is thus a combination of a room type and a rate code.
How are you building your database? What identifiers are you using? Where did you get them from?
I am testing the Instaflights Search API to pull fare information for an airline. In this example, using Delta. When I pull the data, I only get the pricing for the Basic Economy and not for Main Cabin or First class. Is there a way to get access to these prices or we are limited to the lowest price? I compared the results with the Delta website and only the flights with Basic Economy seats matched between the API and the airline site.
InstaFligths, retrieves roundtrip or one-way flight itineraries with published fares and fare breakdowns for a given city pair and departure date. The API returns the 300 of the lowest-priced itineraries.
If looking to retrieve different Brands or Cabin Types, please look into Bargain Finder Max API.
https://developer.sabre.com/docs/read/rest_apis/air/search/bargain_finder_max
I am performing a query using Google Places API to search for local restaurants
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=..lat,..lon&radius=..radius&type=restaurant&key=..key
However, I am receiving a lot of results for locations that are not primarily restaurants, for example:
Popular hotels with restaurants
Food delivery services
Night clubs
Department stores with dining
etc.
Ideally I would like to restrict my query to only a few types or prohibit certain types by query. Otherwise I would need to do this manually or find another service.
Just add the city name as a prefix in the search string. It will only give the search suggestions in which the user is searching.
eg, pass "NewYork" as a prefix in your search string, now type any word, it will only give you results for NewYork city restaurant, cafes, places, etc
I've a data model and i have an issue for executing a request.
Here's my model :
I would like to get all the expenses associated to one specific event.
Do you think that my model is wrong ?
For more explanations this is how i set my data in the data base :
I have 2 types of event : 'Event' and 'Party'
A guest is associated to 1 or n expenses and an expense is associated to 1 or n guests.
Thats why i've created my entity "Transaction".
A transaction has 2 types : "Paid" and "Beneficied" because a Guest can pay an expense and can be a beneficiary too.
Here's how i work with theses entities :
For one expense in one event, a guest pays this expense for all the other guests, so i create a transaction associated to this guest and the expense with the type 'Paid' and a has many transactions as my event's guests associated to the same expense but with the type "Beneficied".
I don't know i'm very clear in my explonations...
EDIT
As people doesn't really understand my question, i'll explain how my application does work.
The main purpose of my application is to rebalance expenses between people for a party (birthday, sushi party, etc.) or an event (vacations, week-end, etc.).
My application is already on the Apple store : iVent.
But it doesn't works very well that's why i want to update it using core data :).
So, how doest it work ?
The user create an event and select the type of the event
For a party :
I get the iPhone contact and show them on a tableview, the user check which contact is invited to the party.
Then for each event, i have a Grocery list. I get that grocery list from a plist which can be modify by the user as "Default grocery list". But, for each event, the user can delete all the groceries, it won't affect the plist.
My groceries are sorted by categories (Drinks, meals, furnitures, alcohols, etc.).
The user selects which grocery he wants for example 2 six-packs, 3 bottle of Red wine etc.
Then he links a Grocery to a Guest : Paul will buy 1 six-packs and 1 bottle of red wine, Amy 1 six-pack etc.
Then i allow the user to give the price for each assigned groceries and to set which guest is beneficiary for this grocery.
For example Anna doesn't drink alcohol, so she doesn't want to pay for any alcohol when the user will rebalance all the price between the user.
For an event, the process is different :
The user only check the invited guest for the event creation.
Then during the event the user will put in the data base all the expenses made.
For exemple Paul and Anna paid gas for everyone, so we set Paul and Anna as buyers of an expense and Paul, Anna, Maurice and Mike as beneficiary because they all were in the car for the trip.
We can set different prices for the buyers for example the gas cost 50$ then Anna paid 20$ and Mike 30$.
It's the same for the beneficiaries : For example Mike came only at middle of the trip so he will pay (after the rebalance) only 12.5% of the price for the gas and not 25% as default
(because they were 4 in the car ^^)
I know it's a little confusing to understand but that's why i came here for help ^^
Basically that's how my application works, the version on the Appstore does already all of these features but not very well.
Here's my all data model :
I hope you'll understand now my problem :)
I'd like to know if my model is Ok and how can i list all the expenses for an Event (not a party) with this model configuration.
Okay, I think what I'm hearing is that your model looks good. If you want a list of all of the expenses associated with an Event you'll have to go through the guests. The following is pseudocode since I'm not exactly sure on the syntax
NSMutableArray* expenseList; //This will contain all of the expense objects for a given event
for Guest* guestObject in myEvent.guests
{
for Transaction* transactionObject in guestObject.transactions
{
[expenseList addObject:transactionObject.expense];
}
}