Single client
POST https://secure.usedesk.com/uapi/client
Warning. If you use the server version of Usedesk, you will have a different URL of methods. Check the URL for the API with our team — support@usedesk.com
The method returns information about the specified client of the company. Accepts one Client ID
* — required fields
Parameter | Value |
api_token* | Channel API token |
client_id* | Client ID |
PHP request example
$data = array( 'api_token'=> 'e1cbe1c1c9d910ef2ae975215644cb53dd555de4', 'client_id'=>'2261648', ); $mch_api = curl_init(); curl_setopt($mch_api, CURLOPT_URL, 'https://secure.usedesk.com/uapi/client'); curl_setopt($mch_api, CURLOPT_RETURNTRANSFER, true); curl_setopt($mch_api, CURLOPT_CUSTOMREQUEST, 'POST'); curl_setopt($mch_api, CURLOPT_TIMEOUT, 10); curl_setopt($mch_api, CURLOPT_POST, true); curl_setopt($mch_api, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($mch_api, CURLOPT_POSTFIELDS, $data); $result = curl_exec($mch_api); return $result;
Example of a response from server
[ { "client": { "id": 2, "name": "Ekaterina Arhipova", "avatar": null, "position": null, "note": null, "company_id": 153561, "zendesk_id": null, "spammer": 0, "vip": 0, "client_company_id": null, "created_at": "2015-02-24 19:50:03", "tickets": [ 2, 3000640, 3000652, 3000708, 3000784, 3000794, 3027058 ], "emails": [ { "id": 2, "email": "arhipova1206@gmail.com", "client_id": 2, "fullcontact": 0, "status": "" } ], "phones": [], "social_networks": [], "messengers": [], "addresses": [], "sites": [], "client_company": null }, "emails": [ null ], "phones": [], "social_networks": [], "messengers": [], "addresses": [], "sites": [], "client_company": null } ]
Server response parameters
Parameter | Description | ||||||||||||||||||||
id | Client ID | ||||||||||||||||||||
name | Client Name | ||||||||||||||||||||
avatar | Client avatar URL | ||||||||||||||||||||
position | Client position | ||||||||||||||||||||
note | Text of note | ||||||||||||||||||||
company_id | Company ID | ||||||||||||||||||||
spammer | Flag indicating the client's spam status | ||||||||||||||||||||
vip | Flag indicating the VIP status of the client | ||||||||||||||||||||
client_company_id | Client company ID | ||||||||||||||||||||
created_at | Date of client creation UTC+0 time zone | ||||||||||||||||||||
tickets | Array of client tickets ID | ||||||||||||||||||||
emails | Client Emails array
| ||||||||||||||||||||
phones | Customer phones array
| ||||||||||||||||||||
social_networks | Array of client's social networks
| ||||||||||||||||||||
messengers | Client messengers array
| ||||||||||||||||||||
addresses | Client addresses array
| ||||||||||||||||||||
sites | An array of client sites | ||||||||||||||||||||
client_company | Customer company information
|