You can use the API to schedule message delivieries. This example will create a delivery to send a message to a single contact. It assumes you have already created a message containing the following API messages tags: %%#purchasetable%% and %%#cardlast4%%.
Start TutorialBefore you can login using the API, you need to log into Bronto and set up your authentication and API access tokens. To do this:
Use the access token you created to log in. The session ID created when you log into the API will expire if there is no transaction for a 20 minute period.
Get the ID for the message you want to send. You will need to use this ID in a later step.
Get the ID for the contact you want to send to. You will need to use this ID in a later step.
Indicate the start time for the message delivery.
Create an array that contains all of the delivery parameters. This should include:
After you send the message you will receive a confirmation or error message. In the event of an error, we suggest you retry connecting to the API a few times before exiting your script, and saving in an error log when the failure happened.
In order to retrieve all objects in a result set, you must iterate over all the available pages. This is done by incrementing the pageNumber parameter on subsequent read calls. When the API returns an empty result set, you know that you have retrieved all objects available. The initial page number is 1. The behavior of making multiple read calls to the same page is not defined and should not be relied upon to perform successfully.