Didomi - Developers documentation
  • Introduction
  • SDKs
    • Introduction
    • Web SDK
      • Getting started
      • Tags and vendors management
        • Tags management
          • Events & Variables
            • Deprecated
            • Custom events
          • Tag managers
            • Adobe Launch/DTM
            • Eulerian
            • Google Tag Manager
              • Configure the Didomi / GTM integration
              • Didomi's GTM template
            • Tealium
            • Other tag managers
        • Custom Didomi <script> tags
        • Third-party integrations
          • Google Ad Manager / AdSense
            • GDPR via Non-Personalized Ads
              • Share consent and load/refresh ads
              • Share consent without loading or refreshing ads
            • US states laws
          • Google Consent Mode V2
          • Kameleoon
          • Piano Analytics (AT Internet)
          • Prebid
            • GDPR via IAB TCF
            • US states laws
          • Salesforce DMP (Krux)
        • IAB frameworks
        • Programmatic API
      • Configuration
        • Bots (SEO & Performance tools)
        • Configuration by URL
        • Cookies and storage
        • Custom domains for events
        • Notice
          • Behavior
          • Interactions
          • Look and feel
        • Preferences
        • Theme
      • AB tests
      • Custom domain
        • Domain delegation
        • Reverse proxy
      • Share consents between domains
      • Share consents across devices
      • Pass user choices in query string
      • Serve Didomi assets from your domain
      • Reference
        • API
          • Deprecated
        • Events
      • Performance
    • Mobile and TV SDKs
      • Android and Android TV
        • Setup
        • Logging
        • Reference
          • API
            • Deprecated
          • Events
        • Versions
      • iOS and tvOS
        • Setup
        • Logging
        • App Tracking Transparency (iOS 14.5+)
        • Reference
          • API
            • Deprecated
          • Events
        • Versions
      • Unity
        • Setup
        • Reference
        • Versions
        • Troubleshooting
      • React Native
        • Setup
        • Reference
          • Deprecated
        • Versions
      • Flutter
        • Setup
        • Reference
        • Versions
      • Consent notice
        • Getting started
        • Customize the notice
        • Customize the preferences popup
        • Customize the theme & UI
        • Load notice by ID
      • Third-party SDKs
      • Share consents across devices
      • Share consent with WebViews
      • Google Consent Mode v2
      • FAQ
    • AMP SDK
      • Blocking Behaviors
        • Load immediately on page load
        • Load only after consent (positive or negative)
        • Load only after positive consent
      • Consent status for vendors
    • Help & Support
  • API
    • Introduction
      • Authentication
      • Errors
      • Pagination
      • Filters
      • Caching
      • Rate limiting
      • Quotas
      • Translations
    • Data Manager
      • Regulations
      • Configuration Tree
      • Purposes
        • Purposes & Vendors Numerical IDs
      • Preferences Library
      • User Rights
    • Widgets
      • Consent notices
        • Notices
        • Configurations
        • Multi-Regulation Configurations
          • Migration of Existing Notices and API Updates
        • Deployments
        • Tutorials
          • Create and publish a consent notice
          • Create and publish a multi-regulation consent notice
      • Privacy widgets
        • Create a widget
        • Retrieve widgets
        • Edit a widget
          • Content & Design
            • Themes & Shapes
            • Components
              • auth
              • dsar_form
              • footer
              • header
              • preference
              • preference_value
              • save
              • section
              • sections
            • Options
          • Purposes & preferences
          • Settings
        • Deploy a Widget
          • Use your own subdomain
          • Use your own domain
          • Implement an embeddable widget on your website
        • Authentication
          • Manage authentication providers
          • Authenticate your end-user
        • Archive a widget
        • Headless widgets
          • Public Methods
          • Custom elements
          • Custom events
          • Event listeners
        • Tutorial
          • Launch a Preference Center from a mobile app
    • Compliance Reports
      • Properties
      • Reports
      • CSV format reference
      • Websites
    • Consents and Preferences
      • Events
        • Generate IAB TCF consent string
      • Links
      • Proofs
      • Tokens
      • Secrets
      • Users
      • Tutorial
        • Collect and operate data
    • Privacy Requests
      • Requests
      • Notes
      • Links
      • Emails
  • Integrations
    • Introduction
      • Quotas
    • Generic integrations
      • Batch export
        • Destinations
          • AWS S3 Bucket (owned by Didomi)
          • GCP Storage Bucket
        • Exported data
          • Notices consents
        • Logs
      • Webhooks
      • Batch import
      • Analytics export
        • Destinations
          • AWS S3 Bucket (owned by Didomi)
          • GCP Storage Bucket
    • Third-party apps
      • CMP integrations
        • Didomi-mParticle integration for your CMP
        • Deploy Didomi’s SDK for your Adobe Commerce website
      • Preference Management Platform integrations
        • Actito
        • Adobe Campaign Classic
        • Adobe Experience Cloud
        • Adobe Marketo Engage
        • Adobe Source Connector
        • Braze
        • Dotdigital
        • Hubspot
        • Mailchimp
        • Microsoft Dynamics 365
        • Salesforce Marketing Cloud
        • Salesforce Sales & Service Cloud
        • Selligent
        • Brevo (ex Sendinblue)
    • Tutorials
      • Configure a HTTP webhook
      • Configure a batch export
      • Configure an analytics export
    • Emailing
      • Configurations
        • Actito Email
        • Actito SMS
        • Adobe Campaign Classic
        • Adobe Campaign Standard
      • Emails
        • Templates
        • Manage your templates
Powered by GitBook
On this page
  • Create a preference
  • Get all preferences
  • Get a preference
  • Edit a preference
  • Delete a preference
  1. API
  2. Data Manager

Preferences Library

A preferences library is a set of re-usable preferences.

Each preference created in the preferences library can be used several times in the configuration tree allowing a more granular choice to be offered to the user for given purposes.

A collection of preferences facilitates analysis of user's choices made on your widgets.

Preferences

A Preference is an opportunity to collect information about user's intentions, motivations and interests.

Each preference has several choices (values) and can be added to one or multiple purpose(s) to offer a more granular choice to the user.

Preferences should match with different marketing use cases. Some examples:

  • Topic and content choices

  • Frequency options

  • Custom customer data questions

  • Privacy policies, programmes and certifications

  • Access to privacy rights information

Values

A value is a string and is always linked to a preference. When you create a preference, you create a list of values from where the user will be able to choose from.

You can see the preference as the question and the value as one of the answer to that question.

Create a preference

To add a preference in your Preferences Library, send a POST request on /preferences.

POST https://api.didomi.io/preferences?organization_id=YOUR_ORG_ID

{
  "name": {
    "en": "String",
    "fr": "String"
  },
  "description": {
    "en": "String",
    "fr": "String"
  },
  "metadata": {},
  /**
  * single: users will be able to make only one choice for this preference
  * multi: users will be able to make multiple choices for this preference  
  */
  "type": "single || multi",
  "values": [
    {
      "name": {
        "en": "String",
        "fr": "String"
      },
      "metadata": {},      
    },
    {
      "name": {
        "en": "String",
        "fr": "String"
      },
      "metadata": {},
    }    
  ]
}

Get all preferences

To retrieve the list of all your preferences, send a GET request on /preferences.

GET https://api.didomi.io/preferences?organization_id=YOUR_ORG_ID

{
  "total": 0,
  "limit": 0,
  "skip": 0,
  "data": [
    {
      "id": "string",
      "created_at": "Date",
      "updated_at": "Date",
      "name": {
        "en": "String",
        "fr": "String"
      },
      "description": {
        "en": "String",
        "fr": "String"
      },
      "metadata": {},      
      "organization_id": "string",
      "type": "single",
      "values": [
        {
          "id": "string",
          "created_at": "Date",
          "updated_at": "Date",
          "name": {
            "en": "String",
            "fr": "String"
          },
          "metadata": {},
          "order": 0
        },
        {
          "id": "string",
          "created_at": "Date",
          "updated_at": "Date",
          "name": {
            "en": "String",
            "fr": "String"
          },
          "metadata": {},          
          "order": 1
        }
      ]
    }
  ]
}

Get a preference

To retrieve a preference from your Preferences Library, send a GET request on /preferences/{id}.

GET https://api.didomi.io/preferences/{id}?organization_id=YOUR_ORG_ID

{
  "id": "string",
  "created_at": "Date",
  "updated_at": "Date",
  "name": {
    "en": "String",
    "fr": "String"
  },
  "description": {
    "en": "String",
    "fr": "String"
  },
  "metadata": {},  
  "organization_id": "string",
  "type": "single",
  "values": [
    {
      "id": "string",
      "created_at": "Date",
      "updated_at": "Date",
      "name": {
        "en": "String",
        "fr": "String"
      },
      "metadata": {},      
      "order": 0
    }
  ]
}

Edit a preference

To edit a preference in your Preferences Library, send a PATCH request on /preferences/{id}.

PATCH https://api.didomi.io/preferences/{id}?organization_id=YOUR_ORG_ID

{
  "name": {
    "en": "String",
    "fr": "String"
  },
  "description": {
    "en": "String",
    "fr": "String"
  },
  "metadata": {},
  "type": "single",
  "values": [
    {
      "id": "string",
      "name": {
        "en": "String",
        "fr": "String"
      },
      "metadata": {},
    }
  ]
}

Note that values order edition is not supported.

When you are editing a preference, all existing values in values array need to be included in your PATCH request so they are not deleted.

Delete a preference

To delete a preference from your Preferences Library, send a DELETE request on /preferences/{id}.

DELETE https://api.didomi.io/preferences/{id}?organization_id=YOUR_ORG_ID
PreviousPurposes & Vendors Numerical IDsNextUser Rights

Last updated 1 year ago

Didomi supports translations. Add your translated content by using available keys detailed .

here