POST /v2/reports/path_to_conversion?project_id={project_id} {
"ResponseType": "JSON",
"Fields": [
"InteractionTime",
"InteractionType",
"InteractionMediaCampaignName",
"TargetEventName"
],
"InteractionFilter": {
"DateFrom": "2024-01-01",
"DateTo": "2024-01-31"
},
"TargetFilter": {
"DateFrom": "2024-01-01",
"DateTo": "2024-01-31",
"EventType": ["Purchase"]
},
"Offset": 0,
"Limit": 10000
}
curl -X POST "https://api.targetads.io/v2/reports/path_to_conversion?project_id=11111" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ResponseType": "JSON",
"Fields": [
"InteractionTime",
"InteractionType",
"InteractionMediaCampaignName",
"TargetEventName",
"TargetEcomAmount",
"MLI30"
],
"InteractionFilter": {
"DateFrom": "2024-01-01",
"DateTo": "2024-01-31"
},
"TargetFilter": {
"DateFrom": "2024-01-01",
"DateTo": "2024-01-31",
"EventType": ["Purchase"]
},
"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": "DONE",
"row_count": 5000,
"file_size_bytes": 250000,
"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/path_to_conversion?project_id=11111" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ResponseType": "JSON",
"Fields": [
"InteractionTime",
"InteractionType",
"InteractionMediaCampaignName",
"TargetEventName",
"TargetEcomAmount",
"MLI30"
],
"InteractionFilter": {
"DateFrom": "2024-01-01",
"DateTo": "2024-01-31"
},
"TargetFilter": {
"DateFrom": "2024-01-01",
"DateTo": "2024-01-31",
"EventType": ["Purchase"]
},
"Limit": 10000
}' curl -X POST "https://api.targetads.io/v2/reports/path_to_conversion?project_id=11111" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ResponseType": "JSON",
"Fields": [
"InteractionTime",
"InteractionType",
"InteractionMediaCampaignName",
"InteractionUtmSource",
"InteractionUtmMedium",
"TargetEventName",
"FL30",
"MLI30"
],
"InteractionFilter": {
"UtmSource": ["google", "facebook"]
},
"TargetFilter": {
"DateFrom": "2024-01-01",
"DateTo": "2024-01-31",
"EventType": ["Purchase"]
}
}' {
"ErrorCode": 400,
"ErrorMessage": "validate error",
"Errors": [
{
"Error": true,
"FailedField": "Interaction or Target DateTo and DateFrom is required",
"Value": ""
}
]
} Лимиты и ограничения
API имеет технические ограничения, которые следует
учитывать при построении интеграции:
Время жизни ссылки на скачивание: 1 час
Время хранения отчета: 24 часа