Mutiara van der Linden

Version 2 of the Copernica REST API has been released!

Written by Mutiara van der Linden Selina Blijleven on
Vernieuwde API calls

Version 2 of the Copernica REST API has been released this week. The REST API allows you to retrieve and update data that is stored in Copernica from your own website or app. The updated version of the REST API contains a number of bug fixes and improvements and is more consistent and comprehensive than the previous version. We discuss the most important changes below.

New calls related to mailings and statistics

Version 2 of the REST API includes many new calls related to mailings and statistics. For example, for the Marketing Suite it is now possible to include calls that retrieve the destinations for an email or the statistics of a template. A complete overview of all the new calls can be found on the updated REST API documentation page.

Improved structure

In the new version of the REST API, a distinction is made between some of the calls that relate to the Marketing Suite and calls that relate to the Publisher. For users this means that the url of the call will look different. Calls relating to the Marketing Suite will contain “ms” in the url as in api.copernica.com/v2/ms/emailings for example.

A few calls that were possible in the Publisher were undocumented. You can find these in the new overview . If you were already using these calls, you might have noticed that the format of the input and output has changed and that for some calls the output has been expanded.

Checklist

Ready to get started with the new REST API? The following checklist will help you make a smooth start

  • If you use PHP, download the new Copernica REST API class . The example that you can find here will help you to instantiate an instance of the v2 API. Until version 1 is deprecated it is also possible to instantiate two API objects and use both versions while you transition.
  • If you use the POST call for database profiles or the PUT call for database profiles you will find that the data should be passed differently since editing/posting interests for a profile is now supported.
  • Check whether all of your MS/Publisher specific calls refer to the correct address.
  • Check if any calls to retrieve log files still function as desired.
  • For more information, check out the improved REST API documentation.