How to identify PQR (exchange fare) in Sabre GetReservationRS - sabre

how do i identify exchange type fares in the GetReservationRS when retrieving a PNR using the Native API? I can see the TicketDetails which contain a status code of A (H for historical and M for manual), does this get a new status code for exchange?

You need to include a version number for the "PriceQuoteServiceVersion" element in your request. This is nested under the "ReturnOptions" element. This element needs to be set to 4.0.0 (or higher). When I made that change to my requests I started getting PQR data back.
Super maddening that the default value isn't the most current version. Apparently the old PQ Service Versions did not return PQR data. I had to dig through the documentation to find this as it turns out my payloads were not returning PQR data either.
Anyhow, here's the relevant line from the GetReservationRQ 1.19.0 service guide as found on page 2-12 / 2-13:
Customers have now the possibility to choose version of
PriceQuoteServicesRQ API. This will only apply when Subject Area
PRICE_QUOTE is used in request. Default value for this service is set
to 3.2.0.
Screengrab is below:

Related

Using LinkedIn API to retrieve advertising reports

I'm working on a simple app to programmatically retrieve ads performance within Linkedin. I have general API experience but this is the first time i get my feet wet with the Linkedin API.
One example from Linkedin API documentation suggest something that would get me started:
GET https://api.linkedin.com/v2/adAnalyticsV2?q=analytics&dateRange.start.month=1&dateRange.start.day=1&dateRange.start.year=2016&timeGranularity=MONTHLY&pivot=CREATIVE&campaigns=urn:li:sponsoredCampaign:112466001
I am encountering two problems:
First this example implies that you already know the campaign ID. However I am unable to find a way to retrieve a list of campaign ID's for a given account.
Second, if I manually pull a campaign ID, I receive an error: "{"serviceErrorCode":2,"message":"Too many fields requested. Maximum possible fields to request: 20","status":400}". Pretty clear error.
A little research tells me that by adding the parameter "&fields=" I will be able to limit my query to less than 20 field (I really need only a dozen anyway) but I can't find and documentation regarding the names of the fields available.
Any help or pointer will be appreciated.
please refer the link below scroll down where you ill see the field names mentioned as metrics , these are the fields.
https://learn.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ads-reporting?tabs=http#analytics-finder

Here-API - Getroute historical route data

I have searched the questions here and gone through a fair amount of the API. I have not found reference to requesting historic route data. My questions is this; Does the Here api support historical route data. An example request would be that I seek the mileage from point a to point b 365 days ago, when perhaps a key route obstruction existed such as a bridge was out or a road was closed for construction that resulted in more miles during that historic period.
I would like to answer this in two parts
Can a route be calculated for a past date ?
Yes, you can. You need to request a Time Aware Route like below. You can read more about it in the developer site.
`
GET https://route.api.here.com/routing/7.2/calculateroute.json
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&mode=fastest;car;
&waypoint0=geo!37.743385,-122.422835
&waypoint1=geo!37.743878,-122.423686
&departure=2014-03-12T10:00:00
&routeattributes=sh,bb,g
`
Will the map used for the query depend on the departure date ?
No, Here API always uses the current version of the map available unless you specify explicitly the map version. But you can specify only till previous two releases.
So for your question, you wont be able to get the map data for a past year even using map version. But what you can do, is explicitly avoid the bridge or road newly constructed so that the api doesn't suggest that route. You can do this through Custom Route Extension API like below example.
GET http://cre.api.here.com/2/overlays/upload.json
?map_name=OVERLAYBLOCKROAD
&overlay_spec=[{"op":"override","shape":[[50.10765,8.68774],[50.10914,8.68771]],"layer":"LINK_ATTRIBUTE_FCN","data":{"VEHICLE_TYPES":"0"}}]
&storage=readonly
&app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}

how to check how many token been sold for my Smart contract

I want to create a smart contract and launch it for ICO. I also create a website where people can buy my token. I want know how to check how many token been sold (live)? so i can create a live bar counter to show how many percentages of the token already been sold.
Or is there a way i can monitor the token sale process in the smart contract?
A token contract is no different than any other smart contract. There are no special built in Solidity features or logic associated with them. They are just regular smart contracts that follow a specification.
So, if you want access to the number of tokens sold, you code that into your contract. While tokens sold is not part of the standard ERC20/ERC721 interface, nothing prevents you from adding a constant function to retrieve this information. In fact, if you're using the basic Zeppelin Crowdsale contract, you can just calculate it using the public state variables weiRaised / rate (Chances are you should be creating your own Crowdsale subcontract, so it's better to add the functionality you want there).
We can use the Etherscan Developer API to review transactions against a given contract address and find out the total supply or number of items available for sale.
There is a lot you can do with the Etherscan Developer API. For example, here's one URL that pulls data from Ethereum Mainnet -> Etherscan -> JSON parser -> Shields.io and renders it as an image to calculate the number of Su Squares remaining for sale:
Source: https://img.shields.io/badge/dynamic/json.svg?label=Su+Squares+available&url=https%3A%2F%2Fapi.etherscan.io%2Fapi%3Fmodule%3Daccount%26action%3Dtokenbalance%26contractaddress%3D0xE9e3F9cfc1A64DFca53614a0182CFAD56c10624F%26address%3D0xE9e3F9cfc1A64DFca53614a0182CFAD56c10624F%26tag%3Dlatest%26apikey%3DYourApiKeyToken&query=%24.result
^ I don't know if SO is going to cache the image here. But that URL is a live URL which pulls the number of Su Squares available hot off the blockchain.

(Why) 'dont my credentials authorize access' to any descriptive meta resources from the HERE-api?

Yesterday I registered with HERE to experiment on Traffic/Flow data.
I registered with both the 'Public Basic plan' as well as the '90-day evaluation'. I managed to perform some basic query's and also got results but the next step was to understand the output.
The official way to get descriptions on the output data is described here:
https://developer.here.com/rest-apis/documentation/traffic/topics/additional-parameters.html.
I simply substituted my credentials in the the https://traffic.cit.api.here.com/traffic/6.0/xsd/flow.xsd?app_id={YOUR_APP_ID}&app_code={YOUR_APP_CODE} URL and pasted in my browser. But the only result I get for every xsd is:
"error:These credentials do not authorize access. Please contact your customer representative or submit a request here developer.here.com/contact-us to upgrade your account. You can also get valid credentials by registering for a free trial license on developer.here.com.,error_description:NA" . So apparently I am authorized to use the api but not authorized to get information on how to interpret the results...?
I already found out the many abbreviation are explained on Interpreting HERE Maps real-time traffic tags but I found a few that weren't described, like <SSS> and <SS>.
Thanks in advance.
UPDATE: Apparently I was already voted down on the question. What am I doing wrong?
The Description of SS/SSS tag is here:
The SS (SUB_SEGMENT) will be provided if the current traffic data is
more precise than the road defined. When there are SS elements, the
elements will be ordered by driving direction. If there are SS
elements, the lengths (LE) of all SS elements will add up to the
length of the roadway represented from the corresponding CF section.

Google reviews counter

I want to know if there is any api that can allow me to get the number of reviews from an url.
I know that google offers the possibility to get this number by using the placeid, but the only information I have is the url of the website of a company.
Any ideas please?
Maybe, but probably not.
Places API Text Search seems to be able to find places by their URL:
https://maps.googleapis.com/maps/api/place/textsearch/json?key=YOURKEY&query=http://www.starbucks.com/store/1014527/us/303-congress-street/303-congress-street-boston-ma-02210
However, this is not a documented feature of the API and I do not think this can be relied upon, so I'd recommend filing a feature request, to make this a supported, reliable feature.
As for the amount of reviews, you may be interested in:
Issue 3484: Add # of reviews to the Place Details Results
I've written an API like this for Reviewsmaker, but I target specific business names not URLs. See this example (I activated a key for this purpose for now):
http://reviewsmaker.com/api/google/?business=life%20made%20a%20little%20easier&api_key=4a2819f3-2874-4eee-9c46-baa7fa17971c
Or, try yourself with any business name:
http://reviewsmaker.com/api/google/?business=Toys R Us&api_key=4a2819f3-2874-4eee-9c46-baa7fa17971c
The following call would return a JSON object which shows:
{
"results":{
"business_name":"Life Made A Little Easier",
"business_address":"1702 Sheepshead Bay Rd, Brooklyn, NY 11235, USA",
"place_id":"ChIJ_xjIR2REwokRH2qEigdFCvs",
"review_count":38
},
"api":{
"author":"Ilan Patao",
"home":"www.reviewsmaker.com"
}
}
Pinging this EP using a Chronjob for example once every hour or two and return the review_count can pretty much build your own review monitoring app;
You can probably do what you're looking for if you query the Places API Text Search or the CSE (Custom Search Engine) API to lookup the URL, return back the matching name of the business associated with this URL and calling an endpoint like this one to return back the associated review count.
You can probably code this in py or PHP. Not sure how familiar you are with data parsing, but I was able to build my API based on Google's CSE API. CSE provides metadata in its results which contain the total reviews, so if you create a CSE engine and use the CSE API looking for business schemas, review schemas, etc; you can return back items and within the PageMap node there are objects with data that you need very little tweaking to do (such as string replacing, trimming) which will return back the values you're looking for.
Hope my answer helped, at least to lead you in the right direction :)

Resources