crisphive
顧客顧客の更新

顧客の更新

顧客レコードの変更可能なフィールドを置き換えます。service_area_id="" を渡すとサービスエリアをクリアできます。住所フィールド(latitude/longitude を含む)は、ネストされた `address` オブジェクトの配下に指定します。

引数

idstringpath必須
顧客 ID(UUID)
addressobjectbody任意
郵送先住所と座標です。
citystringbody任意
countrystringbody任意
formattedstringbody任意
latitudenumberbody任意
linestringbody任意
line2stringbody任意
longitudenumberbody任意
postal_codestringbody任意
statestringbody任意
emailstringbody任意
メールアドレスです。
full_namestringbody必須
顧客の氏名です。必須。最大 255 文字です。
notesstringbody任意
顧客に関する自由記述の社内メモです。最大 4000 文字です。
phonestringbody任意
電話番号です。10〜20 文字です。
preferred_technician_idstringbody任意
この顧客が希望するテクニシャンの UUID です。このビジネスに属している必要があります。
service_area_idstringbody任意
この顧客のサービスエリアの UUID です。このビジネスに属している必要があります。
statusenumbody任意
ライフサイクルステータスです。
tierenumbody任意
ロイヤルティティアです。
uidstringbody任意
この顧客に対するお客様側の外部参照です。省略可能。最大 32 文字です。
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"
}'
リクエストボディ
{
"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":
}

レスポンス