I'm using the BFM service in the SABRE REST API. Im trying get only direct flights (Non Stops Flights) using the objects: TPA_Extensions.DiversityParameters.AdditionalNonStopsPercentage
TravelPreferences.FlightTypePref.FlightType
but the answers allways is: 400 Bad Request
{
"status": "NotProcessed",
"type": "Validation",
"errorCode": "ERR.RAF.VALIDATION",
"timeStamp": "2016-02-10T14:24:13+00:00",
"message": "[{\"level\":\"error\",\"schema\":{\"loadingURI\":\"#\",\"pointer\":\"/definitions/org.opentravel.ota._2003._05.OTAAirLowFareSearchRQ.TPAExtensions\"},\"instance\":{\"pointer\":\"/OTA_AirLowFareSearchRQ/TPA_Extensions\"},\"domain\":\"validation\",\"keyword\":\"additionalProperties\",\"message\":\"object instance has properties which are not allowed by the schema: [\\\"DiversityParameters\\\"]\",\"unwanted\":[\"DiversityParameters\"]}]"
}
There are somebody had the same issue?
thanx in advance
If you want to add nonnumstop you must add to OTA_AirLowFareSearchRQ as in the xml below:
<PriceRequestInformation xmlns="http://webservices.sabre.com/sabreXML/2011/10">
<OptionalQualifiers>
<FlightQualifiers NumStops="0" />
<PricingQualifiers CurrencyCode="VND">
<PassengerType Code="ADT" Quantity="1" />
</PricingQualifiers>
</OptionalQualifiers>
Try this
"DiversityParameters" : {
"AdditionalNonStopsPercentage" : 20
}
or
"DiversityParameters" : {
"AdditionalNonStopsNumber" : 5
}
This code works balancing the BFM results.
Related
I’ve been creating a web app with a login and a registration function and so far everything has been going great. I managed to connect the app to the api/auth/local api endpoint and send some nice post requests.
Now, I’ve been trying to send requests to the http://localhost:1337/api/auth/local/register endpoint and without any success. I’ve been doing this according to:
https://docs.strapi.io/developer-docs/latest/plugins/users-permissions.html#registration
I keep getting a 400 error:
{
"data": null,
"error": {
"status": 400,
"name": "ApplicationError",
"message": "An error occurred during account creation",
"details": {
}
}
}
If I try to send a request with an email that’s already registered in strapi, the response will give me the correct error:
{
"data": null,
"error": {
"status": 400,
"name": "ApplicationError",
"message": "Email is already taken",
"details": {
}
}
}
In the public and authenticated user roles, I’ve allowed every single one of them, for now.
Enable confirmation emails are set to false.
Email confirmation
Public user permission
For the headers, I’m using Content-type : application/json
the raw json body I'm posting:
{
"email": "manager1#strapi.io",
"password": "testtest1",
"username": "manager1"
}
This is my first project with strapi and so far it went pretty well. I’m not sure if I’m missing out on something or if I’m doing something else wrong.
Any help is appreciated!
I figured it out, it wasn’t as complicated as I expected.
In the user I had different fields, like firstName, lastName etc. All of these fields were required.
I made the fields not required, and now it works.
Something isn't correct with HERE API:
This is working if I use https://route.api.here.com
https://route.api.here.com/routing/7.2/calculateroute.json?app_code=**APP_CODE**&app_id=**APP_ID**&waypoint0=geo!40.881402,-8.633051&waypoint1=geo!38.6143899,-1.1041018&mode=fastest;truck;traffic:enabled&language=pt-pt&routeAttributes=shape
This isn't working if I use http://fleet.api.here.com
http://fleet.api.here.com/2/calculateroute.json?app_code=**APP_CODE**&app_id=**APP_ID**&waypoint0=40.881402,-8.633051&waypoint1=38.6143899,-1.1041018&mode=fastest;truck;traffic:enabled&language=pt-pt
I received this error:
{
"issues": [
{
"message": "Cannot match 38.6143899/-1.1041018 onto a road link with 100.0m search radius"
},
{
"message": "Request id: 5c3aee72-e8f5-4c34-b96c-7c3e3cce5c02"
}
],
"response": null,
"error_id": "5c3aee72-e8f5-4c34-b96c-7c3e3cce5c02",
"response_code": "400 Bad Request"
}
But using the link https://tcs.ext.here.com/examples/v3/cost_optimized_route, I saw this:
Meanwhile, I research the API and if i increase the mapMatchRadius option to 500 m is working. It's very strange. The road exists in Here Maps. Someone from the Here Support Team can provide an input?
I'm trying to use the endpoint Flight Low-fare Search and I realised that it's not filtering properly by maxPrice.
For example, reaching the next endpoint with maxPrice=100.
https://test.api.amadeus.com/v1/shopping/flight-offers?origin=MAD&destination=BIO&departureDate=2018-12-07&returnDate=2018-12-10&adults=1&maxPrice=100¤cy=EUR
I'm getting the following result so I think there is an error:
{
"price": {
"total": "185.09",
"totalTaxes": "39.09"
},
"pricePerAdult": {
"total": "185.09",
"totalTaxes": "39.09"
}
This bug has been fixed and deployed in production.
I want to get the result of all INBOX mails and all SENT mails in one API call using the historyID and the history.list Gmail-API.
Refer:
https://developers.google.com/gmail/api/v1/reference/users/history/list
When I am hitting the following GET request :
https://www.googleapis.com/gmail/v1/users/{userID}/history?startHistoryId={historyID}&labelId=SENT&labelId=INBOX
I only get the SENT label messages.
Seems like the API only accepts single & first query param for labelId.
Is there a way to get multiple labelIds' response in a single API call?
I think it would not be possible, I tried making a multiple request and it this response:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "invalidArgument",
"message": "Invalid label value in query"
}
],
"code": 400,
"message": "Invalid label value in query"
}
}
I would suggest to call it separately for each labelID but you can try filing a feature request for this.
Hope this helps.
I have a fusion table with fields: username, description,latitude,longitud,geolocation. I am trying to create a new row with information via the google API. I triple checked that the fusion table is open, the tableid and the apikey are correct, and I have the fusiontable API enabled with 0% of the quota. I think the wrong request must be because some coma or quotation mark but to be honest it completely escapes me. I have tried different combinations and cannot find the mistake. Below error that I get, the code that use in php to generate the link and the link itself. Any idea would be greatly appreciated.
Thank you
link returns:
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "keyInvalid",
"message": "Bad Request"
}
],
"code": 400,
"message": "Bad Request"
}
}
Php Code:
$apikey = "AIzaSyB4BMlrZIlJB-Apo8t_dO9K18uL8O2s5TA";
$tableid = "1X0rFoG7Tt2Ocm2rE39wPuamZCrFiS4D32Odgbh03";
$username="webuser";
$description="nujkn";
$latitude="78";
$longitud="110";
$geolocation="98.8789, 150.1111";
$link = "https://www.googleapis.com/fusiontables/v1/query?sql=INSERT+INTO+".$tableid."+(username,description,latitude,longitud,geolocation)+VALUES+('".$username."','".$description."','".$latitude."','".$longitud."','".$geolocation."')&key={".$apikey."}";
Link generated: https://www.googleapis.com/fusiontables/v1/query?sql=INSERT+INTO+1X0rFoG7Tt2Ocm2rE39wPuamZCrFiS4D32Odgbh03+(username,description,latitude,longitud,geolocation)+VALUES+('webuser','nujkn','78','110','98.8789')&key={AIzaSyB4BMlrZIlJB-Apo8t_dO9K18uL8O2s5TA}
which in browser looks like: https://www.googleapis.com/fusiontables/v1/query?sql=INSERT+INTO+1X0rFoG7Tt2Ocm2rE39wPuamZCrFiS4D32Odgbh03+(username,description,latitude,longitud,geolocation)+VALUES+(%27webuser%27,%27nujkn%27,%2778%27,%27110%27,%2798.8789%27)&key={AIzaSyB4BMlrZIlJB-Apo8t_dO9K18uL8O2s5TA}