Skip to content

create_media_buy / get_media_buys response schemas: currency and total_budget required asymmetry #4416

@fgranata

Description

@fgranata

Summary

create-media-buy-response.json and get-media-buys-response.json have inconsistent required arrays for what should be the same media buy object shape. A seller correctly implementing create_media_buy per its schema will Zod-fail get_media_buys validation on every poll step — and vice versa.

Schema diff (3.0.11)

Field create-media-buy-response.json §CreateMediaBuySuccess get-media-buys-response.json §media_buys[i]
required ["media_buy_id", "packages"] ["media_buy_id", "status", "currency", "total_budget", "packages"]
currency not listed in properties required
total_budget not listed in properties required
created_at / updated_at not listed in properties listed (optional)

Impact

A seller implementing deal_to_media_buy (create) and deal_to_media_buy_summary (list) using a single shared mapper will either:

  • Strip currency + total_budget correctly per the create schema → silently Zod-fail every get_media_buys poll step downstream
  • Include currency + total_budget per the list schema → emit fields not in the create schema

Identified during Wave 23.20.7 by a seller whose shared mapper applied the create schema uniformly to both endpoints. The get_media_buys cascade caused 63/128 storyboard score across multiple runs with no server-side errors — all failures were silent Zod rejections at the runner layer.

Expected behavior

currency and total_budget should be present in both schemas with consistent required status. Both responses represent the same media buy entity — buyers expect the same fields regardless of which operation returned it.

Suggested fix

Either:

  1. Add currency and total_budget to create-media-buy-response.json properties + required array (preferred — buyers need these fields at creation time too)
  2. Or document explicitly that the two response shapes are intentionally different and why — so sellers know to use separate mappers

Labels

bug, schema, media-buy

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingclaude-triagedIssue has been triaged by the Claude Code triage routine. Remove to re-triage.media-buyIssue concerns the media-buy protocol domainschemaJSON Schema source-of-truth: definitions, codegen artifacts, validation, hygiene

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions