Overview
CSV Feed
PHP SDK
API Integration
API For Partners
AOV
Returns the average order value generated by retargeting vs the website on its own.
Method: GET
URL: https://api.retargeting.app/v1/partners-api/aov
Function parameters
| Field | Type | Required | Description | 
|---|---|---|---|
| rest_key | number or text | True | The REST API Key of the client. | 
| date_from | number | Optional (Required only if date_to parameter is given) | Unix Timestamp (Example: 1759317872). If not provided, default fallback is 30 days in the past from now. | 
| date_to | number | Optional | Unix Timestamp (Example: 1761909872). If not provided, default fallback is the current time. | 
The interval between date_from and date_to parameters (if provided) must not exceed 30 days.
Your account status must be in one of the states: PAID, PAYMENT ERROR or ACCOUNT SUSPENDED.
If your account is Inactive or Closed the API call will not work.
The API call will respond with JSON format.
Example
    <?php
    require_once "vendor/autoload.php";
    $apiURL = "https://api.retargeting.app/v1/partners-api/aov";
    $apiKey = "REST_KEY";
    $client = new GuzzleHttp\Client();
    $registerData = [
        "rest_key" => $apiKey,
    ];
    $request = $client->request("GET", $apiURL, ["query" => $registerData]);
                    
                If the API call succeeds, then the response will be as seen below:
// currency dynamic based on the client's currency (Lei, EUR, BGN, etc.) { status: "success", data: { retargeting: "345.00 EUR", your_site: "240.00 EUR" } }
If the API call fails, then the responses will be similar to the ones below:
When the rest_key parameter is invalid:
{
    status: "error",
    message: "Incorrect rest key!"
}
                    
                When the account is not active:
{
    status: "error",
    message: "Your account is not active!"
}
                    
                When the interval between date_from and date_to parameters is greater than 30 days:
{
    status: "error",
    message: "Interval is greater than 30 days"
}
                    
                When date_from parameter is not provided together with date_to parameter:
{
    status: "fail",
    data: {
        validator: {
            date_from: [
                "The date from field is required when date to is present."
            ]
        }
    }
}
                    
                When something went wrong:
{
    status: "error",
    message: "Something went wrong"
}