Find Source
The Find Source method allows you to find one or more contact sources.
Important!
In this method, pagination is used to display information about a large number of lists simultaneously. The offset is considered the starting point, and the limit is the endpoint.
Request
IMPORTANT: Do not send more than 10 concurrent API requests.
Body Example
{
"name": "SourceName",
"customerSourceId": "mySourceID",
"offset" : 0,
"limit" : 20
}
Parameters
Title | Type | Default | Description |
---|---|---|---|
name optional
|
string |
Unique sourceId that is already registered in the system. |
|
customerSourceId optional
|
string |
Unique customerSourceId that is already registered in the system. |
|
offset optional
|
integer | 0 |
Allows you to omit a specified number of rows (number of source) before the beginning of return rows (source) from the query. |
limit optional
|
integer | 20 |
The limit option allows you to limit the number of rows returned from a query. |
Response
{
"result":true,
"data":[
{
"id":"5f8446cb9a0a716b250a117e",
"name":"sourceName 2020-10-12 15:06:35",
"customerSourceId":"apiId_9",
"cac":{
"value":"5.00000",
"currency":"USD"
},
"createdAt":"2020-10-12 12:06:35",
"updatedAt":"2020-10-12 12:06:35"
}
],
"totalCount":1,
"offset":0,
"limit":20
}
Parameters
Title | Type | Description |
---|---|---|
result |
boolean |
The value indicates that the source was successfully got into your account:
|
data |
array |
An array with fetched data about your source. |
data.id |
string |
The sourceId in the Wooxy system. |
data.name |
string |
sourceName and creation date. |
data.customerSourceId |
string |
Customer source Id already registred in Wooxy system. |
data.cac |
object |
An object that contains comprehensive data regarding the cost of acquiring customers comprises the value and currency. |
data.cac.value |
string |
CAC value in string format. |
data.cac.currency |
string |
(EUR, USD). |
data.createdAt |
string |
Request time in |
data.updatedAt |
Last time when the information regarding the request was updated in |
|
totalCount |
integer |
The number of sources that could be unloaded. |
offset |
integer |
The number of sources to view from. |
limit |
integer |
The number of sources to view, to. |
Method Errors
{
"result":false,
"errors":[
"Error description text"
]
}
Error |
---|
“Argument name must be a non-empty string” |
“Argument ‘customerSourceId’ must be an alphanumeric string with max length 40 chars” |
“Argument offset must have a numeric value” |
“Argument limit must have a numeric value” |
“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” |
Code Examples
$accessToken = 'YOUR_API_KEY';
$url = 'https://api.wooxy.comv3/contact-source/find';
$body = json_encode([
'name' => 'SourceName',
'customerSourceId' => 'YOUR_customerSourceId',
'offset' => 0,
'limit' => 20,]);
/** * 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);