Revoke a consent receipt or purpose subset
curl --request POST \
--url https://api.swapnice.com/v1/consent-receipts/{receipt_id}/revoke \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"purposes": [],
"note": "<string>"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({purposes: [], note: '<string>'})
};
fetch('https://api.swapnice.com/v1/consent-receipts/{receipt_id}/revoke', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.swapnice.com/v1/consent-receipts/{receipt_id}/revoke"
payload = {
"purposes": [],
"note": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"workflow_id": "<string>",
"status": "accepted",
"accepted_at": "2023-11-07T05:31:56Z",
"status_url": "<string>"
}{
"error": {
"code": "consent_denied",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "consent_denied",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}
}Consent
Revoke consent
Revoke one or more purposes. Ingest and purpose-scoped reads fail closed immediately.
POST
/
v1
/
consent-receipts
/
{receipt_id}
/
revoke
Revoke a consent receipt or purpose subset
curl --request POST \
--url https://api.swapnice.com/v1/consent-receipts/{receipt_id}/revoke \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"purposes": [],
"note": "<string>"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({purposes: [], note: '<string>'})
};
fetch('https://api.swapnice.com/v1/consent-receipts/{receipt_id}/revoke', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.swapnice.com/v1/consent-receipts/{receipt_id}/revoke"
payload = {
"purposes": [],
"note": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"workflow_id": "<string>",
"status": "accepted",
"accepted_at": "2023-11-07T05:31:56Z",
"status_url": "<string>"
}{
"error": {
"code": "consent_denied",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "consent_denied",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}
}Revoke one or more purposes. Ingest and purpose-scoped reads fail closed immediately.
Returns
202 and a workflow_id. Stop using that customer’s intelligence for the revoked purposes.Authorizations
OAuth 2.1 authorization code with PKCE. Implicit and password flows are unsupported.
Headers
Required for mutating requests. Replays with the same key and payload hash return
the original logical result; replays with a different payload hash return 409.
Required string length:
16 - 255Path Parameters
Body
application/json
Available options:
user_request, partner_request, policy_change, account_disconnected, other If omitted, revoke all purposes on the receipt.
Available options:
account_linking, personalization, analytics, support, event_enrichment, profile_resolution, measurement ⌘I