Consent Docs

Pass instructions to processors

Read the stop and erase instructions in withdrawal and erasure webhooks, pass them to your Data Processors and report back what each one did.

How-to2 min readFor web, backend and mobile developers

When a person withdraws or is erased, the webhook lists an instruction for each partner you registered as a Data Processor. Your server passes each one on and reports back what the processor did.

Before you start#

  • Partners registered as Data Processors. See Register your processors.
  • A webhook endpoint for consent.withdrawn, consent.updated, consent.expired, subject.erased and subject.erased_inactive.
  • The consentId stored against your user when you record consent. A task holds no identifier, and after an erasure its fingerprint may be gone.
  • A secret key with Read processor tasks and Record what processors reported. Keep it apart from the key that erases people, because they share the 60-a-minute budget for calls on a person.

Pass on each instruction#

  1. Read data.processors in the event. Each entry has a taskId, the partner key and name, the action, the purposes and a dueOn.
  2. Find your user by data.consentId, or by data.subject.fingerprint.
  3. Call the processor: stop processing for the purposes on a STOP, erase on an ERASE.
  4. Keep the taskId with the request you made to the processor.
JSON
{
  "taskId": "2b9e4f61-0c3d-4a7e-8f15-6d2c9b0a7e34",
  "key": "nilgiri-mailers",
  "name": "Nilgiri Mailers",
  "action": "STOP",
  "purposes": ["marketing"],
  "dueOn": "2026-10-05T09:30:12.004Z",
  "retainLogsUntil": null
}

An ERASE may carry retainLogsUntil: the processor may keep its processing logs until then. A list is often empty: a change that shuts out no processor, or a person known only by a cookie or session id, writes no task.

Many processors accept an erase request at once and finish it later. Report the task when the processor confirms the work is done, not when it accepts the request.

Report back#

cURLShell
curl -X POST https://console.dpconsent.com/consent/sdk/v1/processor-tasks/acknowledge \
  -H "Authorization: Bearer $PIEDAP_PROCESSOR_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: nm-req-20431" \
  -d '{
    "acknowledgements": [{
      "taskId": "2b9e4f61-0c3d-4a7e-8f15-6d2c9b0a7e34",
      "outcome": "STOPPED",
      "completedOn": "2026-10-04",
      "reference": "NM-REQ-20431"
    }]
  }'
Node.jsJavaScript
const response = await fetch(
  'https://console.dpconsent.com/consent/sdk/v1/processor-tasks/acknowledge',
  {
    method: 'POST',
    headers: {
      Authorization: `Bearer ${process.env.PIEDAP_PROCESSOR_KEY}`,
      'Content-Type': 'application/json',
      'Idempotency-Key': 'nm-req-20431',
    },
    body: JSON.stringify({
      acknowledgements: [
        { taskId, outcome: 'STOPPED', reference: 'NM-REQ-20431' },
      ],
    }),
  },
);
const { results } = await response.json();

Each result is RECORDED, UNCHANGED for a repeat, or REFUSED with a code. Up to 200 reports go in one call. A final outcome cannot be changed later.

Poll for open tasks#

If a webhook was missed, list what is still open:

Shell
curl "https://console.dpconsent.com/consent/sdk/v1/processor-tasks?status=OPEN&limit=500" \
  -H "Authorization: Bearer $PIEDAP_PROCESSOR_KEY"

An open task stays listed until it is reported, so polling cannot miss one. Follow nextCursor for the next page.

Keep it private#

  • Do not point a processor at your webhook endpoint. The payload names the person and their other partners.
  • Send each processor only its own instruction and the identifier it already holds.
  • Write no names in note, reference or the evidence file name. Text that looks like an email address or a phone number is refused with TEXT_LOOKS_PERSONAL.
  • The product records what you report. It does not check that the processor acted.

↑↓ to move, Enter to open