Mettre à jour un client
Mettre à jour un client
Aperçu
Mettre à jour un client
Met à jour un client. N'envoyez que les champs à modifier. Réponse 404 si le client n'existe pas ou n'est pas accessible avec cette clé API.
Quand l’utiliser
Utilisez cet endpoint quand vous devez exécuter PATCH /customers/{id} (Mettre à jour un client).
Authentification
Les routes marchandes nécessitent une clé API dans l’en-tête X-API-KEY (voir Vue d’ensemble). Utilisez une clé test avec https://sandbox.api.lomi.africa et une clé live avec https://api.lomi.africa.
Endpoint
PATCH /customers/{id}
URLs de base :
https://sandbox.api.lomi.africahttps://api.lomi.africa
Requête
Paramètres d’URL
| Nom | Obligatoire | Schéma | Description |
|---|---|---|---|
id | Oui | - | UUID du client |
Paramètres de requête
Aucun paramètre de requête.
En-têtes
| Nom | Emplacement | Obligatoire | Schéma | Description |
|---|---|---|---|---|
Lomi-Account | header | Non | - | Optional lomi. Network account id (acct_...). When present, the API key acts as the Operator and the request targets the connected Member Account. |
Corps de la requête
Corps JSON.
Schéma: object
| Champ | Obligatoire | Type | Description |
|---|---|---|---|
name | Non | string | - |
email | Non | string | - |
phone_number | Non | string | - |
whatsapp_number | Non | string | - |
country | Non | string | - |
city | Non | string | - |
address | Non | string | - |
postal_code | Non | string | - |
is_business | Non | boolean | - |
metadata | Non | object | - |
Exemple de corps :
{
"name": "string",
"email": "string",
"phone_number": "string"
}Réponses
| Statut | Description |
|---|---|
200 | Client mis à jour avec succès |
400 | Données d'entrée invalides |
401 | Clé API invalide ou manquante |
404 | Client introuvable ou accès refusé |
Erreurs
Les erreurs suivent un format JSON standard. 401 : clé manquante ou invalide. 404 : ressource introuvable. 429 : trop de requêtes. Pour les créations, envoyez une clé d’idempotence si votre flux le permet.
Exemple
curl -sS -X PATCH "https://sandbox.api.lomi.africa/customers/value" \
-H "X-API-KEY: $LOMI_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"string","email":"string","phone_number":"string"}'OpenAPI
- operationId:
CustomersController_update - Operation:
PATCH /customers/{id}
Schémas complets et Try it : référence API.