curl --request GET \
--url https://api.hakumedia.ai/v2/reports/conversion-details \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.hakumedia.ai/v2/reports/conversion-details', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hakumedia.ai/v2/reports/conversion-details"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hakumedia.ai/v2/reports/conversion-details",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": [
{
"zone": 553215445,
"campaign": 623114512,
"advertisement": {
"type": "ad_item",
"id": 5523
},
"conversion_date": "2023-11-07T05:31:56Z",
"impression_date": "2023-11-07T05:31:56Z",
"attribution": "CLICK",
"referrer": "2023-11-07T05:31:56Z",
"ip": "192.168.10.xxx",
"country": "Canada",
"region": null,
"city": null,
"value": 35.75,
"transaction_id": "abcd-1234",
"product_id": null
}
],
"meta": {
"limit": 1,
"offset": 10,
"has_more": true,
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"timezone": "America/Los_Angeles"
},
"object": "conversion_detail_report",
"url": "/v2/reports/conversion-details"
}Retrieve Conversion Details
If you are tracking conversions, this endpoint can be a great way to get a more detailed breakdown of how they are performing. You can get reports on conversions for specific zones, campaigns, and date ranges.
curl --request GET \
--url https://api.hakumedia.ai/v2/reports/conversion-details \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.hakumedia.ai/v2/reports/conversion-details', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hakumedia.ai/v2/reports/conversion-details"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hakumedia.ai/v2/reports/conversion-details",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": [
{
"zone": 553215445,
"campaign": 623114512,
"advertisement": {
"type": "ad_item",
"id": 5523
},
"conversion_date": "2023-11-07T05:31:56Z",
"impression_date": "2023-11-07T05:31:56Z",
"attribution": "CLICK",
"referrer": "2023-11-07T05:31:56Z",
"ip": "192.168.10.xxx",
"country": "Canada",
"region": null,
"city": null,
"value": 35.75,
"transaction_id": "abcd-1234",
"product_id": null
}
],
"meta": {
"limit": 1,
"offset": 10,
"has_more": true,
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"timezone": "America/Los_Angeles"
},
"object": "conversion_detail_report",
"url": "/v2/reports/conversion-details"
}Authorizations
API key en el header Authorization: Basic TU_API_KEY. La key va tal cual, sin codificar en base64. Las credenciales se entregan al comenzar la integración.
Query Parameters
Describes how you would like to filter the report, either by zone, campaign, ad-item, or placement. Leave this field blank if you don't want to filter.
A comma-separated list of IDs to filter the report by. The parameter filter_type must be defined, and the IDs given for filter_ids must be either zoneIDs or campaignIDs to match the filter_type chosen.
Whether to return click details for VAST ads (true) or display ads (false). Defaults to false.
Frequently used time frames for reporting statistics are bundled as "presets". You can pick a value from the presets instead of creating your own custom date range using the from and to fields. A preset range value must be one of the following: today, last-24-hours, yesterday, this-week, last-week, this-month, last-month, year-to-date, last-year, last-7-days, last-14-days, last-30-days, last-3-months, last-6-months, or last-12-months.
Either a preset or a valid to and from must be specified.
A valid ISO 8601 formatted date denoting the inclusive start of the period. For example: 2020-01-01T00:00:00+00:00 (greater than or equal to). This field along with the to field lets you specify a custom date and time interval if no preset options suit your needs. The timezone offsets must match in the specified from and to fields.
You may not run a report for an interval larger than a year.
Either a preset or a valid to and from must be specified.
A valid ISO 8601 formatted date denoting the exclusive end of the period. For example: 2020-02-01T00:00:00+00:00. This field along with the from field lets you specify a custom date and time interval if no preset options suit your needs. The timezone offsets must match the specified to and from fields.
You cannot run a report for an interval larger than a year.
Either a preset or a valid to and from must be specified.
A non-negative integer that indicates the number of records you'd like returned in the response.
A non-negative integer that indicates how many records to skip when compiling the response.
Response
successful operation
Show child attributes
Show child attributes
Some additional information about the report.
Show child attributes
Show child attributes
A string denoting the current resource being requested or affected.
"conversion_detail_report"
The URL of the current resource.
"/v2/reports/conversion-details"