The Take API returns a list of actions performed in your account, with detailed information about each action. You can get the report for the specified platform or for all platforms in your account.
If your platform has been disconnected from the merchant, 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/v3/api/stats/action
Method: GET
Request headers
Header | Value | Description |
Authorization | Bearer <PublicKey> |
Header with an account public key value, which is a string of alphanumeric characters with Bearer as prefix, used to authenticate and authorize your API requests. Get your key in the API settings. More in the Authorization article. |
Query parameters
You can use query parameters to retrieve information about specific actions.
This endpoint has no required parameters.
The following table describes query parameters that you can use in the request.
Property | Type | Description |
updatedAtFrom (optional) |
string |
Earliest date of the last update of actions. Example: 2024-01-30T08:07:12.166Z |
updatedAtTo (optional) |
string |
Oldest date of the last update of actions. Example: 2024-01-30T08:07:12.166Z |
createdAtFrom (optional) |
string |
Earliest date of the action creation. Example: 2024-01-30T08:07:12.166Z |
createdAtTo (optional) |
string |
Oldest date of the action creation. Example: 2024-01-30T08:07:12.166Z |
status (optional) |
string |
Action status. Possible values: PENDING, CONFIRMED, CANCELED, SETTLED. Example: PENDING Actions automatically transition from the CONFIRMED to SETTLED status after 45–50 days, without any changes in the status or publisher revenue. Example: an action transitioned to the CONFIRMED status on 05/07/2024. If within the next 45 days this action doesn't transition to another status or have a revenue change, then it will be marked as SETTLED. |
subId (optional) |
string |
Sub id associated with the action, as provided by the user. Example: example_sub_id |
adspaceId (optional) |
string |
Identifier of the adspace to which the action belongs. Example: df2ab445-f49b-4a48-a572-7653d3344f81 |
merchantId (optional) |
integer |
Identifier of the merchant to which the action belongs. Example: 123 |
next (optional) |
string |
Identifier of the next page to retrieve. Example: df2ab445-f49b-4a48-a572-7653d3344f81 |
limit (optional) |
integer |
Maximum number of entries to return. Default value : 0 Example: 100 |
Request examples
-
curl --location 'https://api.takeads.com/v3/api/stats/action?updatedAtFrom=2024-01-01T08%3A07%3A12.123Z&updatedAtTo=2024-01-30T08%3A07%3A12.123Z&createdAtFrom=2024-01-01T08%3A07%3A12.123Z&createdAtTo=2024-01-30T08%3A07%3A12.123Z&status=CONFIRMED&subId=example_sub_id&adspaceId=df2ab445-f49b-4a48-a572-7653d3344f81&merchantId=123&next=df2ab445-f49b-4a48-a572-7653d3344f81&limit=100' \
--header 'accept: application/json' \
--header 'Authorization: Bearer <Public Key>'
-
const myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("Authorization", "Bearer <Public Key>");
const requestOptions = {
method: "GET",
headers: myHeaders,
redirect: "follow"
};
fetch("https://api.takeads.com/v3/api/stats/action?updatedAtFrom=2024-01-01T08%3A07%3A12.123Z&updatedAtTo=2024-01-30T08%3A07%3A12.123Z&createdAtFrom=2024-01-01T08%3A07%3A12.123Z&createdAtTo=2024-01-30T08%3A07%3A12.123Z&status=CONFIRMED&subId=example_sub_id&adspaceId=df2ab445-f49b-4a48-a572-7653d3344f81&merchantId=123&next=df2ab445-f49b-4a48-a572-7653d3344f81&limit=100", requestOptions)
.then((response) => response.json())
.then((result) => console.log(result))
.catch((error) => console.error(error)); -
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.takeads.com/v3/api/stats/action?updatedAtFrom=2024-01-01T08%3A07%3A12.123Z&updatedAtTo=2024-01-30T08%3A07%3A12.123Z&createdAtFrom=2024-01-01T08%3A07%3A12.123Z&createdAtTo=2024-01-30T08%3A07%3A12.123Z&status=CONFIRMED&subId=example_sub_id&adspaceId=df2ab445-f49b-4a48-a572-7653d3344f81&merchantId=123&next=df2ab445-f49b-4a48-a572-7653d3344f81&limit=100',
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(
'accept: application/json',
'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 = {
'accept': 'application/json',
'Authorization': 'Bearer <Public Key>'
}
conn.request("GET", "/v3/api/stats/action?updatedAtFrom=2024-01-01T08%253A07%253A12.123Z&updatedAtTo=2024-01-30T08%253A07%253A12.123Z&createdAtFrom=2024-01-01T08%253A07%253A12.123Z&createdAtTo=2024-01-30T08%253A07%253A12.123Z&status=CONFIRMED&subId=example_sub_id&adspaceId=df2ab445-f49b-4a48-a572-7653d3344f81&merchantId=123&next=df2ab445-f49b-4a48-a572-7653d3344f81&limit=100", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Response
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 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 |
limit |
integer |
Maximum number of actions that may be returned for a single request. The default value is 500. The Maximum value is 500. |
next |
string |
Identifier of the next page to retrieve. |
actionId |
string |
Unique identifier of the action assigned by Takeads. |
actionNumericId |
integer |
Numeric unique identifier of the action. |
adspaceId |
string |
Identifier of the adspace to which the action belongs. |
merchantId |
integer |
Merchant identifier. |
status | string |
Action status. |
advertiserPaid | boolean | Payment status, indicating the advertiser's payment is received and commission credited to the publisher's balance. |
subId | string |
Sub id associated with the action, as provided by the user. |
publisherRevenue | number | Amount of the publisher’s revenue. |
orderAmount | number | Order amount. |
currencyCode | string |
ISO 4217:2008 alpha-3 currency code of the action's orderAmount and publisherRevenue. |
type |
string |
Pricing model of the action. Possible values: LEAD, SALE, CLICK, BONUS. |
orderDate |
string | Date when the action was received. |
createdAt | string | Date when the action become available in API. |
updatedAt | string | Date of the last update. |
countryCode | string | Alpha-2 country code according to the ISO 3166 standard. |
clickId | string | Click unique identifier. Alphanumeric. |
couponId | string | Coupon unique identifier. Alphanumeric. |
Example value
{ "meta": { "limit": 500, "next": "df2ab445-f49b-4a48-a572-7653d3344f81" }, "data": [ { "actionId": "df2ab445-f49b-4a48-a572-7653d3344f81", "actionNumericId": 12345, "adspaceId": "df2ab445-f49b-4a48-a572-7653d3344f81", "merchantId": 12345, "status": "PENDING", "advertiserPaid": false, "subId": "example_sub_id", "orderAmount": 41.72, "publisherRevenue": 5.12, "currencyCode": "EUR", "type": "SALE", "orderDate": "2023-01-30T08:07:12.166Z", "createdAt": "2023-01-30T08:07:12.166Z", "updatedAt": "2023-01-30T08:07:12.166Z", "countryCode": "US", "clickId": "6gZY9x2Q952MFWTNFMfi7", "couponId": "NSUl9GrT1RFiG5F9JjeAF" } ] }
To view possible error responses, refer to the Error responses article.