Skip to content

10. Attachment

Content of this chapter

This chapter contains web service methods concerning attachments of a mailing.

10.1. AddAttachment

Namespace: http://agnitas.org/ws/schemas

Appends an attachment to a mailing.

10.1.1. Request elements

Elements Data type Description
mailingID {http://www.w3.org/2001/XMLSchema}int ID of a mailing to append an attachment to
mimeType {http://www.w3.org/2001/XMLSchema}string MIME type of an attachment
componentName {http://www.w3.org/2001/XMLSchema}string a name for an attachment
data {http://www.w3.org/2001/XMLSchema}base64Binary binary data

10.1.2. Response elements

Element Data type Description
componentID {http://www.w3.org/2001/XMLSchema}int ID of an attachment that was appended

10.1.3. SOAP Faults

A SOAP fault is returned, if any of request fields is missing, if mailing ID or a component type is not positive value or mimeType, componentName exceed permitted length.

10.2. GetAttachment

Namespace: http://agnitas.org/ws/schemas

Gets an attachment.

10.2.1. Request elements

Elements Data type Description
componentID {http://www.w3.org/2001/XMLSchema}int ID of an attachment to get
useISODateFormat {http://www.w3.org/2001/XMLSchema}boolean Indicator, if ISO8601 date format is used (optional)

Optional elements:

Element Default behavior, if not specified
useISODateFormat Uses „false“ → simple date format

"If useISODateFormat is missing or value is set to false, the date format used so far is enabled, true enables ISO8601 date format."

10.2.2. Response elements

Elements Data type Description
componentID {http://www.w3.org/2001/XMLSchema}int ID of an attachment to get
mimeType {http://www.w3.org/2001/XMLSchema}string a MIME type of an attachment
componentType {http://www.w3.org/2001/XMLSchema}int type of an attachment
componentName {http://www.w3.org/2001/XMLSchema}string name of an attachment
timestamp {http://www.w3.org/2001/XMLSchema}dateTime date when an attachment was created
size {http://www.w3.org/2001/XMLSchema}int size of binary data in bytes
data {http://www.w3.org/2001/XMLSchema}base64Binary binary data

10.2.3. SOAP Faults

A SOAP fault is returned if componentID is not positive or the specified component is not an attachment.

10.3. ListAttachment

Namespace: http://agnitas.org/ws/schemas

Acquires a list of attachments pertaining a particular mailing.

10.3.1. Request elements

Elements Data type Description
mailingID {http://www.w3.org/2001/XMLSchema}int list attachments for this mailing ID
useISODateFormat {http://www.w3.org/2001/XMLSchema}boolean Indicator, if ISO8601 date format is used (optional)

Optional elements:

Element Default behavior, if not specified
useISODateFormat Uses „false“ → simple date format

"If useISODateFormat is missing or value is set to false, the date format used so far is enabled, true enables ISO8601 date format."

10.3.2. Response elements

Element Data type Description
item {http://www.w3.org/2001/XMLSchema}Attachment list of attachments, empty if there are no attachments

10.3.3. SOAP Faults

A SOAP fault is returned, if mailing ID is not positive.

10.4. UpdateAttachment

Namespace: http://agnitas.org/ws/schemas

Updates an attachment with the given ID.

'data' field is optional.

10.4.1. Request elements

Elements Data type Description
componentID {http://www.w3.org/2001/XMLSchema}int ID of an attachment to update
mimeType {http://www.w3.org/2001/XMLSchema}string MIME type of an attachment
componentName {http://www.w3.org/2001/XMLSchema}string name of an attachment
data {http://www.w3.org/2001/XMLSchema}base64Binary binary data

Optional elements:

Element Default behavior, if not specified
data Content of attachment remains unchanged

10.4.2. Response elements

Note: The response has no elements.

10.4.3. SOAP Faults

A SOAP fault is returned, if there is no attachment to update, if any of the mandatory request fields is missing, componentID or a component type is not positive or mimeType, componentName exceed permitted length.

10.5. DeleteAttachment

Namespace: http://agnitas.org/ws/schemas

Deletes an attachment with the given ID.

10.5.1. Request elements

Element Data type Description
componentID {http://www.w3.org/2001/XMLSchema}int ID of attachment to delete

10.5.2. Response elements

Note: The response has no elements.

10.5.3. SOAP Faults

A SOAP fault is returned if an attachment with the given ID does not exist.