Removing Passengers From Profile Error

25 views
Skip to first unread message

Michael Gumtow

unread,
Nov 5, 2019, 11:54:52 AM11/5/19
to TramsAPI Beta
Hi Dan,

I'm running into a frustrating issue when hitting the "profile/applyupdates" endpoint while attempting to delete some passenger records.  Every time I attempt to delete a passenger I get the following error:  

{"apiVersion":"4.08","result":{"resultcode":99,"resulttext":"Could not convert variant of type (Null) into type (Int64)"}}

If I remove the passenger deletions, then the request works as anticipated.  You will also notice in the below payload that I am doing an almost identical process of the address information associated with the profile, and that works as expected.

Any insight would be greatly appreciated. 

Thanks!

Payload Body:

Array
(
    [SessionID] => {2C1D087E-E0B2-491C-855D-973F9DC0A5C9}
    [deltaDataset] => Array
        (
            [profile] => Array
                (
                    [0] => Array
                        (
                            [update] => Array
                                (
                                    [profileNo] => Array
                                        (
                                            [oldValue] => 267093
                                        )

                                    [profileType_LinkCode] => Array
                                        (
                                            [oldValue] => I
                                        )

                                    [name] => Array
                                        (
                                            [oldValue] => GREGG/OLD
                                        )

                                    [interfaceID] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [title] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [businessType] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [firstName] => Array
                                        (
                                            [oldValue] => OLD
                                        )

                                    [lastName] => Array
                                        (
                                            [oldValue] => GREGG
                                        )

                                    [middleInit] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [courtesyTitle] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [modifyBy] => Array
                                        (
                                            [oldValue] => SYSDBA
                                        )

                                    [modifyDateTime] => Array
                                        (
                                            [oldValue] => 2019-11-05T10:19:06.962Z
                                        )

                                    [creationDate] => Array
                                        (
                                            [oldValue] => 2019-10-25T15:27:05.471Z
                                        )

                                    [airlineNo] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [GL_LinkNo] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [preferredVendor] => Array
                                        (
                                            [oldValue] => N
                                        )

                                    [notes] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [additionalNotes] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [other] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [stmtRemarks] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [isActive] => Array
                                        (
                                            [oldValue] => Y
                                        )

                                    [payeeName] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [rate1] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [outsideRate] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [unappliedBalance] => Array
                                        (
                                            [oldValue] => 0
                                        )

                                    [travelPref] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [salutation] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [primaryAgent_LinkNo] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [CB_Notes] => Array
                                        (
                                            [oldValue] => Updated Notes
                                        )

                                    [vendorId] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [referredBy] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [serviceProviderOnly] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [branch_LinkNo] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [agencyRemarks] => Array
                                        (
                                            [oldValue] => Updated Remarks
                                        )

                                    [createBy] => Array
                                        (
                                            [oldValue] => SYSDBA
                                        )

                                    [webId] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [webPassword] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [misc1] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [misc2] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [GL2_LinkNo] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [GL2Rate] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [creditLimit] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [GLBranch_LinkNo] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [checkRemarks] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [altInterfaceID] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [bankAccountNo] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [bankRoutingNo] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [CBNotesBlobType_LinkNo] => Array
                                        (
                                            [oldValue] => 2
                                        )

                                    [CBPLookupItem_LinkNo] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [additionalName] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [profileID] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [miscEcoValue] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [privLabel_LinkNo1] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [seg_LinkNo1] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [privLabel_LinkNo2] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [seg_LinkNo2] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [PCC] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [SPUniqueID] => Array
                                        (
                                            [oldValue] => 
                                        )

                                    [syncModDateTime] => Array
                                        (
                                            [oldValue] => 2019-11-05T10:19:07.000Z
                                        )

                                    [passenger] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [delete] => Array
                                                        (
                                                            [passengerNo] => 298308
                                                        )

                                                )

                                            [1] => Array
                                                (
                                                    [delete] => Array
                                                        (
                                                            [passengerNo] => 298363
                                                        )

                                                )

                                            [2] => Array
                                                (
                                                    [delete] => Array
                                                        (
                                                            [passengerNo] => 298364
                                                        )

                                                )

                                            [3] => Array
                                                (
                                                    [delete] => Array
                                                        (
                                                            [passengerNo] => 298365
                                                        )

                                                )

                                            [4] => Array
                                                (
                                                    [delete] => Array
                                                        (
                                                            [passengerNo] => 298366
                                                        )

                                                )

                                            [5] => Array
                                                (
                                                    [delete] => Array
                                                        (
                                                            [passengerNo] => 298367
                                                        )

                                                )

                                            [6] => Array
                                                (
                                                    [insert] => Array
                                                        (
                                                            [profile_LinkNo] => 267093
                                                            [relationship] => TEST RELATIONSHIP
                                                            [dept] => TEST DEPARTMENT
                                                            [isPrimary] => Y
                                                            [name] => WILLIAM NEVER
                                                            [lastName] => NEVER
                                                            [firstName] => WILLIAM
                                                            [middleInit] => B
                                                            [smoking] => 
                                                            [cruiseSize] => 
                                                            [cruiseDining] => 
                                                            [htlBedding] => 
                                                            [htlSpecial] => 
                                                            [htlRoomLocation] => 
                                                            [airSpecial] => 
                                                            [carSpecial] => 
                                                            [notes] => 
                                                            [description] => 
                                                            [passportNo] => 
                                                            [passportExpire] => 
                                                            [courtesyTitle] => 
                                                            [escortPrefId] => 
                                                            [originCountry] => 
                                                            [airMeals] => 
                                                            [airSeats] => 
                                                            [airClass] => 
                                                            [carType] => 
                                                            [specialServices] => 
                                                            [passportNo2] => 
                                                            [passportExpire2] => 
                                                            [originCountry2] => 
                                                            [issueDate] => 
                                                            [issueCity] => 
                                                            [issueDate2] => 
                                                            [issueCity2] => 
                                                            [gender] => 
                                                            [citizenship] => 
                                                            [salutation] => 
                                                            [birthMDYMonth] => 
                                                            [birthMDYDay] => 
                                                            [birthMDYYear] => 
                                                            [redressNo] => 
                                                            [knownTravNo] => 
                                                            [emergncName] => 
                                                            [emergncRelationship] => 
                                                            [emergncPhone] => 
                                                            [emergncEmail] => 
                                                            [emergncMisc] => 
                                                            [travelerID] => 
                                                            [airMealPref] => 
                                                            [airMealPrefCode] => 
                                                            [aircraft] => 
                                                            [cruiseSpecial] => 
                                                            [tourSpecial] => 
                                                            [cruiseShipName] => 
                                                            [departPort] => 
                                                            [address_LinkNo] => 
                                                            [SPUniqueID] => 
                                                            [PCC] => 
                                                            [linkedProfileCount] => 
                                                            [commValue_Fax] => 
                                                            [commValue_Phone] => 
                                                            [commValue_Email] => 
                                                            [commValue_Web] => 
                                                        )

                                                )

                                        )

                                    [address] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [delete] => Array
                                                        (
                                                            [addressNo] => 372107
                                                        )

                                                )

                                            [1] => Array
                                                (
                                                    [insert] => Array
                                                        (
                                                            [profile_LinkNo] => 267093
                                                            [address1] => 123 Test St.
                                                            [address2] => 
                                                            [city] => Oshkosh
                                                            [state] => WI
                                                            [zip] => 54904
                                                            [country] => US
                                                            [aptSuite] => 
                                                            [description] => 
                                                            [permitMarket] => Y
                                                            [isValid] => Y
                                                            [SPUniqueID] => 
                                                            [addressInstance] => Array
                                                                (
                                                                    [0] => Array
                                                                        (
                                                                            [INSERT] => Array
                                                                                (
                                                                                    [addrType_LinkNo] => 
                                                                                    [JAN1] => 
                                                                                    [FEB2] => 
                                                                                    [MAR3] => 
                                                                                    [APR4] => 
                                                                                    [MAY5] => 
                                                                                    [JUN6] => 
                                                                                    [JUL7] => 
                                                                                    [AUG8] => 
                                                                                    [SEP9] => 
                                                                                    [OCT10] => 
                                                                                    [NOV11] => 
                                                                                    [DEC12] => 
                                                                                    [SPUniqueID] => 
                                                                                )

                                                                        )

                                                                )

                                                        )

                                                )

                                        )

                                )

                        )

                )

        )

)

Dan Palley

unread,
Nov 5, 2019, 3:31:12 PM11/5/19
to TramsAPI Beta
Hi Mike,

The payload you posted doesn't appear to be valid JSON.  Can you try sending again?

Here's an example of deleting a passenger:

Profile.applyUpdates
{
    "deltaDataset": {
        "profile": [
            {
                "none": {
                    "profileNo"4,
                    "profileType_LinkCode""I",
                    "name""Sharp\/Janet",
                    "interfaceID""324564654",
                    "title""",
                    "businessType""X",
                    "firstName""Janet",
                    "lastName""Sharp",
                    "middleInit""",
                    "courtesyTitle""Ms",
                    "modifyBy""SYSDBA",
                    "modifyDateTime""2004-01-23T10:13:53.000Z",
                    "creationDate""1997-10-21T00:00:00.000Z",
                    "preferredVendor""N",
                    "notes""x",
                    "additionalNotes""x",
                    "other""x",
                    "stmtRemarks""x",
                    "isActive""Y",
                    "payeeName""",
                    "unappliedBalance"0,
                    "travelPref""AIR",
                    "salutation""",
                    "CB_Notes""",
                    "vendorId""",
                    "referredBy""Yellow Pages",
                    "createBy""SYSDBA",
                    "webId""",
                    "webPassword""",
                    "misc1""",
                    "misc2""",
                    "CBNotesBlobType_LinkNo"2,
                    "passenger": [
                        {
                            "delete": {
                                "passengerNo"443,
                                "profile_LinkNo"4,
                                "dept""Son",
                                "sortNo"443,
                                "isPrimary""N",
                                "name""Sharp\/Tom",
                                "lastName""Sharp",
                                "firstName""Tom",
                                "salutation"""
                            }
                        }
                    ]
                }
            }
        ]
    }
}
Dan

Michael Gumtow

unread,
Nov 6, 2019, 9:46:30 AM11/6/19
to TramsAPI Beta
Hi Dan,

Here is the body request in JSON format: 

{
  "SessionID": "{1F4C6884-2BD0-4F10-B035-0D1DCB86C265}",
  "deltaDataset": {
    "profile": [
      {
        "update": {
          "profileNo": {
            "oldValue": 267093
          },
          "profileType_LinkCode": {
            "oldValue": "I"
          },
          "name": {
            "oldValue": "GREGG/OLD"
          },
          "interfaceID": {
            "oldValue": null
          },
          "title": {
            "oldValue": null
          },
          "businessType": {
            "oldValue": null
          },
          "firstName": {
            "oldValue": "OLD"
          },
          "lastName": {
            "oldValue": "GREGG"
          },
          "middleInit": {
            "oldValue": null
          },
          "courtesyTitle": {
            "oldValue": null
          },
          "modifyBy": {
            "oldValue": "SYSDBA"
          },
          "modifyDateTime": {
            "oldValue": "2019-11-05T10:19:06.962Z"
          },
          "creationDate": {
            "oldValue": "2019-10-25T15:27:05.471Z"
          },
          "airlineNo": {
            "oldValue": null
          },
          "GL_LinkNo": {
            "oldValue": null
          },
          "preferredVendor": {
            "oldValue": "N"
          },
          "notes": {
            "oldValue": null
          },
          "additionalNotes": {
            "oldValue": null
          },
          "other": {
            "oldValue": null
          },
          "stmtRemarks": {
            "oldValue": null
          },
          "isActive": {
            "oldValue": "Y"
          },
          "payeeName": {
            "oldValue": null
          },
          "rate1": {
            "oldValue": null
          },
          "outsideRate": {
            "oldValue": null
          },
          "unappliedBalance": {
            "oldValue": 0
          },
          "travelPref": {
            "oldValue": null
          },
          "salutation": {
            "oldValue": null
          },
          "primaryAgent_LinkNo": {
            "oldValue": null
          },
          "CB_Notes": {
            "oldValue": "Updated Notes"
          },
          "vendorId": {
            "oldValue": null
          },
          "referredBy": {
            "oldValue": null
          },
          "serviceProviderOnly": {
            "oldValue": null
          },
          "branch_LinkNo": {
            "oldValue": null
          },
          "agencyRemarks": {
            "oldValue": "Updated Remarks"
          },
          "createBy": {
            "oldValue": "SYSDBA"
          },
          "webId": {
            "oldValue": null
          },
          "webPassword": {
            "oldValue": null
          },
          "misc1": {
            "oldValue": null
          },
          "misc2": {
            "oldValue": null
          },
          "GL2_LinkNo": {
            "oldValue": null
          },
          "GL2Rate": {
            "oldValue": null
          },
          "creditLimit": {
            "oldValue": null
          },
          "GLBranch_LinkNo": {
            "oldValue": null
          },
          "checkRemarks": {
            "oldValue": null
          },
          "altInterfaceID": {
            "oldValue": null
          },
          "bankAccountNo": {
            "oldValue": null
          },
          "bankRoutingNo": {
            "oldValue": null
          },
          "CBNotesBlobType_LinkNo": {
            "oldValue": 2
          },
          "CBPLookupItem_LinkNo": {
            "oldValue": null
          },
          "additionalName": {
            "oldValue": null
          },
          "profileID": {
            "oldValue": null
          },
          "miscEcoValue": {
            "oldValue": null
          },
          "privLabel_LinkNo1": {
            "oldValue": null
          },
          "seg_LinkNo1": {
            "oldValue": null
          },
          "privLabel_LinkNo2": {
            "oldValue": null
          },
          "seg_LinkNo2": {
            "oldValue": null
          },
          "PCC": {
            "oldValue": null
          },
          "SPUniqueID": {
            "oldValue": null
          },
          "syncModDateTime": {
            "oldValue": "2019-11-05T10:19:07.000Z"
          },
          "passenger": [
            {
              "delete": {
                "passengerNo": 298308
              }
            },
            {
              "delete": {
                "passengerNo": 298363
              }
            },
            {
              "delete": {
                "passengerNo": 298364
              }
            },
            {
              "delete": {
                "passengerNo": 298365
              }
            },
            {
              "delete": {
                "passengerNo": 298366
              }
            },
            {
              "delete": {
                "passengerNo": 298367
              }
            },
            {
              "insert": {
                "profile_LinkNo": 267093,
                "relationship": "TEST RELATIONSHIP",
                "dept": "TEST DEPARTMENT",
                "isPrimary": "Y",
                "name": "WILLIAM NEVER",
                "lastName": "NEVER",
                "firstName": "WILLIAM",
                "middleInit": "B",
                "smoking": null,
                "cruiseSize": null,
                "cruiseDining": null,
                "htlBedding": null,
                "htlSpecial": null,
                "htlRoomLocation": null,
                "airSpecial": null,
                "carSpecial": null,
                "notes": null,
                "description": null,
                "passportNo": null,
                "passportExpire": null,
                "courtesyTitle": null,
                "escortPrefId": null,
                "originCountry": null,
                "airMeals": null,
                "airSeats": null,
                "airClass": null,
                "carType": null,
                "specialServices": null,
                "passportNo2": null,
                "passportExpire2": null,
                "originCountry2": null,
                "issueDate": null,
                "issueCity": null,
                "issueDate2": null,
                "issueCity2": null,
                "gender": null,
                "citizenship": null,
                "salutation": null,
                "birthMDYMonth": null,
                "birthMDYDay": null,
                "birthMDYYear": null,
                "redressNo": null,
                "knownTravNo": null,
                "emergncName": null,
                "emergncRelationship": null,
                "emergncPhone": null,
                "emergncEmail": null,
                "emergncMisc": null,
                "travelerID": null,
                "airMealPref": null,
                "airMealPrefCode": null,
                "aircraft": null,
                "cruiseSpecial": null,
                "tourSpecial": null,
                "cruiseShipName": null,
                "departPort": null,
                "address_LinkNo": null,
                "SPUniqueID": null,
                "PCC": null,
                "linkedProfileCount": null,
                "commValue_Fax": null,
                "commValue_Phone": null,
                "commValue_Email": null,
                "commValue_Web": null
              }
            }
          ],
          "address": [
            {
              "delete": {
                "addressNo": 372112
              }
            },
            {
              "insert": {
                "profile_LinkNo": 267093,
                "address1": "123 Main St.",
                "address2": null,
                "city": "Oshkosh",
                "state": "Wi",
                "zip": "54901",
                "country": "US",
                "aptSuite": null,
                "description": null,
                "permitMarket": "Y",
                "isValid": "Y",
                "SPUniqueID": null,
                "addressInstance": [
                  {
                    "insert": {
                      "addrType_LinkNo": "1",
                      "JAN1": null,
                      "FEB2": null,
                      "MAR3": null,
                      "APR4": null,
                      "MAY5": null,
                      "JUN6": null,
                      "JUL7": null,
                      "AUG8": null,
                      "SEP9": null,
                      "OCT10": null,
                      "NOV11": null,
                      "DEC12": null,
                      "SPUniqueID": null
                    }
                  },
                  {
                    "insert": {
                      "addrType_LinkNo": "2",
                      "JAN1": null,
                      "FEB2": null,
                      "MAR3": null,
                      "APR4": null,
                      "MAY5": null,
                      "JUN6": null,
                      "JUL7": null,
                      "AUG8": null,
                      "SEP9": null,
                      "OCT10": null,
                      "NOV11": null,
                      "DEC12": null,
                      "SPUniqueID": null
                    }
                  },
                  {
                    "insert": {
                      "addrType_LinkNo": "3",
                      "JAN1": null,
                      "FEB2": null,
                      "MAR3": null,
                      "APR4": null,
                      "MAY5": null,
                      "JUN6": null,
                      "JUL7": null,
                      "AUG8": null,
                      "SEP9": null,
                      "OCT10": null,
                      "NOV11": null,
                      "DEC12": null,
                      "SPUniqueID": null
                    }
                  }
                ]
              }
            }
          ]
        }
      }
    ]
  }
}

Dan Palley

unread,
Nov 6, 2019, 10:53:52 AM11/6/19
to TramsAPI Beta
Hi Mike,

When you do the delete, you need to specify all the values for the record being deleted.

 "passenger": [
                    {
                        "delete": {
                            "passengerNo": 443,
                            "profile_LinkNo": 4,
                            "dept": "Son",
                            "sortNo": 443,
                            "isPrimary": "N",
                            "name": "Sharp\/Tom",
                            "lastName": "Sharp",
                            "firstName": "Tom",
                            "salutation": ""
                        }
                    }
              ]

In a future version of the API, we'll relax this restriction so that just primary key fields need to be specified.

Dan
Reply all
Reply to author
Forward
0 new messages