YourMailingListProvider class
Possible Methods
- setTimeOut
- setUserAgent
- ping
- contactsAdd
- contactsDelete
- contactsUnsubscribe
- contactsGetContact
- contactsGetList
- contactsGetUnsubscribed
- contactsGetDeleted
- contactsGetBounced
- GroupsGetList
- GroupsAdd
- GroupsDelete
- GroupsUpdate
- GroupsEmpty
- FieldsGetList
- FieldsAdd
- FieldsDelete
- FieldsUpdate
- FiltersGetList
- FiltersAdd
- FiltersDelete
- newsletterGetFroms
- newsletterAddFrom
- newsletterDeleteFrom
- newsletterSend
- archiveGetList
- archiveGetSummary
- archiveGetRecipients
- archiveGetDelivered
- archiveGetBounces
- archiveGetOpens
- archiveGetUnopened
- archiveGetTrackedLinks
- archiveGetClicks
- archiveGetForwards
setTimeOut
Set the timeout
After this time the request will stop. You should handle any errors triggered by this.
Parameters
- seconds int
- The timeout in seconds.
Return
void
setUserAgent
Set the user-agent for you application
It will be appended to ours, the result will look like: "PHP Your Mailing List Provider/<version> <your-user-agent>"
Parameters
- userAgent string
- Your user-agent, it should look like <app-name>/<app-version>.
Return
void
ping
Ping is the simplest command, doesn't serve any useful purpose but is a great command to understand this API feature and to test your API implementation.
When you call this command, it will return "Hello!"
Return
string
contactsAdd
Adds a new contact to one or more groups in your database.
Parameters
- email string
- The emailadress.
- groups array
- An array with the ids of the groups.
- fields array (optional)
- An key-value-pair array, where the key is the id of the field.
- overruleUnsubscribedBounced bool (optional)
- If true the e-mailadress will be added even if this persion previously unsubscribed or if the email address previously was removed by bounce back handling.
Return
bool
contactsDelete
Removes a given email address from one or more groups.
Parameters
- email string
- The emailadress.
- groups array
- An array with the ids of the groups.
Return
bool
contactsUnsubscribe
Unsubscribes a given email address.
Parameters
- email string
- The emailadress.
Return
bool
contactsGetContact
Retrieves all available information regarding a contact.
Parameters
- email string
- The emailadress.
Return
array
contactsGetList
Returns the list of contacts in a given list of groups.
Parameters
- groups array
- An array with the ids of the groups.
- fields array
- An array with the ids of the fields.
- startDate int (optional)
- Only show contacts that were added after this date.
- stopDate int (optional)
- Only show contacts that were added before this date.
- page int (optional)
- ID of the result page to show.
- numberPerPage int (optional)
- number of contacts per result page.
- sorting string (optional)
- Sorting order of the returned email addresses, either Ascending or Descending.
Return
array
contactsGetUnsubscribed
Returns the list of unsubscribed contacts in your account.
Parameters
- fields array
- An array with the ids of the fields.
- startDate int (optional)
- Only show contacts that were added after this date.
- stopDate int (optional)
- Only show contacts that were added before this date.
- page int (optional)
- ID of the result page to show.
- numberPerPage int (optional)
- number of contacts per result page.
- sorting string (optional)
- Sorting order of the returned email addresses, either Ascending or Descending.
Return
array
contactsGetDeleted
Returns the list of manually removed contacts in your account.
Parameters
- fields array
- An array with the ids of the fields.
- startDate int (optional)
- Only show contacts that were added after this date.
- stopDate int (optional)
- Only show contacts that were added before this date.
- page int (optional)
- ID of the result page to show.
- numberPerPage int (optional)
- number of contacts per result page.
- sorting string (optional)
- Sorting order of the returned email addresses, either Ascending or Descending.
Return
array
contactsGetBounced
Returns the list of contacts removed by bounce back handling in your account.
Parameters
- fields array
- An array with the ids of the fields.
- startDate int (optional)
- Only show contacts that were added after this date.
- stopDate int (optional)
- Only show contacts that were added before this date.
- page int (optional)
- ID of the result page to show.
- numberPerPage int (optional)
- number of contacts per result page.
- sorting string (optional)
- Sorting order of the returned email addresses, either Ascending or Descending.
Return
array
GroupsGetList
Lists the groups in your account, along with their group IDs and the number of contacts in each group.
Return
array
GroupsAdd
Creates a new group.
Parameters
- name string
- Label to use for the new group.
Return
string
GroupsDelete
Removes a group based on a given group ID.
Parameters
- id string
- ID of the group.
Return
bool
GroupsUpdate
Update the properties of a group.
Parameters
- id string
- ID of teh group.
- name string
- New label to use for this group.
Return
bool
GroupsEmpty
Remove all contacts in a group.
Parameters
- id string
- The id of the group.
Return
string
FieldsGetList
Lists the fields in your account along with the field ID, the alias, the default value and the "Correct Uppercase" value for each field.
Return
array
FieldsAdd
Creates a new field.
Parameters
- name string
- Label to use for the new field.
- alias string (optional)
- Alias for the new field, defaults to the field name.
- default mixed (optional)
- The default value.
- correctUppercase bool (optional)
- Correct uppercase values?
Return
string
FieldsDelete
Removes a field based on a given field ID.
Parameters
- id string
- The id of the field to delete.
Return
bool
FieldsUpdate
Update the properties of a field.
Parameters
- id string
- The if of the field.
- name string (optional)
- The name of the field.
- alias string (optional)
- The alias of the field.
- default mixed (optional)
- The default value for the field.
- correctUppercase bool (optional)
- Correct uppercase values?
Return
bool
FiltersGetList
Lists the filters in your account along with the filter ID, the filter name, the criterion description and the field-operand-value combination for each filter.
Parameters
- overruleDeleted bool (optional)
- Whether or not to include deleted filters in the output.
Return
array
FiltersAdd
Creates a new filter.
Parameters
- name string
- The name of the filter.
- field string
- The name of the field.
- operand string
- The operand to use.
- value string
- The value for the filter.
Return
string
FiltersDelete
Removes a filter based on a given filter ID.
Parameters
- id string
- ID of the filter.
Return
bool
newsletterGetFroms
Returns the list of available sender addresses in the account.
Return
array
newsletterAddFrom
Creates a new sender address.
Parameters
- email string
- The emailadress.
- name string
- Name/description for the new sender address.
Return
string
newsletterDeleteFrom
Removes a sender address based on a given From ID.
Parameters
- id string
- The id of the from-address.
Return
bool
newsletterSend
Queues a message for delivery.
Parameters
- subject string
- Subject for the message.
- html string (optional)
- HTML code for the message (optional if a text part is specified).
- text string (optional)
- Plaintext for the message (optional if a HTML part is specified).
- deliveryTime int (optional)
- Delivery time for the message.
- fromID string
- ID of the sender address to use, use NewsletterGetFroms() to retrieve the ID for each sender address.
- trackOpens bool (optional)
- Whether or not to track opens for the message?
- trackClicks bool (optional)
- Whether or not to track clicks for the message?
- testMessage bool (optional)
- Whether it's a test message or a message to be sent to contacts in your database?
- groups array
- ID of the group(s) to send to, use GroupsGetList() to retrieve the ID for each group (ignored for test messages).
- filters array (optional)
- ID of the filter(s) to apply, use FiltersGetList() to retrieve the ID for each filter (ignored for test messages).
- combineFilters bool (optional)
- Whether contacts must match all applied filters or just one?
Return
bool
archiveGetList
Returns a list of newsletters in the archives of your account.
Parameters
- page int (optional)
- ID of the result page to show.
- numberPerPage int (optional)
- Number of newsletters per result page.
- startDate int (optional)
- Only return newsletters that were sent after this date.
- stopDate int (optional)
- Only return newsletters that were sent before this date.
- sorting string (optional)
- Sorting order of the returned newsletters, either Ascending or Descending.
- showTestMessages bool (optional)
- Whether or not to include test messages in the output.
Return
array
archiveGetSummary
Returns all available information regarding a newsletter, except for its content.
Parameters
- id string
- ID of the Newsletter.
Return
array
archiveGetRecipients
Returns the list of email addresses a newsletter was sent to.
Parameters
- id string
- ID of the Newsletter.
- page int (optional)
- ID of the result page to show.
- numberPerPage int (optional)
- Number of email addresses per result page.
- sorting string (optional)
- Sorting order of the returned email addresses, either Ascending or Descending.
Return
array
archiveGetDelivered
Returns the list of email addresses a newsletter was successfully delivered to.
Parameters
- id string
- ID of the Newsletter.
- page int (optional)
- ID of the result page to show.
- numberPerPage int (optional)
- Number of email addresses per result page.
- sorting string (optional)
- Sorting order of the returned email addresses, either Ascending or Descending.
Return
array
archiveGetBounces
Returns the bouncebacks for a newsletter.
Parameters
- id string
- ID of the Newsletter.
- showHardBounces bool (optional)
- Whether to include email addresses that returned a permanent error or "hard" bounceback.
- showSoftBounces bool (optional)
- Whether to include email addresses that returned a temporary error or "soft" bounceback.
- page int (optional)
- ID of the result page to show.
- numberPerPage int (optional)
- Number of email addresses per result page.
- sorting string (optional)
- Sorting order of the returned email addresses, either Ascending or Descending.
Return
array
archiveGetOpens
Returns the list of email addresses that opened a newsletter.
Parameters
- id string
- ID of the Newsletter.
- showUniqueOpens bool (optional)
- Whether or not to list only the first open from an email address, if that email address opened multiple times.
- page int (optional)
- ID of the result page to show.
- numberPerPage int (optional)
- Number of email addresses per result page.
- sorting string (optional)
- Sorting order of the returned email addresses, either Ascending or Descending.
Return
array
archiveGetUnopened
Returns the list of email addresses that opened a newsletter.
Parameters
- id string
- ID of the Newsletter.
- page int (optional)
- ID of the result page to show.
- numberPerPage int (optional)
- Number of email addresses per result page.
- sorting string (optional)
- Sorting order of the returned email addresses, either Ascending or Descending.
Return
array
archiveGetTrackedLinks
Returns the list of tracked links for a newsletter that was sent with click tracking.
Parameters
- id string
- ID of the Newsletter.
Return
array
archiveGetClicks
Returns the list of clicks for a newsletter that was sent with click tracking, either for all links in the newsletter or for a given link.
Parameters
- id string
- ID of the Newsletter.
- linkId string (optional)
- ID of a link if you want to limit the results to the clicks on a particular link.
- showUniqueClicks bool (optional)
- Whether or not to list only the first click from an email address, if that email address clicked multiple times.
- page int (optional)
- ID of the result page to show.
- numberPerPage int (optional)
- Number of email addresses per result page.
- sorting string (optional)
- Sorting order of the returned email addresses, either Ascending or Descending.
Return
array
archiveGetForwards
Returns the list of forwards for a newsletter.
Parameters
- id string
- ID of the Newsletter.
- page int (optional)
- ID of the result page to show.
- numberPerPage int (optional)
- Number of email addresses per result page.
- sorting string (optional)
- Sorting order of the returned email addresses, either Ascending or Descending.
Return
array