Subscriber lists – management
Controlled is used for management of subscriber lists. It enables adding, listing and deleting such lists..
Creating lists
Function is used for subscriber lists. It returns a hash which can be further used.
Recall:
/rest/subscribers_list/create
Data:
name | Required | Name of subscriber list | |
---|---|---|---|
description | Optional | Description of subscriber list | |
custom_fields | Optional | Table defining custom fields (according to a description from Creating custom fields on lists) |
Returned data:
hash | Hash of a new subscriber list | |
---|---|---|
custom_fields | Table with full description of created fields - it they were t be created. |
Error codes:
1601 | Empty value in name field | |
---|---|---|
1602 | Failed to create subscriber list | |
1603 | Incorrect list of custom fields. | |
1604 | Personalization tag should consist of only letters, digits and underscore. | |
1605 | Incorrect field type. |
Modifying lists
Function is used for modification of subscriber lists.
Recall:
/rest/subscribers_list/update
Data:
hash | Required | Hash of subscription list | |
---|---|---|---|
name | Required | Name of subscription list | |
description | Optional | Description of subscription list |
Error codes:
1611 | Empty value in name field or no parameter | |
---|---|---|
1604 | No rights to this list |
Deleting lists
Function is used for deleting subscriber lists.
Recall:
/rest/subscribers_list/delete
Data:
hash | Required | Hash of subscriber list |
---|
Error codes:
1604 | No rights for this list | |
---|---|---|
1605 | Failed to delete subscriber list |
Downloading data concerning lists
Function is used for listing all subscriber lists. It returns tables with data concerning all lists which the account is authorized to.
Recall:
/rest/subscribers_list/lists
Returned data:
hash | Hash of subscriber list | |
---|---|---|
name | Name of subscriber list | |
description | Description of subscriber list | |
creation_date | Subscriber list creation date | |
subscribers_number | Number of current subscribers |
Creating custom fields on lists
Function is used for creating custom fields on subscriber lists.
Recall:
/rest/subscribers_list/addField
Data:
hash | Required | Hash of subscription list | |
---|---|---|---|
name | Required | Field name on the list | |
tag | Optiona | Tag under which the values from this field will be available in e-mails (in case of no such tag, it will be created according to a name of the field) | |
type | Optional | Field type – 0 text, 1 numerical (default: text) |
Returned data:
id_hash | Hash of custom field | |
---|---|---|
field_name | Name of custom field | |
personalization_tag | Tag under which the values from this field will be available in e-mails | |
field_type | Field type – 0 text, 1 numerical (default: text) |
Error codes:
1622 | Incorrect or empty hash of subscriber list | |
---|---|---|
1623 | Incorrect or empty field name | |
1624 | Incorrect tag name | |
1625 | Incorrect field type | |
1626 | Custom field with this tag already exists |
Displaying a list of custom fields on a particular list
Function is used for displaying all custom fields on a selected subscriber list.
Recall:
/rest/subscribers_list/getFields
Date:
hash | Required | Hash of custom field |
---|
Returned data:
hash | Hash of custom field | |
---|---|---|
name | Name of custom field | |
tag | Tag under which the values from this field will be available in e-mails |
Error codes:
1632 |
Incorrect or empty hash of subscriber list |
---|