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

Parameter
Description
id Record ID
email Client Email
client_id Customer ID
fullcontact Depricated, is not in use
status_vip Status vip
status_spam Status spam
created_at Record creation date
UTC+0 time zone
updated_at Date the record was updated
UTC+0 time zone
phones Customer phones array

Parameter
Description
id Record ID
phone Phone
type Phone type
Possible values:
  • home;
  • mobile;
  • stationary;
  • fax;
  • other
client_id Client ID
created_at Record creation date
UTC+0 time zone
updated_at Date the record was updated
UTC+0 time zone
social_networks Array of client's social networks

Parameter
Description
id Record ID
url Link to social network
type Type of social network
client_id Client ID
uid Client ID in a social network
fullcontact Depricated, not in use
messengers Client messengers array

Parameter
Description
id Record ID
identity Client ID in the messenger
type Messenger type
Accepts the following values:
  • telegram,
  • whatsapp,
  • viber,
  • skype,
  • gtalk,
  • iMessage,
  • other
client_id Client ID
addresses Client addresses array

Parameter
Description
id Record ID
country Country
city City
address Address
type Address type
client_id Client ID
sites An array of client sites
client_company Customer company information

Parameter
Description
id Company ID
name Company name
note Note
domains Company Domains
phone Phone
address Address
vip Flag indicating the company's VIP status
company_id Company ID
avatar URL of the customer's company avatar