/api/v2/customers/{customer}
Requires authentication
v2
Send a bearer token in the Authorization header.
Permanently removes the customer and anonymises their orders. Prefer archiving via the update endpoint.
Full URL: https://api.acme.example/api/v2/customers/{customer}
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| customer | integer | yes | The customer id. |
Responses
204 Deleted.
No response body.
409 The customer has an open order and cannot be deleted.
Example request
curl -X DELETE 'https://api.acme.example/api/v2/customers/1' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Accept: application/json'
const response = await fetch('https://api.acme.example/api/v2/customers/1', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Accept': 'application/json'
}
});
const data = await response.json();
use Illuminate\Support\Facades\Http;
$response = Http::withHeaders([
'Authorization' => 'Bearer YOUR_TOKEN',
'Accept' => 'application/json',
])->delete('https://api.acme.example/api/v2/customers/1');
$data = $response->json();
use GuzzleHttp\Client;
$client = new Client();
$response = $client->request('DELETE', 'https://api.acme.example/api/v2/customers/1', [
'headers' => [
'Authorization' => 'Bearer YOUR_TOKEN',
'Accept' => 'application/json',
],
]);
$data = json_decode((string) $response->getBody(), true);