Wooxy API v.3.0

Get source

The Get Source method allows you to obtain detailed information about the contact source by using different parameters of them.

Request

POST
https://api.wooxy.com/v3/contact-source/get

IMPORTANT: Do not send more than 10 concurrent API requests.

Body Example

                                        {
  "name": "SourceName",
  "customerSourceId": "mySourceID",
  "sourceId" : "sourceId"
}
                                    

Parameters

Title Type Default Description

name

optional
string

Unique contact acquisition source name that is already registered in the system.

customerSourceId

optional
string

Unique customerSourceId that is already registered in the system. INFO Works as an alias for sourceId.

sourceId

optional
string

Unique contact acquisition source that is already registered in the system.

Response

                                        {
  "result": true,
  "data": {
    "sourceId": "SourceId",
    "name": "SourceName",
    "customerSourceId": "mySourceID",
    "cac": {
      "value": "5.00",
      "currency": "EUR"
    },
    "createdAt": "2021-07-14 15:50:18",
    "updatedAt": "2021-07-14 15:50:18"
  }
}
                                    

Parameters

Title Type Description

result

boolean

The value indicates that the source was successfully fetched from your account:

  • true: The source was successfully fetched.

data

array

An array with fetched data about your source.

data.sourceId

string

Unique contact acquisition source that is already registered in the system.

data.name

string

sourceName n the Wooxy system.

data.customerSourceId

string

Unique customerSourceId that is already registered in the system. INFO Works as an alias for sourceId.

data.cac

object

An object that contains comprehensive data regarding the cost of acquiring customers comprises the value and currency.

data.cac.value

string

Contact acquisition cost in 'ENUM_STRING' format correspondingly.

data.cac.currency

string

(EUR, USD)
WARNING Please use only latin uppercase format. No numbers or other symbols allowed.

data.createdAt

string

Source creation time in YYYY-MM-DD h:i:s format.

data.updatedAt

string

Last time when the information of the source was updated in YYYY-MM-DD h:i:s format.

Method Errors

                                        {
  "result": false,
  "errors": [
    "Error description text"
  ]
}
                                    
Error

“Argument ‘sourceId’ must be a non-empty alphanumeric string”

“Argument ‘name’ must be a non-empty alphanumeric string with a max length of 40 chars”

“Argument’customerSourceId’ must be an alphanumeric string with max length 40 chars”

“Minimum one unique contact source identification ( sourceId | customerSourceId | name ) is required.”

“No records found by these identifiers”

“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

PHP
                $accessToken = 'YOUR_API_KEY';
$url         = 'https://api.wooxy.com/v3/contact-source/get';
$body = json_encode([
   "name" => "SourceName",
   "customerSourceId" => "YOUR_customerSourceId",
   "sourceId" => "SourceName",]);
/** * 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);