TrustCommander (deprecated)
Community home
English
English
  • Overview
  • Responsability of actors
  • Releases notes
  • Setup Guides
    • Tag Manager
      • TagCommander
      • Google Tag Manager (GTM)
      • Consent Mode
      • Consent Mode in GTM
      • Adobe Launch
    • Websites (Hardcoded)
    • Mobile apps
      • iOS
        • ATT - App Tracking Transparency (iOS 14.5+)
      • Android
  • User Guides
    • Categories & Tags
      • Manage Categories
      • Manage Vendors
      • Assign Categories
    • Privacy Banners
      • Banner Templates
        • Accessibility Template
      • Manage Banner
      • Deploy Banner
      • Copy Banner
    • Dashboard
    • Exports
    • Options
  • Extensions
    • Cookie Scanner
    • TagFirewall
    • Tag Hierarchy
  • Marketing Preferences Center
    • Marketing Preferences Center (Trust Premium only)
  • Knowledge Base
    • Consent Object
    • TrustCommander cookies exemption
    • Consent Cookie
    • IAB TCF V2.0 Consent
    • IAB TCF V2.0 and Google FAQ
  • Rest data API
    • GET/PUT Consents / preferences
  • Onsite API
    • Getting Started
    • consent.get
    • consent.update
    • consent.revoke
    • consent.onUpdate
    • consent.onReady
    • consentBanner.show
    • consentBanner.hide
    • consentCenter.show
    • consentCenter.hide
  • PLATFORM API
    • Get statistics
Powered by GitBook
On this page
  • User Consents
  • Visitor Consents
  • User
  1. Rest data API

GET/PUT Consents / preferences

Get/put user consent stored in DataCommander

User Consents

GET https://api.commander1.com/engage/user/

This endpoint allows you to get categorie's consent for one specific user

Query Parameters

Name
Type
Description

token

string

Security token

user_id

string

ID of the user

site

integer

ID of the site

{
    "user_privacy_optin": 1,
    "user_privacy_categories": [
      "11",
      "12",
      "13"
    ]
}
{
    "message": "Person not found"
}

Visitor Consents

GET https://api.commander1.com/v1.0/engage/visitors/

This endpoint allows you to get categorie's consent for one specific visitor

Query Parameters

Name
Type
Description

callback

string

(optional) Callback for jsonp request

token

string

Security token

site

integer

ID of the site

tc_id

String

Optional. Cookie id of the user

{
    "user_privacy_optin": 1,
    "user_privacy_categories": [
      "11",
      "12",
      "13"
    ]
}
{
    "user_privacy_optin": 0,
    "user_privacy_categories": []
}
{
    "message": "visitor not found"
}

User

PUT https://api.commander1.com/engage/user/

Insert or update a preference in the database (require to have the DataCommander module activated)

Query Parameters

Name
Type
Description

site

string

Id of the site (account)

user_id

string

Id of the user. Required if tc_id parameter is not set

token

string

Security token

{"success":true}

Syntax and limitations

  • The json playload is represented by a key/value for each preference.

  • Each preference property (key) start with "preferences." followed by the preference name : preferences.your_preference_name

  • The preference name should not contain white space, dot or special characters. Its format is [A-Za-z0-9_-]

  • The preference value can contain white space, dot but not special characters.

  • The API accepts a maximum of 20 preferences

Example Request

PUT

https://api.commander1.com/engage/user/?site=1234&user_id=1234&token=WvNIX8955cnZ7WF0f632s0Wb99Ql3rtA

{
  "preferences": {
    "news_monthly": true,
    "news_sales": true
  }
}
PreviousIAB TCF V2.0 and Google FAQNextGetting Started

Last updated 3 years ago