Google Assistant : account linking and Actions sdk : fail to see sign in message - actions-on-google

I want to enable account linking on an Google Assistant application using Actions Sdk.
I have already provided the information in the Account Linking section of the AoG Console :
The grant Type is Authorization code.
I use Auth0 as Oauth Server and i checked that the endpoints are functional.
When the application is invoked using the simulator, the server application send the following json response :
{
"expectUserResponse": true,
"finalResponse": null,
"expectedInputs": [{
"possibleIntents": [{
"intent": "actions.intent.SIGN_IN",
"inputValueData": null
}],
"inputPrompt": {
"richInitialPrompt": {
"items": [{
"simpleResponse": {
"textToSpeech": "Merci de vous authentifier",
"ssml": null,
"displayText": "Merci de vous authentifier"
}
}]
}
}
}],
"conversationToken": null,
"isInSandbox": false
}
I expected then to see the message like : it looks like your account … is not linked
Instead of that, the assistant immediately sends the following request to the server :
{
"user": {
"userId": "ABwppHGK6fClByrbLlS8WDM4xfY0qEck5i_kOGMhlJtuj64SjC-8qDqlH3xZ3BN7f9Yz1JDza-sc",
"locale": "fr-CA",
"lastSeen": "2018-04-23T14:12:02Z"
},
"conversation": {"conversationId": "1524493058716", "type": "NEW"},
"inputs": [{
"intent": "actions.intent.SIGN_IN",
"rawInputs": [{"inputType": "KEYBOARD"}],
"arguments": [{
"name": "SIGN_IN",
"extension": {
"#type": "type.googleapis.com/google.actions.v2.SignInValue",
"status": "ERROR"
}
}]
}],
"surface": {
"capabilities": [
{"name": "actions.capability.WEB_BROWSER"},
{"name": "actions.capability.MEDIA_RESPONSE_AUDIO"},
{"name": "actions.capability.SCREEN_OUTPUT"},
{"name": "actions.capability.AUDIO_OUTPUT"}
]
},
"isInSandbox": true,
"availableSurfaces": [
{
"capabilities": [
{"name": "actions.capability.SCREEN_OUTPUT"},
{"name": "actions.capability.AUDIO_OUTPUT"}
]
}
]
}
Did someone have the same problem ? Thanks

I have a working example, but it might be different of what you are doing because I ask the sign-in with dialogflow Integrations' tab for Google Assistant, and not explicitely with the SDK. The code is for the V2 of Dialogflow, I also have one for the V1 but it is now legacy.
This is my BONJOUR intent that is triggered when my app is launched:
const rp = require('request-promise');
app.intent('BONJOUR', (conv) => {
console.log("Debug: SAY_HELLO");
const accessToken = conv.user.access.token;
console.log("Access Token = "+accessToken);
//========Auth with OAuth website========
if (!accessToken) {
conv.ask(new SignIn());
} else {
let options = {
method: 'GET',
url: '[...]',//Oauth URL
headers:{
authorization: 'Bearer ' + accessToken,
}
};
// I use the RP lib as we need Promises for the V2 of Dialogflow.
return rp(options).then((body) => {
let data = JSON.parse(body);
console.log("auth data ="+JSON.stringify(data));
//You can access the auth data easily here
// For example if you want the name, it's in data.given_name, etc...
//Use conv.ask() to say something here
}).catch((error) => {
console.log("Error in auth request"+error);
})
}
});
Update:
This is my JSON mais the SignIn() is called, as I just tested it, it doesn't work (I created an intent that receives the actions_intent_SIGN_IN event from an example. And it never asks for sign In , I'm always in the else.)
Response {
"payload": {
"google": {
"expectUserResponse": true,
"richResponse": {
"items": [
{
"simpleResponse": {
"textToSpeech": "PLACEHOLDER"
}
}
]
},
"userStorage": "{\"data\":{}}",
"systemIntent": {
"intent": "actions.intent.SIGN_IN",
"data": {
"#type": "type.googleapis.com/google.actions.v2.SignInValueSpec"
}
}
}
},
"outputContexts": [
{
"name": [...],
"lifespanCount": 99,
"parameters": {
"data": "{}"
}
}
]
}
Then the request after that is:
Request {
"responseId": "5a711f0e-be66-4311-b776-2085e81e9bde",
"queryResult": {
"queryText": "actions_intent_SIGN_IN",
"parameters": {},
"allRequiredParamsPresent": true,
"fulfillmentMessages": [
{
"text": {
"text": [
""
]
}
}
],
"outputContexts": [
{
"name": "..."
},
{
"name": ".../actions_intent_sign_in",
"parameters": {
"SIGN_IN": {
"#type": "type.googleapis.com/google.actions.v2.SignInValue",
"status": "ERROR"
}
}
},
{
"name": "...",
"lifespanCount": 98,
"parameters": {
"data": "{}"
}
},
{
"name": "..."
},
{
"name": "..."
},
{
"name": "..."
},
{
"name": "..."
}
],
"intent": {
"name": "...",
"displayName": "Get Signin"
},
"intentDetectionConfidence": 1,
"diagnosticInfo": {},
"languageCode": "fr-fr"
},
"originalDetectIntentRequest": {
"source": "google",
"version": "2",
"payload": {
"isInSandbox": true,
"surface": {
"capabilities": [
{
"name": "actions.capability.WEB_BROWSER"
},
{
"name": "actions.capability.MEDIA_RESPONSE_AUDIO"
},
{
"name": "actions.capability.SCREEN_OUTPUT"
},
{
"name": "actions.capability.AUDIO_OUTPUT"
}
]
},
"inputs": [
{
"rawInputs": [
{
"inputType": "KEYBOARD"
}
],
"arguments": [
{
"extension": {
"#type": "type.googleapis.com/google.actions.v2.SignInValue",
"status": "ERROR"
},
"name": "SIGN_IN"
}
],
"intent": "actions.intent.SIGN_IN"
}
],
"user": {
"userStorage": "{\"data\":{}}",
"lastSeen": "2018-04-24T12:21:19Z",
"locale": "fr-FR",
"userId": "ABwppHHXrOc7N24RC5YS1dMvt7C-MbpzTb5TtzmufeIpGTCINVlReIMb8RKo4SGQMgBY7BUvO1qhn0B-"
},
"conversation": {
"conversationId": "1524572717282",
"type": "ACTIVE",
"conversationToken": "[\"_actions_on_google\"]"
},
"availableSurfaces": [
{
"capabilities": [
{
"name": "actions.capability.SCREEN_OUTPUT"
},
{
"name": "actions.capability.AUDIO_OUTPUT"
}
]
}
]
}
},
"session": "..."
}
I hope it can help you somehow.

Related

Sabre Unable to use "Revalidate Itinerary" REST API

I am trying to follow the developer guide for a air booking process found in the documentation. https://developer.sabre.com/guides/travel-agency/workflows/air-booking
Here, I have used token based authentication (v2) and I could successfully search and book using the rest api. However, Upon hitting the revalidate itinerary api with the example found in the documentation https://developer.sabre.com/docs/rest_apis/air/search/revalidate_itinerary/reference-documentation
Here, I am getting following error. (Note: I have changed the pcc code in here. The original request uses the correct pnr.)
Response:
{
"groupedItineraryResponse": {
"version": "6.3.0",
"messages": [
{
"severity": "Info",
"type": "WORKERTHREAD",
"code": "TRANSACTIONID",
"text": "3019835637227710880"
},
{
"severity": "Info",
"type": "SERVER",
"code": "ASE032LPSCIL668.ATSE.CERT.ASCINT.SABRECIRRUS.COM",
"text": "27038"
},
{
"severity": "Info",
"type": "DRE",
"code": "RULEID",
"text": "25961"
},
{
"severity": "Info",
"type": "DEFAULT",
"code": "RULEID",
"text": "25959"
},
{
"severity": "Error",
"type": "IF2",
"code": "PROCESS",
"text": "PCC EPCC: Revalidate Itinerary not requested."
},
{
"severity": "Error",
"type": "ERR",
"code": "ERR",
"text": "Error during Processing"
}
],
"statistics": {
"itineraryCount": 0
}
}
}
API URL: https://api-crt.cert.havail.sabre.com/v3/shop/flights/revalidate
Request json:
{
"OTA_AirLowFareSearchRQ": {
"OriginDestinationInformation": [
{
"RPH": "0",
"DepartureDateTime": "2021-08-14T00:00:00",
"OriginLocation": {
"LocationCode": "KRK"
},
"DestinationLocation": {
"LocationCode": "WAW"
}
}
],
"POS": {
"Source": [
{
"PseudoCityCode": "EPCC",
"RequestorID": {
"CompanyName": {
"Code": "TN"
},
"ID": "1",
"Type": "1"
}
}
]
},
"TPA_Extensions": {
"IntelliSellTransaction": {
"RequestType": {
"Name": "200ITINS"
}
}
},
"TravelPreferences": {
"TPA_Extensions": {
"DataSources": {
"NDC": "Disable",
"ATPCO": "Enable",
"LCC": "Disable"
},
"NumTrips": {}
}
},
"TravelerInfoSummary": {
"AirTravelerAvail": [
{
"PassengerTypeQuantity": [
{
"Code": "ADT",
"Quantity": 1
}
]
}
],
"SeatsRequested": [
1
]
},
"Version": "3"
}
}
You need to list all the flights with booking classes in TPA_Extension under OriginDestinationInformation.
So, your OriginDestinationInformation should look something like this:
"OriginDestinationInformation": [
{
"RPH": "0",
"DepartureDateTime": "2021-10-11T14:50:00",
"OriginLocation": {
"LocationCode": "BEG"
},
"DestinationLocation": {
"LocationCode": "ZRH"
},
"TPA_Extensions": {
"SegmentType": {
"Code": "O"
},
"Flight": [
{
"Number": 1417,
"DepartureDateTime": "2021-10-11T14:50:00",
"ArrivalDateTime": "2021-10-11T16:40:00",
"Type": "A",
"ClassOfService": "K",
"OriginLocation": {
"LocationCode": "BEG"
},
"DestinationLocation": {
"LocationCode": "ZRH"
},
"Airline": {
"Operating": "LX",
"Marketing": "LX"
}
}
]
}
}
],

Actions on Google dynamic NO_INPUT response via Actions SDK

Is anyone able to get "NO_INPUT" requests from AoG when once they've configured their action.json to route those requests to their server?
I'm receiving "actions.intent.CANCEL" intent requests, but not "actions.intent.NO_INPUT"
My action.json file...
{
"actions": [
{
"description": "Default Welcome Intent",
"name": "MAIN",
"fulfillment": {
"conversationName": "thebigbadtest"
},
"intent": {
"name": "actions.intent.MAIN",
"trigger": {
"queryPatterns": [
"talk to the Sophmora"
]
}
}
}
],
"conversations": {
"thebigbadtest": {
"name": "thebigbadtest",
"url": "https://api.oogum.io/rest/aog/agents/GYuM1j2At8eVLOqh8m1q/apprequests",
"inDialogIntents": [{
"name": "actions.intent.CANCEL"
}, {
"name": "actions.intent.NO_INPUT"
}]
}
},
"locale": "en"
}

Move to v2 API with express self hosting

I would like used the V2 API on my dialogflow fullfilment.
But when I self hosting an express, only v1 works, Why ?
With firebase functions both V1 and V2 works with the same code.
I apply this : https://developers.google.com/actions/reference/nodejs/lib-v1-migration,
Error for the welcome intent :
Request from simulator
{
"user": {
"userId": "ABwppHHtohp6Z0QsGp9X_TSwUK3gCxdRwCZ5w3kXR-iI-aXiUSNZR3Vuo59vocUIgP80gE2qWs2SFKk-fI6g83YJjA",
"locale": "fr-CA",
"lastSeen": "2019-02-25T15:29:15Z"
},
"conversation": {
"conversationId": "ABwppHHfpVWINKIQFvk-bzrVSvu4s-8JexXgZXP7FQ-NQ5HmPAneHtGY0u86_llCV--tj3TZpMtCMIMCZakyxc7mYQ",
"type": "NEW"
},
"inputs": [
{
"intent": "actions.intent.MAIN",
"rawInputs": [
{
"inputType": "KEYBOARD",
"query": "Parler avec le diable"
}
]
}
],
"surface": {
"capabilities": [
{
"name": "actions.capability.SCREEN_OUTPUT"
},
{
"name": "actions.capability.MEDIA_RESPONSE_AUDIO"
},
{
"name": "actions.capability.WEB_BROWSER"
},
{
"name": "actions.capability.AUDIO_OUTPUT"
}
]
},
"isInSandbox": true,
"availableSurfaces": [
{
"capabilities": [
{
"name": "actions.capability.SCREEN_OUTPUT"
},
{
"name": "actions.capability.WEB_BROWSER"
},
{
"name": "actions.capability.AUDIO_OUTPUT"
}
]
}
],
"requestType": "SIMULATOR"
}
reponse from simulator :
{
"responseMetadata": {
"status": {
"code": 10,
"message": "Failed to parse Dialogflow response into AppResponse because of empty speech response",
"details": [
{
"#type": "type.googleapis.com/google.protobuf.Value",
"value": "{\"id\":\"50104e9c-79ec-4545-a510-88ffd1944af7\",\"timestamp\":\"2019-02-25T15:32:35.568Z\",\"lang\":\"fr-ca\",\"result\":{},\"status\":{\"code\":206,\"errorType\":\"partial_content\",\"errorDetails\":\"Webhook call failed. Error: 400 Bad Request\"},\"sessionId\":\"ABwppHHfpVWINKIQFvk-bzrVSvu4s-8JexXgZXP7FQ-NQ5HmPAneHtGY0u86_llCV--tj3TZpMtCMIMCZakyxc7mYQ\"}"
}
]
}
}
}
Simulator :
Any idea ?
I found the issue. It was a wrong express configuration with bodyparser.
This is my code :
import express from 'express';
import { SERVER_NAME, ENTRY_POINT, PORT } from './constants';
import { app } from './app/app';
export const server = express();
server.set('port', PORT);
server.set('trust proxy', 'loopback');
server.use(express.json({}));
server.post(ENTRY_POINT, app);
server.get('/', (req, res) => {
res.send(SERVER_NAME);
});
just used express.use() instead body parser with express 4.16. It seems to me that it resolve the problem. Now V2 API with dialogflow seems works.

DialogFlow: Missing "user" property in JSON after successful Google Account linking

So after successful Google Account linking in my app, I tested it using an Android device without any problem. I used the "in conversation prompt" technique to request the user to authenticate to proceed further. In other words, I was successfully able to receive the "user" property of response from Dialogflow with valid accessToken (among other info).
Now, I tried it on a Google Home device. The device is configured with the same email Id I used on the Android mobile device. The G.Home successfully loads the app when I invoke it. But the missing part here is the accessToken in the user property (JSON below). I have assumed the following in the above scenario:
Since I have already signed in successfully on the Android mobile device, the next time I try to invoke the app on the same device, the app doesn't prompts for the "sign in" because it already has the accessToken (until it is expired). And since I am using the same gmail address on the G. Home device, I should have gotten the same accessToken as well.
As long as the same gmail address is used, it doesn't matter what device/surface I use to Google auth myself, I will always get the accessToken if it has not expired.
The setup/configuration for the whole Google Account linking is detailed in the above link I've shared. Here is the JSON I've received on G. Home and Android device respectively:
{
"originalRequest": {
"source": "google",
"version": "2",
"data": {
"isInSandbox": true,
"surface": {
"capabilities": [
{
"name": "actions.capability.MEDIA_RESPONSE_AUDIO"
},
{
"name": "actions.capability.AUDIO_OUTPUT"
}
]
},
"inputs": [
{
"rawInputs": [
{
"query": "continue",
"inputType": "VOICE"
}
],
"arguments": [
{
"rawText": "continue",
"textValue": "continue",
"name": "text"
}
],
"intent": "actions.intent.TEXT"
}
],
"user": {
"lastSeen": "2018-07-17T10:33:57Z",
"locale": "en-US",
"userId": "15229245xxx"
},
"conversation": {
"conversationId": "153182806xxx",
"type": "ACTIVE",
"conversationToken": "[\"disclaimer_option\"]"
},
"availableSurfaces": [
{
"capabilities": [
{
"name": "actions.capability.SCREEN_OUTPUT"
},
{
"name": "actions.capability.AUDIO_OUTPUT"
},
{
"name": "actions.capability.WEB_BROWSER"
}
]
}
]
}
},
"id": "9459d297-4746-4ffe-99fa-xxx",
"timestamp": "2018-07-17T11:49:02.693Z",
"lang": "en-us",
"result": {
"source": "agent",
"resolvedQuery": "continue",
"speech": "",
"action": "v00.authentication.pin",
"actionIncomplete": false,
"parameters": {
"CallEnum": "Login"
},
"contexts": [
{
"name": "disclaimer_option",
"parameters": {
"CallEnum": "Login",
"CallEnum.original": ""
},
"lifespan": 0
},
{
"name": "pin",
"parameters": {
"CallEnum": "Login",
"CallEnum.original": ""
},
"lifespan": 1
},
{
"name": "google_assistant_input_type_voice",
"parameters": {
"CallEnum": "Login",
"CallEnum.original": ""
},
"lifespan": 0
},
{
"name": "actions_capability_audio_output",
"parameters": {
"CallEnum": "Login",
"CallEnum.original": ""
},
"lifespan": 0
},
{
"name": "actions_capability_media_response_audio",
"parameters": {
"CallEnum": "Login",
"CallEnum.original": ""
},
"lifespan": 0
}
],
"metadata": {
"intentName": "v00.authentication.pin",
"isResponseToSlotfilling": false,
"intentId": "146f0d7d-0194-43cb-90e4-xxx",
"webhookUsed": "true",
"webhookForSlotFillingUsed": "false",
"nluResponseTime": 87
},
"fulfillment": {
"speech": "",
"messages": []
},
"score": 1
},
"status": {
"code": 200,
"errorType": "success"
},
"sessionId": "15318280xxx"
}
and
{
"originalRequest": {
"source": "google",
"version": "2",
"data": {
"isInSandbox": true,
"surface": {
"capabilities": [
{
"name": "actions.capability.MEDIA_RESPONSE_AUDIO"
},
{
"name": "actions.capability.WEB_BROWSER"
},
{
"name": "actions.capability.AUDIO_OUTPUT"
},
{
"name": "actions.capability.SCREEN_OUTPUT"
}
]
},
"inputs": [
{
"rawInputs": [
{
"query": "Continue",
"inputType": "TOUCH"
}
],
"arguments": [
{
"rawText": "Continue",
"textValue": "Continue",
"name": "text"
}
],
"intent": "actions.intent.TEXT"
}
],
"user": {
"lastSeen": "2018-07-17T09:44:08Z",
"accessToken": "6IlPNz0YFb_stP0quM1xxx",
"locale": "en-US",
"userId": "15229245xxx"
},
"conversation": {
"conversationId": "153182082xxx",
"type": "ACTIVE",
"conversationToken": "[\"disclaimer_option\"]"
},
"availableSurfaces": [
{
"capabilities": [
{
"name": "actions.capability.WEB_BROWSER"
},
{
"name": "actions.capability.AUDIO_OUTPUT"
},
{
"name": "actions.capability.SCREEN_OUTPUT"
}
]
}
]
}
},
"id": "ae2e3ff8-f351-497b-9429-xxx",
"timestamp": "2018-07-17T09:47:54.999Z",
"lang": "en-us",
"result": {
"source": "agent",
"resolvedQuery": "Continue",
"speech": "",
"action": "v00.authentication.pin",
"actionIncomplete": false,
"parameters": {
"CallEnum": "Login"
},
"contexts": [
{
"name": "google_assistant_input_type_touch",
"parameters": {
"CallEnum": "Login",
"CallEnum.original": ""
},
"lifespan": 0
},
{
"name": "pin",
"parameters": {
"CallEnum": "Login",
"CallEnum.original": ""
},
"lifespan": 1
},
{
"name": "disclaimer_option",
"parameters": {
"CallEnum": "Login",
"CallEnum.original": ""
},
"lifespan": 0
},
{
"name": "actions_capability_screen_output",
"parameters": {
"CallEnum": "Login",
"CallEnum.original": ""
},
"lifespan": 0
},
{
"name": "actions_capability_audio_output",
"parameters": {
"CallEnum": "Login",
"CallEnum.original": ""
},
"lifespan": 0
},
{
"name": "actions_capability_media_response_audio",
"parameters": {
"CallEnum": "Login",
"CallEnum.original": ""
},
"lifespan": 0
},
{
"name": "actions_capability_web_browser",
"parameters": {
"CallEnum": "Login",
"CallEnum.original": ""
},
"lifespan": 0
}
],
"metadata": {
"intentName": "v00.authentication.pin",
"isResponseToSlotfilling": false,
"intentId": "146f0d7d-0194-43cb-90e4-xxx",
"webhookUsed": "true",
"webhookForSlotFillingUsed": "false",
"nluResponseTime": 87
},
"fulfillment": {
"speech": "",
"messages": []
},
"score": 1
},
"status": {
"code": 200,
"errorType": "success"
},
"sessionId": "153182082xxx"
}
My question is, where can I get the accessToken when I am using the Google Home device?

REST API 'Create Passenger Name Record' Warning and errors

The below attached warnings and error occurred while testing Booking seat.
There is no any proper documentation of Create Passenger Name Record REST API Call, the description and schema are meaning less. In description there are 266 parameters are required true to send a request.
Do you have any proper documentation where i can get all the required parameters detailed information? Like What is SegmentNumber how can i get?
Working flow( For Single trip) :
Get the origin, destination, date, number of seats required.
Send all required parms to Bargain Finder Max, get the response
Send Require params to book a seat. Create Passenger Name Record
Request
{
"CreatePassengerNameRecordRQ": {
"targetCity": "3QND",
"Profile": {
"UniqueID": {
"ID": "ABCD1EF"
}
},
"AirBook": {
"OriginDestinationInformation": {
"FlightSegment": [{
"ArrivalDateTime": "2017-04-30",
"DepartureDateTime": "2017-04-30T13:55",
"FlightNumber": "309",
"NumberInParty": "1",
"ResBookDesigCode": "V",
"Status": "NN",
"DestinationLocation": {
"LocationCode": "KHI"
},
"MarketingAirline": {
"Code": "PK",
"FlightNumber": "309"
},
"MarriageGrp": "O",
"OriginLocation": {
"LocationCode": "ISB"
}
}]
}
},
"AirPrice": {
"PriceRequestInformation": {
"OptionalQualifiers": {
"MiscQualifiers": {
"TourCode": {
"Text": "TEST1212"
}
},
"PricingQualifiers": {
"PassengerType": [{
"Code": "CNN",
"Quantity": "1"
}]
}
}
}
},
"MiscSegment": {
"DepartureDateTime": "2017-04-30",
"NumberInParty": 1,
"Status": "NN",
"Type": "OTH",
"OriginLocation": {
"LocationCode": "ISB"
},
"Text": "TEST",
"VendorPrefs": {
"Airline": {
"Code": "PK"
}
}
},
"SpecialReqDetails": {
"AddRemark": {
"RemarkInfo": {
"FOP_Remark": {
"Type": "CHECK",
"CC_Info": {
"Suppress": true,
"PaymentCard": {
"AirlineCode": "PK",
"CardSecurityCode": "1234",
"Code": "VI",
"ExpireDate": "2012-12",
"ExtendedPayment": "12",
"ManualApprovalCode": "123456",
"Number": "4123412341234123",
"SuppressApprovalCode": true
}
}
},
"FutureQueuePlaceRemark": {
"Date": "12-21",
"PrefatoryInstructionCode": "11",
"PseudoCityCode": "IPCC1",
"QueueIdentifier": "499",
"Time": "06:00"
},
"Remark": [{
"Type": "Historical",
"Text": "TEST HISTORICAL REMARK"
},
{
"Type": "Invoice",
"Text": "TEST INVOICE REMARK"
},
{
"Type": "Itinerary",
"Text": "TEST ITINERARY REMARK"
},
{
"Type": "Hidden",
"Text": "TEST HIDDEN REMARK"
}]
}
},
"AirSeat": {
"Seats": {
"Seat": [{
"NameNumber": "1.1",
"Preference": "AN",
"SegmentNumber": "0"
},
{
"NameNumber": "2.1",
"Preference": "AN",
"SegmentNumber": "1"
},
{
"NameNumber": "3.1",
"Preference": "AN",
"SegmentNumber": "1"
}]
}
},
"SpecialService": {
"SpecialServiceInfo": {
"Service": [{
"SSR_Code": "OSI",
"PersonName": {
"NameNumber": "testing"
#},
"Text": "TEST1",
"VendorPrefs": {
"Airline": {
"Code": "PK"
}
}
}]
}
}
},
"PostProcessing": {
"RedisplayReservation": true,
"ARUNK": "",
"QueuePlace": {
"QueueInfo": {
"QueueIdentifier": [{
"Number": "100",
"PrefatoryInstructionCode": "11"
}]
}
},
"EndTransaction": {
"Source": {
"ReceivedFrom": "SWS TEST"
}
}
}
}
}
Response:
{
"CreatePassengerNameRecordRS": {
"ApplicationResults": {
"status": "NotProcessed",
"Error": [
{
"type": "Application",
"timeStamp": "2017-03-08T04:10:41.317-06:00",
"SystemSpecificResults": [
{
"Message": [
{
"code": "ERR.SP.BUSINESS_ERROR",
"content": "PNR has not been created successfully, see remaining messages for details"
}
]
}
]
}
],
"Warning": [
{
"type": "BusinessLogic",
"timeStamp": "2017-03-08T04:10:40.628-06:00",
"SystemSpecificResults": [
{
"Message": [
{
"code": "WARN.SP.PROVIDER_ERROR",
"content": "NO PROFILE FOUND FOR NAME"
}
]
}
]
},
{
"type": "Validation",
"timeStamp": "2017-03-08T04:10:40.655-06:00",
"SystemSpecificResults": [
{
"Message": [
{
"code": "WARN.SWS.CLIENT.VALIDATION_FAILED",
"content": "Request contains incorrect values: Wrong dateTime format"
}
]
}
]
},
{
"type": "BusinessLogic",
"timeStamp": "2017-03-08T04:10:40.919-06:00",
"SystemSpecificResults": [
{
"Message": [
{
"code": "WARN.SWS.HOST.ERROR_IN_RESPONSE",
"content": "FORMAT, CHECK SEGMENT NUMBER-0003"
}
]
}
]
},
{
"type": "BusinessLogic",
"timeStamp": "2017-03-08T04:10:41.024-06:00",
"SystemSpecificResults": [
{
"Message": [
{
"code": "WARN.SWS.HOST.ERROR_IN_RESPONSE",
"content": ".DTE.NOT ENT BGNG WITH"
}
]
}
]
},
{
"type": "BusinessLogic",
"timeStamp": "2017-03-08T04:10:41.062-06:00",
"SystemSpecificResults": [
{
"Message": [
{
"code": "WARN.SWS.HOST.ERROR_IN_RESPONSE",
"content": "\u0087ND NAMES\u0087"
}
]
}
]
},
{
"type": "BusinessLogic",
"timeStamp": "2017-03-08T04:10:41.096-06:00",
"SystemSpecificResults": [
{
"Message": [
{
"code": "WARN.SWS.HOST.ERROR_IN_RESPONSE",
"content": "\u0087ND NAMES\u0087"
}
]
}
]
},
{
"type": "BusinessLogic",
"timeStamp": "2017-03-08T04:10:41.129-06:00",
"SystemSpecificResults": [
{
"Message": [
{
"code": "WARN.SWS.HOST.ERROR_IN_RESPONSE",
"content": "\u0087ND NAMES\u0087"
}
]
}
]
},
{
"type": "BusinessLogic",
"timeStamp": "2017-03-08T04:10:41.166-06:00",
"SystemSpecificResults": [
{
"Message": [
{
"code": "WARN.SWS.HOST.ERROR_IN_RESPONSE",
"content": "NO ARNK INSERTED"
}
]
}
]
},
{
"type": "BusinessLogic",
"timeStamp": "2017-03-08T04:10:41.229-06:00",
"SystemSpecificResults": [
{
"Message": [
{
"code": "WARN.SWS.HOST.ERROR_IN_RESPONSE",
"content": "NEED PHONE FIELD - USE 9"
}
]
}
]
}
]
},
"TravelItineraryRead": {
"TravelItinerary": {
"CustomerInfo": {
},
"ItineraryInfo": {
"ReservationItems": {
"Item": [
{
"RPH": "1",
"MiscSegment": {
"DayOfWeekInd": "7",
"DepartureDateTime": "04-30",
"NumberInParty": "01",
"SegmentNumber": "0001",
"Status": "NN",
"Type": "OTH",
"IsPast": false,
"OriginLocation": {
"LocationCode": "ISB"
},
"Text": [
"TEST"
],
"Vendor": {
"Code": "PK"
}
}
}
]
}
},
"ItineraryRef": {
"AirExtras": false,
"InhibitCode": "U",
"PartitionID": "AA",
"PrimeHostID": "1B",
"Header": [
"CURRENTLY DISPLAYING A PNR OWNED BY THE SABRE PRIME HOST",
"RULES AND FUNCTIONALITY FOR THAT PRIME HOST WILL APPLY"
],
"Source": {
"PseudoCityCode": "3QND",
"ReceivedFrom": "SWS TEST"
}
},
"SpecialServiceInfo": [
{
"RPH": "001",
"Type": "GFX",
"Service": {
"SSR_Code": "OSI",
"Airline": {
"Code": "PK"
},
"Text": [
"TEST1-TESTING"
]
}
}
]
}
}
},
"Links": [
{
"rel": "self",
"href": "https:\/\/api.sabre.com\/v1.0.0\/passenger\/records?mode=create"
},
{
"rel": "linkTemplate",
"href": "https:\/\/api.sabre.com\/\/passenger\/records?mode="
}
]
}
Please avoid posting the same questions. Here's an answer I just posted regarding the required elements: https://stackoverflow.com/a/42671412/3701641
About the segment number, they represent the itinerary segments, you are adding one flight segment, so the segment number associated with that would be 1.