In the Didomi Consent String, purposes and vendors are identified by a numerical ID. Each time a notice is published, Didomi generates the numerical IDs for the vendors and purposes contained in the notice (if they do not already have numerical IDs).
To be able to decode the consent string, you will need a mapping of purposes and vendors string IDs to their numerical IDs. Use these requests:
Copy curl --request GET \
--url https://api.didomi.io/metadata/numeric-partners \
--header 'accept: application/json' \
--header 'authorization: Bearer <TOKEN>' \
--header 'content-type: application/json'
Copy {
"total": 3,
"limit": 100,
"skip": 0,
"data": [
{
"created_at": "2023-06-09T12:14:02.828Z",
"updated_at": "2023-06-09T12:14:02.828Z",
"metadata_partner_id": "googleana-4TXnJigR",
"numeric_id": 1,
"organization_id": "didomi-test"
},
{
"created_at": "2023-06-09T12:14:02.828Z",
"updated_at": "2023-06-09T12:14:02.828Z",
"metadata_partner_id": "google",
"numeric_id": 2,
"organization_id": "didomi-test"
},
{
"created_at": "2023-06-09T12:21:04.583Z",
"updated_at": "2023-06-09T12:21:04.583Z",
"metadata_partner_id": "tappx-jjy49eFA",
"numeric_id": 3,
"organization_id": "didomi-test"
}
]
}
Copy curl --request GET \
--url https://api.didomi.io/metadata/numeric-purposes \
--header 'accept: application/json' \
--header 'authorization: Bearer <TOKEN>' \
--header 'content-type: application/json'
Copy {
"total": 4,
"limit": 100,
"skip": 0,
"data": [
{
"created_at": "2023-06-09T12:14:02.839Z",
"updated_at": "2023-06-09T12:14:02.839Z",
"metadata_purpose_id": "analytics",
"numeric_id": 5,
"organization_id": "didomi-test"
},
{
"created_at": "2023-06-09T12:14:02.839Z",
"updated_at": "2023-06-09T12:14:02.839Z",
"metadata_purpose_id": "content_personalization",
"numeric_id": 6,
"organization_id": "didomi-test"
},
{
"created_at": "2023-06-09T12:14:02.839Z",
"updated_at": "2023-06-09T12:14:02.839Z",
"metadata_purpose_id": "create_ads_profile",
"numeric_id": 7,
"organization_id": "didomi-test"
},
{
"created_at": "2023-06-09T12:14:02.839Z",
"updated_at": "2023-06-09T12:14:02.839Z",
"metadata_purpose_id": "create_content_profile",
"numeric_id": 8,
"organization_id": "didomi-test"
}
]
}