When to use an API call feed
You can use an API call as the source of a data feed when the data you want to use in your communications is not already stored in a magnews table, but is available in an external system.
This way, you can retrieve up-to-date content in real time—such as products, availability, prices, articles, or personalized information—and use it directly in your emails or dynamic content, without having to import it manually.
This is especially useful when working with eCommerce platforms, CMSs, or business applications that expose APIs, and you want to keep your communications always aligned with the most recent data.
Some examples
For example, you can use an API call when:
- you need to retrieve products, prices, or availability from an eCommerce or external platform
- you want to include articles, news, or editorial content managed in a CMS
- you have data stored in a management system, CRM, or ERP and want to use it directly in your communications
- you work with booking or travel systems and need to show updated availability or offers
- you use marketplaces or catalogs that are not in magnews.
How to configure a data feed via API
When you create the data feed, choose API Call as the data source.
After creating the feed, go to the API Call tab.
Here, enter the API URL from which magnews retrieves the feed content.
If you want to configure the API call manually, deselect the option at the bottom of the page Field Selection Wizard and continue by filling in the available fields. To use the guided procedure, click the Retrieve data preview button (after entering the URL).
In both cases, depending on the structure of the API you are connecting to, you may need to specify headers, body, or disable SSL certificate verification if the called URL does not have one.
Guided configuration
After clicking Retrieve data preview, if there are no errors, you will see a small confirmation window.
Now, in the Content tab, you can select the fields you need in the feed.
First, select the content path (JSONPath) where the data to be used in the feed is located. The table will be automatically populated with the feed fields.
The list shows all the fields found within the JSONPath you specified. Select or deselect the fields you need in the feed. In the Placeholder column, you can see the variable names you can use in your emails or content.
Click Confirm selection to complete the content selection.
You can now set a filter, add more fields, or configure how to use the content, just as you would when choosing a contact extension (data table) as the data source.
You can also use the Add field button: if the JSON changes, you can refresh and select new fields to include.
How to restart the configuration
If you run into difficulties, want to start over, or if the JSON has changed and you want to automatically reconnect the new version, you can use the Restart guided setup button at the bottom of the Web request tab.