Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .changeset/fix-package-request-fields.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
"adcontextprotocol": patch
---

Add missing fields to package request schemas for consistency with core/package.json.

**Schema Changes:**

- `media-buy/package-request.json`: Added `impressions` and `paused` fields
- `media-buy/update-media-buy-request.json`: Added `impressions` field to package updates

**Details:**

- `impressions`: Impression goal for the package (optional, minimum: 0)
- `paused`: Create package in paused state (optional, default: false)

These fields were defined in `core/package.json` but missing from the request schemas, making it impossible to set impression goals or initial paused state when creating/updating media buys.

**Documentation:**

- Updated `create_media_buy` task reference with new package parameters
- Updated `update_media_buy` task reference with impressions parameter
2 changes: 2 additions & 0 deletions docs/media-buy/task-reference/create_media_buy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ npx adcp \
| `pricing_option_id` | string | Yes | Pricing option ID from product's `pricing_options` array |
| `format_ids` | FormatID[] | Yes | Format IDs that will be used - must be supported by product |
| `budget` | number | Yes | Budget in currency specified by pricing option |
| `impressions` | number | No | Impression goal for this package |
| `paused` | boolean | No | Create package in paused state (default: `false`) |
| `pacing` | string | No | `"even"` (default), `"asap"`, or `"front_loaded"` |
| `bid_price` | number | No | Bid price for auction pricing (required when `is_fixed` is false) |
| `targeting_overlay` | TargetingOverlay | No | Additional targeting criteria (see [Targeting](/docs/media-buy/advanced-topics/targeting)) |
Expand Down
1 change: 1 addition & 0 deletions docs/media-buy/task-reference/update_media_buy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ asyncio.run(create_and_pause_campaign())
| `buyer_ref` | string | Your reference for the package to update |
| `paused` | boolean | Pause/resume specific package (`true` = paused, `false` = active) |
| `budget` | number | Updated budget allocation |
| `impressions` | number | Updated impression goal for this package |
| `pacing` | string | Updated pacing strategy |
| `bid_price` | number | Updated bid price (auction products only) |
| `targeting_overlay` | TargetingOverlay | Updated targeting restrictions |
Expand Down
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"devDependencies": {
"@changesets/cli": "^2.29.8",
"@jest/globals": "^30.2.0",
"@jest/test-sequencer": "^30.2.0",
Comment thread
BaiyuScope3 marked this conversation as resolved.
"@types/cookie-parser": "^1.4.10",
"@types/express": "^5.0.6",
"@types/jest": "^30.0.0",
Expand Down
10 changes: 10 additions & 0 deletions static/schemas/source/media-buy/package-request.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@
"description": "Bid price for auction-based CPM pricing (required if using cpm-auction-option)",
"minimum": 0
},
"impressions": {
"type": "number",
"description": "Impression goal for this package",
"minimum": 0
},
"paused": {
"type": "boolean",
"description": "Whether this package should be created in a paused state. Paused packages do not deliver impressions. Defaults to false.",
"default": false
},
"targeting_overlay": {
"$ref": "/schemas/core/targeting.json"
},
Expand Down
5 changes: 5 additions & 0 deletions static/schemas/source/media-buy/update-media-buy-request.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@
"description": "Updated bid price for auction-based pricing options (only applies when pricing_option is auction-based)",
"minimum": 0
},
"impressions": {
"type": "number",
"description": "Updated impression goal for this package",
"minimum": 0
},
"paused": {
"type": "boolean",
"description": "Pause/resume specific package (true = paused, false = active)"
Expand Down