Event Attachment OpCode EAC: Create or Update an Attachment to an Event

Event Attachment OpCode EAC: Create or Update an Attachment to an Event

This opcode is used to update an existing attachment in the list of attachments (documents/links) if found, or create a new attachment for the specified event. The event to update the attachment may be identified by specifying the EventKey, EventDescription, or EventCode.

Attachments can be links (URLs) or actual files uploaded to the system. When updating URL links, no special treatment is necessary. However, when uploading files, certain steps must be taken. File uploads must be the only opcode specified in the OpCodeList. This means that uploading files must be done as separate calls to the API. Additionally, uploading of files must be done using HTTPS multipart form posts.

Calling the API

The API is called via a secure HTTPS request. This HTTPS request may be a GET or POST operation (except for file uploading which requires a multi-part form post). 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 API call is: https://api.onlinexperiences.com/scripts/Server.nxp?LASCmd=AI:4;F:APIUTILS!50540&APIUserAuthCode={YourAuthCode}&APIUserCredentials={YourCredentials}&OpCodeList={Opcode[OpCode[…]]}&OutputFormat={X|H|T(default)}&ShowKey={ShowKey}&{Additional, opcode-specific parameters in name=value format…}

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

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 2000

Y

Should include EAU to invoke this function.

OutputFormat

Char 1

N

T for text, H for HTTP URL-encoded, or X for XML. Defaults to T.

ShowKey

Integer

Y

The ShowKey that the event belongs to.

EventKey

Integer

N

The event key of the attachment to update.

EventCode

Varchar 255

N

The event code of the attachment to update.

EventDescription

Varchar 355

N

The description of the event of the attachment to update.

AttachmentDescription

Varchar 800

Y

The description of this attachment.

Attachment

Varchar 2000

N

If the attachment is a link, rather than a file upload, then this contains the URL. Otherwise, this parameter should be omitted.

AttachmentData

Binary blob

N

If the attachment is a file upload, then this parameter contains the actual document contents. Otherwise, this parameter can be omitted.

AttachmentCategory

Integer

N

Category for this attachment. (See OpCode CTL)

AttachmentSubjectCategoryKey

Integer

N

Subject Category of this attachment. (See OpCode SCL)

AttachmentDisplayOrder

Integer

N

Display order index to be used when listing attachments.

Return Outputs

 

See the descriptions of OpCodes EAI and EAU for more information on the return completion results.

 

Potential Error Codes

 

See the descriptions of OpCodes EAI and EAU for more information on the potential error codes.