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

ParameterDescription
idClient ID
nameClient Name
avatarClient avatar URL
positionClient position
noteText of note
company_idCompany ID
spammerFlag indicating the client's spam status
vipFlag indicating the VIP status of the client
client_company_idClient company ID
created_atDate of client creation
UTC+0 time zone
ticketsArray of client tickets ID
emailsClient Emails array

Parameter
Description
idRecord ID
emailClient Email
client_idCustomer ID
fullcontactDepricated, is not in use
statusStatus
created_atRecord creation date
UTC+0 time zone
updated_atDate the record was updated
UTC+0 time zone
phonesCustomer phones array

Parameter
Description
idRecord ID
phonePhone
typePhone type
Possible values:
  • home;
  • mobile;
  • stationary;
  • fax;
  • other
client_idClient ID
created_atRecord creation date
UTC+0 time zone
updated_atDate the record was updated
UTC+0 time zone
social_networksArray of client's social networks

Parameter
Description
idRecord ID
urlLink to social network
typeType of social network
client_idClient ID
uidClient ID in a social network
fullcontactDepricated, not in use
messengersClient messengers array

Parameter
Description
idRecord ID
identityClient ID in the messenger
typeMessenger type
Accepts the following values:
  • telegram,
  • whatsapp,
  • viber,
  • skype,
  • gtalk,
  • iMessage,
  • other
client_idClient ID
addressesClient addresses array

Parameter
Description
idRecord ID
countryCountry
cityCity
addressAddress
typeAddress type
client_idClient ID
sitesAn array of client sites
client_companyCustomer company information

Parameter
Description
idCompany ID
nameCompany name
noteNote
domainsCompany Domains
phonePhone
addressAddress
vipFlag indicating the company's VIP status
company_idCompany ID
avatarURL of the customer's company avatar