Get list of programs (obsolete)

  • Updated

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.

If you receive an empty list of programs, but the next value in the response is not null — request the following page of the programs list, using the next query parameter with the next value from the received 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/v2/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 Authorization 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
next
(optional)
string

A pointer (UUIDv4) to the next page of the program list. If specified, a list of programs from the indicated page is retrieved.

Example: 64b56b75-83df-43e3-855b-28129bdd7b46

limit
(optional)
number The maximum number of programs that may be returned for a single request. The maximum value is 500.
The default value is 500.
updatedAtFrom
(optional)
number

Date and time in the ISO 8601 format, defining the starting point of the period during which information about programs was last updated.

Example: 2022-01-17T12:00:00.000Z

updatedAtTo
(optional)
number

Date and time in the ISO 8601 format, defining the ending point of the period during which information about programs was last updated.

Example: 2022-05-17T12:00:00.000Z

programStatus
(optional)
string

Status of the program.

Possible values: ACTIVE or INACTIVE


Request examples

  • curl --location --request GET --header 'Authorization: Bearer <Public Key>' \
    
    'https://api.takeads.com/v1/product/monetize-api/v2/
    program?updatedAtFrom=2022-01-01T00%3A00%3A00.000Z&updatedAtTo=2022-05-01T00%3A00%3A00.000Z&programStatus=ACTIVE&limit=100&next=64b56b75-83df-43e3-855b-28129bdd7b46'
    
  • const myHeaders = new Headers();
    myHeaders.append("Authorization", "Bearer <Public Key>");
    const requestOptions = {
    method: 'GET',
    headers: myHeaders,
    redirect: 'follow'
    };
    fetch("https://api.takeads.com/v1/product/monetize-api/v2/program?updatedAtFrom=2022-01-01T00%3A00%3A00.000Z&updatedAtTo=2022-05-01T00%3A00%3A00.000Z&programStatus=ACTIVE&limit=100&next=64b56b75-83df-43e3-855b-28129bdd7b46", 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/v2/program?updatedAtFrom=2022-01-01T00%253A00%253A00.000Z&updatedAtTo=2022-05-01T00%253A00%253A00.000Z&programStatus=ACTIVE&limit=100&next=64b56b75-83df-43e3-855b-28129bdd7b46',
    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/v2/program?updatedAtFrom=2022-01-01T00%253A00%253A00.000Z&updatedAtTo=2022-05-01T00%253A00%253A00.000Z&programStatus=ACTIVE&limit=100&next=64b56b75-83df-43e3-855b-28129bdd7b46", payload, headers)
    res = conn.getresponse()
    data = res.read()
    print(data.decode("utf-8"))

 

Response

If the request was successfully processed by the server, an HTTP response with status code 200 is returned.

The response payload is a JSON object that contains a meta object with metadata, and a data array with information about retrieved programs. Each item of the array is an object with the program's details.

The following table describes the response metadata.

Property Type Description
next string

A pointer (UUIDv4) to the next page of the programs list. If specified, a list of programs from the indicated page is retrieved.

If the value is null, the returned result is a list of programs from the last page.

limit number

The maximum number of programs that can be returned for a single request.

Example: 100

 

The following table describes the response properties from the data array.

Property Type Description
id string Program unique identifier.
name string Program name. Maximum length is 128 bytes.
pricingModel string / null Payment model that is used in the program. Possible values: CPL, CPA, CPC.
programStatus string Program status: ACTIVE or INACTIVE.
avgCommission number / null Average percent of the advertiser's commission.
countryCodes string / null List of country codes in ISO 3166-1 alpha-2 format where the program operates.
websiteUrl string / null Direct (not affiliate) link to the advertiser’s website. This can be a link to the home page or to a particular product.
imageUrl string / null URL of the advertiser’s logo.
hostname string Hostname of the advertiser's website.
Part of the RFC 1035 domain name.
merchantId number / null Unique identifier of the advertised merchant.
updatedAt string Date and time in the ISO 8601 format when information about the program was last updated in the statistics.
languageCodes string Array of languages supported by the website in ISO 639-1 alpha-2 format. If the value is empty, the website languages are unknown.


Example value
 

{
"meta": {
"next": 64b56b75-83df-43e3-855b-28129bdd7b46,
"limit": 500
},
"data": [
{
"id": "7fc4b9f7-ee66-41e0-b6ca-38087aae1188",
"name": "Example CH",
"pricingModel": "CPA",
"programStatus": "ACTIVE",
"avgCommission": 2.72,
"countryCodes": [
"DE"
],
"languageCodes": [
"en",
"de"
],
"websiteUrl": "https://www.example.com/ch/",
"imageUrl": "https://kqdxc4m5.de/logos_v2/
120x60/0b95eee638b5bdf679ca8cf9c11beaa7.gif",
"hostname": "example.com",
"merchantId": null
"updatedAt": "2022-05-17T10:17:39.000Z",
},
...
]
}


To view possible error responses, refer to the Error responses article.

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request