feat: structured business entity data for B2B invoicing#1605
Merged
Conversation
Add billing_entity to accounts and invoice_recipient to media buys, enabling formal B2B invoicing with VAT IDs, tax IDs, addresses, contacts, and bank details. Add billing: "advertiser" for when operator places orders but advertiser pays directly. Bank details are write-only (never echoed in responses). Invoice recipient overrides require governance approval. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Keep both invoice_recipient (our branch) and new_packages/status/confirmed_at/ revision/valid_actions (from main). No logic conflicts — fields are additive. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
B2B workflows often need separate billing, legal, and creative contacts. Adds role enum (billing/legal/creative/general) on each contact. Driven by DBCFM gap analysis — DBCFM has contacts[] with role info. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6 tasks
- Add invoice_recipient field to check-governance-request schema so governance agents can validate billing changes (was prose-only MUST) - Add maxLength to modification_summary in check-governance-request - Add registration_number, bank, contacts to MCP tool invoice_recipient schemas (was missing vs protocol schema) - Add enum: [true] constraint on canceled fields in MCP tools - Add account_id to sync-accounts-response schema and examples - Strip bank details from OAuth retry URL params to prevent PII in browser history and access logs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…idation tests - Fix cancellation docs to use nested object (matches schema) - Fix contact→contacts pluralization in docs - Add media_buy_id/package_id to all update_media_buy examples - Add invoice_recipient/new_packages/valid_actions to update_media_buy docs - Add invoice_recipient to get_media_buys docs - Fix double bullet in create_media_buy usage notes - Declare address/contacts property schemas in MCP tools - Fix example-validation.test.cjs $ref resolution and stale example data (0/21→21/21) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced Apr 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
business-entity.jsonschema for structured B2B invoicing data (legal name, VAT ID, tax ID, registration number, address, contact, bank details)billing_entityto accounts andsync_accounts— default invoicing details for the party responsible for paymentinvoice_recipientto media buys (create, update, get responses) — per-buy override of who gets invoicedbilling: "advertiser"option — operator places orders but advertiser pays directly (social platform / DACH B2B pattern)"advertiser"tosupported_billinginget_adcp_capabilitiesso sellers can declare supportgovernance_agentsare configuredmaxLengthconstraints; nested objects haveadditionalProperties: falsecreate_media_buy,update_media_buy) to includeinvoice_recipientMotivated by DACH market feedback on DBCFM mapping — structured party data (VAT IDs, bank details) needed for formal B2B booking processes that currently require
extworkarounds.Test plan
build:schemassucceeds🤖 Generated with Claude Code