CSAPI(Clients) Category Reference
Declared in | CSAPI+Clients.h |
Tasks
-
– createClientWithCompanyName:country:timezone:completionHandler:errorHandler:
Create a new client in your account with basic information and no access to the application.
-
– updateClientWithClientID:companyName:country:timezone:completionHandler:errorHandler:
Update the basic account details for an existing client in your account.
-
– deleteClientWithID:completionHandler:errorHandler:
Delete an existing client from your account.
-
– setClientPAYGBillingSettingsWithClientID:currency:canPurchaseCredits:clientPays:markupPercentage:markupOnDelivery:markupPerRecipient:markupOnDesignSpamTest:completionHandler:errorHandler:
Set if a client can pay for their own campaigns and design and spam tests using our PAYG billing. Set the mark-up percentage on each type of fee, and if the client can purchase their own email credits to access bulk discounts.
-
– setClientMonthlyBillingWithClientID:currency:clientPays:markupPercentage:monthlyScheme:completionHandler:errorHandler:
Set if a client can pay for their own campaigns and design and spam tests using our monthly billing. Set the currency they should pay in plus mark-up percentage that will apply to the base prices at each pricing tier.
-
– transferCreditsWithClientID:credits:canUseMyCreditsWhenTheyRunOut:completionHandler:errorHandler:
Transfer credits from your account to a client, or transfer credits from a client to your account. The credits parameter should be either a positive integer if you wish to allocate credits from your account to the client, or a negative integer if you wish to deduct credits from the client back into your account.
-
– getClientDetailsWithClientID:completionHandler:errorHandler:
Get the complete details for a client including their API key, access level, contact details and billing settings.
-
– getSentCampaignsWithClientID:completionHandler:errorHandler:
Get a list of all sent campaigns for a client.
-
– getScheduledCampaignsWithClientID:completionHandler:errorHandler:
Get a list of all currently scheduled campaigns for a client.
-
– getDraftCampaignsWithClientID:completionHandler:errorHandler:
Get a list of all draft campaigns belonging to a client.
-
– getSubscriberListsWithClientID:completionHandler:errorHandler:
Get all the subscriber lists that belong to a client.
-
– getSubscriberListsForEmailAddressWithClientID:emailAddress:completionHandler:errorHandler:
Get all the subscriber lists across the client, to which an email address is subscribed.
-
– getSuppressionListWithClientID:page:pageSize:orderField:ascending:completionHandler:errorHandler:
Get a paged result representing the client’s suppression list.
-
– suppressEmailAddressesWithClientID:emailAddresses:completionHandler:errorHandler:
Adds email addresses to the client’s suppression list.
-
– unsuppressEmailAddressWithClientID:emailAddress:completionHandler:errorHandler:
Unsuppress an email addresses (remove the email address from the client’s suppression list).
-
– getSegmentsWithClientID:completionHandler:errorHandler:
Get a list of all segments belonging to a particular client.
-
– getTemplatesWithClientID:completionHandler:errorHandler:
Get a list of all templates belonging to a particular client.
-
– addPersonWithClientID:name:emailAddress:password:accessLevel:completionHandler:errorHandler:
Adds a new person to the client with the specified access.
-
– updatePersonWithClientID:name:currentEmailAddress:newEmailAddress:password:accessLevel:completionHandler:errorHandler:
Updates any aspect of a person including their email address, name and access level.
-
– getPeopleWithClientID:completionHandler:errorHandler:
Get all the (active or invited) people associated with a particular client
-
– getPersonDetailsWithClientID:emailAddress:completionHandler:errorHandler:
Returns the details of a single person associated with a client.
-
– deletePersonWithClientID:emailAddress:completionHandler:errorHandler:
Changes the status of an active person to a deleted person. They will no longer be able to log into this client.
-
– setPrimaryContactWithClientID:emailAddress:completionHandler:errorHandler:
Sets the primary contact for the client to be the person with the specified email address.
-
– getPrimaryContactWithClientID:completionHandler:errorHandler:
Returns the email address of the person who is selected as the primary contact for this client.
Instance Methods
addPersonWithClientID:name:emailAddress:password:accessLevel:completionHandler:errorHandler:
Adds a new person to the client with the specified access.
- (void)addPersonWithClientID:(NSString *)clientID name:(NSString *)name emailAddress:(NSString *)emailAddress password:(NSString *)password accessLevel:(NSUInteger)accessLevel completionHandler:(void ( ^ ) ( NSString *personEmailAddress ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- clientID
The ID of the client to add the person to
- name
Name of the person
- emailAddress
Primary email address of the person
- password
Optional password for the person
- accessLevel
Access level as per documentation listed in discussion
- completionHandler
Completion callback, with email address of the successfully added person as the only argument
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/clients/#adding_a_person
Declared In
CSAPI+Clients.h
createClientWithCompanyName:country:timezone:completionHandler:errorHandler:
Create a new client in your account with basic information and no access to the application.
- (void)createClientWithCompanyName:(NSString *)companyName country:(NSString *)country timezone:(NSString *)timezone completionHandler:(void ( ^ ) ( NSString *clientID ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- companyName
Company name of the new client
- country
Country (see getCountries:errorHandler:)
- timezone
Timezone (see getTimezones:errorHandler:)
- completionHandler
Completion callback, with ID of the successfully created client as the only argument
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/clients/#creating_a_client
Declared In
CSAPI+Clients.h
deleteClientWithID:completionHandler:errorHandler:
Delete an existing client from your account.
- (void)deleteClientWithID:(NSString *)clientID completionHandler:(void ( ^ ) ( void ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- clientID
The ID of the client to be deleted
- completionHandler
Completion callback
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/clients/#deleting_a_client
Declared In
CSAPI+Clients.h
deletePersonWithClientID:emailAddress:completionHandler:errorHandler:
Changes the status of an active person to a deleted person. They will no longer be able to log into this client.
- (void)deletePersonWithClientID:(NSString *)clientID emailAddress:(NSString *)emailAddress completionHandler:(void ( ^ ) ( void ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- clientID
The ID of the client for which the person details should be deleted.
- emailAddress
The email address of the person to be deleted.
- completionHandler
Completion callback
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/clients/#deleting_a_person
Declared In
CSAPI+Clients.h
getClientDetailsWithClientID:completionHandler:errorHandler:
Get the complete details for a client including their API key, access level, contact details and billing settings.
- (void)getClientDetailsWithClientID:(NSString *)clientID completionHandler:(void ( ^ ) ( CSClient *client ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- clientID
The ID of the client to be retrieved
- completionHandler
Completion callback, with a
CSClient
object as the first and only argument
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/clients/#client_details
Declared In
CSAPI+Clients.h
getDraftCampaignsWithClientID:completionHandler:errorHandler:
Get a list of all draft campaigns belonging to a client.
- (void)getDraftCampaignsWithClientID:(NSString *)clientID completionHandler:(void ( ^ ) ( NSArray *campaigns ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- clientID
The ID of the client for which draft campaigns should be retrieved
- completionHandler
Completion callback, with an array of
CSCampaign
objects as the first and only argument.
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/clients/#draft_campaigns
Declared In
CSAPI+Clients.h
getPeopleWithClientID:completionHandler:errorHandler:
Get all the (active or invited) people associated with a particular client
- (void)getPeopleWithClientID:(NSString *)clientID completionHandler:(void ( ^ ) ( NSArray *people ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- clientID
The ID of the client for which the people should be retrieved
- completionHandler
Completion callback, with an array of
CSPerson
objects as the first and only argument
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/clients/#getting_client_people
Declared In
CSAPI+Clients.h
getPersonDetailsWithClientID:emailAddress:completionHandler:errorHandler:
Returns the details of a single person associated with a client.
- (void)getPersonDetailsWithClientID:(NSString *)clientID emailAddress:(NSString *)emailAddress completionHandler:(void ( ^ ) ( CSPerson *person ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- clientID
The ID of the client for which the person details should be retrieved
- emailAddress
The email address of the person whose information should be retrieved.
- completionHandler
Completion callback, with a
CSPerson
as the only argument.
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/clients/#getting_client_person
Declared In
CSAPI+Clients.h
getPrimaryContactWithClientID:completionHandler:errorHandler:
Returns the email address of the person who is selected as the primary contact for this client.
- (void)getPrimaryContactWithClientID:(NSString *)clientID completionHandler:(void ( ^ ) ( NSString *primaryContactEmailAddress ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- clientID
The ID of the client for which the primary contact is to be set.
- completionHandler
Completion callback, with email address of the primary contact as the only argument
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/clients/#getting_primary_contact
Declared In
CSAPI+Clients.h
getScheduledCampaignsWithClientID:completionHandler:errorHandler:
Get a list of all currently scheduled campaigns for a client.
- (void)getScheduledCampaignsWithClientID:(NSString *)clientID completionHandler:(void ( ^ ) ( NSArray *campaigns ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- clientID
The ID of the client for which scheduled campaigns should be retrieved
- completionHandler
Completion callback, with an array of
CSCampaign
objects as the first and only argument.
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/clients/#scheduled_campaigns
Declared In
CSAPI+Clients.h
getSegmentsWithClientID:completionHandler:errorHandler:
Get a list of all segments belonging to a particular client.
- (void)getSegmentsWithClientID:(NSString *)clientID completionHandler:(void ( ^ ) ( NSArray *segments ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- clientID
The ID of the client for which segments should be retrieved
- completionHandler
Completion callback, with an array of
CSSegment
objects as the first and only argument
- errorHandler
Error callback
Discussion
Declared In
CSAPI+Clients.h
getSentCampaignsWithClientID:completionHandler:errorHandler:
Get a list of all sent campaigns for a client.
- (void)getSentCampaignsWithClientID:(NSString *)clientID completionHandler:(void ( ^ ) ( NSArray *campaigns ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- clientID
The ID of the client for which sent campaigns should be retrieved
- completionHandler
Completion callback, with an array of
CSCampaign
objects as the first and only argument.
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/clients/#sent_campaigns
Declared In
CSAPI+Clients.h
getSubscriberListsForEmailAddressWithClientID:emailAddress:completionHandler:errorHandler:
Get all the subscriber lists across the client, to which an email address is subscribed.
- (void)getSubscriberListsForEmailAddressWithClientID:(NSString *)clientID emailAddress:(NSString *)emailAddress completionHandler:(void ( ^ ) ( NSArray *subscriberLists ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- clientID
The ID of the client for which lists should be retrieved
- emailAddress
The email address for which lists should be retrieved
- completionHandler
Completion callback, with an array of
CSListForSubscriber
objects as the first and only argument
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/clients/#lists_for_email
Declared In
CSAPI+Clients.h
getSubscriberListsWithClientID:completionHandler:errorHandler:
Get all the subscriber lists that belong to a client.
- (void)getSubscriberListsWithClientID:(NSString *)clientID completionHandler:(void ( ^ ) ( NSArray *subscriberLists ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- clientID
The ID of the client for which subscriber lists should be retrieved
- completionHandler
Completion callback, with an array of
CSList
objects as the first and only argument
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/clients/#subscriber_lists
Declared In
CSAPI+Clients.h
getSuppressionListWithClientID:page:pageSize:orderField:ascending:completionHandler:errorHandler:
Get a paged result representing the client’s suppression list.
- (void)getSuppressionListWithClientID:(NSString *)clientID page:(NSUInteger)page pageSize:(NSUInteger)pageSize orderField:(NSString *)orderField ascending:(BOOL)ascending completionHandler:(void ( ^ ) ( CSPaginatedResult *paginatedResult ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- clientID
The ID of the client for which the suppression list should be retrieved
- page
The page to retrieve
- pageSize
The number of records to retrieve per page. Values accepted are between
10
and1000
.
- orderField
The field which should be used to order the result. Values accepted are
email
,name
ordate
.
- ascending
Whether to sort the list (see
orderField
) in ascending order
- completionHandler
Completion callback, with a
CSPaginatedResult
as the first and only argument. Items in the result list areCSSuppressedRecipient
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/clients/#suppression_list
Declared In
CSAPI+Clients.h
getTemplatesWithClientID:completionHandler:errorHandler:
Get a list of all templates belonging to a particular client.
- (void)getTemplatesWithClientID:(NSString *)clientID completionHandler:(void ( ^ ) ( NSArray *templates ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- clientID
The ID of the client for which templates should be retrieved
- completionHandler
Completion callback, with an array of
CSTemplate
objects as the first and only argument
- errorHandler
Error callback
Discussion
Declared In
CSAPI+Clients.h
setClientMonthlyBillingWithClientID:currency:clientPays:markupPercentage:monthlyScheme:completionHandler:errorHandler:
Set if a client can pay for their own campaigns and design and spam tests using our monthly billing. Set the currency they should pay in plus mark-up percentage that will apply to the base prices at each pricing tier.
- (void)setClientMonthlyBillingWithClientID:(NSString *)clientID currency:(NSString *)currency clientPays:(BOOL)clientPays markupPercentage:(float)markupPercentage monthlyScheme:(NSString *)monthlyScheme completionHandler:(void ( ^ ) ( void ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- clientID
The ID of the client for which monthly billing settings should be set
- currency
The currency to bill in. Values accepted are:
USD
(US Dollars)GBP
(Great Britain Pounds)EUR
(Euros)CAD
(Canadian Dollars)AUD
(Australian Dollars)NZD
(New Zealand Dollars)
- clientPays
Whether or not the client can pay for their own campaigns and design and spam tests
- markupPercentage
Markup as a percentage
- monthlyScheme
The monthly scheme for the client. Must be either:
Basic
Unlimited
- Or an empty string if you do not wish to use a monthly billing scheme.
- completionHandler
Completion callback
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/clients/#setting_monthly_billing
Declared In
CSAPI+Clients.h
setClientPAYGBillingSettingsWithClientID:currency:canPurchaseCredits:clientPays:markupPercentage:markupOnDelivery:markupPerRecipient:markupOnDesignSpamTest:completionHandler:errorHandler:
Set if a client can pay for their own campaigns and design and spam tests using our PAYG billing. Set the mark-up percentage on each type of fee, and if the client can purchase their own email credits to access bulk discounts.
- (void)setClientPAYGBillingSettingsWithClientID:(NSString *)clientID currency:(NSString *)currency canPurchaseCredits:(BOOL)canPurchaseCredits clientPays:(BOOL)clientPays markupPercentage:(float)markupPercentage markupOnDelivery:(float)markupOnDelivery markupPerRecipient:(float)markupPerRecipient markupOnDesignSpamTest:(float)markupOnDesignSpamTest completionHandler:(void ( ^ ) ( void ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- clientID
The ID of the client for which PAYG billing settings should be set
- currency
The currency to bill in. Values accepted are:
USD
(US Dollars)GBP
(Great Britain Pounds)EUR
(Euros)CAD
(Canadian Dollars)AUD
(Australian Dollars)NZD
(New Zealand Dollars)
- canPurchaseCredits
Whether or not the client can purchase their own email credits to access bulk discounts
- clientPays
Whether or not the client can pay for their own campaigns and design and spam tests
- markupPercentage
Markup as a percentage
- markupOnDelivery
Markup in the major unit for the specified currency (e.g.
6.5f
means $6.50)
- markupPerRecipient
Markup in the minor unit for the specified currency (e.g.
6.5f
means 6.5 cents)
- markupOnDesignSpamTest
Markup in the major unit for the specified currency (e.g.
6.5f
means $6.50)
- completionHandler
Completion callback
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/clients/#setting_payg_billing
Declared In
CSAPI+Clients.h
setPrimaryContactWithClientID:emailAddress:completionHandler:errorHandler:
Sets the primary contact for the client to be the person with the specified email address.
- (void)setPrimaryContactWithClientID:(NSString *)clientID emailAddress:(NSString *)emailAddress completionHandler:(void ( ^ ) ( NSString *primaryContactEmailAddress ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- clientID
The ID of the client for which the primary contact is to be set.
- emailAddress
The email address of the person to be assigned as the primary contact for the client.
- completionHandler
Completion callback, with email address of the primary contact as the only argument
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/clients/#setting_primary_contact
Declared In
CSAPI+Clients.h
suppressEmailAddressesWithClientID:emailAddresses:completionHandler:errorHandler:
Adds email addresses to the client’s suppression list.
- (void)suppressEmailAddressesWithClientID:(NSString *)clientID emailAddresses:(NSArray *)emailAddresses completionHandler:(void ( ^ ) ( void ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- clientID
The ID of the client whose suppression list will have the provided email addresses added to it.
- emailAddresses
A collection of email addresses which will be suppressed.
- completionHandler
Completion callback
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/clients/#suppress_email_addresses
Declared In
CSAPI+Clients.h
transferCreditsWithClientID:credits:canUseMyCreditsWhenTheyRunOut:completionHandler:errorHandler:
Transfer credits from your account to a client, or transfer credits from a client to your account. The credits parameter should be either a positive integer if you wish to allocate credits from your account to the client, or a negative integer if you wish to deduct credits from the client back into your account.
- (void)transferCreditsWithClientID:(NSString *)clientID credits:(NSInteger)credits canUseMyCreditsWhenTheyRunOut:(BOOL)canUseMyCreditsWhenTheyRunOut completionHandler:(void ( ^ ) ( NSUInteger accountCredits , NSUInteger clientCredits ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- clientID
The ID of the client for which the credit transfer will be made.
- credits
The number of credits to transfer to/from the client. For example, to deduct 200 credits from a client (and transfer those credits back to your account) you would provide a value of -200. To allocate 200 credits from your account to a client, you would provide a value of 200.
- canUseMyCreditsWhenTheyRunOut
Whether or not the client will be able to continue sending using your credits or payment details once they run out of credits.
- completionHandler
Completion callback, with the resulting number of credits remaining in your account as the first argument, and the resulting number of credits belonging to the client as the second argument.
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/clients/#transfer_credits
Declared In
CSAPI+Clients.h
unsuppressEmailAddressWithClientID:emailAddress:completionHandler:errorHandler:
Unsuppress an email addresses (remove the email address from the client’s suppression list).
- (void)unsuppressEmailAddressWithClientID:(NSString *)clientID emailAddress:(NSString *)emailAddress completionHandler:(void ( ^ ) ( void ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- clientID
The ID of the client whose suppression list will have the provided email address removed from it.
- emailAddress
The email address to be removed from the suppression list.
- completionHandler
Completion callback
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/clients/#unsuppress_an_email
Declared In
CSAPI+Clients.h
updateClientWithClientID:companyName:country:timezone:completionHandler:errorHandler:
Update the basic account details for an existing client in your account.
- (void)updateClientWithClientID:(NSString *)clientID companyName:(NSString *)companyName country:(NSString *)country timezone:(NSString *)timezone completionHandler:(void ( ^ ) ( void ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- clientID
The ID of the client for which basic details should be set
- companyName
Company name of the client
- country
Country (see getCountries:errorHandler:)
- timezone
Timezone (see getTimezones:errorHandler:)
- completionHandler
Completion callback
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/clients/#setting_basic_details
Declared In
CSAPI+Clients.h
updatePersonWithClientID:name:currentEmailAddress:newEmailAddress:password:accessLevel:completionHandler:errorHandler:
Updates any aspect of a person including their email address, name and access level.
- (void)updatePersonWithClientID:(NSString *)clientID name:(NSString *)name currentEmailAddress:(NSString *)currentEmailAddress newEmailAddress:(NSString *)newEmailAddress password:(NSString *)password accessLevel:(NSUInteger)accessLevel completionHandler:(void ( ^ ) ( NSString *personEmailAddress ))completionHandler errorHandler:(CSAPIErrorHandler)errorHandler
Parameters
- clientID
The ID of the client to add the person to
- name
Name of the person
- currentEmailAddress
Existing email address of the person
- newEmailAddress
New email address of the person
- password
Optional password for the person
- accessLevel
Access level as per documentation listed in discussion
- completionHandler
Completion callback, with email address of the successfully added person as the only argument
- errorHandler
Error callback
Discussion
http://www.campaignmonitor.com/api/clients/#updating_a_person
Declared In
CSAPI+Clients.h