curl --request DELETE \
--url https://api.lexio.rent/api/external/v1/customers/{customerId} \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.lexio.rent/api/external/v1/customers/{customerId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lexio.rent/api/external/v1/customers/{customerId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lexio.rent/api/external/v1/customers/{customerId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"type": "https://api.lexio.rent/errors/validation-failed",
"title": "Requête invalide",
"status": 400,
"code": "VALIDATION_FAILED",
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"errors": [
{
"pointer": "<string>",
"code": "required",
"detail": "<string>"
}
]
}{
"type": "https://api.lexio.rent/errors/api-key-disabled",
"title": "Clé API désactivée",
"status": 401,
"code": "API_KEY_DISABLED",
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>"
}{
"type": "https://api.lexio.rent/errors/feature-not-available",
"title": "Fonctionnalité non incluse",
"status": 403,
"code": "FEATURE_NOT_AVAILABLE",
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"feature": "<string>"
}{
"type": "https://api.lexio.rent/errors/not-found",
"title": "Ressource introuvable",
"status": 404,
"code": "NOT_FOUND",
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"resource": "RENTAL"
}{
"type": "https://api.lexio.rent/errors/idempotency-in-flight",
"title": "Requête identique en cours",
"status": 409,
"code": "IDEMPOTENCY_IN_FLIGHT",
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>"
}{
"type": "https://api.lexio.rent/errors/idempotency-key-reused",
"title": "Clé d’idempotence réutilisée",
"status": 422,
"code": "IDEMPOTENCY_KEY_REUSED",
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>"
}{
"type": "https://api.lexio.rent/errors/rate-limited",
"title": "Trop de requêtes",
"status": 429,
"code": "RATE_LIMITED",
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"limit": "PRE_AUTH",
"windowSeconds": 2,
"retryAfter": 1
}{
"type": "https://api.lexio.rent/errors/internal-error",
"title": "Erreur interne",
"status": 500,
"code": "INTERNAL_ERROR",
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>"
}Supprimer un client
Accès : customers.delete
Supprime définitivement un client, avec ses documents, notes et pièces d’identité ; 204 sans corps.
Refus : client lié à une location (titulaire ou conducteur, tout statut), une facture, un devis commercial ou un incident → 409 RESOURCE_IN_USE avec toutes les causes ; rien n’est supprimé. Pour effacer ses données personnelles, demandez son anonymisation au support Lexio (contact@lexio.rent).
Effets : un mandat de prélèvement SEPA est détaché chez Stripe ; si l’agence a connecté sa comptabilité, la fiche comptable est supprimée. Un échec de ces effets ne change pas la réponse.
curl --request DELETE \
--url https://api.lexio.rent/api/external/v1/customers/{customerId} \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.lexio.rent/api/external/v1/customers/{customerId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lexio.rent/api/external/v1/customers/{customerId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lexio.rent/api/external/v1/customers/{customerId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"type": "https://api.lexio.rent/errors/validation-failed",
"title": "Requête invalide",
"status": 400,
"code": "VALIDATION_FAILED",
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"errors": [
{
"pointer": "<string>",
"code": "required",
"detail": "<string>"
}
]
}{
"type": "https://api.lexio.rent/errors/api-key-disabled",
"title": "Clé API désactivée",
"status": 401,
"code": "API_KEY_DISABLED",
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>"
}{
"type": "https://api.lexio.rent/errors/feature-not-available",
"title": "Fonctionnalité non incluse",
"status": 403,
"code": "FEATURE_NOT_AVAILABLE",
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"feature": "<string>"
}{
"type": "https://api.lexio.rent/errors/not-found",
"title": "Ressource introuvable",
"status": 404,
"code": "NOT_FOUND",
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"resource": "RENTAL"
}{
"type": "https://api.lexio.rent/errors/idempotency-in-flight",
"title": "Requête identique en cours",
"status": 409,
"code": "IDEMPOTENCY_IN_FLIGHT",
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>"
}{
"type": "https://api.lexio.rent/errors/idempotency-key-reused",
"title": "Clé d’idempotence réutilisée",
"status": 422,
"code": "IDEMPOTENCY_KEY_REUSED",
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>"
}{
"type": "https://api.lexio.rent/errors/rate-limited",
"title": "Trop de requêtes",
"status": 429,
"code": "RATE_LIMITED",
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"limit": "PRE_AUTH",
"windowSeconds": 2,
"retryAfter": 1
}{
"type": "https://api.lexio.rent/errors/internal-error",
"title": "Erreur interne",
"status": 500,
"code": "INTERNAL_ERROR",
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>"
}Autorisations
Clé API lck_… créée dans Lexio (Paramètres → Développeur), envoyée en Authorization: Bearer. Voir Authentification.
En-têtes
Clé unique de l’opération, réutilisée à chaque nouvel essai : un rejeu avec la même clé et le même corps renvoie la réponse initiale sans rien réécrire. Voir Idempotence.
1 - 255^[\x20-\x7E]+$"8b3e1d2c-4a5f-4c6b-9e7d-1f2a3b4c5d6e"
Paramètres de chemin
Identifiant de la fiche client.
"7c9e6679-7425-40de-944b-e07fc1f90ae7"
Réponse
Supprimé, sans corps.