Remove an affiliate from every program
Permission
affiliates:writeRate limit writesIdempotent with Idempotency-KeyTakes the person out of every program of the project and deletes their agreement acceptances for it. Earnings, payouts and debts stay; the contact itself is not deleted.
Authorization
ESTAGE-API-KeystringheaderrequiredA project key, est_live_…, from Settings → API keys. Call from server code only.
Path parameters
contactIdintegerrequiredHeaders
Idempotency-Keystring≤ 255 charsAny unique string per attempt. A retry with the same key gets the first answer back instead of doing the work twice.
RequestcURL
curl --request DELETE \ --url 'https://api.estage.com/v1/affiliates/contact-id' \ --header 'ESTAGE-API-Key: est_live_your-api-key' \ --header 'Idempotency-Key: your-unique-key'
OK
{
"data": {
"removed": true,
"programs_detached": 2,
"agreements_removed": 1
}
}Example. Errors are
{ error: { code, message, details } }.