Authorization: Bearer YOUR_TOKEN {
"Fields": [
"EventDateTime",
"SysName",
"DeviceId",
"Domain",
"Givt",
"GivtReasonDataCentre",
"GivtReasonCrawler"
],
"InteractionFilter": {
"DateFrom": "2026-10-01",
"DateTo": "2026-10-31",
"SysName": [
"Impression"
]
}
} curl -X POST "https://api.targetads.io/v2/reports/fraud_reports?project_id=${TARGETIO_PROJECT_ID}" \
-H "Authorization: Bearer ${TARGETIO_API_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"Fields": [
"EventDateTime",
"SysName",
"DeviceId",
"Domain",
"Givt",
"GivtReasonDataCentre",
"GivtReasonCrawler"
],
"InteractionFilter": {
"DateFrom": "2026-10-01",
"DateTo": "2026-10-31",
"SysName": [
"Impression"
]
}
}' {
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "CREATED",
"created_at": "2026-11-02T10:00:00Z"
} curl "https://api.targetads.io/v2/jobs/550e8400-e29b-41d4-a716-446655440000?project_id=${TARGETIO_PROJECT_ID}" \
-H "Authorization: Bearer ${TARGETIO_API_TOKEN}" {
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"report_type": "fraud_reports",
"status": "DONE",
"created_at": "2026-11-02T10:00:00Z",
"completed_at": "2026-11-02T10:01:40Z",
"row_count": 1250000,
"file_size_bytes": 31000000,
"format": "csv.gz",
"download_url": "https://example.com/reports/example.csv.gz",
"download_expires_at": "2026-11-04T10:01:40Z",
"expires_at": "2026-11-04T10:01:40Z"
} curl --fail --location --output report.csv.gz "${TARGETIO_DOWNLOAD_URL}" &&
gzip --decompress --stdout report.csv.gz > report.csv {
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"report_type": "fraud_reports",
"status": "FAILED",
"error_message": "Данные за 2026-10-31 ещё готовятся, повторите запрос позже."
} {
"ErrorCode": 400,
"ErrorMessage": "validate error",
"ErrorsField": [
{
"FiledName": "DateTo",
"Value": "2026-08-01..2026-09-15",
"Message": "V2 fraud_reports accepts up to 31 days per request (got 46 days). Split the period into several jobs."
}
]
} Статусы задач