REST API v3
The REST API allows you to retrieve and update the data that is stored inside Copernica from out of your own website or app. You can write your own scripts that send requests and instructions to our servers to fetch this data or to update it. You can use this API to automatically synchronize the data in Copernica with your own system, without any human interference. This page contains an overview of all API calls.
We are currently on version 3 of the REST API. This article explains the new version (and how to switch) in full detail. Not ready to switch? If you want to use previous versions of the API, here is a link to the v1 and v2 documentation.
Method types
There are four types of methods:
- GET: Used to fetch data
- POST: Used to create new data
- PUT: Used to overwrite existing data
- DELETE: Used to delete data
See the introduction for more information about HTTP requests.
Overview
Use the links below to jump to the type of API call you are looking for.
- Account
- Databases & Collections
- Views & Miniviews
- Rules & Minirules
- Profiles & Subprofiles
- Publisher Mailings
- Marketing Suite Mailings
- Datarequests
- Logfiles
- Sender domains
Account
In the table below you can find a call to retrieve account information.
Type | Address | Description |
---|---|---|
GET | api.copernica.com/v3/identity | Fetch the account information |
GET | api.copernica.com/v3/consumption | Fetch the account consumption |
Databases & Collections
You can search and maintain your databases and collections with API calls. The following table contains the calls related to database and collection structure.
Databases
Collections
Import
Type | Address | Description |
---|---|---|
POST | api.copernica.com/v3/imports | Import data in the account |
GET | api.copernica.com/v3/import/$id | Fetch information about an import |
Views & Miniviews
Views are selections under a database, while miniviews are selections under a collection. You can find methods that relate to a specific (mini)view below.
View
Type | Address | Description |
---|---|---|
POST | api.copernica.com/v3/database/$id/views | Create a view |
POST | api.copernica.com/v3/view/$id/copy | Copy a view |
GET | api.copernica.com/v3/view/$id | Fetch the view information |
PUT | api.copernica.com/v3/view/$id | Update the view information |
DELETE | api.copernica.com/v3/view/$id | Delete a view |
GET | api.copernica.com/v3/view/$id/views | Fetch all nested views |
POST | api.copernica.com/v3/view/$id/views | Create a nested view |
GET | api.copernica.com/v3/view/$id/profileids | Fetch all view profile IDs |
GET | api.copernica.com/v3/view/$id/profiles | Fetch all view profiles |
GET | api.copernica.com/v3/view/$id/rules | Fetch all view rules |
GET | api.copernica.com/v3/view/$id/rule/$id | Fetch a view rule |
POST | api.copernica.com/v3/view/$id/rules | Create a new view rule |
PUT | api.copernica.com/v3/view/$id/intentions | Update the view intentions |
POST | api.copernica.com/v3/view/$id/rebuild | Rebuild the view |
Miniview
Type | Address | Description |
---|---|---|
POST | api.copernica.com/v3/collection/$id/miniviews | Create a new miniview |
GET | api.copernica.com/v3/miniview/$id | Fetch the miniview information |
PUT | api.copernica.com/v3/miniview/$id | Update the miniview information |
DELETE | api.copernica.com/v3/miniview/$id | Delete a miniview |
GET | api.copernica.com/v3/miniview/$id/subprofileids | Fetch all miniview subprofile IDs |
GET | api.copernica.com/v3/miniview/$id/subprofiles | Fetch all miniview subprofiles |
GET | api.copernica.com/v3/miniview/$id/views | Fetch all views for a miniview |
GET | api.copernica.com/v3/miniview/$id/minirules | Fetch all miniview minirules |
GET | api.copernica.com/v3/miniview/$id/minirule/$id | Fetch a miniview minirule |
POST | api.copernica.com/v3/miniview/$id/minirules | Create a new miniview minirule |
PUT | api.copernica.com/v3/miniview/$id/intentions | Update the miniview intentions |
POST | api.copernica.com/v3/miniview/$id/rebuild | Rebuild the miniview |
Rules & Minirules
Rules and minirules are made up of several conditions to create selections under a database or collection respectively. You can find API calls related to rules and their conditions in the table below.
Rules
Type | Address | Description |
---|---|---|
POST | api.copernica.com/v3/view/$id/rules | Create a rule |
GET | api.copernica.com/v3/rule/$id | Fetch the rule information |
PUT | api.copernica.com/v3/rule/$id | Update the rule information |
DELETE | api.copernica.com/v3/rule/$id | Delete a rule |
POST | api.copernica.com/v3/rule/$id/conditions | Create a condition |
PUT | api.copernica.com/v3/condition/$type/$id | Update a condition |
DELETE | api.copernica.com/v3/condition/$type/$id | Delete a condition |
Minirules (for miniselections)
Type | Address | Description |
---|---|---|
POST | api.copernica.com/v3/miniview/$id/minirules | Create a new minirule |
GET | api.copernica.com/v3/minirule/$id | Fetch the minirule information |
PUT | api.copernica.com/v3/minirule/$id | Update the minirule information |
DELETE | api.copernica.com/v3/minirule/$id | Delete a minirule |
POST | api.copernica.com/v3/minirule/$id/conditions | Create a minirule condition |
PUT | api.copernica.com/v3/minicondition/$type/$id | Update a minirule condition |
DELETE | api.copernica.com/v3/minicondition/$type/$id | Delete a minirule condition |
Profiles & Subprofiles
Profiles and subprofiles can be used to represent entities in your database, like your customers or orders. The relevant API calls can be found below.
Profile
Subprofile
Type | Address | Description |
---|---|---|
POST | api.copernica.com/v3/profile/$id/subprofiles | Create a new subprofile |
GET | api.copernica.com/v3/subprofile/$id | Fetch the subprofile information |
PUT | api.copernica.com/v3/subprofile/$id | Update the subprofile information |
DELETE | api.copernica.com/v3/subprofile/$id | Delete a subprofile |
GET | api.copernica.com/v3/subprofile/$id/fields | Fetch all subprofile fields |
PUT | api.copernica.com/v3/subprofile/$id/fields | Update the subprofile fields |
GET | api.copernica.com/v3/subprofile/$id/publisher/emailings | Fetch all Publisher mailings for a subprofile |
GET | api.copernica.com/v3/subprofile/$id/ms/emailings | Fetch all Marketing Suite mailings for a subprofile |
GET | api.copernica.com/v3/subprofile/$id/publisher/destinations | Fetch all Publisher destinations for a subprofile |
GET | api.copernica.com/v3/subprofile/$id/ms/destination | Fetch all Marketing Suite destinations for a subprofile |
POST | api.copernica.com/v3/subprofile/$id/datarequest | Create a request for all data stored for a subprofile |
PUT | api.copernica.com/v3/subprofile/$id/unsubscribe | Execute unsubscribe behavior of a subprofile |
GET | api.copernica.com/v3/subprofile/$id/publisher/document/$id | Fetch the personalized Publisher document for a subprofile |
Publisher Mailings
The table below contains all API calls related to Publisher documents, templates and mailings.
Mailings
Documents & Templates
Destinations
Statistics
Type | Address | Description |
---|---|---|
GET | api.copernica.com/v3/publisher/abuses | Fetch all abuses for Publisher |
GET | api.copernica.com/v3/publisher/clicks | Fetch all clicks for Publisher |
GET | api.copernica.com/v3/publisher/deliveries | Fetch all deliveries for Publisher |
GET | api.copernica.com/v3/publisher/errors | Fetch all errors for Publisher |
GET | api.copernica.com/v3/publisher/impressions | Fetch all impressions for Publisher |
GET | api.copernica.com/v3/publisher/unsubscribes | Fetch all unsubscribes for Publisher |
Marketing Suite Mailings
The table below contains all API calls related to Marketing Suite templates and emailings.
Mailings
Templates
Type | Address | Description |
---|---|---|
GET | api.copernica.com/v3/ms/templates | Fetch all templates |
GET | api.copernica.com/v3/ms/template/$id | Fetch a template |
DELETE | api.copernica.com/v3/ms/template/$id | Delete a template |
GET | api.copernica.com/v3/ms/template/$id/statistics | Fetch the statistics for a template |
POST | api.copernica.com/v3/ms/template/$id/translations | Create new language for a template |
GET | api.copernica.com/v3/ms/template/$id/translations | Fetch all language from a template |
PUT | api.copernica.com/v3/ms/template/$id/translations | Modify languages from a template |
GET | api.copernica.com/v3/ms/directories | Fetch information of all template directory |
GET | api.copernica.com/v3/ms/directory/$id | Fetch information of the template directory |
Messages & Destinations
Copernica uses the terms messages and destinations interchangeably in the Marketing Suite. Both refer to a specific message sent to a specific profile or subprofile. Please keep in mind that you can substitute 'message' by 'destination' or vice versa in all of the articles below, including the code examples.
Statistics
SMS mailings
Type | Address | Description |
---|---|---|
GET | api.copernica.com/v3/smsmailing/$id | Fetch information for a SMS mailing |
Coupons
Type | Address | Omschrijving |
---|---|---|
GET | https://api.copernica.com/v3/couponcampaigns | Fetch all coupon campaigns |
POST | https://api.copernica.com/v3/couponcampaigns | Create a coupon campaign |
PUT | https://api.copernica.com/v3/couponcampaign/$id | Update coupon campaign information |
GET | https://api.copernica.com/v3/couponcampaign/$id | Fetch coupon campaign information |
PUT | https://api.copernica.com/v3/couponcampaign/$id/coupons | Create or update one or multiple coupons inside a campaign |
GET | https://api.copernica.com/v3/couponcampaign/$id/coupons | Fetch one or multiple coupons inside a campaign |
Media libraries
Type | Address | Description |
---|---|---|
POST | api.copernica.com/v3/medialibrary/$id/files | Upload a file/image in a media library |
Datarequests
The result of data requests is stored for a while after completion. With the following methods you can retrieve the status and data of previously completed calls.
Type | Address | Description |
---|---|---|
POST | api.copernica.com/v3/profile/$id/datarequest | Create a request for all data stored for a profile |
POST | api.copernica.com/v3/subprofile/$id/datarequest | Create a request for all data stored for a subprofile |
GET | api.copernica.com/v3/datarequest/$id/data | Fetch the data of a previous data request |
GET | api.copernica.com/v3/datarequest/$id/status | Fetch the status of a previous data request |
Logfiles
Copernica keeps extensive logfiles about everything that happens to your emails after sending. You can find all calls related to logfiles in the table below.
Type | Address | Description |
---|---|---|
GET | api.copernica.com/v3/logfiles | Fetch logfile dates |
GET | api.copernica.com/v3/logfiles | Fetch logfile names |
GET | api.copernica.com/v3/logfile/$filename/csv | Fetch logfiles in CSV format |
GET | api.copernica.com/v3/logfile/$filename/json | Fetch logfiles in JSON format |
GET | api.copernica.com/v3/logfile/$filename/xml | Fetch logfiles in XML format |
Webhooks
Webhooks are processes that notify their user of events that happen in real time through HTTP POST. You can find all calls related to webhooks in the table below.
Type | Address | Description |
---|---|---|
GET | api.copernica.com/v3/webhook/$id | Fetch a webhook |
POST | api.copernica.com/v3/webhooks | Create a webhook |
PUT | api.copernica.com/v3/webhook/$id | Update a webhook |
DELETE | api.copernica.com/v3/webhook/$id | Remove a webhook |
Sender domains
Within our software you can configure from which domain or subdomain do you to send your emails. If you want the 'FROM' address of your emails to be info@example.com, you need to provide 'example.com' as your sender domain.
Type | Address | Description |
---|---|---|
GET | api.copernica.com/v3/senderdomain/$id | Fetch a senderdomain |
POST | api.copernica.com/v3/senderdomains | Create a senderdomain |
PUT | api.copernica.com/v3/senderdomain/$id | Update a senderdomain |
DELETE | api.copernica.com/v3/senderdomain/$id | Remove a senderdomain |