I am trying to add consents for a profile using curl
request as provided in Apache Unomi documentation:
curl -X POST http://localhost:8181/cxs/context.json?sessionId=1234 \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"source":{
"itemId":"homepage",
"itemType":"page",
"scope":"example"
},
"events": [
{
"scope":"unomi-tracker-test",
"eventType":"modifyConsent",
"source":{
"itemType":"page",
"scope":"example",
"itemId":"anItemId"
},
"target":{
"itemType":"profile",
"scope":"unomi-tracker-test",
"itemId":"d501a4be-8568-484d-8550-a01a6a13aca2"},
"properties":{
"consent":{
"typeIdentifier":"newsletter",
"scope":"unomi-tracker-test",
"status":"GRANTED",
"statusDate":"2018-05-22T09:27:09.473Z",
"revokeDate":"2020-05-21T09:27:09.473Z"
}
}
}
]
}
EOF
On hitting this POST
request, the consents are not updated in profile.
Here, I have replaced itemType for target with "profile" and itemId with my profileId.
Is there anything else I am missing?