HTTP endpoints
eraseCustomer
Erase a referred customer's personal data: order emails, identity signals, reasons and raw provider bodies. Orders and rewards keep the customer ID. Safe to repeat. Needs partners:write.
POST /api/v1/customers/{customerId}/erase
Requires partners:write. Keep the Bearer key on your server.
SDK
ts
grizzlee.eraseCustomer(customerId: string): Promise<CustomerErasureResult>HTTP
Use your backend's HTTP client. The cURL request shows the wire format. Replace path parameters and example values.
sh
curl --fail-with-body --request POST \
'https://app.grizzlee.ca/api/v1/customers/{customerId}/erase' \
-H "Authorization: Bearer $GRIZZLEE_SERVER_KEY"Response
HTTP responses wrap this value in data. The SDK returns the value directly unless the note above describes a wrapper.
| Field | Type | Required | Details |
|---|---|---|---|
customerId | string | Yes | |
erasedAt | string | Yes | When the customer was first erased. |
alreadyErased | boolean | Yes | True when an earlier call already erased the customer. This call still removed anything new. |
erased | object | Yes |
erased
| Field | Type | Required | Details |
|---|---|---|---|
erased.identitySignals | number | Yes | Hashed identity signals deleted. |
erased.orderEmails | number | Yes | Orders whose customerEmail was removed. Customers only. |
erased.customerDisplayNames | number | Yes | Saved display names removed from referrals, orders and cached claims. Customers only. |
erased.events | number | Yes | Saved copies of processed events that lost an email or a revocation, reinstatement or order adjustment reason. Customers only. |
erased.notes | number | Yes | Free-text reasons replaced with ERASED_TEXT: reward rejection reasons, milestone revocation and reinstatement reasons, failed delivery reasons and, for customers, the reasons on their orders' adjustments. Also counts provider promo code names erased for a partner. Each order counts once. |
erased.auditEntries | number | Yes | Activity log entries rewritten without the name or reasons. |
erased.webhookEvents | number | Yes | Webhook payloads rewritten, delivered or not. |
erased.providerEvents | number | Yes | Raw payment provider webhook bodies deleted. Customers only. |
erased.embedSessions | number | Yes | Embed sessions deleted. Partners only. |
erased.partnerAccess | number | Yes | Partner dashboard memberships and invitations removed, plus stored logins no company uses any more. Partners only. |
erased.partnerEmails | number | Yes | Partner email log rows whose recipient address was removed, plus queued emails that will not be sent. Partners only. |
Response schema
json
{
"type": "object",
"properties": {
"customerId": {
"type": "string"
},
"erasedAt": {
"type": "string",
"description": "When the customer was first erased."
},
"alreadyErased": {
"type": "boolean",
"description": "True when an earlier call already erased the customer. This call still removed anything new."
},
"erased": {
"type": "object",
"properties": {
"identitySignals": {
"type": "number",
"description": "Hashed identity signals deleted."
},
"orderEmails": {
"type": "number",
"description": "Orders whose customerEmail was removed. Customers only."
},
"customerDisplayNames": {
"type": "number",
"description": "Saved display names removed from referrals, orders and cached claims. Customers only."
},
"events": {
"type": "number",
"description": "Saved copies of processed events that lost an email or a revocation, reinstatement or order\nadjustment reason.\nCustomers only."
},
"notes": {
"type": "number",
"description": "Free-text reasons replaced with ERASED_TEXT: reward rejection reasons, milestone revocation\nand reinstatement reasons, failed delivery reasons and, for customers, the reasons on their\norders' adjustments. Also counts provider promo code names erased for a partner.\nEach order counts once."
},
"auditEntries": {
"type": "number",
"description": "Activity log entries rewritten without the name or reasons."
},
"webhookEvents": {
"type": "number",
"description": "Webhook payloads rewritten, delivered or not."
},
"providerEvents": {
"type": "number",
"description": "Raw payment provider webhook bodies deleted. Customers only."
},
"embedSessions": {
"type": "number",
"description": "Embed sessions deleted. Partners only."
},
"partnerAccess": {
"type": "number",
"description": "Partner dashboard memberships and invitations removed, plus stored logins no company uses\nany more. Partners only."
},
"partnerEmails": {
"type": "number",
"description": "Partner email log rows whose recipient address was removed, plus queued emails that will not\nbe sent. Partners only."
}
},
"required": [
"identitySignals",
"orderEmails",
"customerDisplayNames",
"events",
"notes",
"auditEntries",
"webhookEvents",
"providerEvents",
"embedSessions",
"partnerAccess",
"partnerEmails"
]
}
},
"required": [
"customerId",
"erasedAt",
"alreadyErased",
"erased"
]
}Errors
Failures return { "error": { "code": "...", "message": "...", "details": {} } }. Details are optional. See error statuses. Reuse an unchanged event payload when retrying.