Skip to content

7. Template

Content of this chapter

This chapter contains web service methods concerning the creation of templates.

7.1. AddTemplate

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

Creates a new template without content.

'targetIDList', 'senderName' and 'replyToName' fields are optional.

7.1.1. Request elements

Elements Data type Description
shortname {http://www.w3.org/2001/XMLSchema}string short name of a template to be inserted
description {http://www.w3.org/2001/XMLSchema}string description of a template to be inserted
mailinglistID {http://www.w3.org/2001/XMLSchema}int ID of a mailing list for the mailing
targetIDList {http://www.w3.org/2001/XMLSchema}element list of target group's ID to form target expression, can be empty
matchTargetGroups {http://www.w3.org/2001/XMLSchema}string defines whether to match one or all of the target groups, allowed values ‘all’ and ‘one’
mailingType {http://www.w3.org/2001/XMLSchema}string type of mailing, 'regular', 'action-based', 'rule-based'
subject {http://www.w3.org/2001/XMLSchema}string the subject of a mailing
senderName {http://www.w3.org/2001/XMLSchema}string appears as a full name of the sender
senderAddress {http://www.w3.org/2001/XMLSchema}string the address shown as sender of the e-mail
replyToName {http://www.w3.org/2001/XMLSchema}string a full name of an institution or person to send response to
replyToAddress {http://www.w3.org/2001/XMLSchema}string the address for responses
charset {http://www.w3.org/2001/XMLSchema}string charset to use in email
linefeed {http://www.w3.org/2001/XMLSchema}int interval at which line break symbols are put in text mailing
format {http://www.w3.org/2001/XMLSchema}string format of a mailing - 'text', 'Online-HTML' or 'OfflineHTML'
onePixel {http://www.w3.org/2001/XMLSchema}string defines position where a tracking pixel is inserted

Optional elements:

Elements Default behavior, if not specified
description Description is empty
senderName Name is empty
replyToName Name is empty

7.1.2. Response elements

Element Data type Description
templateID {http://www.w3.org/2001/XMLSchema}int ID of an inserted template

7.1.3. SOAP Faults

A SOAP fault is returned, if any of the mandatory request fields is missing, any of identifiers is not positive, the format of the email address is invalid, values of 'matchTargetGroups', 'mailingType', 'format', 'onePixel' do not belong to correspondent designated ranges.

7.2. GetTemplate

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

Retrieves a template by ID.

7.2.1. Request elements

Element Data type Description
templateID {http://www.w3.org/2001/XMLSchema}int ID of a template in question

7.2.2. Response elements

Elements Data type Description
templateID {http://www.w3.org/2001/XMLSchema}int ID of a template in question
shortname {http://www.w3.org/2001/XMLSchema}string short name of a template to be inserted
description {http://www.w3.org/2001/XMLSchema}string description of a template to be inserted
mailinglistID {http://www.w3.org/2001/XMLSchema}int mailing list for the template
targetIDList {http://www.w3.org/2001/XMLSchema}element list of target groups ID's to form target expression
mailingType {http://www.w3.org/2001/XMLSchema}string type of mailing, 'regular', 'action-based', 'rule-based'
subject {http://www.w3.org/2001/XMLSchema}string the subject of a mailing
senderName {http://www.w3.org/2001/XMLSchema}string appears as a full name of the sender
senderAddress {http://www.w3.org/2001/XMLSchema}string the address shown as sender of the e-mail
replyToName {http://www.w3.org/2001/XMLSchema}string a full name of an institution or person to send response to
replyToAddress {http://www.w3.org/2001/XMLSchema}string the address for responses
charset {http://www.w3.org/2001/XMLSchema}string charset to use in email
linefeed {http://www.w3.org/2001/XMLSchema}int interval at which line break symbols are put in text mailing
formats {http://www.w3.org/2001/XMLSchema}element formats a mailing can sent in
onePixel {http://www.w3.org/2001/XMLSchema}string defines position where a tracking pixel is inserted
autoUpdate {http://www.w3.org/2001/XMLSchema}boolean mailing list for the mailing

7.2.3. SOAP Faults

A SOAP fault is returned, if the templateID request field is missing, it is not a positive value, or there is no template with the given ID.

7.3. ListTemplates

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

Retrieves a list of all templates.

7.3.1. Request elements

Note: There’s no parameter given.

7.3.2. Response elements

Element Data type Description
item {http://agnitas.org/ws/schemas}Template 0 or more templates

7.4. UpdateTemplate

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

Updates a template with the given ID. If there is no such template a SOAP fault is returned.

7.4.1. Request elements

Elements Data type Description
templateID {http://www.w3.org/2001/XMLSchema}int ID of a template in question
shortname {http://www.w3.org/2001/XMLSchema}string short name of a template to be updated
description {http://www.w3.org/2001/XMLSchema}string description of a template to be updated
mailinglistID {http://www.w3.org/2001/XMLSchema}int ID of a mailing list for the mailing
targetIDList {http://www.w3.org/2001/XMLSchema}element list of target group's ID to form target expression
matchTargetGroups {http://www.w3.org/2001/XMLSchema}string defines whether to match one or all of the target groups, allowed values ‘all’ and ‘one’
mailingType {http://www.w3.org/2001/XMLSchema}string type of mailing, 'regular', 'action-based', 'rule-based'
subject {http://www.w3.org/2001/XMLSchema}string the subject of a mailing
senderName {http://www.w3.org/2001/XMLSchema}string appears as a full name of the sender
senderAddress {http://www.w3.org/2001/XMLSchema}string the address shown as sender of the e-mail
replyToName {http://www.w3.org/2001/XMLSchema}string a full name of an institution or person to send response to
replyToAddress {http://www.w3.org/2001/XMLSchema}string the address for responses
charset {http://www.w3.org/2001/XMLSchema}string charset to use in email
linefeed interval at which line break symbols are put in text mailing
format {http://www.w3.org/2001/XMLSchema}string format of a mailing - 'text', 'Online-HTML' or 'OfflineHTML'
onePixel {http://www.w3.org/2001/XMLSchema}string defines position where a tracking pixel is inserted

Optional elements:

Elements Default behavior, if not specified
description Description becomes empty
senderName Name becomes empty
replyToName Name becomes empty

7.4.2. Response elements

Note: The response has no elements.

7.4.3. SOAP Faults

A SOAP fault is returned, if any of the mandatory request fields is missing, any of identifiers is not positive, ‘templateID’ does not exist, the format of the email address is invalid, values of 'matchTargetGroups', 'mailingType', 'format', 'onePixel' do not belong to correspondent designated ranges.

7.5. DeleteTemplate

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

Deletes a template with the given ID.

7.5.1. Request elements

Element Data type Description
templateID {http://www.w3.org/2001/XMLSchema}int ID of a template in question

7.5.2. Response elements

Note: The response has no elements.

7.5.3. SOAP Faults

A SOAP fault is returned, if a template with the given ID does not exist.