CSAPI(Account) Category Reference
Declared in | CSAPI+Account.h |
Tasks
-
– getAPIKeyWithSiteURL:username:password:completionHandler:errorHandler:
Allows a client or designer to retrieve their API key, given their username, password, and site URL.
-
– getClients:errorHandler:
Get a list of all the clients in your account, including their name & ID.
-
– getBillingDetails:errorHandler:
Returns billing details for your account, including the number of credits in your account.
-
– getCountries:errorHandler:
Get a list of valid countries.
-
– getTimezones:errorHandler:
Get a list of valid timezones.
-
– getSystemDate:errorHandler:
Get the current time.
-
– addAdministratorWithName:emailAddress:completionHandler:errorHandler:
Adds a new administrator to the account. An invitation will be sent to the new administrator via email
-
– updateAdministratorWithEmailAddress:name:newEmailAddress:completionHandler:errorHandler:
Updates the email address and/or name of an administrator.
-
– getAdministrators:errorHandler:
Contains a list of all (active or invited) administrators associated with a particular account.
-
– getAdministratorWithEmailAddress:completionHandler:errorHandler:
Returns the details of a single administrator associated with an account.
-
– deleteAdministratorWithEmailAddress:completionHandler:errorHandler:
Changes the status of an active administrator to a deleted administrator. They will no longer be able to log into this account
-
– setPrimaryContactWithEmailAddress:completionHandler:errorHandler:
Sets the primary contact for the account to be the administrator with the specified email address.
-
– getPrimaryContact:errorHandler:
Returns the email address of the administrator who is selected as the primary contact for this account.
-
– getExternalSessionUrl:chrome:url:integratorID:clientID:completionHandler:errorHandler:
Returns a URL which initiates a new external session for the user with the given email address.
Instance Methods
addAdministratorWithName:emailAddress:completionHandler:errorHandler:
Adds a new administrator to the account. An invitation will be sent to the new administrator via email
- (void)addAdministratorWithName:(NSString *)name emailAddress:(NSString *)emailAddress completionHandler:(void ( ^ ) ( NSString *administratorEmailAddress ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- name
Name of the person
- emailAddress
Email address of the person
- completionHandler
Completion callback, with email address of the administrator as the only argument
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/account/#adding_an_admin
Declared In
CSAPI+Account.h
deleteAdministratorWithEmailAddress:completionHandler:errorHandler:
Changes the status of an active administrator to a deleted administrator. They will no longer be able to log into this account
- (void)deleteAdministratorWithEmailAddress:(NSString *)emailAddress completionHandler:(void ( ^ ) ( void ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- emailAddress
The email address of the administrator to be deleted.
- completionHandler
Completion callback
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/account/#deleting_an_admin
Declared In
CSAPI+Account.h
getAPIKeyWithSiteURL:username:password:completionHandler:errorHandler:
Allows a client or designer to retrieve their API key, given their username, password, and site URL.
- (void)getAPIKeyWithSiteURL:(NSString *)siteURL username:(NSString *)username password:(NSString *)password completionHandler:(void ( ^ ) ( NSString *APIKey ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- siteURL
The base URL of the CreateSend site. e.g. http://example.createsend.com/.
- username
The username for the account
- password
The password for the account
- completionHandler
Completion callback, with the API Key as the first and only argument
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/account/#getting_your_api_key
Declared In
CSAPI+Account.h
getAdministratorWithEmailAddress:completionHandler:errorHandler:
Returns the details of a single administrator associated with an account.
- (void)getAdministratorWithEmailAddress:(NSString *)emailAddress completionHandler:(void ( ^ ) ( CSAdministrator *administrator ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- emailAddress
The email address of the administrator whose information should be retrieved.
- completionHandler
Completion callback, with a
CSAdministrator
as the only argument.
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/account/#getting_account_admin
Declared In
CSAPI+Account.h
getAdministrators:errorHandler:
Contains a list of all (active or invited) administrators associated with a particular account.
- (void)getAdministrators:(void ( ^ ) ( NSArray *administrators ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- completionHandler
Completion callback, with an array of
CSAdministrator
objects as the first and only argument
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/account/#getting_account_admins
Declared In
CSAPI+Account.h
getBillingDetails:errorHandler:
Returns billing details for your account, including the number of credits in your account.
- (void)getBillingDetails:(void ( ^ ) ( CSBillingDetails *billingDetails ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- completionHandler
Completion callback, including a
CSBillingDetails
object as the first and only argument
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/account/#getting_your_billing_details
Declared In
CSAPI+Account.h
getClients:errorHandler:
Get a list of all the clients in your account, including their name & ID.
- (void)getClients:(void ( ^ ) ( NSArray *clients ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- completionHandler
Completion callback, with an array of
CSClient
objects as the first and only argument
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/account/#getting_your_clients
Declared In
CSAPI+Account.h
getCountries:errorHandler:
Get a list of valid countries.
- (void)getCountries:(void ( ^ ) ( NSArray *countries ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- completionHandler
Completion callback, including a list of country names as an
NSArray
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/account/#getting_valid_countries
See Also
Declared In
CSAPI+Account.h
getExternalSessionUrl:chrome:url:integratorID:clientID:completionHandler:errorHandler:
Returns a URL which initiates a new external session for the user with the given email address.
- (void)getExternalSessionUrl:(NSString *)email chrome:(NSString *)chrome url:(NSString *)url integratorID:(NSString *)integratorID clientID:(NSString *)clientID completionHandler:(void ( ^ ) ( NSString *sessionUrl ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
The email address of the Campaign Monitor user for whom the login session should be created.
- chrome
Which ‘chrome’ to display – Must be either “all”, “tabs”, or “none”.
- url
The URL to display once logged in. e.g. “/subscribers/”
- integratorID
The integrator ID. You need to contact Campaign Monitor support to get an integrator ID.
- clientID
The Client ID of the client which should be active once logged in to the Campaign Monitor account.
- completionHandler
Completion callback, with the session URL as the only argument
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/account/#single_sign_on
Declared In
CSAPI+Account.h
getPrimaryContact:errorHandler:
Returns the email address of the administrator who is selected as the primary contact for this account.
- (void)getPrimaryContact:(void ( ^ ) ( NSString *primaryContactEmailAddress ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- completionHandler
Completion callback, with email address of the primary contact as the only argument
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/account/#getting_primary_contact
Declared In
CSAPI+Account.h
getSystemDate:errorHandler:
Get the current time.
- (void)getSystemDate:(void ( ^ ) ( NSDate *systemDate ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- completionHandler
Completion callback, including the current time as an
NSDate
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/account/#getting_the_current_date
See Also
Declared In
CSAPI+Account.h
getTimezones:errorHandler:
Get a list of valid timezones.
- (void)getTimezones:(void ( ^ ) ( NSArray *timezones ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- completionHandler
Completion callback, including a list of timezone names as an
NSArray
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/account/#getting_valid_timezones
See Also
Declared In
CSAPI+Account.h
setPrimaryContactWithEmailAddress:completionHandler:errorHandler:
Sets the primary contact for the account to be the administrator with the specified email address.
- (void)setPrimaryContactWithEmailAddress:(NSString *)emailAddress completionHandler:(void ( ^ ) ( NSString *primaryContactEmailAddress ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- emailAddress
The email address of the administrator to be assigned as the primary contact for the account.
- completionHandler
Completion callback, with email address of the primary contact as the only argument
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/account/#setting_primary_contact
Declared In
CSAPI+Account.h
updateAdministratorWithEmailAddress:name:newEmailAddress:completionHandler:errorHandler:
Updates the email address and/or name of an administrator.
- (void)updateAdministratorWithEmailAddress:(NSString *)currentEmailAddress name:(NSString *)name newEmailAddress:(NSString *)newEmailAddress completionHandler:(void ( ^ ) ( NSString *administratorEmailAddress ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- currentEmailAddress
The email address of the admin whose details will be updated. This is regarded as the ‘old’ email address.
- name
Name of the administrator
- newEmailAddress
New email address of the person
- completionHandler
Completion callback, with email address of the administrator as the only argument
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/account/#updating_an_admin
Declared In
CSAPI+Account.h