News! SmartSender.io becomes Wooxy. Read a post from the CEO Arrow
Wooxy API v.3.0

Get event

The Get event method allows you to get detailed information about a custom event by using event name or id.

Request

POST
/v3/custom-event/get

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

Body Example

                                        {
    "id": "YOUR_REGISTERED_EVENT_ID",
    "name": "YOUR_REGISTERED_EVENT_NAME"
}
                                    

Parameters

Title Type Default Description

id

optional
string

Unique EventId that is already registered in the Wooxy system.

name

optional
string

Unique EventName that is already registered in the Wooxy system.

Response

                                        {
  "result": true,
  "data": [{
      "id": "YOUR_EVENT_ID_1",
      "name": "YOUR_EVENT_NAME",
      "description": "YUOR_EVENT_DESCRIPTION",
      "isConversion": true,
      "cost": {
        "value": "91.00",
        "currency": "EUR"
      },
      "createdAt": "2021-07-14 15:51:17",
      "updatedAt": "2021-07-14 15:51:17"
    }]
}
                                    

Parameters

Title Type Description

result

boolean

The value indicates that the event was successfully fetched in your account:

  • true: The event was successfully found.

data

array

An array of fetched information.

data.id

string

The eventId in the Wooxy system.

data.name

string

The eventName in the Wooxy system.

data.description

string

Description note about your events.

data.isConversion

boolean

If you want existing events to be taken into account in advanced analytics, mark the parameter as true or false if not.

data.cost

object

Value and currency of your registered event.

data.cost.value

float

value in 'ENUM_STRING' format correspondingly.

data.cost.currency

string

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

data.createdAt

string

The creation time of the event in YYYY-MM-DD h:i:s format.

data.updatedAt

string

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

Method Errors

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

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

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

“Minimum one unique event identification (id | name) is required.”

“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/custom-event/get';

$body = json_encode([
   "id" => "YOUR_REGISTERED_EVENT_ID",
   "name" => "YOUR_REGISTERED_EVENT_NAME"
]);                           

/**
 * 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);