Delete Customer (GDPR)
Anonymises the Azotte projection of the customer. The record is not physically deleted — it is rewritten so all PII fields become GDPR-compliant placeholders while non-PII operational data (subscription IDs, payment history references, analytics keys) is preserved.
URL
POST /api/c2a/customer/delete
Request Parameters
Body: DeleteCustomerRequest.
| Name | Type | Description |
|---|---|---|
customerUuid | string | Required. The Azotte CustomerUrn to anonymise. |
Request Example
{ "customerUuid": "cu.00.482" }
Response Parameters
DeleteCustomerResponse.
| Name | Type | Description |
|---|---|---|
status | object (AzotteStatus) | Operation status envelope. |
status.messageCode | string | SUCCESS on hit. |
Sample Response
{ "status": { "messageCode": "SUCCESS" } }
Behaviour
- Idempotent: calling delete on an already-anonymised record returns
SUCCESSand changes nothing. - Open subscriptions are not canceled by this call — cancel them via the Subscription API first if you also want billing to stop.
- Historical / analytical aggregations remain queryable via the customer key.
Sample Codes
- cURL
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
curl --location 'https://acme.sandbox.azotte.com/api/v1/c2a/customer/delete' \
--header 'Content-Type: application/json' \
--header 'x-tn: e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f' \
--header 'x-api-key: sk_dev_acme_sample_123456789' \
--data '{ "customerUuid": "cu.00.482" }'
const res = await fetch('https://acme.sandbox.azotte.com/api/v1/c2a/customer/delete', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-tn': 'e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f',
'x-api-key': 'sk_dev_acme_sample_123456789'
},
body: JSON.stringify({ customerUuid: 'cu.00.482' })
});
console.log(await res.json());
import { request } from 'undici';
const { body } = await request('https://acme.sandbox.azotte.com/api/v1/c2a/customer/delete', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-tn': 'e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f',
'x-api-key': 'sk_dev_acme_sample_123456789'
},
body: JSON.stringify({ customerUuid: 'cu.00.482' })
});
console.log(await body.json());
import requests
res = requests.post(
'https://acme.sandbox.azotte.com/api/v1/c2a/customer/delete',
headers={
'Content-Type': 'application/json',
'x-tn': 'e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f',
'x-api-key': 'sk_dev_acme_sample_123456789',
},
json={'customerUuid': 'cu.00.482'},
)
print(res.json())
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
HttpClient client = HttpClient.newHttpClient();
HttpRequest req = HttpRequest.newBuilder()
.uri(URI.create("https://acme.sandbox.azotte.com/api/v1/c2a/customer/delete"))
.header("Content-Type", "application/json")
.header("x-tn", "e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f")
.header("x-api-key", "sk_dev_acme_sample_123456789")
.POST(HttpRequest.BodyPublishers.ofString("{\"customerUuid\":\"cu.00.482\"}"))
.build();
HttpResponse<String> res = client.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println(res.body());
using var http = new HttpClient();
http.DefaultRequestHeaders.Add("x-tn", "e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f");
http.DefaultRequestHeaders.Add("x-api-key", "sk_dev_acme_sample_123456789");
var content = new StringContent(
"{\"customerUuid\":\"cu.00.482\"}",
System.Text.Encoding.UTF8,
"application/json");
var res = await http.PostAsync(
"https://acme.sandbox.azotte.com/api/v1/c2a/customer/delete",
content);
Console.WriteLine(await res.Content.ReadAsStringAsync());
<?php
$ch = curl_init('https://acme.sandbox.azotte.com/api/v1/c2a/customer/delete');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'x-tn: e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f',
'x-api-key: sk_dev_acme_sample_123456789',
],
CURLOPT_POSTFIELDS => json_encode(['customerUuid' => 'cu.00.482']),
]);
echo curl_exec($ch);
curl_close($ch);
package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
body := bytes.NewBufferString(`{"customerUuid":"cu.00.482"}`)
req, _ := http.NewRequest("POST",
"https://acme.sandbox.azotte.com/api/v1/c2a/customer/delete", body)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("x-tn", "e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f")
req.Header.Set("x-api-key", "sk_dev_acme_sample_123456789")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(string(out))
}