Opcode C: Update a User, Creating them if they do not exist

OpCode C: Update a User, Creating them if they do not exist

This opcode is used to update or create a user in the VTS system. Both attendees (default) and exhibitor users can be updated or created. If LookupByExternalUserID is specified as one (1), then the user is located based on the ExternalUserID value. Otherwise, the user is located based on EMailAddress. If found, the update process is invoked (OpCode U). If not found, the create process (OpCode I) is invoked.

Calling The API

The API is called via a secure HTTPS request. This HTTPS request may be a GET or POST operation. Each request must supply the authentication credentials assigned to the caller by Notified. Only requests with valid credentials will be processed. These credentials identify the caller and provide access only to a specific customer area.

The format of the call is: https://api.onlinexperiences.com/scripts/Server.nxp?LASCmd=AI:4;F:APIUTILS!50500&APIUserAuthCode={YourAuthCode}&APIUserCredentials={YourCredentials}&OpCodeList={Opcode[OpCode[…]]}&OutputFormat={X|H|T(default)}&LookupByExternalUserID={0(default)|1}&{Additional, opcode-specific parameters in name=value format…}

Note: The format of the APAC Data Center is: https://api.apac.onlinexperiences.com.

Specific parameter ordering is unimportant, with the only restriction being that the first parameter MUST BE LASCmd=AI:4;F:APIUTILS!50500. All other parameters may appear in any sequence.

API Parameter Type/Size Req. Comment
APIUserAuthCode Varchar 80 Y Your API authorization code as supplied by Notified.
APIUserCredentials Varchar 80 Y Your API user credentials as supplied by Notified.
OpCodeList Varchar 20 Y Should include I to invoke this function.
OutputFormat Char 1 N T for text, H for HTTP URL-encoded, or X for XML. Defaults to T.
LookupByExternalUserID Bit (0/1) N Pass one (1) to look up this person by the supplied ExternalUserID (your internal identifier).
ExternalUserID Varchar 255 N Your internal identifier for this person. This value must be unique for each person.
EMailAddress Varchar 255 Y The person’s email address.
FullName Varchar 80 - Optional name of a person. Either the FullName or both the FirstName and LastName parameters should be specified.
FirstName Varchar 40 - See above.
LastName Varchar 40 - See above.
CompanyName Varchar 80 N The company that this person is affiliated with.
JobTitle Varchar 100 N Job title of this person.
Active Bit (0/1) N Pass one (1) to indicate that this person’s account is active, or zero (0) to deactivate their account.
UserType Bit (0/1) N Pass zero (0) to indicate that this person is a standard attendee, or one (1) if this person is an exhibitor. If this is set to one (1), a valid ExhibitorKey MUST be passed.
LoginID Varchar 80 N The login id for this person. Defaults to email address.
Password Varchar 80 Y The password for this person. If not supplied, a system-generated password will be assigned, unless the UBMLCPWD parameter is specified, in which case the password will use the lower-cased email address.
Phone Varchar 80 N The person’s primary phone number.
Phone2 Varchar 80 N The person’s secondary phone number.
Address1 Varchar 300 N The primary address. The entire address may be passed in Address1 by separating multiple lines with CR/LFs or as separate lines in Address1, Address2, and Address3.
Address2 Varchar 100 N See above.
Address3 Varchar 100 N See above.
City Varchar 100 N The city that the person is in.
StateProv Varchar 100 N The State or Province that the person is in.
Country Varchar 100 N The country that the person is in.
PostalCode Varchar 30 N The person’s postal/zip code.
AttendeeTypeKey Integer N A specific attendee type value to assign to this person. This is only valid if UserType is zero (0).
ExhibitorKey Integer N The exhibitor that this person is a part of/assigned to. This is only valid if UserType is one (1).
ExhibitorUserTypeKey Integer N A specific exhibitor user type value to assign to this person. This is only valid if UserType is one (1).
UserProfile Varchar 3500 N Textual profile or bio for this person to be displayed to others at the show.
Message Varchar 3500 N A message or greeting to display to other users in the show.
SubHostGroupingList Varchar 1000 N List of sub-host grouping descriptions, separated by carets (^) to assign this person to. Example: Eastern Region^Central Region^
UDFValues Varchar 8000 N Additional demographic and profile information. See the section on Passing UDF Values for the description of the format of this field.
ShowSurveyResponses Varchar 8000 N Show Survey Response information. See the section on Passing Show Survey Responses for the description of the format of this field.
TimeZoneInfoKey Integer N Time Zone Key for this user.
EmoticonImage Varchar 255 N URL to the photo/image for this user. The image should be 180x180.
LocaleID Integer N The language/locale id for this user. See the table in the Locale Reference section for valid values. Default is 1033.
SkypeID Varchar 80 N Skype ID for this user.
AOLIMID Varchar 80 N AOL Instant Messenger ID for this user.
YahooIMID Varchar 80 N Yahoo Instant Messenger ID for this user.
MSNIMID Varchar 80 N MSN Instant Messenger ID for this user.
TwitterID Varchar 15 N Twitter ID for this user.
CredentialBadgeList Varchar 8000 N List of credential badges to assign to this user. The list may be the Titles or ExternalIDs of the badges to assign, separated by a caret (^) symbol.
AutoForwardShowMail Flag (0/1) N An optional flag indicating whether to set the auto-forwarding of show mail to this user. Omit or pass -1 for default.
UBMLCPWD Flag (0/1) N An optional flag that will use the lower-cased email address as the Password value if the Password field is not supplied.

 

Return Outputs

This API returns the VTS Show User Key and Pubsuite Recipient Key for cross reference purposes. If the user existed and was updated, the OpCode of U is returned. If the user did not exist and was created, the OpCode of I is returned. Examples below depict a user that did not exist and was created.

Text

### APICallResult=0 APICallDiagnostic=OK OpCodesProcessed=1 OpCodesInError=0

## OpCode=U Status=0 Message=OK

ShowUserKey, RecipientKey

123456, 123456

HTTP URL-encoded

APICallResult=0&APICallDiagnostic=OK&OpCodesProcessed=1&OpCodesInError=0&OpCode=I&Status=0&Message=OK&ShowUserKey=123456&RecipientKey=123456

XML

 

<?xml version="1.0" encoding="utf-8" ?>

<APIResults APICallResult="0" APICallDiagnostic="OK" OpCodesProcessed="1" OpCodesInError=”0” >

<OpCodeResult OpCode="I" Status="0" Message="OK" >

 <ResultRow>

  <ShowUserKey>123456</ShowUserKey>

  <RecipientKey>123456</RecipientKey>

 </ResultRow>

</OpCodeResult>

</APIResults>

Potential Error Codes

Error Message Reason
12 Invalid Or Missing Email Address! Email address is a required field and must contain a value.
13 Missing Password! Password is a required field and must contain a value.
14 Invalid Attendee Type Specified! If specifying an attendee type to assign this person to (UserType=0), it must be valid.
15 Invalid Exhibitor User Type Specified! If specifying an exhibitor user type to assign this person to (UserType=1), it must be valid.
16 Invalid Exhibitor Specified! When creating an Exhibitor User (UserType=1), a valid ExhibitorKey must be supplied.
17 Login ID / Password already in use! The LoginID and Password combination must be unique.
18 Email Address already in use! A person with this email address already exists. Email addresses must be unique.
19 Invalid Time Zone Info Key Specified! The Time Zone Info Key was invalid.
24 Invalid Attendee Type Specified! When updating an Attendee User and AttendeeTypeKey is specified, it must be valid.
25 Invalid Exhibitor User Type Specified! When updating an Exhibitor User and ExhibitorUserTypeKey is specified, it must be valid.
26 Invalid Exhibitor Specified! When updating an Exhibitor User and ExhibitorKey is specified, ExhibitorKey must be valid.
27 Login ID/Password already in use! The LoginID and Password combination must be unique.
28 Email Address already in use! A person with this email address already exists. Email addresses must be unique.
29 Invalid Time Zone Info Key Specified! The Time Zone Info Key is invalid.