Native Message API - Vendor url mapping

The Vendor Purpose Mapping API is intended to be used by publishing systems to help determine if a vendor URL has been defined appropriately in the Sourcepoint System. This API can help developers that are integrating with Content Management Systems (CMS) verify that a URL referenced in content can be related to Vendor and Purpose consent preferences that can be queried and set based on user actions.

The vendor url mapping API call returns a JSON response, listing an array of vendors that are matched to a set of urls passed in the request. This article describes the implementation, the JSON response with examples examples of both.


POST API call - Vendor url mapping

In order for this API to be relevant, an administrator needs to set up the URL mappings in their Vendor Lists. The URL mapping setting can be set in the Vendor List manager, by opening the appropriate Vendor List, selecting the vendor to which you wish to maps a URL, and adding the matching rules.

vendor_match_rules.png

Any number of patterns can be added to match a URL to a vendor. These mapping must be set up in the Sourcepoint portal before this API can be used.

  Note: Do not create patterns that can be matched to multiple vendors as this will cause errors.

POST API call

This POST API call requires values for parameters to be sent in the body of the request:

https://cdn.privacy-mgmt.com/consent/tcfv2/vendor-list/vendor-url-mapping

Body params

Body param Required Description
siteId Yes Site id of property setup. Can be found in the Sourcepoint dashboard
vendorUrls Yes An array of urls to be matched against
allCategoryMapping No If set will return an array of "categoryMapping"; example format below. For every vendor in the vendor list, the purposes set for that vendor along with the legal basis defined

Example implementation

Your organization can call the API endpoint using a serve- side script or a third-party service like Postman.

JSON body With Postman PHP code
{
    "siteId": "16992",
    "vendorUrls": ["www.sourcepoint.com", "www.bahn.de"],
    "allCategoryMapping": "true"
}

JSON response

The response from the native message API call is a JSON string with several objects & values. The following is a description of the JSON response with their objects and values.

Field Description
url object The url that is being mapped
matchPattern, patterns object Click here
vendorId object Sourcepoint id for this vendor
vendorType object The vendor type e.g. IAB, Custom
iabId object The vendor type e.g. IAB, Custom
name object The vendor name
policyUrl object The url to the vendor's privacy policy
purposes object Click here

matchPattern, patterns object

Field Description
type object The type of match made to the urlPattern e.g. "MATCH", "BEGINS_WITH", "ENDS_WITH"
urlPattern object The url pattern for comparison

purposes object

Field Description
_id object The Sourcepoint id for the purpose
type object What type of consent is provided by the vendor e.g. "CONSENT", "LEGITIMATE_INTEREST"
Sample - JSON response
{
   "vendorUrlMapping": [
      {
         "url": "www.sourcepoint.com",
         "matchPattern": [
            {
               "ruleBoolean": true,
               "type": "MATCHES",
               "urlPattern": "www.sourcepoint.com"
            }
         ],
         "rules": [
            {
               "patterns": [
                  {
                     "ruleBoolean": true,
                     "type": "MATCHES",
                     "urlPattern": "www.sourcepoint.com"
                  }
               ]
            }
         ],
         "vendorId": "5e7ced57b8e05c47e418b73c",
         "vendorType": "IAB",
         "iabId": 109,
         "name": "LoopMe Limited",
         "description": null,
         "policyUrl": "https://loopme.com/privacy-policy/",
         "purposes": [
            {
               "_id": "60925aa29ccb1d3420efabf7",
               "type": "CONSENT"
            },
            {
               "_id": "60925aa29ccb1d3420efabfe",
               "type": "CONSENT"
            },
            {
               "_id": "60925aa29ccb1d3420efac05",
               "type": "CONSENT"
            },
            {
               "_id": "60925aa29ccb1d3420efac0b",
               "type": "CONSENT"
            },
            {
               "_id": "60925aa29ccb1d3420efac12",
               "type": "LEGITIMATE_INTEREST"
            },
            {
               "_id": "60925aa29ccb1d3420efac19",
               "type": "CONSENT"
            },
            {
               "_id": "60925aa29ccb1d3420efac20",
               "type": "CONSENT"
            },
            {
               "_id": "60925aa29ccb1d3420efac27",
               "type": "CONSENT"
            },
            {
               "_id": "60925aa29ccb1d3420efac2e",
               "type": "CONSENT"
            },
            {
               "_id": "60925aa29ccb1d3420efac36",
               "type": "CONSENT"
            }
         ]
      },
      {
         "url": "www.bahn.de",
         "matchPattern": [
            {
               "ruleBoolean": true,
               "type": "MATCHES",
               "urlPattern": "www.bahn.de"
            }
         ],
         "rules": [
            {
               "patterns": [
                  {
                     "ruleBoolean": true,
                     "type": "MATCHES",
                     "urlPattern": "www.bahn.de"
                  }
               ]
            }
         ],
         "vendorId": "5e37fc3e56a5e6614776722e",
         "vendorType": "IAB",
         "iabId": 467,
         "name": "Haensel AMS GmbH",
         "description": null,
         "policyUrl": "https://haensel-ams.com/data-privacy/",
         "purposes": [
            {
               "_id": "60925aa29ccb1d3420efac2e",
               "type": "CONSENT"
            },
            {
               "_id": "60925aa29ccb1d3420efac36",
               "type": "CONSENT"
            }
         ]
      }
   ]
}
Was this article helpful?
0 out of 0 found this helpful