OpCode A: Add Attachment to User Briefcase

OpCode A: Add Attachment to User Briefcase

This Opcode is used to add an attachment (document/link) to a specified user of a particular show. The user must already exist. 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 LookupByExternalAttachmentID is specified as one (1), then the attachment is located based on the ExternalAttachmentID value. Otherwise, the attachment is located based on AttachmentKey.

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!50535&APIUserAuthCode={YourAuthCode}&APIUserCredentials={YourCredentials}&OpCode={Opcode}&OutputFormat={X|H|T(default)}&{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!50535. 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.
OpCode Varchar 20 Y Should include A 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).
LookupByExternalAttachmentID Bit (0/1) N Pass one (1) to look up this attachment by the supplied ExternalAttachmentID (your internal identifier).
ExternalUserID Varchar 255 - Your internal identifier for this person. This value must be unique for each person.
EMailAddress Varchar 255 - The person’s email address.
ShowKey Integer Y The show identifier to add Attachment to Briefcase of person.
AttachmentKey Integer Y AttachmentKey to add to the briefcase for this user.
ExternalAttachmentID Integer - Your internal identifier for this attachment. This value must be unique for each attachment.

Return Outputs

This API returns the status message OK upon successful completion, as well as the AttachmentsAdded count.

Text

### APICallResult=0 APICallDiagnostic=OK OpCodesProcessed=1 OpCodesInError=0
## OpCode=A Status=0 Message=OK
AttachmentsAdded
1

HTTP URL-endcoded

APICallResult=0&APICallDiagnostic=OK&OpCodesProcessed=1&OpCodesInError=0&OpCode=A&Status=0&Message=OK&AttachmentsAdded=1

XML

<?xml version="1.0" encoding="utf-8" ?>
<APIResults APICallResult="0" APICallDiagnostic="OK" OpCodesProcessed="1" OpCodesInError=”0” >
<OpCodeResult OpCode="A" Status="0" Message="OK" >
 <ResultRow>
  <AttachmentsAdded>1</AttachmentsAdded>
 </ResultRow>
</OpCodeResult>
</APIResults>

Potential Error Codes

Error

Message Reason
71 User Not Found! The user with either the specified ExternalUserID or EMailAddress could not be found.
72 Attachment Not Found! The specified attachment does not exist for the specified ShowKey.