The Vendor URL 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 which can be queried and set based on user actions.
In this article, we will cover how to leverage Sourcepoint's vendor URL mapping API to retrieve vendors that are matched to a set of URLs passed in the request.
Prerequisite
The vendor URL mapping API will return the vendors that have URL mappings which match the vendorUrls
passed in the request. These mapping must be configured within the Sourcepoint portal before this API can be used.
Configure the URL mappings for vendors by navigating to the the GDPR TCF vendor list associated with the property and selecting a vendor from the list.
Click URL Mappings in the modal and select Add Pattern.
Use the provided fields to configure conditions of the pattern. Your organization can create patterns with multiple condition statements. Additionally, you can configure multiple patterns for the vendor.
Click Apply changes when finished.
Repeat as necessary for other vendors.
Note: Do not create patterns that can be matched to multiple vendors as this will cause errors.
Click Save in vendor list builder to confirm all changes.
API endpoint
Utilize a POST request to retrieve the vendor URL mapping for a specific property from the following endpoint:
POST https://cdn.privacy-mgmt.com/consent/tcfv2/vendor-list/vendor-url-mapping
When making your POST request to the endpoint you will need to include the following body data (in type JSON):
Attribute | Required | Description |
siteId |
true |
The site ID value is the same as the Property ID on the property for which you are making the request. It can be found on the Properties page inline with the property name. |
vendorUrls |
true | An array of URLs to be matched against. |
allCategoryMapping |
false | When set to true , will return categoryMapping array which details all the vendors and their configured purposes for the property. |
API response
The response will return the vendorUrlMapping
array which represents the vendors on the vendor list associated with the property with patterns that match the URL passed in the request.
Key | Type | Value |
url |
String | The URL that is being mapped and has been passed in the body of the request. |
matchPattern |
Array | The pattern(s) matched for a particular vendor. |
rules |
Array | An array with all patterns configured for the vendor. |
vendorId |
String | The Sourcepoint ID for the vendor |
vendorType |
String | The type of vendor (e.g. IAB, Custom, etc...) |
iabId |
Num | If available, the vendor's IAB ID. |
name |
String | The name of the vendor |
description |
String | If configured for the vendor in the Sourcepoint portal, the description of the vendor. |
policyUrl |
String | If available, the URL to the vendor's privacy policy |
purposes |
Array | An array of objects that detail the purposes configured for the vendor. |
categoryMapping |
Array | Only returned if the allCategoryMapping attribute is set to true in the body of the request. Details all the vendors and their configured purposes for the property. |
purposes
Key | Type | Value |
id |
String | The unique ID for a vendor on the vendor list associated with the property |
type |
String | The legal basis configured for the purpose. |
matchPattern
Key | Type | Value |
ruleBoolean |
Boolean | The boolean field in the pattern configuration for the vendor (i.e. MUST or MUST NOT). |
type |
String | The type of match made to the urlPattern (e.g. "MATCH", "BEGINS_WITH", "ENDS_WITH") |
urlPattern |
String | The URL pattern for comparison. |
rules {patterns}
Key | Type | Value |
ruleBoolean |
Boolean | The boolean field in the pattern configuration for the vendor (i.e. MUST or MUST NOT). |
type |
String | The type of match made to the urlPattern (e.g. "MATCH", "BEGINS_WITH", "ENDS_WITH") |
urlPattern |
String | The URL pattern for comparison. |
{
"vendorUrlMapping": [
{
"url": "www.sourcepoint.com",
"matchPattern": [
{
"ruleBoolean": true,
"type": "CONTAINS",
"urlPattern": "sourcepoint.com"
}
],
"rules": [
{
"patterns": [
{
"ruleBoolean": true,
"type": "CONTAINS",
"urlPattern": "sourcepoint.com"
}
]
}
],
"vendorId": "5f23e826b8e05c0c0d4fdb8f",
"vendorType": "IAB",
"iabId": 590,
"name": "Sourcepoint Technologies, Inc. (non-CMP)",
"description": null,
"policyUrl": "https://www.sourcepoint.com/privacy-notice/",
"purposes": [
{
"_id": "5fd7e01e32bd4d27654ba1d5",
"type": "CONSENT"
},
{
"_id": "5fd7e01e32bd4d27654ba1f3",
"type": "CONSENT"
},
{
"_id": "5fd7e01e32bd4d27654ba1ff",
"type": "CONSENT"
},
{
"_id": "5fd7e01e32bd4d27654ba20b",
"type": "CONSENT"
}
]
}
]
}