Profile and related

222 views
Skip to first unread message

bill

unread,
Jul 26, 2017, 6:01:16 PM7/26/17
to TramsAPI Beta
Hi Dan,

Do you have an example of a profile query and how we could use the api to create a profile with a Primary traveler?  I guess we would also need something to show addresses and communication fields.

Bill

Dan Palley

unread,
Jul 27, 2017, 10:18:20 PM7/27/17
to tramsa...@googlegroups.com
Hi Bill,

I'm currently re-working how profiles are loaded and saved, so it's not completely working in the version you have now, but I should have an update soon.

At any rate, here's an example of adding a profile with a traveler:


{
  "SessionID":"{ACFE70DC-AB95-4ED0-B6BE-26996D11EFF3}",
  "DELTADATASET":{
    "Profile":[
      {
        "INSERT":{
          "ProfileType_LinkCode":"I","Name":"Shelley\/Bill","FirstName":"Bill","LastName":"Shelley",
         
          "Address":[
            {
              "INSERT":{
                "Address1":"1234 Main st.","Address2":"","City":"Beveryly Hills","State":"CA","Zip":"90000",
                "PermitMarket":"Y","IsValid":"Y",
                "AddressInstance":[
                  {"INSERT":{"AddrType_LinkNo":1}},
                  {"INSERT":{"AddrType_LinkNo":2}},
                  {"INSERT":{"AddrType_LinkNo":3}}
                ]
              }
            }
          ],
          "ProfilePassenger":[
            {
              "INSERT":{
                "Relationship,"Dept":"","IsPrimary":"Y",
                "Passenger":[
                  {
                    "INSERT":{
                      "Name":"Shelley\/Bill","LastName":"Shelley","FirstName":"Bill","MiddleInit":""
                    }
                  }
                ]
              }
            }
          ]
        }
      }
    ]
  }
}


Dan

Dan Palley

unread,
Jul 28, 2017, 2:22:45 PM7/28/17
to TramsAPI Beta
Ok, had to make another change to flip the PASSENGER and PROFILEPASSENGER datasets.  Here's the revised example:

{
  "SessionID":"{ACFE70DC-AB95-4ED0-B6BE-26996D11EFF3}",
  "DELTADATASET":{
    "Profile":[
      {
        "INSERT":{
          "ProfileType_LinkCode":"I","Name":"Shelley\/Bill","FirstName":"Bill","LastName":"Shelley", "PreferredVendor":"N","IsActive":"Y",
          "CB_Notes":"","AgencyRemarks":"","Address":[
            {
              "INSERT":{
                "Address1":"1234 Main st.","Address2":"","City":"Beveryly Hills","State":"CA","Zip":"90000","Country":"","AptSuite":"","Description":"",

                "PermitMarket":"Y","IsValid":"Y","AddressInstance":[
                  {"INSERT":{"AddrType_LinkNo":1}},
                  {"INSERT":{"AddrType_LinkNo":2}},
                  {"INSERT":{"AddrType_LinkNo":3}}
                ]
              }
            }
          ],
          "Passenger":[
            {
              "INSERT":{
                "Name":"Shelley\/Bill","LastName":"Shelley","FirstName":"Bill","MiddleInit":"","SpecialServices":"",
                "ProfilePassenger":[
                  {
                    "INSERT":{
                      "Relationship":"","SortNo":1,"Dept":"","IsPrimary":"Y"
                    }
                  }
                ]
              }
            }
          ]
        }
      }
    ]
  }
}

Dan

rianaville

unread,
Oct 18, 2018, 11:11:23 AM10/18/18
to TramsAPI Beta
Hi Dan, how do I update a profile with specific email address? (that is how do I do UPDATE profile WHERE email=$?) 

Dan Palley

unread,
Oct 22, 2018, 3:13:35 PM10/22/18
to TramsAPI Beta
Hi,

So first you'd need to find the profile with the specified email address.  You can do a profile query for that.  

http://localhost:8085/profilequery/runquery

{
 
"SessionID" : "<sessionid>"
 
"params" : {
   
"commType" : 3,
   
"commValue" : "1...@tramsqa.com",
   
"IncludeCols" :
     
[
       
"profileNo",
       
"tr_passengerNo"
     
]
 
}
}

if the passengerno column is NULL, then the email is at the profile level.

Keep in mind that emails can be at the profile level and the traveler level, and they are updated separately.

Dan

rianaville

unread,
Feb 11, 2019, 2:05:47 PM2/11/19
to TramsAPI Beta
Hello Dan, I was trying to update some fields of the profile, I tried to run 
"SessionID": "{session}",
"DELTADATASET": {
"Profile": [
{
"update": {
"profileNo": { "OLDVALUE": 5 },
"CB_Notes": { "OLDVALUE": null, "NEWVALUE": "some text" }
}
}
]
}
}
but it is not updating, what am I missing?

Dan Palley

unread,
Feb 13, 2019, 5:30:25 PM2/13/19
to TramsAPI Beta
Hi,

You have to specify all of the fields when you do an update.  If a field wasn't changed, you just specify the old value.  Typically you read a profile, make your changes, then update, so you should be able to copy the unchanged fields from the original request.

Did you get an error response back when you made this call?

Dan

rianaville

unread,
Feb 14, 2019, 1:25:26 AM2/14/19
to TramsAPI Beta
Yes I already did it that way and succeeded. Thank you for your reply.

Michael Gumtow

unread,
Sep 24, 2019, 6:35:15 PM9/24/19
to TramsAPI Beta
Hi Dan,

Do you have a list of valid "commTypes" for this request?

Thanks!

Michael Gumtow

unread,
Sep 25, 2019, 10:00:20 AM9/25/19
to TramsAPI Beta
In case anyone else is wondering what the list of commTypes, here is the list:

1 => Fax
2 => Phone
3 => E-mail
4 => Web
5 => Social Media

Michael Gumtow

unread,
Oct 7, 2019, 4:19:20 PM10/7/19
to TramsAPI Beta
Hi Dan,

I'm attempting to run a test on creating a new profile with the API, but I'm running into an error with the sample payload used above.  I keep getting an error of "TDatasetJSONConverter.FindField Error: Field ProfileType_LinkCode not found."  If there are any additonal sample payload requests, I would gladly review if you could point me in the right direction.

Thanks!

Sample Payload:
{"SessionID":"'[Generated Session ID]","DELTADATASET":{"Profile":[{"INSERT":{"ProfileType_LinkCode":"I","Name":"Shelley Bill","FirstName":"Bill","LastName":"Shelley","Address":[{"INSERT":{"Address1":"1234 Main st.","Address2":"","City":"Beveryly Hills","State":"CA","Zip":"90000","PermitMarket":"Y","IsValid":"Y","AddressInstance":[{"INSERT":{"AddrType_LinkNo":1}},{"INSERT":{"AddrType_LinkNo":2}},{"INSERT":{"AddrType_LinkNo":3}}]}}],"ProfilePassenger":[{"INSERT":{"Relationship":"","Dept":"","IsPrimary":"Y","Passenger":[{"INSERT":{"Name":"Shelley Bill","LastName":"Shelley","FirstName":"Bill","MiddleInit":""}}]}}]}}]}}

Error: 
array:2 [
  "apiVersion" => "4.08"
  "result" => array:2 [
    "resultcode" => 99
    "resulttext" => "TDatasetJSONConverter.FindField Error: Field ProfileType_LinkCode not found"
  ]
]

J Dyken

unread,
Oct 8, 2019, 11:33:24 AM10/8/19
to TramsAPI Beta
Any update on this?

Now that we're paying for this capability, is there a reasonable expectation that more formal documentation will be forthcoming?

Also - is there a reasonable SLA that we can communicate back to the business on how long it will take to get answers? Should we be doing support tickets or is this forum going to be the only place for that kind of support?

Thanks!

Dan Palley

unread,
Oct 9, 2019, 6:25:41 PM10/9/19
to TramsAPI Beta
Hi Michael,

I apologize for not getting back to you sooner.  The forum has been quiet for a while now and I haven't been checking as often.

I tested your request and got a different error than you did, that the ProfilePassenger field was not found.  There's only one PASSENGER table in the Profile format and it contains all of the fields.  Here's your revised request:

{
 
"SessionID" : "<session ID>",

       
"Passenger": [
         
{

           
"INSERT": {
             
"Relationship":"",
             
"Dept":"",
             
"IsPrimary":"Y",

             
"Name":"Shelley Bill",
             
"LastName":"Shelley",
             
"FirstName":"Bill",
             
"MiddleInit":""
           
}
         
}
       
]
     
}
   
}
 
]
}

You can always view the full metadata for PROFILE or any other section, by calling Profile/Load.  In the response, you'll see a metadata section that breaks down every field.

{
"apiVersion": "4.08",
{
"resultcode": 0,
"resulttext": "",
{
"name": "Profile",
"tableName": "profile",
["insert", "update", "delete"],
{
{
{"type": "largeInt", "flags":["insertOnly", "PKField", "autoAssign" ]},
{"type": "string", "size": 1, "checkValues":["I", "C", "V",…},
{"type": "string", "size": 150},
{"type": "string", "size": 10},
{"type": "string", "size": 15},
{"type": "string", "size": 50},
{"type": "string", "size": 50},
{"type": "string", "size": 50},
{"type": "string", "size": 50},
{"type": "string", "size": 15},
{"type": "string", "size": 20},
{"type": "dateTime"},
{"type": "dateTime"},
{"type": "integer"},
{"type": "integer"},
{"type": "string", "size": 1, "checkValues":["N", "Y" ]},
{"type": "string", "size": 128},
{"type": "string", "size": 128},
{"type": "string", "size": 128},
{"type": "string", "size": 128},
{"type": "string", "size": 1},
{"type": "string", "size": 128},
{"type": "integer"},
{"type": "integer"},
{"type": "largeInt", "flags":["readOnly" ]},
{"type": "string", "size": 128},
{"type": "string", "size": 80},
{"type": "largeInt"},
{"type": "memo"},
{"type": "string", "size": 10},
{"type": "string", "size": 30},
{"type": "string", "size": 1},
{"type": "integer"},
{"type": "memo"},
{"type": "string", "size": 20},
{"type": "string", "size": 128},
{"type": "string", "size": 128},
{"type": "string", "size": 20},
{"type": "string", "size": 20},
{"type": "integer"},
{"type": "integer"},
{"type": "largeInt"},
{"type": "integer"},
{"type": "string", "size": 128},
{"type": "string", "size": 20},
{"type": "string", "size": 25},
{"type": "string", "size": 9},
{"type": "integer"},
{"type": "largeInt"},
{"type": "string", "size": 80},
{"type": "string", "size": 80},
{"type": "string", "size": 12},
{"type": "largeInt"},
{"type": "largeInt"},
{"type": "largeInt"},
{"type": "largeInt"},
{"type": "string", "size": 5},
{"type": "string", "size": 30},
{"type": "dateTime"},
{"CCNo":{"type": "largeInt", "flags":["insertOnly", "PKField",…},
{"commNo":{"type": "largeInt", "flags":["insertOnly", "PKField",…},
{"addressNo":{"type": "largeInt", "flags":["insertOnly", "PKField",…},
{"specialDateNo":{"type": "largeInt", "flags":["insertOnly", "PKField",…},
{"marketingNo":{"type": "largeInt", "flags":["insertOnly", "PKField",…},
{"profile_LinkNo":{"type": "largeInt", "flags":["required", "insertOnly",…},
{"attachNo":{"type": "largeInt", "flags":["insertOnly", "PKField",…},
{"profile_LinkNo":{"type": "largeInt", "flags":["required", "insertOnly",…},
{"passengerNo":{"type": "largeInt", "flags":["insertOnly", "PKField",…},
{"profile_LinkNo":{"type": "largeInt", "flags":["PKField" ], "linkField": "profile.profileNo"},
{"profMoreFieldNo":{"type": "largeInt", "flags":["insertOnly", "PKField",…},
{"itinInvRemarksNo":{"type": "largeInt", "flags":["insertOnly", "PKField",…},
{"profile_LinkNo":{"type": "largeInt", "flags":["PKField" ], "linkField": "profile.profileNo"},
{"profile_LinkNo":{"type": "largeInt", "flags":["required", "insertOnly",…},
{"entryNo":{"type": "largeInt", "flags":["insertOnly", "PKField",…},
{"recNo":{"type": "largeInt", "flags":["insertOnly", "PKField",…}
}
},
{"profile":[{"profileNo": 4, "profileType_LinkCode": "I", "name": "Sharp/Janet",…}
}
}
}

Hope this helps.  If you don't see a response in the future, feel free to shoot me an email (dan.p...@sabre.com).

Regards,

Dan

Dan Palley

unread,
Oct 9, 2019, 6:27:46 PM10/9/19
to TramsAPI Beta
Hi J

I think we're still putting together a proper support mechanism for the API.  Feel free to discuss with the product manager, Linda Pannekeet, for more information.

Regards,

Dan

Michael Gumtow

unread,
Oct 10, 2019, 1:00:32 PM10/10/19
to TramsAPI Beta
Hi Dan,

I have updated the payload as advised but still get the "TDatasetJSONConverter.FindField Error: Field ProfileType_LinkCode not found" error.  I submitted the test request to the "userprofile/applyupdates" endpoint with the following data:

{
  "SessionID": "{55D4DDA7-128E-44DC-BE85-30215BF10EC7}",
  "DELTADATASET": {
    "Profile": [
      {
        "INSERT": {
          "ProfileType_LinkCode": "I",
          "Name": "William Never",
          "FirstName": "William",
          "LastName": "Never",
          "Address": [
            {
              "INSERT": {
                "Address1": "1234 Main st.",
                "Address2": "",
                "City": "Beveryly Hills",
                "State": "CA",
                "Zip": "90000",
                "PermitMarket": "Y",
                "IsValid": "Y",
                "AddressInstance": [
                  {
                    "INSERT": {
                      "AddrType_LinkNo": 1
                    }
                  },
                  {
                    "INSERT": {
                      "AddrType_LinkNo": 2
                    }
                  },
                  {
                    "INSERT": {
                      "AddrType_LinkNo": 3
                    }
                  }
                ]
              }
            }
          ],
          "Passenger": [
            {
              "INSERT": {
                "Relationship": "",
                "Dept": "",
                "IsPrimary": "Y",

Dan Palley

unread,
Oct 10, 2019, 1:24:10 PM10/10/19
to TramsAPI Beta
Hi Mike,

You are trying to create client profiles correct?

You need to use profile/applyupdates and not userprofile.

Dan
Reply all
Reply to author
Forward
0 new messages