POST /v2/reports/raw_reports?project_id={project_id} {
"ResponseType": "JSON",
"Fields": [
"InteractionTime",
"InteractionDeviceID",
"InteractionType",
"InteractionMediaCampaignName",
"InteractionDomain"
],
"InteractionFilter": {
"DateFrom": "2024-01-01",
"DateTo": "2024-01-31",
"InteractionType": ["Impression", "Click"],
"MediaCampaignId": [12345, 12346]
},
"Stable": 1,
"Offset": 0,
"Limit": 10000
} {
"ProjectId": 11111,
"ResponseType": "JSON",
"Fields": ["InteractionDeviceID", "InteractionTime", "InteractionType"],
"Stable": 1,
"InteractionFilter": {
"DateFrom": "2025-01-01",
"DateTo": "2025-01-31",
"InteractionType": ["Impression"]
}
}
curl -X POST "https://api.targetads.io/v2/reports/raw_reports?project_id=11111" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ResponseType": "JSON",
"Fields": [
"InteractionTime",
"InteractionDeviceID",
"InteractionType",
"InteractionMediaCampaignName",
"InteractionDomain"
],
"InteractionFilter": {
"DateFrom": "2024-01-01",
"DateTo": "2024-01-31",
"InteractionType": ["Impression", "Click"]
},
"Limit": 10000
}' {
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "CREATED",
"created_at": "2024-01-15T10:00:00Z",
"estimated_seconds": 120
} curl "https://api.targetads.io/v2/jobs/{job_id}?project_id=11111" \
-H "Authorization: Bearer YOUR_TOKEN" {
"job_id": "550e8400-...",
"status": "PROCESSING"
} {
"job_id": "550e8400-...",
"status": "DONE",
"row_count": 150000,
"file_size_bytes": 8500000,
"download_url": "https://storage.yandexcloud.net/...",
"download_expires_at": "2024-01-15T11:00:00Z"
} curl -o report.csv "https://storage.yandexcloud.net/..." curl -X POST "https://api.targetads.io/v2/reports/raw_reports?project_id=11111" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ResponseType": "JSON",
"Fields": [
"InteractionTime",
"InteractionDeviceID",
"InteractionType",
"InteractionMediaCampaignName",
"InteractionDomain"
],
"InteractionFilter": {
"DateFrom": "2024-01-01",
"DateTo": "2024-01-31",
"InteractionType": ["Impression", "Click"]
},
"Limit": 10000
}' curl -X POST "https://api.targetads.io/v2/reports/raw_reports?project_id=11111" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ResponseType": "JSON",
"Fields": [
"InteractionTime",
"InteractionDeviceID",
"InteractionType",
"InteractionMediaCampaignName",
"InteractionCountry",
"InteractionCity",
"InteractionDeviceType",
"InteractionBrowserName"
],
"InteractionFilter": {
"DateFrom": "2024-01-01",
"DateTo": "2024-01-31",
"InteractionType": ["Impression"],
"MediaCampaignId": [12345, 12346],
"DeviceType": ["mobile", "desktop"]
},
"Limit": 50000
}' curl -X POST "https://api.targetads.io/v2/reports/raw_reports?project_id=11111" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ResponseType": "JSON",
"Fields": [
"InteractionTime",
"InteractionDeviceID",
"InteractionEcomId",
"InteractionEcomAmount",
"InteractionEcomItemsName",
"InteractionEcomItemsPrice"
],
"InteractionFilter": {
"DateFrom": "2024-01-01",
"DateTo": "2024-01-31",
"InteractionType": ["Purchase"]
}
}'
``` {
"ErrorCode": 400,
"ErrorMessage": "validate error",
"Errors": [
{
"Error": true,
"FailedField": "Interaction or Target DateTo and DateFrom is required",
"Value": ""
}
]
} Лимиты и ограничения
API имеет технические ограничения, которые следует
учитывать при построении интеграции:
Время жизни ссылки на скачивание: 1 час
Время хранения отчета: 24 часа