/schemas/v2/media-buy/get-media-buy-delivery-request.json
Response Schema: /schemas/v2/media-buy/get-media-buy-delivery-response.json
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
media_buy_ids | string[] | No* | Array of media buy IDs to retrieve |
buyer_refs | string[] | No* | Array of buyer reference IDs |
status_filter | string | string[] | No | Status filter: "active", "pending", "paused", "completed", "failed", "all". Defaults to ["active"] |
start_date | string | No | Report start date (YYYY-MM-DD) |
end_date | string | No | Report end date (YYYY-MM-DD) |
media_buy_ids or buyer_refs can be provided. If neither provided, returns all media buys in current session context.
Response
Returns delivery report with aggregated totals and per-media-buy breakdowns:| Field | Description |
|---|---|
reporting_period | Date range for report (start/end timestamps) |
currency | ISO 4217 currency code (USD, EUR, GBP, etc.) |
aggregated_totals | Combined metrics across all media buys (impressions, spend, clicks, video_completions, media_buy_count) |
media_buy_deliveries | Array of delivery data per media buy |
Media Buy Delivery Object
| Field | Description |
|---|---|
media_buy_id | Media buy identifier |
buyer_ref | Buyer’s reference identifier |
status | Current status (pending, active, paused, completed, failed) |
totals | Aggregate metrics (impressions, spend, clicks, ctr, video_completions, completion_rate) |
by_package | Package-level breakdowns with delivery_status, paused state, and pacing_index |
daily_breakdown | Day-by-day delivery (date, impressions, spend) |
Common Scenarios
Single Media Buy
Multiple Media Buys
Date Range Reporting
Multi-Status Query
Buyer Reference Query
Metrics Definitions
| Metric | Definition |
|---|---|
| Impressions | Number of times ads were displayed |
| Spend | Amount spent in specified currency |
| Clicks | Number of ad clicks (if available) |
| CTR | Click-through rate (clicks/impressions) |
| Video Completions | Videos watched to completion |
| Completion Rate | Video completions/video impressions |
| Pacing Index | Actual vs. expected delivery rate (1.0 = on track, <1.0 = behind, >1.0 = ahead) |
| CPM | Cost per thousand impressions (spend/impressions * 1000) |
Query Behavior
Context-Based Queries
- If neither
media_buy_idsnorbuyer_refsprovided, returns all media buys from current session context - Context established by previous operations (e.g.,
create_media_buy)
Status Filtering
- Defaults to
["active"]if not specified - Can be single string (
"active") or array (["active", "paused"]) - Use
"all"to return media buys of any status
Date Ranges
- If dates not specified, returns lifetime delivery data
- Date format:
YYYY-MM-DD - Daily breakdown may be truncated for long date ranges to reduce response size
Metric Availability
- Universal: Impressions, spend (available on all platforms)
- Format-dependent: Clicks, video completions (depends on inventory type and platform capabilities)
- Package-level: All metrics broken down by package with pacing_index
Data Freshness
- Reporting data typically has 2-4 hour delay
- Real-time impression counts not available
- Use for periodic reporting and optimization decisions, not live monitoring
Error Handling
| Error Code | Description | Resolution |
|---|---|---|
AUTH_REQUIRED | Authentication needed | Provide credentials |
MEDIA_BUY_NOT_FOUND | Media buy doesn’t exist | Verify media_buy_id |
INVALID_DATE_RANGE | Invalid start/end dates | Use YYYY-MM-DD format, ensure start < end |
CONTEXT_REQUIRED | No media buys in context | Provide media_buy_ids or buyer_refs explicitly |
INVALID_STATUS_FILTER | Invalid status value | Use valid status: active, pending, paused, completed, failed, all |
Package-Level Metrics
Theby_package array provides per-package delivery details with these key fields:
Buyer Control:
paused: Whether the package is currently paused by the buyer (true/false)
delivery_status: System-reported operational state:delivering- Package is actively delivering impressionscompleted- Package finished successfullybudget_exhausted- Package ran out of budgetflight_ended- Package reached its end dategoal_met- Package achieved its impression/conversion goal
pacing_index: Delivery pace (1.0 = on track, below 1.0 = behind, above 1.0 = ahead)rate: Effective pricing rate (e.g., CPM)pricing_model: How the package is billed (cpm, cpcv, cpp, etc.)
paused reflects buyer control, while delivery_status reflects system reality. A package can be not paused but have delivery_status: "budget_exhausted".
Best Practices
1. Use Date Ranges for Analysis Specify date ranges for period-over-period comparisons and trend analysis. 2. Monitor Pacing Index Aim for 0.95-1.05 pacing index. Values outside this range indicate delivery issues. 3. Check Daily Breakdown Identify delivery patterns and weekend/weekday performance differences. 4. Compare Package Performance Useby_package breakdowns to identify best-performing inventory. Check both paused state and delivery_status to understand why packages aren’t delivering.
5. Track Status Changes
Use multi-status queries to understand why campaigns were paused or completed.
Next Steps
After retrieving delivery data:- Optimize Campaigns: Use
update_media_buyto adjust budgets, pacing, or targeting - Provide Feedback: Use
provide_performance_feedbackto share results with seller - Update Creatives: Use
sync_creativesto refresh underperforming assets - Create Follow-Up Campaigns: Use
create_media_buybased on insights
Learn More
- Media Buy Lifecycle - Complete campaign workflow
- Task Management - Async patterns and status handling
- Performance Optimization - Using delivery data for optimization