3. Subscriber
Content of this chapter
This chapter contains web service methods concerning the recipient management.
3.1. AddSubscriber
Namespace: http://agnitas.org/ws/schemas
Creates a new subscriber without binding to a mailing list.
If double checking is enabled, the web service checks, if there is already an entry with the same value in the key column. Existing entries are updated, when overwriting is enabled.
The profile fields „email“, „mailtype“ and „gender“ are required. More profile fields are possible, but must exist in the database.
Use the database names for profile fields in the webservice call. These names can be found in the EMM user interface.
A numeric datasource ID is assigned to every new recipient to mark the origin of the data. It can be committed as the profile field “datasource_id”. If this profile field is missing the default datasource ID of the web service user is used.
Note: Using another key column than "email" can lead to performance reduction. If you want to use another key column please contact your key account manager.
3.1.1. Request elements
| Elements | Data type | Description |
|---|---|---|
| parameters | {http://agnitas.org/ws/schemas}Map | subscriber profile fields Key: the name of the profile field Value: the value stored in the profile field |
| doubleCheck | {http://www.w3.org/2001/XMLSchema}boolean | turns on double check mode |
| keyColumn | {http://www.w3.org/2001/XMLSchema}string | in double check mode search is done by value of this column |
| overwrite | {http://www.w3.org/2001/XMLSchema}boolean | turns on overwrite mode |
Please note, that the XSD data type "string" has to be specified in the request for the elements <key> and <value> of "MapItem".
3.1.2. Response elements
| Element | Datentyp | Beschreibung |
|---|---|---|
| customerID | {http://www.w3.org/2001/XMLSchema}int | ID of the new subscriber; 0 if none was inserted |
3.1.3. SOAP Faults
A SOAP fault is returned, when at least one of the required profile fields is missing or the format of the email address is invalid.
3.2. AddSubscribers
Namespace: http://agnitas.com/ws/schemas
Creates a list of subscribers without assigning these to a mailing list.
If the duplicate check is activated, the Web service checks whether there are already entries with the same values in the Key column. Existing entries can be overwritten if necessary.
Note: For each item, that would overwrite more than one recipient, an error message is returned.
The profile fields "email", "mailtype" and "gender" are required. Further profile fields are possible but must exist in the database.
Use the database names for profile fields in the webservice call. These names can be found in the EMM user interface.
Note: Using another key column than "email" can lead to performance reduction. If you want to use another key column please contact your key account manager.
Using this webservice for larger data sets is not recommended. Use import feature of EMM instead.
3.2.1. Request Elemente
| Elemente | Data type | Description |
|---|---|---|
| subscribers | List of subscriber data (see below) | List of subscriber data |
| doubleCheck | {http://www.w3.org/2001/XMLSchema}boolean | Enable / disable double check |
| keyColumn | {http://www.w3.org/2001/XMLSchema}string | Key column (used when double check is enabled) |
| overwrite | {http://www.w3.org/2001/XMLSchema}boolean | Enable overwriting of existing subscribers when double check is enabled |
Subscriber data
| Element | Data type | Description |
|---|---|---|
| profilefields | {http://agnitas.org/ws/schemas}Map | Profile fields of subscriber (key: name of profile field, value: content) |
Please note, that profile fields require to use the XSD data type "string" for both "key" and "value" in "MapItem".
3.2.2. Response Elemente
| Element | Data type | Description |
|---|---|---|
| item | List of subscriber data (see below) | List of subscriber IDs and error messages |
Subscriber data
| Element | Data type | Description |
|---|---|---|
| subscriberID | {http://www.w3.org/2001/XMLSchema}int | ID of subscriber |
| Error | {http://www.w3.org/2001/XMLSchema}string | error message |
A subscriber record contains either "subscriberID" or "Error". The order of the subscriber data from request is preserved.
3.2.3. SOAP Faults
A SOAP fault is returned if
- double check is enabled and a value in the key column appears more than once
3.3. AddSubscriberBulk
This webservice is deprecated. Use AddSubscribers instead.
Namespace: http://agnitas.org/ws/schemas
Creates a list of subscribers without assigning these to a mailing list.
If the duplicate check is activated, the Web service checks whether there are already entries with the same values in the Key column. Existing entries can be overwritten if necessary.
Note: For each item, that would overwrite more than one recipient, an error message is returned.
The profile fields "email", "mailtype" and "gender" are required. Further profile fields are possible but must exist in the database.
Use the database names for profile fields in the webservice call. These names can be found in the EMM user interface.
Note: Using another key column than "email" can lead to performance reduction. If you want to use another key column please contact your key account manager.
Using this webservice for larger data sets is not recommended. Use import feature of EMM instead.
3.3.1. Request elements
| Elements | Data type | Description |
|---|---|---|
| ignoreErrors | {http://www.w3.org/2001/XMLSchema}boolean | If set to false, processing is aborted at first error |
| items | List of {http://agnitas.org/ws/schemas}AddSubscriberRequest | List of subscriber to add |
The elements are structured as items and correspond to the structure of an AddSubscriber call.
Please note, that the XSD data type "string" has to be specified in the request for the elements <key> and <value> of "MapItem".
3.3.2. Response elements
| Element | Data type | Description |
|---|---|---|
| items | List of result elements | Contains result for each subscriber specified in request |
Aufbau von items
| Element | Data type | Description |
|---|---|---|
| item | Single result element |
Aufbau von item
| Element | Data type | Description |
|---|---|---|
| AddSubscriberResponse | {http://agnitas.org/ws/schemas}AddSubscriberResponse | Result for a single subscriber |
| Error | {http://agnitas.org/ws/schemas}Error | Result in case of an error in adding or updating the subscriber |
3.4. FindSubscriber
Namespace: http://agnitas.org/ws/schemas
Finds a customer by the given attribute.
If there is more than one matching customer returns one of them in arbitrary manner.
3.4.1. Request elements
| Elements | Data type | Description |
|---|---|---|
| keyColumn | {http://www.w3.org/2001/XMLSchema}string | search is done by value of this column |
| value | {http://www.w3.org/2001/XMLSchema}string | value to look for |
3.4.2. Response elements
| Element | Data type | Description |
|---|---|---|
| value | {http://www.w3.org/2001/XMLSchema}int | ID of matching subscriber; 0 if none exists |
3.5. GetSubscriber
Namespace: http://agnitas.org/ws/schemas
Returns a list of key-value pairs. The keys are the names of the profile fields, the values are the corresponding values of the profile. Optionally it is possible to reduce the set of profile fields that are returned by this web service. Existence of profile fields is not checked.
3.5.1. Request elements
| Elements | Data type | Description |
|---|---|---|
| customerID | {http://www.w3.org/2001/XMLSchema}int | ID of a customer to get |
| profilefields | Liste von {http://www.w3.org/2001/XMLSchema}string | Optional list of profile fields that are returned by the web service |
If the optional argument profilefields is missing, all profile fields are returned.
Optional element:
| Element | Default behavior, if not specified |
|---|---|
| profilefields | All profile fields are returned |
3.5.2. Response elements
| Elements | Data type | Description |
|---|---|---|
| parameters | {http://agnitas.org/ws/schemas}Map | customer attributes with corresponding values |
| customerID | {http://www.w3.org/2001/XMLSchema}int | ID of a returned customer, 0 if none exists |
3.6. GetSubscriberBulk
This webservice is deprecated. Use GetSubscribersByIds instead.
Namespace: http://agnitas.org/ws/schemas
Delivers a list of key value pairs for a list of subscriber IDs. The keys are the names of the profile fields, the values are the corresponding values of the profile fields.
In the case of an invalid customer ID, either a data record with ID 0 can be sent back, or an error element. The sequence of elements is retained, thus allowing the response elements to be assigned to the corresponding request elements.
Existence of profile fields is not checked.
Using this webservice for larger data sets is not recommended. Use export feature of EMM instead.
3.6.1. Request elements
| Element | Data type | Description |
|---|---|---|
| items | List of {http://agnitas.org/ws/schemas}GetSubscriberRequest | List of customer Ids to get |
The elements are structured as items and correspond to the structure of a GetSubscriber call.
3.6.2. Response elements
| Element | Data type | Description |
|---|---|---|
| items | List of result elements | Contains result for each customer ID specified in request |
Structure of items
| Element | Data type | Description |
|---|---|---|
| item | Single result element |
Structure of items
item contains one of the following elements:
| Elements | Data type | Description |
|---|---|---|
| GetSubscriberResponse | {http://agnitas.org/ws/schemas}GetSubscriberResponse | Result for a valid customer ID containing the profile fields |
| Error | {http://agnitas.org/ws/schemas}Error | Result in case of an invalid customer ID |
3.7. GetSubscribersByIds
Namespace: http://agnitas.com/ws/schemas
Returns a list of key value pairs for a list of subscriber IDs. The keys are the names of the profile fields, the values are the corresponding values of the profile fields.
In the case of an invalid customer ID, either a data record with ID 0 can be sent back, or an error element. The sequence of elements is retained, thus allowing the response elements to be assigned to the corresponding request elements.
Existence of profile fields is not checked.
Using this webservice for larger data sets is not recommended. Use export feature of EMM instead.
3.7.1. Request elements
| Element | Data type | Description |
|---|---|---|
| profilefields | Liste von {http://www.w3.org/2001/XMLSchema}string | Optional list of profile fields that are returned by the web service |
| subscriberIDs | Liste von {http://www.w3.org/2001/XMLSchema}int | List of subscriber IDs |
Optional elements:
| Element | Default behavior, if not specified |
|---|---|
| profilefields | Returns all profile fields |
3.7.2. Response elements
| Element | Data type | Description |
|---|---|---|
| subscribers | Liste von subscriber-Elementen | Liste von Empfänger-Informationen |
Structure of subscriber
| Element | Data type | Description |
|---|---|---|
| data | data | Subscriber data |
| error | {http://www.w3.org/2001/XMLSchema}string | Error information |
A subscriber contains only of elements data or error.
Structure of data
| Elemente | Data type | Description |
|---|---|---|
| subscriberID | {http://www.w3.org/2001/XMLSchema}int | Subscriber ID |
| profilefields | {http://agnitas.org/ws/schemas}Map | (Selected) profile fields and values |
3.8. UpdateSubscriber
Namespace: http://agnitas.org/ws/schemas
Either creates or updates a subscriber with the given ID.
Subscriber's attributes that are not present in the request will not be changed. Attributes that do not have correspondent fields in the database are ignored. If an attribute of numeric types holds incorrect value a subscriber updates with 0.
Use the database names for profile fields in the webservice call. These names can be found in the EMM user interface.
3.8.1. Request elements
| Elements | Data type | Description |
|---|---|---|
| customerID | {http://www.w3.org/2001/XMLSchema}int | ID of a customer to update |
| parameters | {http://agnitas.org/ws/schemas}Map | subscriber attributes with values to update to |
Please note, that the XSD data type "string" has to be specified in the request for the elements <key> and <value> of "MapItem".
3.8.2. Response elements
| Element | Data type | Description |
|---|---|---|
| value | {http://www.w3.org/2001/XMLSchema}boolean | always true |
3.9. UpdateSubscriberBulk
Namespace: http://agnitas.org/ws/schemas
Creates or updates a list of subscribers.
Subscriber's attributes that are not present in the request will not be changed. Attributes that do not have a suitable field in the database are ignored. If numeric fields contain invalid values, these are filled with 0.
Use the database names for profile fields in the webservice call. These names can be found in the EMM user interface.
Using this webservice for larger data sets is not recommended. Use import feature of EMM instead.
3.9.1. Request elements
| Elements | Data type | Description |
|---|---|---|
| ignoreErrors | {http://www.w3.org/2001/XMLSchema}boolean | If set to false, processing is aborted at first error |
| items | List of {http://agnitas.org/ws/schemas}UpdateSubscriberRequest | List of subscriber to update |
The elements are structured as items and correspond to the structure of a AddSubscriber call.
Please note, that the XSD data type "string" has to be specified in the request for the elements <key> and <value> of "MapItem".
3.9.2. Response elements
| Element | Data type | Description |
|---|---|---|
| items | List of result elements | Contains result for each subscriber specified in request |
Structure of items
| Element | Data type | Description |
|---|---|---|
| item | Single result element |
Structure of item
item contains one of the following items:
| Elements | Data type | Description |
|---|---|---|
| UpdateSubscriberResponse | {http://agnitas.org/ws/schemas}UpdateSubscriberResponse | Result for a single subscriber |
| Error | {http://agnitas.org/ws/schemas}Error | Result in case of an error in updating the subscriber |
3.10. DeleteSubscriber
Namespace: http://agnitas.org/ws/schemas
Deletes subscribers by their ID.
Important note: This webservice is not suitable for unsubscribe a recipient. This webservices entirely remove all subscriber data and bindings. To unsubscribe a recipient use webservice
SetSubscriberBinding, SetSubscriberBindingBulk or SetSubscriberBindingWithAction.
3.10.1. Request elements
| Element | Data type | Description |
|---|---|---|
| customerID | {http://www.w3.org/2001/XMLSchema}int | 1 or more subscriber ID's to delete |
3.10.2. Response elements
Note: The response has no elements.
3.11. DeleteSubscriberBulk
Namespace: http://agnitas.org/ws/schemas
Deletes the listed subscriber IDs.
The sequence of elements is retained, thus allowing the response elements to be assigned to the corresponding request elements.
Important note: This webservice is not suitable for unsubscribe a recipient. This webservices entirely remove all subscriber data and bindings. To unsubscribe a recipient use webservice
SetSubscriberBinding, SetSubscriberBindingBulk or SetSubscriberBindingWithAction.
Using this webservice for larger data sets is not recommended. Use import feature of EMM instead.
3.11.1. Request elements
| Elements | Data type | Description |
|---|---|---|
| ignoreErrors | {http://www.w3.org/2001/XMLSchema}boolean | If set to false, processing is aborted at first error |
| items | List of {http://agnitas.org/ws/schemas}DeleteSubscriberRequest | List of customer IDs to delete |
The elements are structured as items and correspond to the structure of a DeleteSubscriber call.
3.11.2. Response elements
| Element | Data type | Description |
|---|---|---|
| items | List of result elements | Contains result for each customer ID specified in request |
Structure of items
| Element | Data type | Description |
|---|---|---|
| item | Single result element |
Structure of items
item contains one of the following elements:
| Elements | Data type | Description |
|---|---|---|
| DeleteSubscriberResponse | {http://agnitas.org/ws/schemas}DeleteSubscriberResponse | Successfully deleted subscriber |
| Error | {http://agnitas.org/ws/schemas}Error | Result in case of an invalid customer ID |
3.12. ListSubscribers
Namespace: http://agnitas.org/ws/schemas
The web service returns a list of subscriber Ids matching a set of search criteria.
3.12.1. Request elements
| Element | Data type | Description |
|---|---|---|
| criteria | {http://agnitas.org/ws/schemas}Criteria | Search criteria |
| eql | {http://www.w3.org/2001/XMLSchema}string | Search criterion as EQL expression |
Only one element of "criteria" or "eql" can be used. If both elements are given, "eql" is used. A detailed documentation on EQL can be found in the EMM manual.
Das Feld criteria hat dabei folgenden Aufbau:
| Elements | Data type | Description |
|---|---|---|
| matchAll | {http://www.w3.org/2001/XMLSchema}boolean | Defines, if at least one search criterion must match (value false) or all (value true) |
| equals | Liste von {http://agnitas.org/ws/schemas}Equals | List of search criteria for exact matching |
A search criteria is a key-value pair:
| Elements | Data type | Description |
|---|---|---|
| profilefield | {http://www.w3.org/2001/XMLSchema}string | Name of profile field |
| value | {http://www.w3.org/2001/XMLSchema}string | Value of profile field |
| dateformat | {http://www.w3.org/2001/XMLSchema}string | Date format of value (only relevant for date fields) |
The date format uses Java-format tags:
| Format tag | Description |
|---|---|
| yyyy | Year (4 digits) |
| yy | Year (2 digits) |
| MM | Month (numeric, 2 digits), for example: 06 for June |
| dd | Day of month (2 digits) |
| HH | Hour (24 hour format, 2 digits) |
| mm | Minutes (2 digits) |
| ss | Seconds (2 digits) |
| Z | Timezone as offset value (according to RFC822, z.B. -0700) |
| z | Timezone (z.B. CEST, GMT+08:00) |
Optional element:
| Element | Default behavior, if not specified |
|---|---|
| dateformat (Equals) | For date fields, this element is mandatory. If missing, a SOAP FAULT is returned. |
3.12.2. Response elements
| Element | Data type | Description |
|---|---|---|
| customerID | List of {http://www.w3.org/2001/XMLSchema}int | List of subscriber Ids matching given search criteria |
3.12.3. SOAP Faults
A Soap Fault with error message is returned in case of an error.