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
Since this endpoint is obsolete, you will receive the following HTTP response with 410 status code:
DEPRECATED METHOD, USE `/v1/product/monetize-api/v2/program` INSTEAD.