crisphive
ClientsMettre à jour un client

Mettre à jour un client

Remplace les champs modifiables d'une fiche client. Passez service_area_id="" pour effacer la zone de service. Les champs d'adresse (y compris latitude/longitude) se trouvent sous l'objet imbriqué `address`.

Arguments

idstringpathrequis
ID du client (UUID)
addressobjectbodyoptionnel
Adresse postale et coordonnées.
citystringbodyoptionnel
countrystringbodyoptionnel
formattedstringbodyoptionnel
latitudenumberbodyoptionnel
linestringbodyoptionnel
line2stringbodyoptionnel
longitudenumberbodyoptionnel
postal_codestringbodyoptionnel
statestringbodyoptionnel
emailstringbodyoptionnel
Adresse e-mail.
full_namestringbodyrequis
Nom complet du client. Requis ; 255 caractères max.
notesstringbodyoptionnel
Notes internes libres concernant le client ; 4000 caractères max.
phonestringbodyoptionnel
Numéro de téléphone. 10–20 caractères.
preferred_technician_idstringbodyoptionnel
UUID du technicien préféré de ce client. Doit appartenir à cette entreprise.
service_area_idstringbodyoptionnel
UUID de la zone de service de ce client. Doit appartenir à cette entreprise.
statusenumbodyoptionnel
Statut du cycle de vie.
tierenumbodyoptionnel
Niveau de fidélité.
uidstringbodyoptionnel
Votre référence externe pour ce client. Facultative ; 32 caractères max.
PUT/v1/customers/{id}
curl -X PUT "https://api.crisphive.com/v1/customers/9b2f6c3e-1a4d-4f0a-8f2e-7c5d1b3a9e01" \
  -H "Authorization: Bearer chsk_test_4eC8xQ9mZ2pL7Ka0rT" \
  -H "Content-Type: application/json" \
  -d '{
  "address": {
    "city": "San Francisco",
    "country": "US",
    "formatted": "123 Market Street, San Francisco, CA 94103",
    "latitude": 1,
    "line": "123 Market Street",
    "line2": "Suite 200",
    "longitude": 1,
    "postal_code": "94103",
    "state": "CA"
  },
  "email": "jane.doe@example.com",
  "full_name": "Jane Cooper",
  "notes": "Please call on arrival.",
  "phone": "+14155550142",
  "preferred_technician_id": "9b2f6c3e-1a4d-4f0a-8f2e-7c5d1b3a9e01",
  "service_area_id": "9b2f6c3e-1a4d-4f0a-8f2e-7c5d1b3a9e01",
  "status": "active",
  "tier": "regular",
  "uid": "CRM-10293"
}'
Corps de la requête
{
"address": {
"city": ,
"country": ,
"formatted": ,
"latitude": ,
"line": ,
"line2": ,
"longitude": ,
"postal_code": ,
"state":
},
"email": ,
"full_name": ,
"notes": ,
"phone": ,
"preferred_technician_id": ,
"service_area_id": ,
"status": ,
"tier": ,
"uid":
}

Réponses