Sabre - BFM v1 REST API - Is booking class tied to passenger or a flight leg - sabre

The question is on Bargain Finder Max v1 REST API response. We have booking class information at passenger level in the response. But when we search flights we don't mention booking class at passenger level.
Do we always get same booking class (cabinCode, bookingCode) for all passengers in the itinerary?
x.groupedItineraryResponse.itineraryGroups[0].itineraries[0].pricingInformation[0].fare.passengerInfoList[0].passengerInfo.fareComponents[0].segments[0].segment
segments": [
{
"segment": {
"bookingCode": "H",
"cabinCode": "Y",
"seatsAvailable": 4,
"availabilityBreak": true
}
}
]

Booking class is a subset of the cabin Code.
One Cabin Code can have multiple booking classes depending on the airline.
You get one bookingcode for all passengers as a PNR cant handle multiple bookingcodes for one segment.
Short answer: Yes its tied to Segments and it is the same across passengers.

Related

Restrict Shipping Class by specific Zipcodes

I'm trying to find a more manageable way to restrict shipping class to specific zipcode.
My configuration as below:
Shipping method: Self Collect, Free Delivery, Delivery with a fee
Shipping Class: Class A, Class B, Class C
Shipping Country: Only 1 country
Shipping Zone: Zone A, Subset of Zone A (specific Zipcode 123*)
Shipping plugin: Table Rate Shipping
Conditions:
All shipping methods are applicable to Class A, B and C. Class C is restricted to zipcode 123* only. If orders contain Class C and shipping address is outside of zipcode 123*, the shipping method will be defaulted to self-collect only.
I figure I can set up two zones. One zone contains specifically zipcode 123*. And setup another zone manually inserting every other zipcodes excluding zipcode 123*. I find this approach onerous and difficult to maintain considering it doesn't support import and export natively.
I wonder if there is a way to restrict class to specific zipcodes only? I only managed to restrict product categories by countries but can't find a way to restrict by zipcodes.

Why order is not working on /v2/shares endpoint

At hootsuite.com we are using v2/shares to create reports for multiple social profiles over large periods of time.
The documentation for that endpoint specifies here that: "Shares are ordered by creation time".
at the moment, when I go to https://api.linkedin.com/v2/shares?q=owners&owners=urn:li:organization:15100279&sharesPerOwner=500&start=290
I'll see "activity": "urn:li:activity:6537431951580684288" with createdTime 1558645236755 between two other shares that both have bigger createTime (1559217643294 and 1559131242301)
This means that the creation time is not the order.
If the order has been changed on lastModified time, please suggest a method to paginate through shares up to a last known share fetched 1 day ago, while guaranteeing no new shares were missed.

Is it possible to group segments in Retrieve PNR response?

I'm currently retrieving a PNR information using the Retrieve PNR API. For display, i need to group the flights by legs. However, the flight returned in the view i'm using (DefaultWithPq) are simply returned as a single sequence of segments :
<stl18:Segments>
<stl18:Segment sequence="1" id="8">
...
<stl18:Segment sequence="2" id="9">
...
<stl18:Segment sequence="3" id="10">
...
<stl18:Segment sequence="4" id="11">
...
</stl18:Segments>
How is it possible from those sequence (without calculating with departure times destinations etc.) to know which ones are in the departure leg and which ones are in the return leg ?
thank you
Unfortunately this would be have to be done by your application's logic, as the service does not return that information. You can use dates and marriage indicators but there is no element to show which one is the inbound or outbound flight. Usually customers obtain this with shopping services like BFM.

How do I get a Price for Amtrak rail when using the Sabre RailShopRS

I am trying to implement AMTRAK Rail bookings using Sabre's RailShopRS.
I've been able to get a list of available journeys but now I'm struggling to figure out how I get a price for those journeys. It looks like the price should be part of the availability response but there never appears to be a price anywhere.
Is this something that should be part of the initial availability response or do I have to make a new request with details of the specific train and faretype?
Does this help?
http://files.developer.sabre.com/doc/providerdoc/rail/RailServicesDescription_v1.12.0.html#amtrak
Here are some sample request and responses:
http://files.developer.sabre.com/doc/providerdoc/rail/RS_Sample_RQ_RS_1_12_0.zip
There should be a list of 'Offers' within the response, with a reference to a JourneyId that can be used to match the fares with its corresponding journey/train option.

How to extract Companies per country from Freebase

I am new to Freebase. I am trying to extract all companies per country (The Head Quarter's country). The simplest approach I thought was to list them all and filter by country such as this test
[{
"name": null,
"type": "/organization/organization",
"/location/location/containedby": "Japan",
"limit": 4
}]
The problem is that I get schools as well. It is not very clear unlike DBpedia that has a class called "Company", how one can find distinguish the companies in Freebase while there is no clear type for it? I thought the organization/organization domain will do but it is too general also there is Business domain.
Why not use /business/business_operation or /business/consumer_company or some other more appropriate type if /organization/organization is too broad?
A bigger issue with your query is that it is only going to find entities contained directly in Japan, not those contained in all locations contained by Japan (e.g. prefectures, cities, etc). You may want to investigate using the Freebase Search API instead of MQL since I think it will compute the closure for you (or do radius searches). Alternatively, you'll probably need to run a few variations of you query with different levels of location nesting.
Here are some example search queries/filters:
https://developers.google.com/freebase/v1/search-output
restaurants near SF Ferry building - filter=(all type:restaurant (within radius:1000ft lon:-122.39 lat:37.7955))
https://developers.google.com/freebase/v1/search-cookbook
Japanese volcanos - filter: (all category:volcano (any part_of:japan))

Resources