You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Enhanced `get_media_buy_delivery` response to include package-level pricing information: `pricing_model`, `rate`, and `currency` fields added to `by_package` section.
6
+
- Added offline file delivery examples for JSON Lines (JSONL), CSV, and Parquet formats.
7
+
- Added tab structure to list different formats of offline delivery files in optimization reporting documentation.
8
+
- Updated all delivery reporting examples to include new pricing fields.
9
+
- Added comprehensive JSONL, CSV, and Parquet format examples with schema documentation.
10
+
11
+
**Impact:**
12
+
- Buyers can now see pricing information directly in delivery reports for better cost analysis.
13
+
- Publishers have clearer guidance on structured batch reporting formats that maintain nested data.
14
+
- Documentation provides a detailed examples for implementing offline file delivery.
File contains same structure as webhook payload but aggregated across all campaigns. Buyer processes files on their schedule.
@@ -174,7 +174,7 @@ When a reporting webhook is configured, publishers commit to sending:
174
174
- One final notification when the campaign completes
175
175
- If reporting data is delayed beyond the expected delay window, a `"delayed"` notification will be sent
176
176
177
-
### Webhook Payload
177
+
### Webhook Payload (Real-time)
178
178
179
179
Reporting webhooks use the same payload structure as [`get_media_buy_delivery`](/docs/media-buy/task-reference/get_media_buy_delivery) with additional metadata:
180
180
@@ -211,6 +211,123 @@ Reporting webhooks use the same payload structure as [`get_media_buy_delivery`](
211
211
-**`next_expected_at`**: ISO 8601 timestamp for next notification (omitted for final notifications)
212
212
-**`media_buy_deliveries`**: Array of media buy delivery data (may contain multiple media buys aggregated by publisher)
213
213
214
+
### Offline File Delivery (Batch)
215
+
216
+
For offline file delivery, publishers can provide reporting data in JSON Lines (JSONL), CSV, or Parquet format. All formats preserve the nested JSON structure from webhook payloads, making them ideal for batch processing.
217
+
218
+
**Compression:**
219
+
Files can be compressed with gzip (`.jsonl.gz`, `.csv.gz`, or `.parquet.gz`) for efficient storage and transfer. Compression is recommended for large files.
220
+
221
+
importTabsfrom'@theme/Tabs';
222
+
importTabItemfrom'@theme/TabItem';
223
+
224
+
<Tabs>
225
+
<TabItemvalue="jsonl"label="JSONL"default>
226
+
227
+
---
228
+
229
+
**Structure:**
230
+
231
+
Each line in the JSONL file contains a complete webhook payload object. Multiple reports can be included by having multiple lines in the file. The structure matches the [webhook payload structure](#webhook-payload-real-time).
- File extension: `.jsonl` or `.jsonl.gz` (compressed)
242
+
- Compression: Consider using `.gz` compression for large files to reduce storage and transfer costs
243
+
244
+
---
245
+
246
+
</TabItem>
247
+
<TabItemvalue="csv"label="CSV">
248
+
249
+
---
250
+
251
+
**Structure:**
252
+
253
+
CSV format flattens the nested JSON structure into rows. Since CSV cannot natively represent nested arrays, each child element (package) gets its own row with all parent-level data repeated. This is the standard approach for representing hierarchical data in CSV format.
Each row represents a package with its parent media buy context repeated. Parent-level data (reporting period, media buy totals) is included in every package row:
Copy file name to clipboardExpand all lines: docs/media-buy/task-reference/get_media_buy_delivery.mdx
+35-8Lines changed: 35 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,10 @@ The message is returned differently in each protocol:
74
74
"spend": "number",
75
75
"clicks": "number",
76
76
"video_completions": "number",
77
-
"pacing_index": "number"
77
+
"pacing_index": "number",
78
+
"pricing_model": "string",
79
+
"rate": "number",
80
+
"currency": "string"
78
81
}
79
82
],
80
83
"daily_breakdown": [
@@ -120,6 +123,9 @@ The message is returned differently in each protocol:
120
123
-**clicks**: Package clicks
121
124
-**video_completions**: Package video completions
122
125
-**pacing_index**: Delivery pace (1.0 = on track, <1.0 = behind, >1.0 = ahead)
126
+
-**pricing_model**: The pricing model used for this package (e.g., `"cpm"`, `"cpcv"`, `"cpp"`, `"cpc"`, `"cpv"`, `"vcpm"`, `"flat_rate"`). This indicates how the package is billed and which metrics are most relevant for optimization. See [Pricing Models](/docs/media-buy/advanced-topics/pricing-models) for details on each model.
127
+
-**rate**: The pricing rate for this package in the specified currency. For fixed-rate pricing, this is the agreed rate (e.g., CPM rate of `12.50` means $12.50 per 1,000 impressions). For auction-based pricing, this represents the effective rate based on actual delivery. The rate helps calculate expected delivery and compare performance across different pricing models.
128
+
-**currency**: ISO 4217 currency code (e.g., `"USD"`, `"EUR"`, `"GBP"`) for this specific package's pricing. This indicates the currency in which the `rate` and `spend` values are denominated. Different packages within the same media buy can use different currencies when supported by the publisher.
123
129
-**daily_breakdown**: Day-by-day delivery
124
130
-**date**: Date (YYYY-MM-DD)
125
131
-**impressions**: Daily impressions
@@ -176,7 +182,10 @@ The AdCP payload is identical across protocols. Only the request/response wrappe
176
182
"spend": 22500,
177
183
"clicks": 0,
178
184
"video_completions": 525000,
179
-
"pacing_index": 0.95
185
+
"pacing_index": 0.95,
186
+
"pricing_model": "cpcv",
187
+
"rate": 0.03,
188
+
"currency": "USD"
180
189
}
181
190
]
182
191
}
@@ -262,7 +271,10 @@ A2A returns results as artifacts:
262
271
"spend": 22500,
263
272
"clicks": 0,
264
273
"video_completions": 525000,
265
-
"pacing_index": 0.95
274
+
"pacing_index": 0.95,
275
+
"pricing_model": "cpcv",
276
+
"rate": 0.03,
277
+
"currency": "USD"
266
278
}
267
279
]
268
280
}
@@ -330,14 +342,20 @@ A2A returns results as artifacts:
330
342
"spend": 11250.00,
331
343
"clicks": 500,
332
344
"video_completions": 175000,
333
-
"pacing_index": 0.93
345
+
"pacing_index": 0.93,
346
+
"pricing_model": "cpcv",
347
+
"rate": 0.0643,
348
+
"currency": "USD"
334
349
},
335
350
{
336
351
"package_id": "pkg_audio_drive_ca_ny",
337
352
"impressions": 200000,
338
353
"spend": 5625.00,
339
354
"clicks": 400,
340
-
"pacing_index": 0.88
355
+
"pacing_index": 0.88,
356
+
"pricing_model": "cpm",
357
+
"rate": 28.125,
358
+
"currency": "USD"
341
359
}
342
360
],
343
361
"daily_breakdown": [
@@ -410,7 +428,10 @@ A2A returns results as artifacts:
410
428
"spend": 11250.00,
411
429
"clicks": 500,
412
430
"video_completions": 175000,
413
-
"pacing_index": 0.93
431
+
"pacing_index": 0.93,
432
+
"pricing_model": "cpcv",
433
+
"rate": 0.0643,
434
+
"currency": "USD"
414
435
}
415
436
],
416
437
"daily_breakdown": []
@@ -433,7 +454,10 @@ A2A returns results as artifacts:
433
454
"spend": 5625.00,
434
455
"clicks": 100,
435
456
"video_completions": 56250,
436
-
"pacing_index": 0.75
457
+
"pacing_index": 0.75,
458
+
"pricing_model": "cpm",
459
+
"rate": 45.00,
460
+
"currency": "USD"
437
461
}
438
462
],
439
463
"daily_breakdown": []
@@ -456,7 +480,10 @@ A2A returns results as artifacts:
0 commit comments