Get Contact
The Get Contact method allows you to get detailed information about a contact.
IMPORTANT!
Minimum one unique user identificator (userId
| email
| phoneNumber
) is required.
Request
IMPORTANT: Do not send more than 10 concurrent API requests.
Body Example
{
"contactListId": "YOUR_CONTACT_LIST_ID",
"email": "user@example.com",
"phoneNumber": "+15555555",
"userId": "myUserId"
}
Parameters
Title | Type | Default | Description |
---|---|---|---|
contactListId required
|
string |
ID of the Contact List where the contact to be fetched belongs. |
|
optional
|
string |
Contact’s email address. |
|
phoneNumber optional
|
string |
|
|
userId optional
|
string |
Contact’s unique user ID from your platform to enable management of the contact in the list based on it. |
Response
{
"result": true,
"contact": {
"name": "John Doe",
"email": "user@example.com",
"phoneNumber": "+15555555",
"userId": "myUserId",
"active": true,
"emailSubscribe": true,
"smsSubscribe": true,
"desktopWebPushSubscribe": false,
"mobileWebPushSubscribe": false,
"telegramSubscribe": false,
"viberSubscribe": false,
"createdAt": "2021-12-24 13:32:53",
"updatedAt": "2021-12-30 11:48:05",
"avatarLink": "img.wooxy.com/g/56fff04568.jpg",
"contactBirthday": "1990-01-01",
"contactLanguage": "en",
"firstName": "John",
"lastName": "Doe",
"contactGender": "0",
"contactTimezone": "Europe/Tallinn",
"facebookLink": "facebook.com/wooxy.com",
"instagramLink": "instagram.com/wooxy",
"linkedInLink": "linkedin.com/company/wooxy",
"twitterLink": "twitter.com/wooxy",
"tiktokLink": "tiktok.com/wooxy",
"contactScore": "0",
"sourceName": "Google",
"sourceId": "Source_ID_from_Wooxy",
"customerSourceId": "хххххх",
"variables": [
{
"name": "var1",
"value": null
}
],
"cac": {
"value": "0.30000",
"currency": "USD"
}
},
"errors": []
}
Parameters
Title | Type | Description |
---|---|---|
result |
boolean |
The value indicates that the contact was successfully fetched from your Contact List:
|
contact |
object |
An array of contact information. |
contact.name |
string |
The optional display name to use for the recipient. |
contact.email |
string |
Contact’s email address. |
contact.phoneNumber |
string |
|
contact.userId |
string |
Contact’s unique user ID from your platform to enable management of the contact in the list based on it. |
contact.active |
boolean |
Indicates if the contact is enabled Contact List or not:
|
contact.emailSubscribe |
boolean |
Indicates if the contact is subscribed to receiving Emails or not:
|
contact.smsSubscribe |
boolean |
Indicates if the contact is subscribed to receiving SMS or not:
|
contact.desktopWebPushSubscribe |
boolean |
Indicates if the contact is subscribed to receiving Desktop Web Push notifications or not:
|
contact.mobileWebPushSubscribe |
boolean |
Indicates if the contact is subscribed to receiving Mobile Web Push notifications or not:
|
contact.telegramSubscribe |
boolean |
Indicates if the contact is subscribed to receiving Telegram messages or not:
|
contact.viberSubscribe |
boolean |
Indicates if the contact is subscribed to receiving Telegram messages or not:
|
contact.firstName |
string |
Contact’s first name. |
contact.lastName |
string |
Contact’s last name. |
contact.contactBirthday |
string |
Contact’s birth date in |
contact.contactLanguage |
string |
Contact’s locale in |
contact.contactGender |
string |
Contact’s gender in
|
contact.contactTimezone |
string |
Contact’s timezone in |
contact.contactScore |
string |
Contact Score. |
contact.avatarLink |
string |
Link to contact’s avatar image. |
contact.facebookLink |
string |
Link to contact’s Facebook profile. |
contact.instagramLink |
string |
Link to contact’s Instagram profile. |
contact.linkedInLink |
string |
Link to contact’s LinkedIn profile. |
contact.twitterLink |
string |
Link to contact’s Twitter profile. |
contact.tiktokLink |
string |
Link to contact’s TikTok profile. |
contact.variables |
array |
An array of contact variables and their values. |
contact.variables.name |
string |
Variable name in lowerCamelCase format. |
contact.variables.value |
string |
Variable value in |
contact.sourceId |
string |
Contact’s unique source ID from Wooxy platform. |
contact.customerSourceId |
string |
Contact’s unique source ID from your system to synchronize two sides. |
contact.cac |
object |
An object that contains comprehensive data regarding the cost of acquiring customers comprises the value and currency. |
contact.cac.value |
string |
CAC value in |
contact.cac.currency |
string |
(EUR, USD) |
Method Errors
{
"errors": [
"Error description text"
],
"result": false
}
Error |
---|
“Invalid authorization token!” |
“Internal server error” |
“Bad Request” |
“No matches found for access token {accessToken}” |
“User {id} not enabled” |
“No data found for key {userId}” |
“Access token check failed for key/secret $key/$accessToken” |
“Argument {argument} required” |
“Argument ‘contactListId’ must be a non-empty string” |
“Invalid RFC2822 email {email} at email field” |
“Argument ’email’ must be a string” |
“Argument ‘phoneNumber’ must be a string” |
“{phoneNumber} is not a valid E.164 phone number” |
“Argument ‘userId’ must be a string” |
Code Examples
$accessToken = "YOUR_API_KEY";
$url = 'https://api.wooxy.com/v3/contact/get';
$body = json_encode([
"contactListId" => "YOUR_CONTACT_LIST_ID",
"email" => "user@example.com",
"phoneNumber" => "+15555555",
"userId" => "myUserId",
]);
/**
* Request Example
*/
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
//curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_INFILESIZE, null);
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Access-Token: $accessToken",
'Content-Type: application/json',
'Content-Length: ' . strlen($body),
]);
$result = curl_exec($ch);
if ($result === false) {
echo 'cURL error:' . curl_error($ch) . PHP_EOL;
} else {
echo strval($result) . PHP_EOL;
}
curl_close($ch);