This endpoint is obsolete. To receive the list of programs available in the Takeads catalog, refer to the Get list of programs endpoint.
Use this endpoint to receive the list of programs available in the Takeads catalog.
When querying a list of programs, the detailed information on each program is also provided in the response.
You can test this API endpoint and inspect the possible responses using Swagger UI.
Request
URL: https://api.takeads.com/v1/product/monetize-api/v1/program
Method: GET
Request headers
Header | Value | Description |
Authorization | Bearer <PublicKey> |
String of alphanumeric characters with Bearer as prefix, used to authenticate and authorize your API requests. To learn how to get your Public key, refer to the Receiving API keys article. |
Query parameters
Specify the query parameters to get particular programs or paginate the response. This endpoint has no required parameters.
If no query parameters are specified, the list with up to 500 first programs is returned.
The following table describes query parameters that you can use in the request.
Property | Type | Description |
updatedAtFrom |
number |
Timestamp in the ISO 8601 format that specifies the starting point of the period during which information about programs was last updated. Example: 2022-01-17T12:00:00.000Z |
updatedAtTo |
number |
Timestamp in the ISO 8601 format that specifies the ending point of the period during which information about programs was last updated. Example: 2022-05-17T12:00:00.000Z |
programStatus |
string |
Status of the program. Possible values: ACTIVE or INACTIVE |
offset |
number |
If specified, the list of programs starting with the |
limit |
number |
The maximum number of programs that may be returned for a single request. The maximum value is 500. |
Request examples
-
curl --location --request GET --header 'Authorization: Bearer <Public Key>' \
'https://api.takeads.com/v1/product/monetize-api/v1/ program?updatedAtFrom=2022-01-01T00%3A00%3A00.000Z&updatedAtTo=2022-05-01T00%3A00%3A00.000Z&programStatus=ACTIVE&limit=100&offset=500' -
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <Public Key>");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.takeads.com/v1/product/monetize-api/v1/program?updatedAtFrom=2022-01-01T00%3A00%3A00.000Z&updatedAtTo=2022-05-01T00%3A00%3A00.000Z&programStatus=ACTIVE&limit=100&offset=500", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error)); -
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.takeads.com/v1/product/monetize-api/v1/program?updatedAtFrom=2022-01-01T00%253A00%253A00.000Z&updatedAtTo=2022-05-01T00%253A00%253A00.000Z&programStatus=ACTIVE&limit=100&offset=500',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer <Public Key>'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response; -
import http.client
conn = http.client.HTTPSConnection("api.takeads.com")
payload = ''
headers = {
'Authorization': 'Bearer <Public Key>'
}
conn.request("GET", "/v1/product/monetize-api/v1/program?updatedAtFrom=2022-01-01T00%253A00%253A00.000Z&updatedAtTo=2022-05-01T00%253A00%253A00.000Z&programStatus=ACTIVE&limit=100&offset=500", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Response
If the request was successfully processed by the server, the HTTP response with 200 status code is returned.
The returned programs are sorted by the updatedAt
value in the descending order. If the updatedAt
value is the same for a number of programs, they are filtered by their id
s in the ascending order.
The response payload is a JSON object that contains meta
object with metadata, and data
array with information on the retrieved programs. Each item of the array is an object with the program's details.
The following table describes the response properties.
Property | Type | Description |
offset |
number |
If specified — the list of programs starting with the |
limit |
number |
The maximum number of programs that may be returned for a single request. |
total |
number |
Total number of programs available in the Takeads catalog. |
id |
string |
Program ID. |
name |
string |
Program name. |
pricingModel |
string / null |
Payment model used in the program. Possible values: CPL, CPA, CPC. |
websiteUrl |
string / null |
Direct (not affiliate) link to the advertiser’s website. Can be the link to the main page or to the particular product. |
imageUrl |
string / null |
URL of the advertiser’s logo. |
countryCodes |
string / null |
List of the country codes where the program is operating. |
avgCommission |
number / null |
Average percent of the advertiser's commission. |
updatedAt |
string |
Timestamp that specifies the date when information about the program was last updated in the statistics. |
hostname |
string |
Hostname of the advertiser's website. |
programStatus |
string |
Status of the program: ACTIVE or INACTIVE. |
merchantId |
number / null |
ID of the merchant that is being advertised. |
Example value
{
"meta": {
"offset": 0,
"limit": 500,
"total": 189193
},
"data": [
{
"id": "7fc4b9f7-ee66-41e0-b6ca-38087aae1188",
"name": "Example CH",
"pricingModel": "CPA",
"websiteUrl": "https://www.example.com/ch/",
"imageUrl": "https://kqdxc4m5.de/logos_v2/
120x60/0b95eee638b5bdf679ca8cf9c11beaa7.gif",
"countryCodes": [
"DE"
],
"avgCommission": 2.72,
"updatedAt": "2022-05-17T10:17:39.000Z",
"hostname": "example.com",
"programStatus": "ACTIVE",
"merchantId": null
},
...
]
}
To view possible error responses, refer to the Error responses article.