Project

General

Profile

API - Browsing - Promos

URL: /promotii/
Method: GET

For the next pages, use the URL from 'pagination' info: /promotii/paginaXX/
Also, you can filter by the campaign ID, using URL /promotii/?campaign_id=813

$api_id = 1;
$api_key = 'testpass';
$hostname = 'https://example.com'; // no trailing slash

# fetch data
$url = '/promotii/';
$post_data = array();
$user_token = 'xxx'; // is required here. Get it from Your DB after Token generation
$extra_headers = array(
    'X-API-ID: ' . $api_id,
    'X-API-Hash: ' . md5($api_key . $url. http_build_query($post_data)),
    'X-User-Token: ' . $user_token
);

header('Content-Type: application/json; charset=utf-8');
echo sendRequest($hostname . $url, $post_data, $extra_headers);

Succes message:

{
    has_error: false,
    messages: {
        section: "promos" 
    },
    results: {
        products: [],
        campaigns: {},
        pagination: []
    }
}

Go to top