We’ve migrated our documentation to a new site, which means some URLs have changed.
Subscriptions

How to get Consent fields data via the Piano API

For this purpose you can use the following call in for Sandbox:

https://sandbox.piano.io/api/v3/publisher/user/search?api_token=<API_TOKEN>&amp;aid=<AID>&amp;consent_checked=true&amp;selected_consents_map=<CONSENT_ID_1>&amp;selected_consents_map=<CONSENT_ID_2>&amp;consent_has_data=true&amp;registered_from=1507121529&amp;registered_until=1507567408

The available base URLs for Production are listed here.

Here’s a breakdown of the parameters:

api_token - your API token
aid - your application ID
consent_has_data - identifies that the filter for consent fields must be used
consent_checked - identifies that you’re looking for users who checked/unchecked the consents (values true/false)
selected_consents_map - a list of consent_id values for which you’re making a search.

You can find those IDs by making a request to:

https://sandbox.piano.io/api/v3/publisher/consent/list?api_token=<API_TOKEN>&amp;aid=<AID>

Note that they are different from the field_id.

registered_from - timestamp of start criteria for creation date
registered_until - timestamp of end criteria for creation date

You can also use publisher/export/create/userExport with the same parameters.

Last updated: