Reignte allows you to add your own custom data feeds from API’s that return data. 


Typical use cases might include:

  • Product feeds to automate the building of products for dropping into email templates, and have pricing details automatically updated
  • Recommendation engine results to display personalised products, holidays
  • Latest pricing from feeds of currencies rates, betting odds or special offers
  • Available appointment times at the recipients local store
  • Customer loyalty scheme reward points balances and scores
  • Latest news stories or blog posts from Wordpress or your CMS

This guide takes you through adding a custom data source that can then be used to generate live images.


How to add data sources

To add your first data source from the main menu select 'Create New' under 'Data Sources'


Step 1: Setup

You then are presented with a screen to configure:



Name
Enter a name of this data source so its easily identifiable

URL
Enter the URL of the feed/API call you wish to make. 


Use placeholders in {{brackets}} to tell Reignite what parameters can be passed into the URL. These parameters will then be available to any images using this data source in order to filter the results returned by the API.


Type of Results
Next we need to specify whether the API will return a single record or multiple records. For multiple records Reignite will make available a position parameter to allow you to choose which number result from the API the image should use.

Examples:

An API that returns information on a customer such as current loyalty points, their location and other basic details would be a single result.


However, an API that returns product recommendations for a customer is likely to be multiple results as there will be many of the same JSON objects listed.


Custom Headers
Here you specify headers to make with the API call with name and value pairs. Not all API’s require this, and you need to refer to the documentation of the API if this is necessary. Typically, where this is used its where the username, password, API key and other authentication is entered. 

It might also be where you enter POST parameters for querying the API to return specific results.

Again you can use {{brackets}} to enter placeholders that you can pass into the image tags for Reignite to add to the API request.


Step 2: Preview your API

At the next stage Reignite will ask you to preview the API results to make sure they are what you expect to see and to test your settings.


If you have added parameters to either the API URL or in custom headers these will appear here. Enter example values here in these in order to return example results.


Step 3: Choose the record that has the data you require

Now we need to choose the first record that has our data in we want to merge into the email. In the example where there are multiple records to return choose the first of these. This enables Reignite to identify how to cycle through each result.  



Step 4: Choose your fields

Reignite will now present you with the ability to tick fields within this first record that you wish to merge into your live images. Select each field required by ticking and optionally alter the label when it is added on the right. 



Using your data in images

Now when you create a new image using this data source you will see that any parameters used in the API call are listed under the preview values, and on the tags page.


Plus when adding a merge field you will see the list is populated with the fields you selected in the final stage of the setup of the API.



Common Technical Questions about API's in Reignite


When setting up API's for the first time in Reignite Developers typically have a couple of common questions and concerns they require assurance on:


Caching
All results for a unique API URL are cached for 5 minutes to reduce load on the API servers, and reduce the chances of hitting rate limits for 3rd party API's.

If you need this setting adjusted for any specific API data source please contact our support team.


Errors & Response Speed

All API requests must return a valid response in under 1 second otherwise the image will use the fallback image. Speed of displaying the images is critical so should the API consistently have performance issues our automatic detection algorithm will disable the data source so only fallback images are shown.


Marketers should not worry though - professional API's tend to be designed for this purpose, and in conjunction with our cache settings mean it is extremely rare for this to be an issue.


Fallback images will also be shown if the API returns an error, or indeed no data is found.