Edit a Subordinate User
Edit the information of a customer.
Request URL
POST {base_url}/user/openapi/user/v1/client/edit_user
Request parameters
- Headers
-
Parameter Required Description Content-Type Yes Specify the type of data that is sent in the body of the POST request. Valid value:
application/json.User-Agent Yes Provide information about the user agent, such as the type of web browser, operating system, software version, etc., so as to help Yeastar Partner Portal to identify the user or the application that is making the request. Example:
User-Agent: OpenAPI.Authorization Yes Pass the access token in the header, so as to authenticate the API request. Format: Bearer {access_token}.
- Body parameters
-
Parameter Required Type Description yeastarId Yes String Yeastar ID (email address). userType Yes String User type. Valid value:
Customercompany No String Company name. firstName No String First name. lastName No String Last name. phoneNumber No String Phone number. stateProvince No String State/Province. city No String City. street No String Street. zipCode No String ZIP/Postal Code. taxType No String Tax type. Valid value:VAT_numberTax_IDTIN_numberRUCCUIT
taxNum No String Tax number. remark No String Remark.
Response parameters
| Parameter | Type | Description |
|---|---|---|
| code | String | The response message of the API request. |
| detailMessage | String | The detailed error information. When the request is successful, this parameter returns empty. |
| requestId | String | The unique ID of the request, which can be used to quickly locate the request. |
| result | Boolean | Whether the operation is successful. |
| status | Integer | The HTTP status code of the API request. |
Example
Request example
Edit the tax number for a customer.
POST /user/openapi/user/v1/client/edit_user HTTP/1.1
Host: openapi.partner.yeastar.com
Content-Type: application/json
User-Agent: OpenAPI
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsicmVzMSJdLCJYLU1TLVVTRVIiOiJ7XCJleHByXCI6XCIwXCIsXCJ0eXBlXCI6XCJwYXJ0bmVyXCIsXCJ1Y0lkXCI6XCIzMDc2OTE1NDU0NDY4NzY3NzQ0XCIsXCJ1c2VyQ29kZVwiOlwiUGFydG5lclwiLFwidXNlcklkXCI6XCIzMDc2OTE1NDU0NDg5NzM5MjY0XCIsXCJ1c2VybmFtZVwiOlwicGFydG5lcmV4YW1wbGVAb3V0bG9vay5jb21cIn0iLCJ1c2VyX25hbWUiOiJwYXJ0bmVyZXhhbXBsZUBvdXRsb29rLmNvbSIsInNjb3BlIjpbImFsbCJdLCJleHAiOjE3Mzk3MTc5MjYsInRva2VuX3R5cGUiOiJvcGVuYXBpIiwianRpIjoidmlzMkh0QkxaUStNQmxPbS9UdThWR1pyNFljPSIsImF1dGhvcml0aWVzIjpbIjc5Il0sImNsaWVudF9pZCI6IjE0NDI5NjM2ODBiMjM0YjA0YmRjZDVjMTZmODcyOWQ2In0.RPRoTJRkXCB4krDSwGRpUFyCfUVv2LHjIiBICA1pCiY
{
"yeastarId": "yaya@yeastar.com",
"userType":"Customer",
"taxNum":"1234"
}
Response example
{
"code": "success",
"detailMessage": "",
"requestId": "99b4f26bbcc625b98e4d4cc8658b3aeb",
"result": true,
"status": 200
}