CSAPI(Subscribers) Category Reference
Declared in | CSAPI+Subscribers.h |
Tasks
-
– subscribeToListWithID:emailAddress:name:shouldResubscribe:customFields:completionHandler:errorHandler:
Adds a subscriber to an existing subscriber list, including custom field data if provided. If the subscriber (email address) already exists, their name and any custom field values are updated.
-
– updateSubscriptionWithListID:currentEmailAddress:newEmailAddress:name:shouldResubscribe:customFields:completionHandler:errorHandler:
Update an existing subscriber, including email address, name, and custom field data if supplied.
-
– unsubscribeFromListWithID:emailAddress:completionHandler:errorHandler:
Change the status of a subscriber from
Active
toUnsubscribed
. -
– getSubscriberDetailsWithListID:emailAddress:completionHandler:errorHandler:
Get a subscribers details including their email address, name, active/inactive state and any custom field data.
-
– getSubscriberHistoryWithListID:emailAddress:completionHandler:errorHandler:
Get a list of all campaigns or autoresponder emails, to which a subscriber has made some trackable action. For each campaign or autoresponder email, all actions are provided, including the event type, date and IP address from which the event occurred.
-
– importSubscribersToListWithID:subscribers:shouldResubscribe:shouldQueueSubscriptionBasedAutoresponders:shouldRestartSubscriptionBasedAutoresponders:completionHandler:errorHandler:
Import many subscribers into a subscriber list, including any custom field data if provided.
Instance Methods
getSubscriberDetailsWithListID:emailAddress:completionHandler:errorHandler:
Get a subscribers details including their email address, name, active/inactive state and any custom field data.
- (void)getSubscriberDetailsWithListID:(NSString *)listID emailAddress:(NSString *)emailAddress completionHandler:(void ( ^ ) ( CSSubscriber *subscriber ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- listID
The ID of the subscriber list to which the subscriber belongs
- emailAddress
The ID of the subscriber whose details should be retrieved
- completionHandler
Completion callback, with a
CSSubscriber
instance as the first and only argument.
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/subscribers/#getting_a_subscribers_details
Declared In
CSAPI+Subscribers.h
getSubscriberHistoryWithListID:emailAddress:completionHandler:errorHandler:
Get a list of all campaigns or autoresponder emails, to which a subscriber has made some trackable action. For each campaign or autoresponder email, all actions are provided, including the event type, date and IP address from which the event occurred.
- (void)getSubscriberHistoryWithListID:(NSString *)listID emailAddress:(NSString *)emailAddress completionHandler:(void ( ^ ) ( NSArray *historyItems ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- listID
The ID of the subscriber list to which the subscriber belongs
- emailAddress
The email address of the subscriber whose history should be retrieved
- completionHandler
Completion callback, with an array of
CSSubscriberHistoryItem
objects
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/subscribers/#getting_a_subscribers_history
Declared In
CSAPI+Subscribers.h
importSubscribersToListWithID:subscribers:shouldResubscribe:shouldQueueSubscriptionBasedAutoresponders:shouldRestartSubscriptionBasedAutoresponders:completionHandler:errorHandler:
Import many subscribers into a subscriber list, including any custom field data if provided.
- (void)importSubscribersToListWithID:(NSString *)listID subscribers:(NSArray *)subscribers shouldResubscribe:(BOOL)shouldResubscribe shouldQueueSubscriptionBasedAutoresponders:(BOOL)shouldQueueSubscriptionBasedAutoresponders shouldRestartSubscriptionBasedAutoresponders:(BOOL)shouldRestartSubscriptionBasedAutoresponders completionHandler:(void ( ^ ) ( CSSubscriberImportResult *subscriberImportResult ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- listID
The ID of the subscriber list to which the subscribers should be added
- subscribers
An array of
CSSubscriber
objects
- shouldResubscribe
Whether or not to resubscribe inactive subscribers
- shouldQueueSubscriptionBasedAutoresponders
By default, Autoresponder emails that are based on the subscription date will not be sent for subscribers imported with this method. This can be overridden by setting the shouldQueueSubscriptionBasedAutoResponders parameter to true.
- shouldRestartSubscriptionBasedAutoresponders
By default, resubscribed subscribers will not restart any subscription-based autoresponder sequences, but they will receive any remaining emails. However, if you specify the shouldRestartSubscriptionBasedAutoresponders input value as true, any sequences will be restarted.
- completionHandler
Completion callback, with a
CSSubscriberImportResult
object containing information about the import.
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/subscribers/#importing_many_subscribers
Declared In
CSAPI+Subscribers.h
subscribeToListWithID:emailAddress:name:shouldResubscribe:customFields:completionHandler:errorHandler:
Adds a subscriber to an existing subscriber list, including custom field data if provided. If the subscriber (email address) already exists, their name and any custom field values are updated.
- (void)subscribeToListWithID:(NSString *)listID emailAddress:(NSString *)emailAddress name:(NSString *)name shouldResubscribe:(BOOL)shouldResubscribe customFields:(NSArray *)customFields completionHandler:(void ( ^ ) ( NSString *subscribedAddress ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- listID
The ID of the subscriber list to which the subscriber should be added
- emailAddress
Email address of the subscriber
- name
Name of the subscriber
- shouldResubscribe
Whether to resubscribe subscribers in the inactive or unsubscribed state
- customFields
An array of
CSCustomField
objects
- completionHandler
Completion callback, with the email address of the new subscriber as the first and only argument
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/subscribers/#adding_a_subscriber
Declared In
CSAPI+Subscribers.h
unsubscribeFromListWithID:emailAddress:completionHandler:errorHandler:
Change the status of a subscriber from Active
to Unsubscribed
.
- (void)unsubscribeFromListWithID:(NSString *)listID emailAddress:(NSString *)emailAddress completionHandler:(void ( ^ ) ( void ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- listID
The ID of the subscriber list from which the subscriber should be unsubscribed
- emailAddress
Email address of the subscriber you’d like to unsubscribe
- completionHandler
Completion callback
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/subscribers/#unsubscribing_a_subscriber
Declared In
CSAPI+Subscribers.h
updateSubscriptionWithListID:currentEmailAddress:newEmailAddress:name:shouldResubscribe:customFields:completionHandler:errorHandler:
Update an existing subscriber, including email address, name, and custom field data if supplied.
- (void)updateSubscriptionWithListID:(NSString *)listID currentEmailAddress:(NSString *)currentEmailAddress newEmailAddress:(NSString *)newEmailAddress name:(NSString *)name shouldResubscribe:(BOOL)shouldResubscribe customFields:(NSArray *)customFields completionHandler:(void ( ^ ) ( void ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- listID
The ID of the subscriber list containing the subscriber you’d like to update
- currentEmailAddress
Existing email address of the subscriber
- newEmailAddress
New email address of the subscriber
- name
New name of the subscriber
- shouldResubscribe
Whether or not to resubscribe inactive subscribers
- customFields
An array of
CSCustomField
objects to update
- completionHandler
Coompletion callback
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/subscribers/#updating_a_subscriber
Declared In
CSAPI+Subscribers.h