Get report on actions (depricated)

Use this endpoint to get the report on actions performed in your account. You can get the detailed report for the specified platform or for all platforms in your account.

If your platform has been disconnected from a program, you can still receive reports for it.

You can test this API endpoint and inspect the possible responses using Swagger UI.

Request

URL: https://api.takeads.com/v1/api/stats/action

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

You can use query parameters to retrieve information about specific actions.
This endpoint has no required parameters.

To get reports on actions performed within a certain period, use one of the following: days parameter, or date parameter, or a pair of dateFrom and dateTo parameters.

  • If days parameter is specified — date, dateFrom and dateTo parameters are ignored.

  • If days parameter is not specified and date parameter is specified — dateFrom and dateTo parameters are ignored.

The specified period cannot exceed 120 days. If you don’t specify the period, the information for the past 7 seven days is returned.
Use offset and limit parameters to paginate the response.

If no query parameters are specified, actions performed on all platforms in your account will be returned.

The following table describes query parameters that you can use in the request.

Property Type Description

dateFrom
(optional)

string

Starting point of the reporting period. This parameter can't be used without the ending point of the reporting period — dateTo.

Example: 2021-08-03

dateTo
(optional)

string

Ending point of the reporting period. This parameter can't be used without the starting point of the reporting period — dateFrom.

Example: 2021-08-04

date
(optional)

string

Exact report date.

Example: 2021-08-03

days
(optional)

integer

Number of days in the reporting period. Defaults to 7.

Example: 3

The starting date of the reporting period can be defined by the current date minus the number of days.

programId
(optional)

string

ID (UUIDv4) of the program you want to get the report for.

Example: f527f086-3c67-4c03-8dd5-556d14106dd2

subId
(optional)

string

SubId of the deeplink you want to get the report for.

Example: abc_123-2

adspaceId
(optional)

string

ID (UUIDv4) of the platform you want to get the report for.

Example: 603f4ef6-ec4f-4f34-827c-9a66ca6920a4

offset
(optional)

integer

If specified, the list of actions starting with the offset value is retrieved. The first N actions are excluded from the response (N = offset value). The default value is 0.

limit
(optional)

integer

The maximum number of actions that may be returned for a single request. The default value is 500. The maximum value is 500.

Request examples


  • curl --location --request GET --header 'Authorization: Bearer <Public Key>' \
    'http://api.takeads.com/v1/api/stats/action?dateFrom=2021-08-03&dateTo=2021-08-04&subId=test&adspaceId=fb9868e4-b7e3-4d2f-957e-7ed7e0f1e87f&programId=c126a15d-ebb3-4ed8-b5d1-a239ecd52e0d01&limit=100&offset=500'
  • fetch("http://api.takeads.com/v1/api/stats/action?dateFrom=2021-08-03&dateTo=2021-08-04&subId=test&adspaceId=fb9868e4-b7e3-4d2f-957e-7ed7e0f1e87f&programId=c126a15d-ebb3-4ed8-b5d1-a239ecd52e0d01&limit=100&offset=500", {
    "method": "GET",
    "headers": {
    "Authorization": "Bearer <Public Key>",
    "Content-Type": "application/json"
    }
    })
    .then(response => {
    console.log(response);
    })
    .catch(err => {
    console.error(err);
    });
  • <?php

    $curl = curl_init();

    curl_setopt_array($curl, [
    CURLOPT_URL => "http://api.takeads.com/v1/api/stats/action?dateFrom=2021-08-03&dateTo=2021-08-04&subId=test&adspaceId=fb9868e4-b7e3-4d2f-957e-7ed7e0f1e87f&programId=c126a15d-ebb3-4ed8-b5d1-a239ecd52e0d01&limit=100&offset=500",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_POSTFIELDS => "",
    CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <Public Key>",
    "Content-Type: application/json"
    ],
    ]);

    $response = curl_exec($curl);
    $err = curl_error($curl);

    curl_close($curl);

    if ($err) {
    echo "cURL Error #:" . $err;
    } else {
    echo $response;
    }
  • import http.client

    conn = http.client.HTTPConnection("api.takeads.com")

    payload = ""

    headers = {
    'Authorization': "Bearer <Public Key>",
    'Content-Type': "application/json"
    }

    conn.request("GET", "/v1/api/stats/action?dateFrom=2021-08-03&dateTo=2021-08-04&subId=test&adspaceId=fb9868e4-b7e3-4d2f-957e-7ed7e0f1e87f&programId=c126a15d-ebb3-4ed8-b5d1-a239ecd52e0d01&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 and the list of action items is returned.

The returned actions are sorted by the updatedAt parameter.

The response payload is a JSON object that contains meta object with metadata and data array with the retrieved action items. Each item of the array is an object with information about the action.

The following table describes the response properties.

Property Type Description

offset

integer

If specified, the list of actions starting with the offset value is retrieved. The first N actions are excluded from the response (N = offset value). The default value is 0.

limit

integer

The maximum number of actions that may be returned for a single request. The default value is 500. The Maximum value is 500.

total

integer

Total number of actions corresponding to the specified parameters.

id

number

Action ID.

actionId

number

Unique identifier of the action assigned by Takeads.

status

string

Action status. Possible values: PENDING, CONFIRMED, or CANCELED.

orderType

string

Action type corresponding to a payment model used in the program.
Possible values:
SALE (corresponds to CPA),
LEAD (corresponds to CPL),
CLICK (corresponds to CPC).

adspaceId

string

ID (UUIDv4) of the platform you received the report for.

adspaceName

string

Name of the platform.

programId

string

ID (UUIDv4) of the program you received the report for.

programName

string

Name of the program.

subId

string

SubID of the deeplink you received the report for.

currencyCode

string

ISO 4217:2008 alpha-3 currency code of the action's commission and revenue.

commission

number ($float)

Commission per action.

revenue

number ($float)

Revenue for the order in currencyCode.

productId

string

ID of the Takeads product. Possible values:
MONETIZE_LINK_SCRIPT,
MONETIZE_LINK_API,
MONETIZE_API,
MONETIZE_SEARCH_API,
MONETIZE_SUGGEST.

paidOut

boolean

Indicates whether a reward for the action was paid upon a withdrawal request.

invoiceNumber

string

Invoice number of a successfully completed withdrawal, which includes a reward for the retrieved action.

date

string

Exact reporting date.

days

string

Number of days in the reporting period. Defaults to 7.

The starting date of the reporting period can be defined by the current date minus the number of days.

createdAt

string

Timestamp that specifies the date when the action was performed.

updatedAt

string

Timestamp that specifies the date when the action was last updated in the statistics.

Example value

{
"meta": {
"limit": 500,
"offset": 0,
"total": 1
},
"data": [
{
"id": 3841030,
"status": "CONFIRMED",
"orderType": "SALE",
"adspaceId": "317ea576-72c9-4d9e-a963-092e10ddc212",
"adspaceName": "name",
"programId": "fe5b76de-c9a6-4960-ba34-fa239f8e0e47",
"programName": "name",
"subId": "test",
"currencyCode": "EUR",
"commission": 1.34,
"revenue": 13.4,
"productId": "MONETIZE_LINK_SCRIPT",
"paidOut": true,
"invoiceNumber": "4685261",
"createdAt": "2022-07-15T10:33:22.659Z",
"updatedAt": "2022-07-16T08:34:59.786Z"
}
]
}


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