NAV
bash php

Info

API provides the ability to manage HOQU functionality remotely

API key

Sample API key:

59c9c3b3-7173-47de-87d7-168ebcd7d365

To see your personal API key, open the documentation from the HOQU application

Auth

Get token

Before making targeted API requests, you need to pass your API Key and receive a token

This token is used in authorized requests headers: Authorization: Bearer {token}

Example request:

curl -X GET \
    -G "https://api.hoqu.com/api/users/connect/59c9c3b3-7173-47de-87d7-168ebcd7d365" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json"

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.hoqu.com/api/users/connect/59c9c3b3-7173-47de-87d7-168ebcd7d365',
    [
        'headers' => [
            'Accept' => 'application/json',
            'Content-Type' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM"
}

Example response (404):

{
    "message": "Undefined secure key"
}

HTTP Request

GET api/users/connect/{secureKey}

URL Parameters

Parameter Status Description
secureKey required Personal API key

Glossary

Participants


Requires authentication You can find participant_id at response data items

First participant_id at response data[0].id

Second participant_id at data[1].id

etc.

Example request:

curl -X GET \
    -G "https://api.hoqu.com/api/networks/participants/search" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM" \
    -d '{"per_page":25,"page":1,"search":{"statuses":["joined"],"roles":["merchant"]}}'

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.hoqu.com/api/networks/participants/search',
    [
        'headers' => [
            'Accept' => 'application/json',
            'Content-Type' => 'application/json',
            'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM',
        ],
        'query' => [
            'per_page' => 25,
            'page' => 1,
            'search' => [
                'statuses' => [
                    'joined',
                ],
                'roles' => [
                    'merchant',
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "data": [
        {
            "id": 1,
            "status": "joined",
            "role": "merchant",
            "network": {
                "id": 1,
                "name": "Name Test-5f23c56312645"
            },
            "entity": {
                "id": 1,
                "name": "Merchant Test-5f23c56344622",
                "owner": {
                    "id": 4,
                    "first_name": "User",
                    "last_name": "Test-5f23c56344622",
                    "email": "user.Test-5f23c56344622@test.net"
                }
            }
        }
    ],
    "sort_column": "id",
    "sort_order": "asc",
    "sortable": [
        "id"
    ],
    "total": 1,
    "per_page": 10,
    "current_page": 1,
    "last_page": 1
}

HTTP Request

GET api/networks/participants/search

Body Parameters

Parameter Type Status Description
per_page integer optional Number of results per page.
page integer optional Current page.
search object optional Filtering conditions.
search.statuses array optional Advertisers filtered by statuses
search.statuses.* string optional Advertiser status (options: applied, joined, not_joined, banned).
search.roles array optional Advertisers filtered by roles
search.roles.* string optional Advertiser role (options: merchant, affiliate).

Timezones


Requires authentication

Example request:

curl -X GET \
    -G "https://api.hoqu.com/api/timezones" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM"

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.hoqu.com/api/timezones',
    [
        'headers' => [
            'Accept' => 'application/json',
            'Content-Type' => 'application/json',
            'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

[
    {
        "id": 19,
        "name": "Africa\/Djibouti",
        "shift": 10800
    },
    {
        "id": 153,
        "name": "America\/New_York",
        "shift": -14400
    },
    {
        "id": 275,
        "name": "Asia\/Seoul",
        "shift": 32400
    },
    {
        "id": 342,
        "name": "Europe\/London",
        "shift": 3600
    },
    {
        "id": 426,
        "name": "UTC",
        "shift": 0
    }
]

HTTP Request

GET api/timezones

Pricing Models


Requires authentication

Example request:

curl -X GET \
    -G "https://api.hoqu.com/api/pricing-models" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM"

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.hoqu.com/api/pricing-models',
    [
        'headers' => [
            'Accept' => 'application/json',
            'Content-Type' => 'application/json',
            'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

[
    {
        "id": 1,
        "name": "CPL (Cost per Lead)",
        "description": null
    },
    {
        "id": 2,
        "name": "CPO (Cost per Order)",
        "description": null
    },
    {
        "id": 8,
        "name": "CPA (Cost per Action)",
        "description": null
    },
    {
        "id": 9,
        "name": "CPM (Cost per Mille)",
        "description": null
    }
]

HTTP Request

GET api/pricing-models

Currencies


Requires authentication

Example request:

curl -X GET \
    -G "https://api.hoqu.com/api/currencies" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM"

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.hoqu.com/api/currencies',
    [
        'headers' => [
            'Accept' => 'application/json',
            'Content-Type' => 'application/json',
            'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

[
    {
        "code": "USD",
        "name": "US Dollar",
        "symbol": "$"
    },
    {
        "code": "EUR",
        "name": "Euro",
        "symbol": "€"
    },
    {
        "code": "RUB",
        "name": "Russian Ruble",
        "symbol": "RUB"
    },
    {
        "code": "GBP",
        "name": "British Pound",
        "symbol": "£"
    }
]

HTTP Request

GET api/currencies

Categories


Requires authentication

Example request:

curl -X GET \
    -G "https://api.hoqu.com/api/offers/categories" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM"

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.hoqu.com/api/offers/categories',
    [
        'headers' => [
            'Accept' => 'application/json',
            'Content-Type' => 'application/json',
            'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

[
    {
        "id": 1,
        "name": "Adult"
    },
    {
        "id": 2,
        "name": "Beauty"
    },
    {
        "id": 3,
        "name": "Business Opportunity"
    },
    {
        "id": 43,
        "name": "Social media"
    },
    {
        "id": 44,
        "name": "Sports"
    }
]

HTTP Request

GET api/offers/categories

Targeting: GEO - Countries


Requires authentication

Example request:

curl -X GET \
    -G "https://api.hoqu.com/api/offers/targeting/countries" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM" \
    -d '{"limit":10,"offset":5,"name":"Name"}'

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.hoqu.com/api/offers/targeting/countries',
    [
        'headers' => [
            'Accept' => 'application/json',
            'Content-Type' => 'application/json',
            'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM',
        ],
        'query' => [
            'limit' => 10,
            'offset' => 5,
            'name' => 'Name',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

[
    {
        "id": 1,
        "name": "Rwanda",
        "iso_code": "RW"
    },
    {
        "id": 7,
        "name": "Cyprus",
        "iso_code": "CY"
    },
    {
        "id": 11,
        "name": "Kenya",
        "iso_code": "KE"
    },
    {
        "id": 16,
        "name": "Seychelles",
        "iso_code": "SC"
    }
]

HTTP Request

GET api/offers/targeting/countries

Body Parameters

Parameter Type Status Description
limit integer required Number of rows.
offset integer optional Offset
name string optional Filtering by name

Targeting: GEO - Regions


Requires authentication

Example request:

curl -X GET \
    -G "https://api.hoqu.com/api/offers/targeting/regions" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM" \
    -d '{"limit":10,"offset":5,"name":"Name"}'

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.hoqu.com/api/offers/targeting/regions',
    [
        'headers' => [
            'Accept' => 'application/json',
            'Content-Type' => 'application/json',
            'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM',
        ],
        'query' => [
            'limit' => 10,
            'offset' => 5,
            'name' => 'Name',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

[
    {
        "id": 1,
        "name": "Basra",
        "iso_code": "BA",
        "country_iso_code": "IQ"
    },
    {
        "id": 22,
        "name": "Fars",
        "iso_code": "14",
        "country_iso_code": "IR"
    },
    {
        "id": 25,
        "name": "East Azerbaijan",
        "iso_code": "01",
        "country_iso_code": "IR"
    },
    {
        "id": 27,
        "name": "Pafos",
        "iso_code": "05",
        "country_iso_code": "CY"
    },
    {
        "id": 29,
        "name": "Zanzibar Urban\/West",
        "iso_code": "15",
        "country_iso_code": "TZ"
    }
]

HTTP Request

GET api/offers/targeting/regions

Body Parameters

Parameter Type Status Description
limit integer required Number of rows.
offset integer optional Offset
name string optional Filtering by name

Targeting: GEO - Cities


Requires authentication

Example request:

curl -X GET \
    -G "https://api.hoqu.com/api/offers/targeting/cities" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM" \
    -d '{"limit":10,"offset":5,"name":"Name"}'

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.hoqu.com/api/offers/targeting/cities',
    [
        'headers' => [
            'Accept' => 'application/json',
            'Content-Type' => 'application/json',
            'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM',
        ],
        'query' => [
            'limit' => 10,
            'offset' => 5,
            'name' => 'Name',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

[
    {
        "id": 1,
        "name": "Souni",
        "country_iso_code": "CY",
        "region_iso_code": "02"
    },
    {
        "id": 18,
        "name": "Baidoa",
        "country_iso_code": "SO",
        "region_iso_code": "BY"
    },
    {
        "id": 19,
        "name": "Zinjibar",
        "country_iso_code": "YE",
        "region_iso_code": "AB"
    },
    {
        "id": 51,
        "name": "Samarra",
        "country_iso_code": "IQ",
        "region_iso_code": "SD"
    },
    {
        "id": 52,
        "name": "Raniye",
        "country_iso_code": "IQ",
        "region_iso_code": "SU"
    }
]

HTTP Request

GET api/offers/targeting/cities

Body Parameters

Parameter Type Status Description
limit integer required Number of rows.
offset integer optional Offset
name string optional Filtering by name

Targeting: Providers


Requires authentication

Example request:

curl -X GET \
    -G "https://api.hoqu.com/api/offers/targeting/providers" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM" \
    -d '{"limit":10,"offset":5,"name":"Name"}'

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.hoqu.com/api/offers/targeting/providers',
    [
        'headers' => [
            'Accept' => 'application/json',
            'Content-Type' => 'application/json',
            'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM',
        ],
        'query' => [
            'limit' => 10,
            'offset' => 5,
            'name' => 'Name',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

[
    {
        "id": 1,
        "name": "Cloudflare"
    },
    {
        "id": 3,
        "name": "Gtelecom-AUSTRALIA"
    },
    {
        "id": 9,
        "name": "Mountain View Communications"
    },
    {
        "id": 11,
        "name": "China Telecom"
    },
    {
        "id": 18,
        "name": "Hongkong Yaboidc Technology Limited"
    }
]

HTTP Request

GET api/offers/targeting/providers

Body Parameters

Parameter Type Status Description
limit integer required Number of rows.
offset integer optional Offset
name string optional Filtering by name

Targeting: Brands


Requires authentication

Example request:

curl -X GET \
    -G "https://api.hoqu.com/api/offers/targeting/brands" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM" \
    -d '{"limit":10,"offset":5,"name":"Name"}'

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.hoqu.com/api/offers/targeting/brands',
    [
        'headers' => [
            'Accept' => 'application/json',
            'Content-Type' => 'application/json',
            'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM',
        ],
        'query' => [
            'limit' => 10,
            'offset' => 5,
            'name' => 'Name',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

[
    {
        "id": 1,
        "name": "Apple"
    },
    {
        "id": 5,
        "name": "Samsung"
    },
    {
        "id": 16,
        "name": "Sony"
    },
    {
        "id": 21,
        "name": "Lenovo"
    },
    {
        "id": 22,
        "name": "Huawei"
    }
]

HTTP Request

GET api/offers/targeting/brands

Body Parameters

Parameter Type Status Description
limit integer required Number of rows.
offset integer optional Offset
name string optional Filtering by name

Targeting: Connection Types


Requires authentication

Example request:

curl -X GET \
    -G "https://api.hoqu.com/api/offers/targeting/connection-types" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM"

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.hoqu.com/api/offers/targeting/connection-types',
    [
        'headers' => [
            'Accept' => 'application/json',
            'Content-Type' => 'application/json',
            'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

[
    {
        "id": 1,
        "type": "Dialup"
    },
    {
        "id": 2,
        "type": "Cable\/DSL"
    },
    {
        "id": 3,
        "type": "Corporate"
    },
    {
        "id": 4,
        "type": "Cellular"
    }
]

HTTP Request

GET api/offers/targeting/connection-types

Targeting: Device Types


Requires authentication

Example request:

curl -X GET \
    -G "https://api.hoqu.com/api/offers/targeting/device-types" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM"

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.hoqu.com/api/offers/targeting/device-types',
    [
        'headers' => [
            'Accept' => 'application/json',
            'Content-Type' => 'application/json',
            'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

[
    {
        "id": 1,
        "type": "computer"
    },
    {
        "id": 2,
        "type": "mobile"
    },
    {
        "id": 3,
        "type": "server"
    },
    {
        "id": 5,
        "type": "vehicle"
    },
    {
        "id": 6,
        "type": "pda"
    }
]

HTTP Request

GET api/offers/targeting/device-types

Targeting: Devices


Requires authentication

Example request:

curl -X GET \
    -G "https://api.hoqu.com/api/offers/targeting/devices" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM" \
    -d '{"limit":10,"offset":5,"name":"Name"}'

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.hoqu.com/api/offers/targeting/devices',
    [
        'headers' => [
            'Accept' => 'application/json',
            'Content-Type' => 'application/json',
            'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM',
        ],
        'query' => [
            'limit' => 10,
            'offset' => 5,
            'name' => 'Name',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

[
    {
        "id": 1,
        "name": "iPhone",
        "device_type_id": 2,
        "operating_system_id": 4,
        "brand_id": 1
    },
    {
        "id": 3,
        "name": "iPad",
        "device_type_id": 2,
        "operating_system_id": 4,
        "brand_id": 1
    },
    {
        "id": 5,
        "name": "iPhone 5s",
        "device_type_id": 2,
        "operating_system_id": 4,
        "brand_id": 1
    },
    {
        "id": 8,
        "name": "Galaxy Note",
        "device_type_id": 2,
        "operating_system_id": 7,
        "brand_id": 5
    }
]

HTTP Request

GET api/offers/targeting/devices

Body Parameters

Parameter Type Status Description
limit integer required Number of rows.
offset integer optional Offset
name string optional Filtering by name

Targeting: Browsers


Requires authentication

Example request:

curl -X GET \
    -G "https://api.hoqu.com/api/offers/targeting/browsers" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM" \
    -d '{"limit":10,"offset":5,"name":"Name"}'

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.hoqu.com/api/offers/targeting/browsers',
    [
        'headers' => [
            'Accept' => 'application/json',
            'Content-Type' => 'application/json',
            'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM',
        ],
        'query' => [
            'limit' => 10,
            'offset' => 5,
            'name' => 'Name',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

[
    {
        "id": 1,
        "name": "Chrome"
    },
    {
        "id": 2,
        "name": "Safari"
    },
    {
        "id": 3,
        "name": "Firefox"
    },
    {
        "id": 4,
        "name": "Edge"
    },
    {
        "id": 5,
        "name": "Internet Explorer"
    },
    {
        "id": 10,
        "name": "Fennec"
    },
    {
        "id": 16,
        "name": "Opera"
    }
]

HTTP Request

GET api/offers/targeting/browsers

Body Parameters

Parameter Type Status Description
limit integer required Number of rows.
offset integer optional Offset
name string optional Filtering by name

Targeting: Operating Systems


Requires authentication

Example request:

curl -X GET \
    -G "https://api.hoqu.com/api/offers/targeting/operating-systems" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM" \
    -d '{"limit":10,"offset":5,"name":"Name"}'

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.hoqu.com/api/offers/targeting/operating-systems',
    [
        'headers' => [
            'Accept' => 'application/json',
            'Content-Type' => 'application/json',
            'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM',
        ],
        'query' => [
            'limit' => 10,
            'offset' => 5,
            'name' => 'Name',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

[
    {
        "id": 1,
        "name": "Mac OS X"
    },
    {
        "id": 2,
        "name": "Mac OS"
    },
    {
        "id": 3,
        "name": "Linux"
    },
    {
        "id": 4,
        "name": "iOS"
    },
    {
        "id": 5,
        "name": "Windows"
    }
]

HTTP Request

GET api/offers/targeting/operating-systems

Body Parameters

Parameter Type Status Description
limit integer required Number of rows.
offset integer optional Offset
name string optional Filtering by name

Offers

Get offers list


Requires authentication Getting a page-by-page sorted filtered list of offers.

Example request:

curl -X GET \
    -G "https://api.hoqu.com/api/offers/grid" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM" \
    -d '{"per_page":25,"page":1,"sort_column":"id","sort_order":"desc","search":{"id":"1","name":"My offer","lead_hold_time":[1,7],"status":"active","visibility":"public","start_date":{"start_date":1580418000,"end_date":1609362000},"end_date":{"start_date":1580418000,"end_date":1609362000},"created_at":{"start_date":1580418000,"end_date":1609362000},"networks":[15],"merchants":[15],"managers":[2],"categories":[2],"pricing_models":[17],"traffic_types":[15],"countries":["EN"],"only_with_campaigns":true,"only_with_promo_tools":true,"only_with_leads":true,"only_with_active_rate":true,"all":"01.01.2020"}}'

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.hoqu.com/api/offers/grid',
    [
        'headers' => [
            'Accept' => 'application/json',
            'Content-Type' => 'application/json',
            'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM',
        ],
        'query' => [
            'per_page' => 25,
            'page' => 1,
            'sort_column' => 'id',
            'sort_order' => 'desc',
            'search' => [
                'id' => '1',
                'name' => 'My offer',
                'lead_hold_time' => [
                    1,
                    7,
                ],
                'status' => 'active',
                'visibility' => 'public',
                'start_date' => [
                    'start_date' => 1580418000,
                    'end_date' => 1609362000,
                ],
                'end_date' => [
                    'start_date' => 1580418000,
                    'end_date' => 1609362000,
                ],
                'created_at' => [
                    'start_date' => 1580418000,
                    'end_date' => 1609362000,
                ],
                'networks' => [
                    15,
                ],
                'merchants' => [
                    15,
                ],
                'managers' => [
                    2,
                ],
                'categories' => [
                    2,
                ],
                'pricing_models' => [
                    17,
                ],
                'traffic_types' => [
                    15,
                ],
                'countries' => [
                    'EN',
                ],
                'only_with_campaigns' => true,
                'only_with_promo_tools' => true,
                'only_with_leads' => true,
                'only_with_active_rate' => true,
                'all' => '01.01.2020',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "sort_column": "id",
    "sort_order": "desc",
    "sortable": [
        "id",
        "name",
        "start_date",
        "end_date",
        "created_at"
    ],
    "total": 137,
    "per_page": 50,
    "current_page": 1,
    "last_page": 3,
    "data": [
        {
            "id": "string",
            "lead_hold_time": 0,
            "name": "string",
            "logo": "\/uploads\/offers\/logo\/logo.jpg",
            "status": "created",
            "currency": "USD",
            "visibility": "public",
            "start_date": "string",
            "end_date": "string",
            "description": [
                {
                    "id": 0,
                    "lang": "string",
                    "type": "description",
                    "text": "string"
                }
            ],
            "rules": [
                {
                    "id": 0,
                    "lang": "string",
                    "type": "description",
                    "text": "string"
                }
            ],
            "tracking": {
                "tracking_url": "string",
                "macros": "string",
                "tracking_domain": "string",
                "tracking_params": "string",
                "preview_url": "string",
                "trafficback_url": "string",
                "allow_deeplinks": true,
                "allow_impressions": true,
                "cookie_lifetime": 0
            },
            "created_at": 0,
            "updated_at": 0,
            "network": {
                "id": 0,
                "name": "string"
            },
            "merchant": {
                "id": 0,
                "name": "string",
                "kyc_level": 0,
                "rating": 0,
                "created_at": 0,
                "owner": {
                    "id": 0,
                    "role": "affiliate",
                    "first_name": "string",
                    "last_name": "string",
                    "patronymic": "string",
                    "email": "string",
                    "phone": "string",
                    "avatar": "\/uploads\/users\/avatars\/asdwtf.jpg",
                    "birthday": {},
                    "country": {
                        "code": "RU",
                        "title": "Russia"
                    },
                    "social": {
                        "skype": "string",
                        "telegram": "string"
                    },
                    "created_at": 0,
                    "kyc_level": 0,
                    "rating": 0
                }
            },
            "merchant_participant_id": 0,
            "manager": {
                "id": 0,
                "first_name": "string",
                "last_name": "string",
                "email": "string",
                "phone": "string",
                "country": {
                    "code": "RU",
                    "title": "Russia"
                },
                "social": {
                    "skype": "string",
                    "telegram": "string"
                }
            },
            "categories": [
                {
                    "id": 0,
                    "name": "string"
                }
            ],
            "pricing_models": [
                {
                    "id": 0,
                    "name": "string"
                }
            ],
            "countries": [
                {
                    "code": "RU",
                    "title": "Russia"
                }
            ],
            "rates": [
                {
                    "id": 0,
                    "action": "string",
                    "active": true,
                    "description": "string",
                    "merchant_payment_type": "fixed",
                    "merchant_payment_amount": 12.57,
                    "commission_payment_amount": 12.57,
                    "default_payout": 12.57,
                    "created_at": 0,
                    "updated_at": 0,
                    "ended_at": 0,
                    "visibility": "public",
                    "payment_model": {
                        "id": 0,
                        "name": "string"
                    },
                    "custom_payouts": [
                        {
                            "id": 0,
                            "payout": 12.57,
                            "affiliate": {
                                "id": 0,
                                "owner": {
                                    "id": 0,
                                    "first_name": "string",
                                    "last_name": "string",
                                    "email": "string"
                                }
                            }
                        }
                    ]
                }
            ],
            "traffic_types": [
                {
                    "id": 0,
                    "name": "string",
                    "items": [
                        {
                            "id": 0,
                            "name": "string"
                        }
                    ]
                }
            ],
            "promo_tools_count": [
                {
                    "landing": 0,
                    "website": 0,
                    "banner": 0,
                    "keywords": 0,
                    "render": 0,
                    "feed": 0
                }
            ],
            "targeting": [
                {
                    "id": 0,
                    "exclude_countries": true,
                    "exclude_regions": true,
                    "exclude_cities": true,
                    "exclude_brands": true,
                    "exclude_device_types": true,
                    "exclude_devices": true,
                    "exclude_browsers": true,
                    "exclude_operating_systems": true,
                    "countries": [
                        {
                            "id": 0,
                            "name": "string",
                            "iso_code": "string"
                        }
                    ],
                    "regions": [
                        {
                            "id": 0,
                            "name": "string",
                            "iso_code": "string",
                            "country_iso_code": "string"
                        }
                    ],
                    "cities": [
                        {
                            "id": 0,
                            "name": "string",
                            "country_iso_code": "string",
                            "region_iso_code": "string"
                        }
                    ],
                    "providers": [
                        {
                            "id": 0,
                            "name": "string"
                        }
                    ],
                    "device_types": [
                        {
                            "id": 0,
                            "type": "string"
                        }
                    ],
                    "connection_types": [
                        {
                            "id": 0,
                            "type": "string"
                        }
                    ],
                    "devices": [
                        {
                            "id": 0,
                            "name": "string",
                            "device_type_id": 0,
                            "operating_system_id": 0,
                            "brand_id": 0
                        }
                    ],
                    "browsers": [
                        {
                            "id": 0,
                            "name": "string"
                        }
                    ],
                    "operating_systems": [
                        {
                            "id": 0,
                            "name": "string"
                        }
                    ],
                    "brands": [
                        {
                            "id": 0,
                            "name": "string"
                        }
                    ]
                }
            ],
            "cap": {
                "id": 0,
                "default_over_cap_rate_id": 0,
                "timezone": "string",
                "lead_statuses": [
                    "hold"
                ],
                "items": [
                    {
                        "id": 0,
                        "time_frame": "day",
                        "type": "clicks",
                        "value": 100.01,
                        "rate_distribution_type": "all",
                        "affiliate_distribution_type": "all",
                        "affiliates": [
                            {
                                "id": 0,
                                "owner": {
                                    "id": 0,
                                    "first_name": "string",
                                    "last_name": "string",
                                    "email": "string"
                                }
                            }
                        ],
                        "rates": [
                            1,
                            2,
                            3
                        ]
                    }
                ]
            },
            "moderate_campaigns": "string",
            "campaigns_count": 0
        }
    ]
}

HTTP Request

GET api/offers/grid

Body Parameters

Parameter Type Status Description
per_page integer optional Number of results per page.
page integer optional Current page.
sort_column string optional Sorting column (options: id, name, start_date, end_date, created_at).
sort_order string optional Sorting order (options: desc, asc).
search object optional Filtering conditions.
search.id string optional Offer ID.
search.name string optional Offer name.
search.lead_hold_time array optional Days until auto-approve
search.lead_hold_time[0] integer optional Min days until auto-approve
search.lead_hold_time[1] integer optional Max days until auto-approve
search.status string optional Offer status (options: created, pending, declined, active, paused, disabled).
search.visibility string optional Offer visibility (options: public, private).
search.start_date object optional Offers filtered by Start date
search.start_date.start_date integer optional Start of range for start date (unix timestamp).
search.start_date.end_date integer optional End of range for start date (unix timestamp).
search.end_date object optional Offers filtered by End date
search.end_date.start_date integer optional Start of range for end date (unix timestamp).
search.end_date.end_date integer optional End of range for end date (unix timestamp).
search.created_at object optional Offers filtered by Created At date
search.created_at.start_date integer optional Start of range for creation date (unix timestamp).
search.created_at.end_date integer optional Start of range for creation date (unix timestamp).
search.networks array optional Offers filtered by Network
search.networks.* integer optional Network ID
search.merchants array optional Offers filtered by Advertiser
search.merchants.* integer optional Advertiser ID
search.managers array optional Offers filtered by Manager
search.managers.* integer optional Manager ID
search.categories array optional Offers filtered by Categories
search.categories.* integer optional Offer category ID
search.pricing_models array optional Offers filtered by Pricing models
search.pricing_models.* integer optional Pricing model ID
search.traffic_types array optional Offers filtered by Traffic types
search.traffic_types.* integer optional Traffic type ID
search.countries array optional Offers filtered by Countries
search.countries.* string optional Country ISO code
search.only_with_campaigns boolean optional Shows Offers which have at least one campaign. For affiliates, it shows only offers with at least 1 campaign created by this affiliate (in any status). For the network and manager, it show offers that have at least 1 active campaign.
search.only_with_promo_tools boolean optional Shows all offers with Promo tools.
search.only_with_leads boolean optional Shows all offers with Leads.
search.only_with_active_rate boolean optional Shows all offers with active Rates.
search.all string optional Universal filter (by fields id, title, also dates: start_date, end_date, created_at at format DD.MM.YYYY HH:MM).

Add new offer


Requires authentication Adding one new offer to HOQU

Example request:

curl -X POST \
    "https://api.hoqu.com/api/offers" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM" \
    -d '{"participant_id":1,"name":"Demo offer","visibility":"public","moderate_campaigns":"1","currency":"USD","lead_hold_time":1,"description":[{"lang":"en","text":"officiis"}],"rules":[{"lang":"en","text":"commodi"}],"tracking":{"trafficback_url":"suscipit","tracking_url":"libero","tracking_params":"provident","macros":"qui","preview_url":"ullam","allow_deeplinks":false,"allow_impressions":false,"cookie_lifetime":16},"countries":["RU"],"pricing_models":[17],"categories":[15],"traffic_types":[3],"rates":[{"action":"commodi","description":"aut","merchant_payment_type":"percent","merchant_payment_amount":325519.417,"commission_payment_amount":1120812.6699331,"payment_model_id":10,"activate":false,"visibility":"public"}],"targeting":[{"exclude_countries":true,"exclude_regions":true,"exclude_cities":false,"exclude_brands":true,"exclude_device_types":true,"exclude_devices":false,"exclude_browsers":false,"exclude_operating_systems":true,"countries":[1],"regions":[1],"cities":[1],"providers":[1],"brands":[1],"devices":[1],"device_types":[1],"connection_types":[1],"operating_systems":[1],"browsers":[1]}],"start_date":1580418000,"end_date":1609362000}'

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.hoqu.com/api/offers',
    [
        'headers' => [
            'Accept' => 'application/json',
            'Content-Type' => 'application/json',
            'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM',
        ],
        'json' => [
            'participant_id' => 1,
            'name' => 'Demo offer',
            'visibility' => 'public',
            'moderate_campaigns' => '1',
            'currency' => 'USD',
            'lead_hold_time' => 1,
            'description' => [
                [
                    'lang' => 'en',
                    'text' => 'officiis',
                ],
            ],
            'rules' => [
                [
                    'lang' => 'en',
                    'text' => 'commodi',
                ],
            ],
            'tracking' => [
                'trafficback_url' => 'suscipit',
                'tracking_url' => 'libero',
                'tracking_params' => 'provident',
                'macros' => 'qui',
                'preview_url' => 'ullam',
                'allow_deeplinks' => false,
                'allow_impressions' => false,
                'cookie_lifetime' => 16,
            ],
            'countries' => [
                'RU',
            ],
            'pricing_models' => [
                17,
            ],
            'categories' => [
                15,
            ],
            'traffic_types' => [
                3,
            ],
            'rates' => [
                [
                    'action' => 'commodi',
                    'description' => 'aut',
                    'merchant_payment_type' => 'percent',
                    'merchant_payment_amount' => 325519.417,
                    'commission_payment_amount' => 1120812.6699331,
                    'payment_model_id' => 10,
                    'activate' => false,
                    'visibility' => 'public',
                ],
            ],
            'targeting' => [
                [
                    'exclude_countries' => true,
                    'exclude_regions' => true,
                    'exclude_cities' => false,
                    'exclude_brands' => true,
                    'exclude_device_types' => true,
                    'exclude_devices' => false,
                    'exclude_browsers' => false,
                    'exclude_operating_systems' => true,
                    'countries' => [
                        1,
                    ],
                    'regions' => [
                        1,
                    ],
                    'cities' => [
                        1,
                    ],
                    'providers' => [
                        1,
                    ],
                    'brands' => [
                        1,
                    ],
                    'devices' => [
                        1,
                    ],
                    'device_types' => [
                        1,
                    ],
                    'connection_types' => [
                        1,
                    ],
                    'operating_systems' => [
                        1,
                    ],
                    'browsers' => [
                        1,
                    ],
                ],
            ],
            'start_date' => 1580418000,
            'end_date' => 1609362000,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "id": "string",
    "lead_hold_time": 0,
    "name": "string",
    "logo": "\/uploads\/offers\/logo\/logo.jpg",
    "status": "created",
    "currency": "USD",
    "visibility": "public",
    "start_date": "string",
    "end_date": "string",
    "created_at": 0,
    "updated_at": 0,
    "merchant_participant_id": 0,
    "moderate_campaigns": "string",
    "campaigns_count": 0,
    "network": {
        "id": 0,
        "name": "string"
    },
    "description": [
        {
            "id": 0,
            "lang": "string",
            "type": "description",
            "text": "string"
        }
    ],
    "rules": [
        {
            "id": 0,
            "lang": "string",
            "type": "description",
            "text": "string"
        }
    ],
    "tracking": {
        "tracking_url": "string",
        "macros": "string",
        "tracking_domain": "string",
        "tracking_params": "string",
        "preview_url": "string",
        "trafficback_url": "string",
        "allow_deeplinks": true,
        "allow_impressions": true,
        "cookie_lifetime": 0
    },
    "merchant": {
        "id": 0,
        "name": "string",
        "kyc_level": 0,
        "rating": 0,
        "created_at": 0,
        "owner": {
            "id": 0,
            "role": "affiliate",
            "first_name": "string",
            "last_name": "string",
            "patronymic": "string",
            "email": "string",
            "phone": "string",
            "avatar": "\/uploads\/users\/avatars\/asdwtf.jpg",
            "birthday": {},
            "country": {
                "code": "RU",
                "title": "Russia"
            },
            "social": {
                "skype": "string",
                "telegram": "string"
            },
            "created_at": 0,
            "kyc_level": 0,
            "rating": 0
        }
    },
    "manager": {
        "id": 0,
        "first_name": "string",
        "last_name": "string",
        "email": "string",
        "phone": "string",
        "country": {
            "code": "RU",
            "title": "Russia"
        },
        "social": {
            "skype": "string",
            "telegram": "string"
        }
    },
    "categories": [
        {
            "id": 0,
            "name": "string"
        }
    ],
    "pricing_models": [
        {
            "id": 0,
            "name": "string"
        }
    ],
    "countries": [
        {
            "code": "RU",
            "title": "Russia"
        }
    ],
    "rates": [
        {
            "id": 0,
            "action": "string",
            "active": true,
            "description": "string",
            "merchant_payment_type": "fixed",
            "merchant_payment_amount": 12.57,
            "commission_payment_amount": 12.57,
            "default_payout": 12.57,
            "created_at": 0,
            "updated_at": 0,
            "ended_at": 0,
            "visibility": "public",
            "payment_model": {
                "id": 0,
                "name": "string"
            },
            "custom_payouts": [
                {
                    "id": 0,
                    "payout": 12.57,
                    "affiliate": {
                        "id": 0,
                        "owner": {
                            "id": 0,
                            "first_name": "string",
                            "last_name": "string",
                            "email": "string"
                        }
                    }
                }
            ]
        }
    ],
    "traffic_types": [
        {
            "id": 0,
            "name": "string",
            "items": [
                {
                    "id": 0,
                    "name": "string"
                }
            ]
        }
    ],
    "promo_tools_count": [
        {
            "landing": 0,
            "website": 0,
            "banner": 0,
            "keywords": 0,
            "render": 0,
            "feed": 0
        }
    ],
    "targeting": [
        {
            "id": 0,
            "exclude_countries": true,
            "exclude_regions": true,
            "exclude_cities": true,
            "exclude_brands": true,
            "exclude_device_types": true,
            "exclude_devices": true,
            "exclude_browsers": true,
            "exclude_operating_systems": true,
            "countries": [
                {
                    "id": 0,
                    "name": "string",
                    "iso_code": "string"
                }
            ],
            "regions": [
                {
                    "id": 0,
                    "name": "string",
                    "iso_code": "string",
                    "country_iso_code": "string"
                }
            ],
            "cities": [
                {
                    "id": 0,
                    "name": "string",
                    "country_iso_code": "string",
                    "region_iso_code": "string"
                }
            ],
            "providers": [
                {
                    "id": 0,
                    "name": "string"
                }
            ],
            "device_types": [
                {
                    "id": 0,
                    "type": "string"
                }
            ],
            "connection_types": [
                {
                    "id": 0,
                    "type": "string"
                }
            ],
            "devices": [
                {
                    "id": 0,
                    "name": "string",
                    "device_type_id": 0,
                    "operating_system_id": 0,
                    "brand_id": 0
                }
            ],
            "browsers": [
                {
                    "id": 0,
                    "name": "string"
                }
            ],
            "operating_systems": [
                {
                    "id": 0,
                    "name": "string"
                }
            ],
            "brands": [
                {
                    "id": 0,
                    "name": "string"
                }
            ]
        }
    ]
}

Example response (400):

"Неправильный запрос на создание, подробности в ошибке"

Example response (403):

"Данное действие недоступно для текущего пользователя"

Example response (422):

{
    "errors": {
        "participant_id": [
            "participant_id is required",
            "participant_id must be an integer"
        ],
        "currency": [
            "name must be a string"
        ]
    }
}

HTTP Request

POST api/offers

Body Parameters

Parameter Type Status Description
participant_id integer required Advertiser ID in this particular Network.
name string required Offer name.
visibility string required Offers visibility (options: public, private)
moderate_campaigns string required Moderate offer campaigns (options: 0 - disabled, 1 - enabled)
currency string required Offer currency
lead_hold_time integer required Number of Hold days (until conversions wil be auto approved)
description array required
description.* object required Object of the offer description in a specific language
description.*.lang string required Offer description language (options: en, ru)
description.*.text string required Offer description text
rules array required
rules.* object optional Object of the offer rules description in a specific language required
rules.*.lang string required Offer rules description language (options: en, ru)
rules.*.text string required Offer rules description text
tracking object required Offer tracking object
tracking.trafficback_url string required Trafficback URL
tracking.tracking_url string required Tracking URL
tracking.tracking_params string optional Specify macros for the tracking URL, which will be passed during the redirect
tracking.macros string optional Tracking macros ({click_id} is required)
tracking.preview_url string optional Offer preview URL
tracking.allow_deeplinks boolean optional If deeplinks allowed
tracking.allow_impressions boolean optional If impressions allowed
tracking.cookie_lifetime integer optional Cookie lifetime (in days)
countries array required
countries.* string required Specify the countries the offer is available for (example: RU, GB)
pricing_models array required
pricing_models.* integer required Offer pricing models
categories array required
categories.* integer optional Specify offer categories (verticals)
traffic_types array required
traffic_types.* integer required Specify allowed traffic types IDs for the offer
rates array required
rates.* object required
rates.*.action string optional Paid action name (used for creating offer rates & for s2s integration)
rates.*.description string optional Description of the paid action
rates.*.merchant_payment_type string optional Type of the paid action (options: fixed, percent)
rates.*.merchant_payment_amount number optional Advertiser cost
rates.*.commission_payment_amount number optional (min: 0.01, max: 100) Network commission
rates.*.payment_model_id integer optional Payment model id
rates.*.activate boolean optional Specify rate status when created (active or not)
rates.*.visibility string optional Visibility of the offer rate (options: public, private)
targeting array optional
targeting.* object optional
targeting.*.exclude_countries boolean optional Specify countries IDs you'd like to exclude from targeting
targeting.*.exclude_regions boolean optional Specify regions IDs you'd like to exclude from targeting
targeting.*.exclude_cities boolean optional Specify cities IDs you'd like to exclude from targeting
targeting.*.exclude_brands boolean optional Specify device brands you'd like to exclude from targeting
targeting.*.exclude_device_types boolean optional Specify device types you'd like to exclude from targeting
targeting.*.exclude_devices boolean optional Specify devices you'd like to exclude from targeting
targeting.*.exclude_browsers boolean optional Specify browsers you'd like to exclude from targeting
targeting.*.exclude_operating_systems boolean optional Specify OSs you'd like to exclude from targeting
targeting.*.countries array optional
targeting.*.countries.* integer required Specify countries IDs you'd like to target
targeting.*.regions array optional
targeting.*.regions.* integer required Specify regions IDs you'd like to target
targeting.*.cities array optional
targeting.*.cities.* integer required Specify cities IDs you'd like to target
targeting.*.providers array optional
targeting.*.providers.* integer required Specify ISPs IDs you'd like to target
targeting.*.brands array optional
targeting.*.brands.* integer required Specify brands IDs you'd like to target
targeting.*.devices array optional
targeting.*.devices.* integer required Specify devices IDs you'd like to target
targeting.*.device_types array optional
targeting.*.device_types.* integer required Specify device types IDs you'd like to target
targeting.*.connection_types array optional
targeting.*.connection_types.* integer required Specify connection types IDs you'd like to target
targeting.*.operating_systems array optional
targeting.*.operating_systems.* integer required Specify OSs IDs you'd like to target
targeting.*.browsers array optional
targeting.*.browsers.* integer required Specify browsers you'd like to target
start_date integer required Offer start date (unix timestamp)
end_date integer optional Offer end date (unix timestamp)
logo string optional Binary file of logo

Add offer cap


Requires authentication

Example request:

curl -X POST \
    "https://api.hoqu.com/api/offers/1/caps" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM" \
    -d '{"default_over_cap_rate_id":20,"allow_overcap":true,"timezone":"Asia\/Seoul","lead_statuses":["hold"],"items":[{"status":"active","time_frame":"day","type":"clicks","value":100.01,"rate_distribution_type":"all","affiliate_distribution_type":"all","affiliates":[19],"rates":[13]}]}'

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.hoqu.com/api/offers/1/caps',
    [
        'headers' => [
            'Accept' => 'application/json',
            'Content-Type' => 'application/json',
            'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9ob3F1LmxvY2FsOjgwODJcL2FwaVwvdXNlcnNcL2Nvbm5lY3RcLzU5YzljM2IzLTcxNzMtNDdkZS04N2Q3LTE2OGViY2Q3ZDM2NSIsImlhdCI6MTU5NjE4NTc0OCwiZXhwIjoxNTk2NzkwNTQ4LCJuYmYiOjE1OTYxODU3NDgsImp0aSI6IkNEUWJHRFNJRUZ3QUxkdEIiLCJzdWIiOjEsInBydiI6IjgxZGNiMzA0NjI2NzZhNDMxYWU0M2YxZmYzNzk5ZmIxMmY5MDQ1OTIiLCJyb2xlIjoibmV0d29yayIsInNldHRpbmdzIjp7Imxhbmd1YWdlIjoiZW4iLCJ0aW1lem9uZSI6IlVUQyIsImRhdGVfZm9ybWF0IjpudWxsLCJtYWluX2N1cnJlbmN5IjoiVVNEIiwiY3VycmVuY3lfZm9ybWF0IjpudWxsLCJlbWFpbF9hdXRoX2VuYWJsZWQiOmZhbHNlfX0.eJiyHiTLJRsBl3u6z2_RIP78DA0Ebsbb-O8af2XwPfM',
        ],
        'json' => [
            'default_over_cap_rate_id' => 4,
            'allow_overcap' => true,
            'timezone' => 'Asia/Seoul',
            'lead_statuses' => [
                'hold',
            ],
            'items' => [
                [
                    'status' => 'active',
                    'time_frame' => 'day',
                    'type' => 'clicks',
                    'value' => 100.01,
                    'rate_distribution_type' => 'all',
                    'affiliate_distribution_type' => 'all',
                    'affiliates' => [
                        6,
                    ],
                    'rates' => [
                        19,
                    ],
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "id": 0,
    "default_over_cap_rate_id": 0,
    "timezone": "string",
    "allow_overcap": true,
    "lead_statuses": [
        "hold"
    ],
    "items": [
        {
            "id": 0,
            "time_frame": "day",
            "type": "clicks",
            "value": 100.01,
            "rate_distribution_type": "all",
            "affiliate_distribution_type": "all",
            "affiliates": [
                {
                    "id": 0,
                    "owner": {
                        "id": 0,
                        "first_name": "string",
                        "last_name": "string",
                        "email": "string"
                    }
                }
            ],
            "rates": [
                1,
                2,
                3
            ]
        }
    ]
}

HTTP Request

POST api/offers/{offer}/caps

URL Parameters

Parameter Status Description
offer required Offer ID

Body Parameters

Parameter Type Status Description
default_over_cap_rate_id integer optional
allow_overcap boolean optional
timezone string required
lead_statuses array optional
lead_statuses.* string optional Lead status (options: hold, approved, rejected)
items array optional
items.* object optional
items.*.status string optional (options: active, inactive)
items.*.time_frame string optional (options: day, mounth, lifetime)
items.*.type string optional (options: clicks, bubget, conversions)
items.*.value float optional
items.*.rate_distribution_type string optional (options: all, each, select)
items.*.affiliate_distribution_type string optional (options: all, each, select)
items.*.affiliates array optional
items.*.affiliates.* integer optional
items.*.rates array optional
items.*.rates.* integer optional