REST API v1

Warning: You are viewing the documentation for the old REST API. We recommend using our latest version of the REST API.

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.

REST API v1: method reference

The following table lists all methods that are accessible through HTTP GET, POST, PUT en DELETE.

GET

GET methods are used to fetch data. The following GET methods are available:

Method Address Description
GET api.copernica.com/v1/identity Fetch API access token identity
GET api.copernica.com/v1/databases Fetch databases
GET api.copernica.com/v1/database/$id Fetch database settings
GET api.copernica.com/v1/database/$id/unsubscribe Fetch unsubscribe behavior
GET api.copernica.com/v1/database/$id/fields Fetch database fields
GET api.copernica.com/v1/database/$id/interests Fetch interests
GET api.copernica.com/v1/database/$id/collections Fetch collections
GET api.copernica.com/v1/database/$id/profiles Fetch profiles
GET api.copernica.com/v1/database/$id/profileids Fetch profile identifiers
GET api.copernica.com/v1/database/$id/views Fetch selections
GET api.copernica.com/v1/view/$id Fetch selection data
GET api.copernica.com/v1/view/$id/profiles Fetch profiles from selection
GET api.copernica.com/v1/view/$id/profileids Fetch profile identifiers
GET api.copernica.com/v1/view/$id/rules Fetch selection rules
GET api.copernica.com/v1/view/$id/rule/$id Fetch selection rule
GET api.copernica.com/v1/view/$id/views Fetch nested selections
GET api.copernica.com/v1/rule/$id Fetch selection rule
GET api.copernica.com/v1/rule/$id/conditions Get selection conditions
GET api.copernica.com/v1/profile/$id/ Fetch profile data
GET api.copernica.com/v1/profile/$id/events Fetch profile events
GET api.copernica.com/v1/profile/$id/fields Fetch profile fields
GET api.copernica.com/v1/profile/$id/interests Fetch profile interests
GET api.copernica.com/v1/profile/$id/subprofiles Fetch subprofiles of a profile
GET api.copernica.com/v1/collection/$id Fetch collection data
GET api.copernica.com/v1/collection/$id/fields Fetch collection fields
GET api.copernica.com/v1/collection/$id/miniviews Fetch miniviews
GET api.copernica.com/v1/collection/$id/subprofiles Fetch subprofiles from a collection
GET api.copernica.com/v1/collection/$id/subprofileids Fetch subprofile IDs from a collection
GET api.copernica.com/v1/collection/$id/unsubscribe Fetch collection unsubscribe behavior
GET api.copernica.com/v1/miniview/$id Fetch miniview data
GET api.copernica.com/v1/miniview/$id/subprofiles Fetch subprofiles in a miniview
GET api.copernica.com/v1/miniview/$id/subprofileids Fetch subprofile identifiers
GET api.copernica.com/v1/miniview/$id/rules Fetch miniview rules
GET api.copernica.com/v1/miniview/$id/rule/$id Fetch miniview rule
GET api.copernica.com/v1/minirule/$id Fetch miniselection rule
GET api.copernica.com/v1/minirule/$id/conditions Fetch conditions for a miniselection
GET api.copernica.com/v1/subprofile/$id/ Fetch subprofile data
GET api.copernica.com/v1/subprofile/$id/events Fetch subprofile events
GET api.copernica.com/v1/subprofile/$id/fields Fetch subprofile fields
GET api.copernica.com/v1/emailingdocument/id Fetch all document data
GET api.copernica.com/v1/logfiles Fetch all logfiles
GET api.copernica.com/v1/logfiles/$date Logfile names
GET api.copernica.com/v1/logfiles/$name Download logfile in CSV format
GET api.copernica.com/v1/logfiles/$name/json Download logfile in JSON format
GET api.copernica.com/v1/logfiles/$name/xml Download logfile in XML format
GET api.copernica.com/v1/email/$addres/events Fetch email events
GET api.copernica.com/v1/message/$id/events Fetch MS message events
GET api.copernica.com/v1/message/$id/body/ Fetch MS message body (HTML/MIME/text)
GET api.copernica.com/v1/template/$id/events Fetch MS template events
GET api.copernica.com/v1/old/template/$id/events Fetch Publisher template events
GET api.copernica.com/v1/old/message/$id/events Fetch Publisher message events
GET api.copernica.com/v1/old/document/$id/events Fetch Publisher document events
GET api.copernica.com/v1/tags/$tag/events Fetch tag events
GET api.copernica.com/v1/datarequest/$id/data Fetch data from a datarequest
GET api.copernica.com/v1/datarequest/$id/status Fetch status of a datarequest

See also the general article on events.

PUT & POST

PUT and POST methods are used to create and edit data. They are often very similar. If you can not find a POST method of what you are looking for there might be a PUT method to do it. It also works the other way around. The following PUT and POST methods are available:

Method Address Description
POST api.copernica.com/v1/databases Create a new database
PUT api.copernica.com/v1/database/$id Modify database settings
PUT api.copernica.com/v1/database/$id/unsubscribe Set unsubscribe behavior
POST api.copernica.com/v1/database/$id/fields Create database field
PUT api.copernica.com/v1/database/$id/field/$id Edit database field
POST api.copernica.com/v1/database/$id/interests Create interest
POST api.copernica.com/v1/database/$id/collections Create collection
POST api.copernica.com/v1/database/$id/profiles Create new profile
PUT api.copernica.com/v1/database/$id/profiles Edit multiple profiles
POST api.copernica.com/v1/database/$id/views Create new selection
PUT api.copernica.com/v1/view/$id Update selection data
POST api.copernica.com/v1/view/$id/rules Create selection rules
POST api.copernica.com/v1/view/$id/views Create a nested selection
PUT api.copernica.com/v1/rule/$id Edit selection rule
POST api.copernica.com/v1/rule/$id/conditions Create a selection condition
PUT api.copernica.com/v1/rule/$id/conditions/$type Edit selection condition
PUT api.copernica.com/v1/profile/$id Edit profile data
PUT api.copernica.com/v1/profile/$id/fields Edit profile fields
POST api.copernica.com/v1/profile/$id/interests Add interests to profile
PUT api.copernica.com/v1/profile/$id/interests Edit profile interests
POST api.copernica.com/v1/profile/$id/subprofiles Create subprofile
PUT api.copernica.com/v1/profile/$id/subprofiles Edit subprofile
POST api.copernica.com/v1/profile/$id/datarequest Request all data regarding a profile
POST api.copernica.com/v1/collection/$id/fields Create collection field
PUT api.copernica/com/v1/collection/$id/field/$id Edit collection field
PUT api.copernica.com/v1/collection/$id Edit collection data
POST api.copernica.com/v1/collection/$id/miniviews Create miniview
PUT api.copernica.com/v1/collection/$id/unsubscribe Update collection unsubscribe behavior
PUT api.copernica.com/v1/miniview/$id Update miniview data
POST api.copernica.com/v1/miniview/$id/rules Create miniview rule
PUT api.copernica.com/v1/minirule/$id Edit miniselection rule
POST api.copernica.com/v1/minirule/$id/conditions Create condition for a miniselection
PUT api.copernica.com/v1/minirule/$id/conditions/$type Edit condition for a miniselection
POST api.copernica.com/v1/subprofile/$id/datarequest Request all data regarding a subprofile
POST api.copernica.com/v1/email/$email/datarequest Request all data regarding an email address

DELETE

DELETE methods are used to delete data. This is permanent, so always be careful and double check your calls. The following DELETE methods are available:

Method Address Description
DELETE api.copernica.com/v1/database/$id/field/$id Remove database field
DELETE api.copernica.com/v1/view/$id Remove selection
DELETE api.copernica.com/v1/rule/$id Remove selection rule
DELETE api.copernica.com/v1/profile/$id Remove profile
DELETE api.copernica.com/v1/collection/$id/field/$id Remove collection field
DELETE api.copernica.com/v1/miniview/$id Remove miniview
DELETE api.copernica.com/v1/minirule/$id Remove miniselection rule