In the Subscribe and Unsubscribe action requests:
- Email must be the first entry
- ID must be the second entry
- The <ID> tag must be in UPPERCASE
<Subscriber>
<Email>test2@example.com</Email>
<ID>2</ID>
</Subscriber>
Subscribe
This document facilitates the management of Informz subscribers.
- It is designed for infrequent subscriber data updates.
- If you expect to be regularly updating subscriber data, Informz recommends the BulkUpload method.
- This document is processed synchronously.
The InterestAction element has two options:
- AddOrUpdateSubscribers
- ReplaceAllSubscribers
Request
<ActionRequest xmlns="http://partner.informz.net/aapi/2009/08/">
<Brand id="9999">Test Brand</Brand>
<User></User>
<Actions>
<Subscribe>
<InterestDetails>
<InterestNames>
<InterestName>Sample Interest 1</InterestName>
<InterestName>Sample Interest 2</InterestName>
</InterestNames>
<InterestAction>ReplaceAllSubscribers</InterestAction>
</InterestDetails>
<SubscriberData>
<FieldDefinitions>
<FieldDefinition>
<Name>First_Name</Name>
<DataType>String</DataType>
<DefaultValue>Customer</DefaultValue>
</FieldDefinition>
<FieldDefinition>
<Name>Last_Name</Name>
<DataType>String</DataType>
<DefaultValue>McCustomer</DefaultValue>
</FieldDefinition>
</FieldDefinitions>
<Subscribers>
<Subscriber>
<Email>steve@example.com</Email>
<ID>321</ID>
<Fields>
<Field element="First_Name">Steve</Field>
<Field element="Last_Name">Sanders</Field>
</Fields>
</Subscriber>
<Subscriber>
<Email>mary@example.com</Email>
<ID>6612</ID>
<Fields>
<Field element="First_Name">Mary</Field>
<Field element="Last_Name">Lamb</Field>
</Fields>
</Subscriber>
<Subscriber>
<Email>chuck@example.com</Email>
<ID>5143</ID>
<Fields>
<Field element="First_Name">Chuck</Field>
<Field element="Last_Name">Norris</Field>
</Fields>
</Subscriber>
</Subscribers>
</SubscriberData>
</Subscribe>
</Actions>
</ActionRequest
Details
| Node | Type | Description |
|---|---|---|
| <Email> | String | The email address that you want to add as a subscriber record in your account (100-character max.) |
| <ID> | Int | The unique ID in the AMS/CRM database that is associated with the specified email address |
Notes
- Email address does not have to be unique within Informz.
- Both elements are required.
- Incoming email addresses are converted to all lowercase.
- Subscriber records that cannot be created are presented within the <InvalidSubscribers> tag.
Response (with No Invalid Email Addresses)
<?xml version="1.0" encoding="utf-16"?>
<ActionResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://partner.informz.net/aapi/2009/08/">
<Brand id=“0”>Brand1</Brand>
<User></User>
<Responses>
<Subscribe>
<Count>0</Count>
<ActionStatus>
<Status>success</Status>
<Message xsi:type="xsd:string">3 total records:
3 added.
0 previous subscribers.
0 previous unsubscribers.
0 duplicate subscribers.
0 invalid addresses.</Message>
</ActionStatus>
<InvalidSubscribers />
</Subscribe>
</Responses>
</ActionResponse>
Unsubscribe
Returns unsubscribe count and unsubscribe status with reason.
Details
| Node | Type | Description |
|---|---|---|
| <Email> | String | The email address that of the subscriber record that you want to unsubscribe |
| <ID> | Int | The unique ID in the AMS/CRM database that is associated with the specified email address |
| <UnsubscribeReason> | String | The reason for the unsubscribe action |
Request
<?xml version="1.0" encoding="utf-8"?>
<ActionRequest xmlns="http://partner.informz.net/aapi/2009/08/">
<Brand id="9999">Test Brand</Brand>
<User></User>
<Password></Password>
<Actions>
<Unsubscribe>
<Subscribers>
<Subscriber>
<Email>test1@example.com</Email>
<ID>1</ID>
<UnsubscribeReason>Unsubscribe reason 1</UnsubscribeReason>
</Subscriber>
<Subscriber>
<Email>test2@example.com</Email>
<ID>2</ID>
<UnsubscribeReason>Unsubscribe reason 2</UnsubscribeReason>
</Subscriber>
<Subscriber>
<Email>test3@example.com</Email>
<ID>3</ID>
<UnsubscribeReason>Unsubscribe reason 3</UnsubscribeReason>
</Subscriber>
</Subscribers>
</Unsubscribe>
</Actions>
</ActionRequest
Response
<?xml version="1.0" encoding="utf-16"?>
<ActionResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://partner.informz.net/aapi/2009/08/">
<Brand id="9999">Test Brand</Brand>
<User></User>
<Responses>
<Unsubscribe>
<Count>3</Count>
<ActionStatus>
<Status>success</Status>
<Message xsi:type="xsd:string">3 email addresses unsubscribed.</Message>
</ActionStatus>
</Unsubscribe>
</Responses>
</ActionResponse>
Notes
- If the ID is not provided, and there is only one matching email address, it is unsubscribed. If there is more than one matching email address, an exception is returned.
- If UnsubscribeReason is not provided, a default reason ("Unsubscribed via Informz Web Service") is written to the database table.
Opt Out
This document facilitates removing a subscriber from one or more Interests.
<ActionRequest xmlns="http://partner.informz.net/aapi/2009/08/">
<Brand id="0"></Brand>
<User></User>
<Actions>
<Optout>
<InterestNames>
<InterestName>Sample Interest 1</InterestName>
<InterestName>Sample Interest 2</InterestName>
</InterestNames>
<Subscribers>
<Subscriber>
<Email>mike@example.com</Email>
<ID>8462</ID>
</Subscriber>
<Subscriber>
<Email>ann@example.com</Email>
<ID>384</ID>
</Subscriber>
<Subscriber>
<Email>jim@example.com</Email>
<ID>6324</ID>
</Subscriber>
</Subscribers>
</Optout>
</Actions>
</ActionRequest>
Notes
- The <InterestName> is required. Not including it in the document will result in an error.
- All <InterestName> values must exist in Informz in order for the document to process.
- At least one <Email> is required. Not including it in the document will result in an error.
- If malformed emails are provided, they will be ignored. The total count reported back will include these as having been processed.
- If an email address is not found in the interest, it will be reported as having been processed. These are not identified as errors.