API Reference

getCustomVendorConsents

The getCustomVendorConsents command returns an object that contains information on vendors an end-user consents to, and the legitimate interest and consent purposes mapped to a vendor.


Command

//Input getCustomVendorConsents in browser console
window._sp_.gdpr.getCustomVendorConsents((vendorConsents, success) => console.log(vendorConsents));

Response

{
  "consentedAll": true,
  "consentedPurposes": [
    {
      "_id": "5fd7e01e32bd4d27654ba1d5",
      "name": "Custom purpose name 1"
    }
  ],
  "consentedVendors": [
    {
      "_id": "abcde01e32bd4d27654ba1d5",
      "name": "Vendor example name",
      "vendorType": "CUSTOM"
    }
  ],
  "dateCreated": "2023-05-26T14:12:48.333Z",
  "grants": {
    "5f1aada6b8e05c306c0597d7": {
      "purposeGrants": {
        "5fd7e01e32bd4d27654ba1d5": true
      },
      "vendorGrant": true
    }
  },
  "legIntPurposes": [
    {
      "_id": "6011ea75c5d9c787531b3ede",
      "name": "Custom purpose name 2"
    }
  ],
  "newUser": false
}
schema:
  type: object
  properties:
    consentedAll:
      type: boolean
      description: End-user has consented to all vendors
    consentedPurposes:
      type: array
      description: Lists the purposes that apply to the end-user
      items:
        type: object
        properties:
          _id:
            type: string
            description: Purpose ID
          name:
            type: string
            description: Purpose name in vendor list
    consentedVendors:
      type: array
      description: Lists the custom vendors in the vendor list that apply to the end-user
      items:
        type: object
        properties:
          _id:
            type: string
            description: Custom vendor ID
          name:
            type: string
            description: Custom vendor name as described in vendor list
          vendorType:
            type: string
            description: The vendor type
    dateCreated:
      type: string
      description: Date consent status was created
    grants:
      type: object
      description: Contains the applicable purposes and the consent status for that vendor
      properties:
        vendorId: #value will be a string of the vendor's ID
          type: object
          properties:
            purposeGrants:
              type: object
              description: Contains all applicable purposes (identified by its purpose_id) for the vendor and whether consent was given from the end-user.
              properties:
                purposeId: #value will be a string of the purpose ID
                  type: boolean
            vendorGrant:
              type: boolean
              description: true if end-user granted consent to all applicable purposes for the vendor | false if end-user has not given consent to one or more applicable purposes for the vendor
    legIntPurposes:
      type: array
      description: Lists a purpose who uses legitimate interest as a legal basis for at least one vendor on your vendor list.
      items:
        type: object
        properties:
          _id:
            type: string
            description: The purpose ID
          name:
            type: string
            description: Purpose name as described in vendor list
    newUser:
      type: boolean
      description: Is the end-user a first time visitor to the property?