Update a Customer
Update the information of a specific customer.
Request URL
PUT {base_url}/dm/open_api/v1/customers/{customerId}
Request parameters
Path parameter
Parameter | Required | Type | Description |
---|---|---|---|
customerId | Yes | Long | The ID of the customer. Note: You can query the customer ID
using Query all the Customers or
Query the Customer(s) of a Cloud PBX.
|
Headers
BodyParameter | Required | Type | Description |
---|---|---|---|
Authorization | Yes | String | Pass the access token in the header. Format: Bearer {access_token}. |
Important: Parameters not present in the request
will be set to NULL.
Parameter | Required | Type | Description |
---|---|---|---|
firstName | Yes | String | First name. |
lastName | No | String | Last name. |
company | Yes | String | Company name. |
Yes | String | Email address. | |
businessNumber | No | String | Business number. |
mobileNumber | No | String | Mobile number. |
homeNumber | No | String | Home number. |
faxNumber | No | String | Fax number. |
zipCode | No | String | ZIP code. |
street | No | String | Street. |
city | No | String | City. |
state | No | String | State. |
country | No | String | Country. |
remark | No | String | Remark. |
Response parameters
Parameter | Type | Description |
---|---|---|
requestId | String | The unique ID of the request, which can be used to quickly locate the request. |
status | String | Request result:
|
time | Long | The response time. Note: The YCM API response returns a
timestamp, you can convert the timestamp to detailed
date and time as needed. For more information, see Convert Timestamp to Local Date and Time.
|
Example
Request example
Update the email address of a customer (ID: 50329401).
PUT /dm/open_api/v1/customers/50329401 HTTP/1.1
Host: ycm.yeastar.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21Kd3RQYXlsb2FkSW5mbyI6eyJncmFudFR5cGUiOiJjbGllbnRfY3JlZGVudGlhbHMiLCJ5c0lkIjoxNzg5NjM2MDM5MDg1MDI1NjY0NSwidmVyc2lvbiI6MTY2Mzc0MTEyNSwicmVmcmVzaFZlcnNpb24iOjE2NjQyNzA1MzB9LCJzY29wZSI6WyJhbGwiXSwiZXhwIjoxNjY0MjcyMzMwLCJhdXRob3JpdGllcyI6WyJST0xFX0NMSUVOVCJdLCJqdGkiOiJiNzY2NzYzMi1jZmZjLTQ4ZDQtYTY1YS01MzYzYmUwODhjMmEiLCJjbGllbnRfaWQiOiJ5QXN4ZzdITkRFczNxSHprQk1aUU5Pblo2NTBPRUNNWSJ9.rtpTweQ6DPwwCEgQcrvdmjIvSOSzeKI4ZZjCgepkE0E
Content-Type: application/json
{
"firstName": "Leo",
"lastName": "Ball",
"company": "Example Company",
"email": "newemailaddress@example.com",
"businessNumber": "123456789",
"mobileNumber": "123456789",
"faxNumber": "347-111-1111",
"street": "Metrotech Center",
"country": "USA",
"state": "New York",
"remark": "example"
}
Response exampleHTTP/1.1 200 OK
{
"requestId": "15eba94d-c5b2-47c4-bdcc-109322195bea",
"status": "Success",
"time": 1664270677
}