{"openapi":"3.1.0","info":{"title":"BidMachine Agentic Seller API","description":"Internal API layer for BidMachine's dual-protocol agentic seller agents (AdCP + AAMP)","version":"0.1.0"},"paths":{"/api/v1/inventory/apps":{"get":{"tags":["inventory"],"summary":"List Apps","operationId":"list_apps_api_v1_inventory_apps_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"platform","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform"}},{"name":"publisher_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Publisher Name"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AppOut"},"title":"Response List Apps Api V1 Inventory Apps Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/inventory/apps/{app_id}":{"get":{"tags":["inventory"],"summary":"Get App","operationId":"get_app_api_v1_inventory_apps__app_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/inventory/placements":{"get":{"tags":["inventory"],"summary":"List Placements","operationId":"list_placements_api_v1_inventory_placements_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"app_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"App Id"}},{"name":"ad_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ad Type"}},{"name":"is_rewarded","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Rewarded"}},{"name":"min_floor_cpm","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Floor Cpm"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PlacementDetailOut"},"title":"Response List Placements Api V1 Inventory Placements Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/inventory/placements/{placement_id}":{"get":{"tags":["inventory"],"summary":"Get Placement","operationId":"get_placement_api_v1_inventory_placements__placement_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"placement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Placement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlacementDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/deals/":{"get":{"tags":["deals"],"summary":"List Deals","description":"List deals. Non-admin callers see only deals for their own seat.\n\nWave 21/A3: Non-admin callers have any buyer_seat_id query parameter\nsilently overridden to their key's bound seat. Admins may filter by\nany seat. Callers with no seat_id on their key see no deals (rather\nthan seeing everything — safer default).","operationId":"list_deals_api_v1_deals__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"deal_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deal Type"}},{"name":"buyer_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buyer Name"}},{"name":"buyer_seat_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buyer Seat Id"}},{"name":"protocol_origin","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Protocol Origin"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/src__api__schemas__deals__DealOut"},"title":"Response List Deals Api V1 Deals  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["deals"],"summary":"Create Deal","operationId":"create_deal_api_v1_deals__post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__api__schemas__deals__DealOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/deals/{deal_id}":{"get":{"tags":["deals"],"summary":"Get Deal","operationId":"get_deal_api_v1_deals__deal_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__api__schemas__deals__DealOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["deals"],"summary":"Update Deal","operationId":"update_deal_api_v1_deals__deal_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deal Id"}},{"name":"If-Match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"If-Match"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__api__schemas__deals__DealOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["deals"],"summary":"Delete Deal","operationId":"delete_deal_api_v1_deals__deal_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deal Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/deals/{deal_id}/status":{"patch":{"tags":["deals"],"summary":"Update Deal Status","operationId":"update_deal_status_api_v1_deals__deal_id__status_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deal Id"}},{"name":"If-Match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"If-Match"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealStatusUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__api__schemas__deals__DealOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/deals/{deal_id}/performance":{"get":{"tags":["deals"],"summary":"Deal Performance","description":"Get real-time deal performance and pacing metrics.","operationId":"deal_performance_api_v1_deals__deal_id__performance_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/signals/device":{"get":{"tags":["signals"],"summary":"List Device Signals","operationId":"list_device_signals_api_v1_signals_device_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"app_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"App Id"}},{"name":"os","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Os"}},{"name":"device_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeviceSignalOut"},"title":"Response List Device Signals Api V1 Signals Device Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/signals/geo":{"get":{"tags":["signals"],"summary":"List Geo Signals","operationId":"list_geo_signals_api_v1_signals_geo_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"app_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"App Id"}},{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GeoSignalOut"},"title":"Response List Geo Signals Api V1 Signals Geo Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/signals/session":{"get":{"tags":["signals"],"summary":"List Session Signals","operationId":"list_session_signals_api_v1_signals_session_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"app_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"App Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SessionSignalOut"},"title":"Response List Session Signals Api V1 Signals Session Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/signals/summary/{app_id}":{"get":{"tags":["signals"],"summary":"Get Signal Summary","operationId":"get_signal_summary_api_v1_signals_summary__app_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignalSummaryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/signals/ingest/device":{"post":{"tags":["signals"],"summary":"Ingest Device Signals","description":"Ingest device signals from BidMachine SDK.\n\nAccepts a batch of device signals and persists them to the database.\nInvalid signals (e.g. unknown app_id) are skipped with errors reported.","operationId":"ingest_device_signals_api_v1_signals_ingest_device_post","requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DeviceSignalIn"},"type":"array","title":"Signals"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignalIngestResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/signals/ingest/geo":{"post":{"tags":["signals"],"summary":"Ingest Geo Signals","description":"Ingest geo signals from BidMachine SDK.","operationId":"ingest_geo_signals_api_v1_signals_ingest_geo_post","requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/GeoSignalIn"},"type":"array","title":"Signals"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignalIngestResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/signals/ingest/session":{"post":{"tags":["signals"],"summary":"Ingest Session Signals","description":"Ingest session engagement signals from BidMachine SDK.","operationId":"ingest_session_signals_api_v1_signals_ingest_session_post","requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SessionSignalIn"},"type":"array","title":"Signals"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignalIngestResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/signals/ingest/batch":{"post":{"tags":["signals"],"summary":"Ingest Signal Batch","description":"Batch ingest multiple signal types in a single request.\n\nAccepts device, geo, and session signals together. Each signal type\nis validated independently; errors in one type don't block others.","operationId":"ingest_signal_batch_api_v1_signals_ingest_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignalBatchIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignalIngestResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reporting/delivery":{"get":{"tags":["reporting"],"summary":"List Delivery Metrics","operationId":"list_delivery_metrics_api_v1_reporting_delivery_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"deal_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deal Id"}},{"name":"placement_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Placement Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"}},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryMetricOut"},"title":"Response List Delivery Metrics Api V1 Reporting Delivery Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reporting/delivery/summary":{"get":{"tags":["reporting"],"summary":"Delivery Summary","operationId":"delivery_summary_api_v1_reporting_delivery_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"}},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeliverySummaryOut"},"title":"Response Delivery Summary Api V1 Reporting Delivery Summary Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/keys":{"get":{"tags":["auth"],"summary":"List Keys","operationId":"list_keys_api_v1_auth_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/KeyInfo"},"type":"array","title":"Response List Keys Api V1 Auth Keys Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["auth"],"summary":"Create Key","description":"Mint a new API key. Admin-only (Wave 21/A1).\n\nPrior to Wave 21 this route had no auth dependency, which let any caller\non the network mint a key under any buyer_name / buyer_seat_id / scope.\nBootstrap the first admin key with `scripts/bootstrap_admin_key.py`.","operationId":"create_key_api_v1_auth_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKeyRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/keys/{key_id}":{"delete":{"tags":["auth"],"summary":"Revoke Key","operationId":"revoke_key_api_v1_auth_keys__key_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dashboard/overview":{"get":{"tags":["dashboard"],"summary":"Dashboard Overview","description":"High-level exchange overview — inventory, deals, and delivery totals.","operationId":"dashboard_overview_api_v1_dashboard_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/dashboard/protocol-activity":{"get":{"tags":["dashboard"],"summary":"Protocol Activity","description":"Deal creation activity split by protocol origin.","operationId":"protocol_activity_api_v1_dashboard_protocol_activity_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":7,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dashboard/deal-pipeline":{"get":{"tags":["dashboard"],"summary":"Deal Pipeline","description":"Deal pipeline — counts by status with avg price per status.","operationId":"deal_pipeline_api_v1_dashboard_deal_pipeline_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/dashboard/audit-summary":{"get":{"tags":["dashboard"],"summary":"Audit Summary","description":"Recent audit log summary — tool call counts and error rates.","operationId":"audit_summary_api_v1_dashboard_audit_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"hours","in":"query","required":false,"schema":{"type":"integer","default":24,"title":"Hours"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dashboard/revenue":{"get":{"tags":["dashboard"],"summary":"Revenue Analytics","description":"Revenue analytics grouped by protocol, buyer, or date.","operationId":"revenue_analytics_api_v1_dashboard_revenue_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"group_by","in":"query","required":false,"schema":{"type":"string","default":"protocol","title":"Group By"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":7,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dashboard/trust-trends/{placement_id}":{"get":{"tags":["dashboard"],"summary":"Trust Trends","description":"Trust score trend for a placement over time.","operationId":"trust_trends_api_v1_dashboard_trust_trends__placement_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"placement_id","in":"path","required":true,"schema":{"type":"string","title":"Placement Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dashboard/credit-history/{buyer_seat_id}":{"get":{"tags":["dashboard"],"summary":"Credit History","description":"Buyer credit score history over time.","operationId":"credit_history_api_v1_dashboard_credit_history__buyer_seat_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"buyer_seat_id","in":"path","required":true,"schema":{"type":"string","title":"Buyer Seat Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dashboard/supply-quality":{"get":{"tags":["dashboard"],"summary":"Supply Quality","description":"Aggregated supply quality metrics across all placements.","operationId":"supply_quality_api_v1_dashboard_supply_quality_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/dashboard/top-deals":{"get":{"tags":["dashboard"],"summary":"Top Deals","description":"Top deals by impression volume over the given period.","operationId":"top_deals_api_v1_dashboard_top_deals_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":7,"title":"Days"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/optimizer/analyze/{placement_id}":{"get":{"tags":["floor-optimizer"],"summary":"Analyze","description":"Analyze a single placement and get floor price recommendation.","operationId":"analyze_api_v1_optimizer_analyze__placement_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"placement_id","in":"path","required":true,"schema":{"type":"string","title":"Placement Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":7,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/optimizer/analyze-all":{"get":{"tags":["floor-optimizer"],"summary":"Analyze All","description":"Analyze all placements and return optimization recommendations.","operationId":"analyze_all_api_v1_optimizer_analyze_all_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":7,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/start":{"post":{"tags":["onboarding"],"summary":"Start Onboarding","description":"Start the onboarding process for a new buyer agent.\n\nThis single endpoint handles the full onboarding flow:\n1. Creates API credentials\n2. Discovers matching inventory\n3. Creates a test deal in draft status","operationId":"start_onboarding_api_v1_onboarding_start_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/status/{buyer_seat_id}":{"get":{"tags":["onboarding"],"summary":"Onboarding Status","description":"Check onboarding status for a buyer seat.","operationId":"onboarding_status_api_v1_onboarding_status__buyer_seat_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"buyer_seat_id","in":"path","required":true,"schema":{"type":"string","title":"Buyer Seat Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/exports/deals":{"get":{"tags":["exports"],"summary":"Export Deals","description":"Export deal data as JSON or CSV.","operationId":"export_deals_api_v1_exports_deals_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(json|csv)$","default":"json","title":"Format"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/exports/revenue":{"get":{"tags":["exports"],"summary":"Export Revenue","description":"Export daily revenue data as JSON or CSV.","operationId":"export_revenue_api_v1_exports_revenue_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(json|csv)$","default":"json","title":"Format"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks/":{"get":{"tags":["webhooks"],"summary":"List Webhooks","operationId":"list_webhooks_api_v1_webhooks__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"buyer_seat_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buyer Seat Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookOut"},"title":"Response List Webhooks Api V1 Webhooks  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["webhooks"],"summary":"Create Webhook","operationId":"create_webhook_api_v1_webhooks__post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks/{webhook_id}":{"get":{"tags":["webhooks"],"summary":"Get Webhook","operationId":"get_webhook_api_v1_webhooks__webhook_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["webhooks"],"summary":"Update Webhook","operationId":"update_webhook_api_v1_webhooks__webhook_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["webhooks"],"summary":"Delete Webhook","operationId":"delete_webhook_api_v1_webhooks__webhook_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks/{webhook_id}/test":{"post":{"tags":["webhooks"],"summary":"Test Webhook","description":"Send a test event through the webhook to verify connectivity.","operationId":"test_webhook_api_v1_webhooks__webhook_id__test_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/notifications/win":{"post":{"tags":["notifications"],"summary":"Win Notification","description":"Record a winning bid notification (nurl callback).\n\nWave 23.29 dedup contract:\n  1. Attempt ImpressionEvent insert first. On UNIQUE constraint hit\n     (replay), return ``{\"status\": \"duplicate\", ...}`` 200 — NO\n     DeliveryMetric increment, NO BID_WON publish, NO webhook fire.\n  2. On successful insert, proceed with the existing DeliveryMetric\n     upsert + BID_WON publish path unchanged.","operationId":"win_notification_api_v1_notifications_win_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WinNotification"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/notifications/loss":{"post":{"tags":["notifications"],"summary":"Loss Notification","description":"Record a losing bid notification (lurl callback).\n\nWave 23.29 dedup contract:\n  1. Attempt ImpressionEvent insert first. On UNIQUE constraint hit\n     (replay), return ``{\"status\": \"duplicate\", ...}`` 200 — NO\n     BID_LOST publish, NO webhook fire.\n  2. On successful insert, proceed with the BID_LOST event publish.","operationId":"loss_notification_api_v1_notifications_loss_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LossNotification"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/exchange/deals":{"get":{"tags":["exchange"],"summary":"List Exchange Deals","description":"Return active DSP-routed deals for the BidMachine exchange's PMP service.\n\nHard filters (not buyer-controllable):\n  - ``status = 'active'``\n  - ``fulfillment_mode = 'dsp_routed'``\n  - ``end_date >= today`` — defensive layer that hides deals whose\n    validity window has elapsed even if no background process has\n    transitioned their ``status`` to ``expired``. Belt-and-suspenders\n    against state-machine drift; see also\n    ``scripts/expire_stale_deals.py`` for the eventual write-side fix.\n\nThe composite index ``ix_deals_fulfillment_status`` covers the first\ntwo filters. The ``end_date`` compare is a single column scan over the\nalready-filtered subset, so the overall query stays bounded.\n\nOrdering: ``updated_at`` ascending, then ``deal_id`` for tiebreak. This\nmakes the ``updated_since`` cursor advance deterministically.","operationId":"list_exchange_deals_api_v1_exchange_deals_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"updated_since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"ISO timestamp. When set, returns only deals with updated_at >= updated_since. Use the max updated_at from the previous page as the cursor for incremental sync.","title":"Updated Since"},"description":"ISO timestamp. When set, returns only deals with updated_at >= updated_since. Use the max updated_at from the previous page as the cursor for incremental sync."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExchangeDealOut"},"title":"Response List Exchange Deals Api V1 Exchange Deals Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/approvals/pending":{"get":{"tags":["approvals"],"summary":"List Pending","description":"List pending approval rows, optionally filtered by entity_type.\n\nMirrors the AAMP `list_pending_approvals` MCP tool. Lazy-expiry\nruns inside the service.","operationId":"list_pending_api_v1_approvals_pending_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by entity_type — one of {floor_change, deal_migration, deal_state_transition}. Omit for all.","title":"Entity Type"},"description":"Filter by entity_type — one of {floor_change, deal_migration, deal_state_transition}. Omit for all."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Pending Api V1 Approvals Pending Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/approvals/{pending_id}":{"get":{"tags":["approvals"],"summary":"Get Approval","description":"Fetch a single approval row (in any status) by id.","operationId":"get_approval_api_v1_approvals__pending_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"pending_id","in":"path","required":true,"schema":{"type":"string","title":"Pending Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Approval Api V1 Approvals  Pending Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/approvals/{pending_id}/decide":{"post":{"tags":["approvals"],"summary":"Decide","description":"Approve or reject a single pending row.\n\nMirrors the AAMP `approve_or_reject` MCP tool. Idempotent on\nsame-direction re-decides; surfaces 409 on direction conflict /\nexpired state.\n\n**Admin-only** (Wave 23.26.1) — approving a row fires the\nregistered handler for the entity_type, which mutates production\nstate (e.g. moves a placement floor for entity_type=floor_change).\nOperator-grade callers (no admin scope) get 403.","operationId":"decide_api_v1_approvals__pending_id__decide_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"pending_id","in":"path","required":true,"schema":{"type":"string","title":"Pending Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecideRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Decide Api V1 Approvals  Pending Id  Decide Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/approvals/gates/config":{"get":{"tags":["approvals"],"summary":"Get Gates","description":"Read the current approval-gate configuration.","operationId":"get_gates_api_v1_approvals_gates_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Gates Api V1 Approvals Gates Config Get"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["approvals"],"summary":"Set Gates","description":"Replace one or more gate rules. Partial update — only listed\ngates are touched. Returns the full post-update configuration.\n\n**Admin-only** (Wave 23.26.1) — system-wide policy change.\nOperator-grade callers (no admin scope) get 403. Bumped from\nrequire_auth to require_admin as the Wave 23.24.2 contract doc\nqueued.","operationId":"set_gates_api_v1_approvals_gates_config_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetGatesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Set Gates Api V1 Approvals Gates Config Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/.well-known/agent-card.json":{"get":{"tags":["a2a"],"summary":"Agent Card","description":"Return the A2A Agent Card for BidMachine.\n\nTwo paths serve the SAME card content:\n  * ``/.well-known/agent.json``       — A2A spec ≤ v0.2.5 (legacy)\n  * ``/.well-known/agent-card.json``  — A2A spec ≥ v0.3.0 (canonical\n                                        per RFC 8615 well-known URI\n                                        convention; what current\n                                        registries probe)\n\nWave 23.6 follow-up: the Linux Foundation A2A spec migrated the\ndiscovery filename from ``agent.json`` to ``agent-card.json``. IAB\nTech Lab's Agent Registry probe specifically fetches\n``/.well-known/agent-card.json``; pre-this-fix that returned 404\nand the registration UI surfaced \"Could not fetch A2A agent card.\nPlease check the endpoint URL.\" even though our card was\nspec-conformant.\n\na2aregistry.org accepts the legacy ``agent.json`` path (we\nregistered there yesterday with the legacy URL). Keeping both\nroutes registered means we don't break our existing listing\nwhile adding compatibility with current-spec consumers.\n\nBase URL precedence: A2A_PUBLIC_BASE_URL → PUBLIC_BASE_URL →\nrequest.base_url. Lets a dedicated A2A subdomain (e.g.\na2a.bidmachine.io) advertise itself.\n\nThe agent card's ``url`` is the JSON-RPC POST endpoint — must\npoint at ``/a2a``, not the bare host. The monolith mounts\nJSON-RPC at ``POST /a2a``; the subdomain is a plain CNAME with no\nHost-header path-rewriting, so ``https://a2a.bidmachine.io/``\nreturns 404. Earlier versions advertised the bare host, which\nwould have failed every A2A directory smoke test.","operationId":"agent_card__well_known_agent_card_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/agent.json":{"get":{"tags":["a2a"],"summary":"Agent Card","description":"Return the A2A Agent Card for BidMachine.\n\nTwo paths serve the SAME card content:\n  * ``/.well-known/agent.json``       — A2A spec ≤ v0.2.5 (legacy)\n  * ``/.well-known/agent-card.json``  — A2A spec ≥ v0.3.0 (canonical\n                                        per RFC 8615 well-known URI\n                                        convention; what current\n                                        registries probe)\n\nWave 23.6 follow-up: the Linux Foundation A2A spec migrated the\ndiscovery filename from ``agent.json`` to ``agent-card.json``. IAB\nTech Lab's Agent Registry probe specifically fetches\n``/.well-known/agent-card.json``; pre-this-fix that returned 404\nand the registration UI surfaced \"Could not fetch A2A agent card.\nPlease check the endpoint URL.\" even though our card was\nspec-conformant.\n\na2aregistry.org accepts the legacy ``agent.json`` path (we\nregistered there yesterday with the legacy URL). Keeping both\nroutes registered means we don't break our existing listing\nwhile adding compatibility with current-spec consumers.\n\nBase URL precedence: A2A_PUBLIC_BASE_URL → PUBLIC_BASE_URL →\nrequest.base_url. Lets a dedicated A2A subdomain (e.g.\na2a.bidmachine.io) advertise itself.\n\nThe agent card's ``url`` is the JSON-RPC POST endpoint — must\npoint at ``/a2a``, not the bare host. The monolith mounts\nJSON-RPC at ``POST /a2a``; the subdomain is a plain CNAME with no\nHost-header path-rewriting, so ``https://a2a.bidmachine.io/``\nreturns 404. Earlier versions advertised the bare host, which\nwould have failed every A2A directory smoke test.","operationId":"agent_card__well_known_agent_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/a2a":{"post":{"tags":["a2a"],"summary":"Jsonrpc Endpoint","description":"A2A JSON-RPC 2.0 endpoint.\n\nDispatches to the appropriate handler based on the ``method`` field.\n``tasks/sendSubscribe`` returns a Server-Sent Events stream; all other\nmethods return a standard JSON response.","operationId":"jsonrpc_endpoint_a2a_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/aamp/opendirect/organizations/":{"get":{"tags":["aamp-organizations"],"summary":"List Organizations","description":"List all organizations (publisher + registered buyers).","operationId":"list_organizations_aamp_opendirect_organizations__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Organization"},"type":"array","title":"Response List Organizations Aamp Opendirect Organizations  Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["aamp-organizations"],"summary":"Register Buyer Organization","description":"Register a buyer organization. Called by buyer agents during setup.\n\nCreates or updates a BuyerAgent record in the database.","operationId":"register_buyer_organization_aamp_opendirect_organizations__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/aamp/opendirect/organizations/publisher":{"get":{"tags":["aamp-organizations"],"summary":"Get Publisher","description":"Get the publisher (BidMachine) organization.","operationId":"get_publisher_aamp_opendirect_organizations_publisher_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}}},"security":[{"HTTPBearer":[]}]}},"/aamp/opendirect/organizations/{org_id}":{"get":{"tags":["aamp-organizations"],"summary":"Get Organization","operationId":"get_organization_aamp_opendirect_organizations__org_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/aamp/opendirect/products/":{"get":{"tags":["aamp-products"],"summary":"List Products","description":"List available products (inventory packages).","operationId":"list_products_aamp_opendirect_products__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"platform","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Product"},"title":"Response List Products Aamp Opendirect Products  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/aamp/opendirect/products/{product_id}":{"get":{"tags":["aamp-products"],"summary":"Get Product","description":"Get a specific product by ID.","operationId":"get_product_aamp_opendirect_products__product_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/aamp/opendirect/products/search":{"post":{"tags":["aamp-products"],"summary":"Search Products","description":"Search products with filters (OpenDirect product search).","operationId":"search_products_aamp_opendirect_products_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Product"},"type":"array","title":"Response Search Products Aamp Opendirect Products Search Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/aamp/opendirect/orders/":{"get":{"tags":["aamp-orders"],"summary":"List Orders","description":"List orders (deals created via AAMP).\n\nWave 21/A3: non-admin callers always see only their own seat. Any\naccount_id override in the query is rejected unless it matches their\nbound seat (or the caller has admin scope).","operationId":"list_orders_aamp_opendirect_orders__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Order"},"title":"Response List Orders Aamp Opendirect Orders  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["aamp-orders"],"summary":"Create Order","description":"Create an order (deal) via OpenDirect workflow.\n\nEach order line becomes a deal configuration in BidMachine's exchange.\n\nWave 21/A3: non-admin callers cannot create orders for another seat.\nAn account_id in the body is either auto-filled from the caller's key\nor rejected (403) if it points at a different seat.\n\nWave 23.30 — Path 1 gate (HTTP 501). The OpenDirect REST orders\nsurface is structurally Path 1 (Direct fulfillment commitment).\nWhile Path 1 is gated, this endpoint returns 501 Not Implemented\nwith a body pointing buyers at ``/aamp/deals/activate`` (Path 2).\nBypassed via BM_PATH_GATING_ENABLED=false. See\ndocs/PATH_GATING_CONTRACT.md.","operationId":"create_order_aamp_opendirect_orders__post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/aamp/opendirect/orders/{order_id}":{"get":{"tags":["aamp-orders"],"summary":"Get Order","description":"Get order details.","operationId":"get_order_aamp_opendirect_orders__order_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/aamp/opendirect/orders/{order_id}/approve":{"post":{"tags":["aamp-orders"],"summary":"Approve Order","description":"Approve an order (activates the deal in BidMachine's exchange).","operationId":"approve_order_aamp_opendirect_orders__order_id__approve_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/aamp/opendirect/orders/{order_id}/complete":{"post":{"tags":["aamp-orders"],"summary":"Complete Order","description":"Mark an order as completed (expires the deal).","operationId":"complete_order_aamp_opendirect_orders__order_id__complete_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/aamp/opendirect/orders/{order_id}/cancel":{"post":{"tags":["aamp-orders"],"summary":"Cancel Order","description":"Cancel an order (cancels the deal in BidMachine's exchange).","operationId":"cancel_order_aamp_opendirect_orders__order_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/aamp/deals/":{"get":{"tags":["aamp-deals"],"summary":"List Deals","description":"List available deals in IAB Deals API format.\n\nBuyer agents use this to discover deals they can activate.\n\nWave 21/A3: non-admin callers always see only their own seat.","operationId":"list_deals_aamp_deals__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status"}},{"name":"buyer_seat","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buyer Seat"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/src__aamp_agent__schemas__DealOut"},"title":"Response List Deals Aamp Deals  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/aamp/deals/{deal_id}":{"get":{"tags":["aamp-deals"],"summary":"Get Deal","description":"Get a specific deal by deal_id.","operationId":"get_deal_aamp_deals__deal_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"string","title":"Deal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__aamp_agent__schemas__DealOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/aamp/deals/activate":{"post":{"tags":["aamp-deals"],"summary":"Activate Deal","description":"Activate a deal for a specific buyer seat.\n\nTransitions the deal from draft/pending to active, enabling bid\neligibility in BidMachine's exchange auction.\n\nWave 21/A3: non-admin callers cannot activate deals they don't own,\nand cannot bind a deal to a buyer_seat_id other than their own.","operationId":"activate_deal_aamp_deals_activate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealActivateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__aamp_agent__schemas__DealOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/aamp/registry":{"get":{"summary":"Aamp Registry","operationId":"aamp_registry_aamp_registry_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRegistryEntry"}}}}}}},"/aamp/health":{"get":{"summary":"Aamp Health","operationId":"aamp_health_aamp_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/metrics":{"get":{"summary":"Prometheus Metrics","description":"Prometheus metrics endpoint.","operationId":"prometheus_metrics_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/adagents.json":{"get":{"summary":"Adagents","description":"AdCP discovery endpoint per agenticadvertising.org spec.\n\nBuyer agents fetch this to discover seller agent capabilities,\navailable properties, and how to connect.\n\nProtocol-specific base URLs (adcp_public_base_url, aamp_public_base_url)\nare preferred when set — this lets each protocol advertise its own\nsubdomain (e.g. adcp.bidmachine.io, aamp.bidmachine.io). Falls back\nto public_base_url, then the incoming request's Host header.\n\nPath prefixes are preserved: the monolith serves AdCP at /adcp/* and\nAAMP at /aamp/* on every subdomain (DevOps sets the CNAMEs so each\nsubdomain reaches the same app, no Host-header rewrite layer). Earlier\nversions of this generator stripped the /adcp and /aamp prefixes on\nsubdomain output, which would have produced URLs like\nhttps://adcp.bidmachine.io/mcp — but that path 404s because the MCP\napp is only mounted at /adcp/mcp. The advertised URL must match a\nreal mount point, so we keep the prefix.","operationId":"adagents__well_known_adagents_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AgentRegistryEntry":{"properties":{"agent_id":{"type":"string","title":"Agent Id","default":"seller-bidmachine-001"},"agent_name":{"type":"string","title":"Agent Name","default":"BidMachine AAMP Seller Agent"},"primary_domain":{"type":"string","title":"Primary Domain","default":"bidmachine.io"},"endpoint_url":{"type":"string","title":"Endpoint Url","default":"/aamp"},"protocol_type":{"type":"string","title":"Protocol Type","default":"mcp"},"category":{"type":"string","title":"Category","default":"Supply Side Platform"},"description":{"type":"string","title":"Description","default":"BidMachine ad exchange seller agent supporting OpenDirect 2.1, Deals API, and MCP."},"capabilities":{"items":{"type":"string"},"type":"array","title":"Capabilities","default":["opendirect-2.1","deals-api-1.0","mcp"]},"supported_formats":{"items":{"type":"string"},"type":"array","title":"Supported Formats","default":["banner","video","rewarded","native","ctv"]},"protocols":{"items":{"type":"string"},"type":"array","title":"Protocols","default":["opendirect-2.1","openrtb-2.5"]},"status":{"type":"string","title":"Status","default":"active"}},"type":"object","title":"AgentRegistryEntry"},"AppDetailOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"bundle_id":{"type":"string","title":"Bundle Id"},"name":{"type":"string","title":"Name"},"store_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Store Url"},"category":{"type":"string","title":"Category"},"subcategory":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subcategory"},"platform":{"type":"string","title":"Platform"},"publisher_name":{"type":"string","title":"Publisher Name"},"publisher_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Publisher Domain"},"monthly_active_users":{"type":"integer","title":"Monthly Active Users"},"avg_daily_sessions":{"type":"integer","title":"Avg Daily Sessions"},"geo_distribution":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Geo Distribution"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"placements":{"items":{"$ref":"#/components/schemas/PlacementOut"},"type":"array","title":"Placements","default":[]}},"type":"object","required":["id","bundle_id","name","category","platform","publisher_name","monthly_active_users","avg_daily_sessions","created_at"],"title":"AppDetailOut"},"AppOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"bundle_id":{"type":"string","title":"Bundle Id"},"name":{"type":"string","title":"Name"},"store_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Store Url"},"category":{"type":"string","title":"Category"},"subcategory":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subcategory"},"platform":{"type":"string","title":"Platform"},"publisher_name":{"type":"string","title":"Publisher Name"},"publisher_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Publisher Domain"},"monthly_active_users":{"type":"integer","title":"Monthly Active Users"},"avg_daily_sessions":{"type":"integer","title":"Avg Daily Sessions"},"geo_distribution":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Geo Distribution"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","bundle_id","name","category","platform","publisher_name","monthly_active_users","avg_daily_sessions","created_at"],"title":"AppOut"},"CreateKeyRequest":{"properties":{"buyer_name":{"type":"string","title":"Buyer Name"},"buyer_seat_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buyer Seat Id"},"scopes":{"type":"string","title":"Scopes","default":"read,write"}},"type":"object","required":["buyer_name"],"title":"CreateKeyRequest"},"CreateKeyResponse":{"properties":{"api_key":{"type":"string","title":"Api Key"},"buyer_name":{"type":"string","title":"Buyer Name"},"buyer_seat_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buyer Seat Id"},"scopes":{"type":"string","title":"Scopes"},"message":{"type":"string","title":"Message","default":"Store this key securely — it cannot be retrieved again."}},"type":"object","required":["api_key","buyer_name","buyer_seat_id","scopes"],"title":"CreateKeyResponse"},"DealActivateRequest":{"properties":{"deal_id":{"type":"string","title":"Deal Id"},"buyer_seat_id":{"type":"string","title":"Buyer Seat Id"}},"type":"object","required":["deal_id","buyer_seat_id"],"title":"DealActivateRequest"},"DealCreate":{"properties":{"deal_id":{"type":"string","title":"Deal Id"},"name":{"type":"string","title":"Name"},"buyer_name":{"type":"string","title":"Buyer Name"},"buyer_seat_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buyer Seat Id"},"deal_type":{"type":"string","title":"Deal Type"},"price_cpm":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Price Cpm"},"protocol_origin":{"type":"string","title":"Protocol Origin","default":"manual"},"start_date":{"type":"string","format":"date","title":"Start Date"},"end_date":{"type":"string","format":"date","title":"End Date"},"daily_impression_cap":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Daily Impression Cap"},"total_impression_cap":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Impression Cap"},"targeting":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Targeting"},"placement_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Placement Ids","default":[]},"idempotency_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency Key"}},"type":"object","required":["deal_id","name","buyer_name","deal_type","price_cpm","start_date","end_date"],"title":"DealCreate"},"DealInventory":{"properties":{"inventory_type":{"type":"string","title":"Inventory Type","default":"app"},"bundles":{"items":{"type":"string"},"type":"array","title":"Bundles","default":[]},"sites":{"items":{"type":"string"},"type":"array","title":"Sites","default":[]}},"type":"object","title":"DealInventory"},"DealStatusUpdate":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"DealStatusUpdate"},"DealTerms":{"properties":{"bidfloor":{"type":"number","title":"Bidfloor"},"pricetype":{"type":"integer","title":"Pricetype","default":1}},"type":"object","required":["bidfloor"],"title":"DealTerms"},"DealUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"price_cpm":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Price Cpm"},"daily_impression_cap":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Daily Impression Cap"},"total_impression_cap":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Impression Cap"},"targeting":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Targeting"},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"}},"additionalProperties":false,"type":"object","title":"DealUpdate"},"DecideRequest":{"properties":{"decision":{"type":"string","title":"Decision","description":"'approve' or 'reject'"},"reason":{"type":"string","maxLength":500,"minLength":1,"title":"Reason"},"decided_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decided By","description":"Optional actor identifier. Defaults to 'rest:operator'."}},"type":"object","required":["decision","reason"],"title":"DecideRequest"},"DeliveryMetricOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"deal_id":{"type":"string","format":"uuid","title":"Deal Id"},"placement_id":{"type":"string","format":"uuid","title":"Placement Id"},"date":{"type":"string","format":"date","title":"Date"},"impressions":{"type":"integer","title":"Impressions"},"clicks":{"type":"integer","title":"Clicks"},"revenue_usd":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Revenue Usd"},"spend_usd":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Spend Usd"},"viewability_rate":{"type":"number","title":"Viewability Rate"},"completion_rate":{"type":"number","title":"Completion Rate"},"win_rate":{"type":"number","title":"Win Rate"},"avg_bid_cpm":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Avg Bid Cpm"}},"type":"object","required":["id","deal_id","placement_id","date","impressions","clicks","revenue_usd","spend_usd","viewability_rate","completion_rate","win_rate","avg_bid_cpm"],"title":"DeliveryMetricOut"},"DeliverySummaryOut":{"properties":{"deal_id":{"type":"string","format":"uuid","title":"Deal Id"},"deal_name":{"type":"string","title":"Deal Name"},"total_impressions":{"type":"integer","title":"Total Impressions"},"total_clicks":{"type":"integer","title":"Total Clicks"},"total_revenue_usd":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Revenue Usd"},"total_spend_usd":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Spend Usd"},"avg_viewability_rate":{"type":"number","title":"Avg Viewability Rate"},"avg_win_rate":{"type":"number","title":"Avg Win Rate"},"avg_cpm":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Avg Cpm"},"ctr":{"type":"number","title":"Ctr"},"days_active":{"type":"integer","title":"Days Active"}},"type":"object","required":["deal_id","deal_name","total_impressions","total_clicks","total_revenue_usd","total_spend_usd","avg_viewability_rate","avg_win_rate","avg_cpm","ctr","days_active"],"title":"DeliverySummaryOut"},"DeviceSignalIn":{"properties":{"app_id":{"type":"string","format":"uuid","title":"App Id"},"device_type":{"type":"string","title":"Device Type","description":"phone or tablet"},"os":{"type":"string","title":"Os","description":"ios or android"},"os_version":{"type":"string","title":"Os Version","description":"e.g. 17.4, 14"},"device_make":{"type":"string","title":"Device Make","description":"e.g. Apple, Samsung"},"device_model":{"type":"string","title":"Device Model","description":"e.g. iPhone 15 Pro, Galaxy S24"},"screen_w":{"type":"integer","title":"Screen W"},"screen_h":{"type":"integer","title":"Screen H"},"connection_type":{"type":"string","title":"Connection Type","description":"wifi, cellular_5g, cellular_4g, cellular_3g"},"idfa_available":{"type":"boolean","title":"Idfa Available","default":false},"att_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Att Status","description":"authorized, denied, not_determined"},"language":{"type":"string","title":"Language","default":"en"}},"type":"object","required":["app_id","device_type","os","os_version","device_make","device_model","screen_w","screen_h","connection_type"],"title":"DeviceSignalIn","description":"Device signal from BidMachine SDK."},"DeviceSignalOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"app_id":{"type":"string","format":"uuid","title":"App Id"},"device_type":{"type":"string","title":"Device Type"},"os":{"type":"string","title":"Os"},"os_version":{"type":"string","title":"Os Version"},"device_make":{"type":"string","title":"Device Make"},"device_model":{"type":"string","title":"Device Model"},"screen_w":{"type":"integer","title":"Screen W"},"screen_h":{"type":"integer","title":"Screen H"},"connection_type":{"type":"string","title":"Connection Type"},"idfa_available":{"type":"boolean","title":"Idfa Available"},"att_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Att Status"},"language":{"type":"string","title":"Language"},"collected_at":{"type":"string","format":"date-time","title":"Collected At"}},"type":"object","required":["id","app_id","device_type","os","os_version","device_make","device_model","screen_w","screen_h","connection_type","idfa_available","language","collected_at"],"title":"DeviceSignalOut"},"ExchangeDealOut":{"properties":{"deal_id":{"type":"string","title":"Deal Id","description":"Wire-stable external deal id (Deal.deal_id)."},"supply_package":{"$ref":"#/components/schemas/SupplyPackage","description":"What inventory this deal targets. Nested object carrying the deal's targeting + targeting_overlay JSON. See docs/DEAL_TARGETING_REFERENCE.md for the field vocabulary."},"agency_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agency Id","description":"DSP organization name (Deal.buyer_name). The exchange owns the join to its internal agencyId. v1 caveat: we do not capture true agency identity distinct from the DSP today. See docs/EXCHANGE_PULL_API_CONTRACT.md §agency-gap."},"buyer_seat_id":{"type":"string","title":"Buyer Seat Id","description":"Buyer's own seat id inside the buyer-agent org (Deal.buyer_seat_id)."},"buyer_agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buyer Agent Name","description":"The AI agent on the buyer side that minted the deal — the exchange routes this deal's bid requests to this agent's demand integration. Wave 23.109: sourced from the bearer token's identity captured at create time (AdCP's entity model: 'the entity placing the buy is identified by the authentication token'). Legacy fallbacks for pre-23.109 deals: BuyerAgent.name joined on buyer_seat_id, then Deal.buyer_name (which conflated the advertiser brand with the agent — treat brand-shaped values on old deals accordingly)."},"operator_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Domain","description":"Wave 23.109 — the AdCP account natural key's operator: 'domain of the entity operating on the brand's behalf' (agency / trading desk / storefront). Null for pre-23.109 deals and creates that referenced an account_id instead of the natural key. NOTE: integration-phase partners may send a placeholder here (Scope3's test traffic uses our own domain by agreement)."},"protocol_origin":{"type":"string","title":"Protocol Origin","description":"Which protocol surface minted the deal: 'adcp' / 'aamp' / 'manual' (REST)."},"bid_floor_cpm":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Bid Floor Cpm","description":"Deal floor price as CPM dollars (Deal.price_cpm). Not cents."},"currency":{"type":"string","title":"Currency","description":"Currency code. Constant 'USD' today; placeholder for forward compat.","default":"USD"},"deal_type":{"type":"string","title":"Deal Type","description":"'preferred' / 'private_auction' / 'guaranteed'."},"start_date":{"type":"string","format":"date","title":"Start Date"},"end_date":{"type":"string","format":"date","title":"End Date"},"daily_impression_cap":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Daily Impression Cap","description":"NULL = uncapped."},"total_impression_cap":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Impression Cap","description":"NULL = uncapped."},"fulfillment_mode":{"type":"string","title":"Fulfillment Mode","description":"Routing discriminator. Always 'dsp_routed' for this endpoint."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Cursor field for incremental sync via ?updated_since=..."},"version":{"type":"integer","title":"Version","description":"Optimistic-lock version; the exchange can use it to detect updates."}},"type":"object","required":["deal_id","supply_package","buyer_seat_id","protocol_origin","bid_floor_cpm","deal_type","start_date","end_date","fulfillment_mode","updated_at","version"],"title":"ExchangeDealOut","description":"Response shape for ``GET /api/v1/exchange/deals``.\n\nField-by-field semantics documented in docs/EXCHANGE_PULL_API_CONTRACT.md."},"GeoSignalIn":{"properties":{"app_id":{"type":"string","format":"uuid","title":"App Id"},"country":{"type":"string","title":"Country","description":"ISO 3166-1 alpha-2 (e.g. US, GB)"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code"},"lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lat"},"lon":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lon"},"accuracy_meters":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Accuracy Meters"},"ip_derived":{"type":"boolean","title":"Ip Derived","default":false}},"type":"object","required":["app_id","country"],"title":"GeoSignalIn","description":"Geo signal from BidMachine SDK."},"GeoSignalOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"app_id":{"type":"string","format":"uuid","title":"App Id"},"country":{"type":"string","title":"Country"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lat"},"lon":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lon"},"ip_derived":{"type":"boolean","title":"Ip Derived"},"collected_at":{"type":"string","format":"date-time","title":"Collected At"}},"type":"object","required":["id","app_id","country","ip_derived","collected_at"],"title":"GeoSignalOut"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"KeyInfo":{"properties":{"id":{"type":"string","title":"Id"},"buyer_name":{"type":"string","title":"Buyer Name"},"buyer_seat_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buyer Seat Id"},"scopes":{"type":"string","title":"Scopes"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At"}},"type":"object","required":["id","buyer_name","buyer_seat_id","scopes","is_active","created_at","last_used_at"],"title":"KeyInfo"},"LossNotification":{"properties":{"auction_id":{"type":"string","title":"Auction Id"},"deal_id":{"type":"string","title":"Deal Id"},"seat":{"type":"string","title":"Seat"},"price":{"type":"number","title":"Price"},"bid_id":{"type":"string","title":"Bid Id"},"loss_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Loss Reason"},"placement_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Placement Id"}},"type":"object","required":["auction_id","deal_id","seat","price","bid_id"],"title":"LossNotification"},"OnboardingRequest":{"properties":{"buyer_name":{"type":"string","title":"Buyer Name"},"buyer_seat_id":{"type":"string","title":"Buyer Seat Id"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"preferred_ad_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Preferred Ad Types"},"target_geos":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Target Geos"},"protocols":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Protocols"},"capabilities":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Capabilities"},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url"}},"type":"object","required":["buyer_name","buyer_seat_id"],"title":"OnboardingRequest"},"OnboardingResponse":{"properties":{"status":{"type":"string","title":"Status"},"buyer_name":{"type":"string","title":"Buyer Name"},"api_key":{"type":"string","title":"Api Key"},"message":{"type":"string","title":"Message"},"steps_completed":{"items":{"type":"string"},"type":"array","title":"Steps Completed"},"next_steps":{"items":{"type":"string"},"type":"array","title":"Next Steps"},"sample_inventory":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Sample Inventory"},"test_deal":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Test Deal"},"endpoints":{"additionalProperties":true,"type":"object","title":"Endpoints"}},"type":"object","required":["status","buyer_name","api_key","message","steps_completed","next_steps","sample_inventory","endpoints"],"title":"OnboardingResponse"},"Order":{"properties":{"id":{"type":"string","title":"Id"},"account_id":{"type":"string","title":"Account Id"},"name":{"type":"string","title":"Name"},"advertiser_name":{"type":"string","title":"Advertiser Name"},"currency":{"type":"string","title":"Currency","default":"USD"},"status":{"$ref":"#/components/schemas/OrderStatus","default":"draft"},"estimated_budget":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Estimated Budget"},"lines":{"items":{"$ref":"#/components/schemas/OrderLine"},"type":"array","title":"Lines","default":[]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","account_id","name","advertiser_name"],"title":"Order"},"OrderCreate":{"properties":{"account_id":{"type":"string","title":"Account Id"},"name":{"type":"string","title":"Name"},"advertiser_name":{"type":"string","title":"Advertiser Name"},"currency":{"type":"string","title":"Currency","default":"USD"},"lines":{"items":{"$ref":"#/components/schemas/OrderLineCreate"},"type":"array","title":"Lines","default":[]}},"type":"object","required":["account_id","name","advertiser_name"],"title":"OrderCreate"},"OrderLine":{"properties":{"product_id":{"type":"string","title":"Product Id"},"placement_ids":{"items":{"type":"string"},"type":"array","title":"Placement Ids","default":[]},"name":{"type":"string","title":"Name"},"start_date":{"type":"string","format":"date","title":"Start Date"},"end_date":{"type":"string","format":"date","title":"End Date"},"price_cpm":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Price Cpm"},"daily_impression_cap":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Daily Impression Cap"},"total_impression_cap":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Impression Cap"},"targeting":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Targeting"},"id":{"type":"string","title":"Id"},"order_id":{"type":"string","title":"Order Id"},"status":{"type":"string","title":"Status","default":"draft"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["product_id","name","start_date","end_date","price_cpm","id","order_id"],"title":"OrderLine"},"OrderLineCreate":{"properties":{"product_id":{"type":"string","title":"Product Id"},"placement_ids":{"items":{"type":"string"},"type":"array","title":"Placement Ids","default":[]},"name":{"type":"string","title":"Name"},"start_date":{"type":"string","format":"date","title":"Start Date"},"end_date":{"type":"string","format":"date","title":"End Date"},"price_cpm":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Price Cpm"},"daily_impression_cap":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Daily Impression Cap"},"total_impression_cap":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Impression Cap"},"targeting":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Targeting"}},"type":"object","required":["product_id","name","start_date","end_date","price_cpm"],"title":"OrderLineCreate"},"OrderStatus":{"type":"string","enum":["draft","pending","approved","rejected","completed","cancelled"],"title":"OrderStatus"},"Organization":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"role":{"$ref":"#/components/schemas/OrganizationRole"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"status":{"type":"string","title":"Status","default":"active"}},"type":"object","required":["id","name","role"],"title":"Organization"},"OrganizationRole":{"type":"string","enum":["publisher","buyer","advertiser"],"title":"OrganizationRole"},"PlacementDetailOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"ad_type":{"type":"string","title":"Ad Type"},"format_w":{"type":"integer","title":"Format W"},"format_h":{"type":"integer","title":"Format H"},"is_interstitial":{"type":"boolean","title":"Is Interstitial"},"is_rewarded":{"type":"boolean","title":"Is Rewarded"},"avg_daily_impressions":{"type":"integer","title":"Avg Daily Impressions"},"avg_viewability":{"type":"number","title":"Avg Viewability"},"floor_price_cpm":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Floor Price Cpm"},"supported_creatives":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Supported Creatives"},"app_id":{"type":"string","format":"uuid","title":"App Id"}},"type":"object","required":["id","name","ad_type","format_w","format_h","is_interstitial","is_rewarded","avg_daily_impressions","avg_viewability","floor_price_cpm","app_id"],"title":"PlacementDetailOut"},"PlacementOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"ad_type":{"type":"string","title":"Ad Type"},"format_w":{"type":"integer","title":"Format W"},"format_h":{"type":"integer","title":"Format H"},"is_interstitial":{"type":"boolean","title":"Is Interstitial"},"is_rewarded":{"type":"boolean","title":"Is Rewarded"},"avg_daily_impressions":{"type":"integer","title":"Avg Daily Impressions"},"avg_viewability":{"type":"number","title":"Avg Viewability"},"floor_price_cpm":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Floor Price Cpm"},"supported_creatives":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Supported Creatives"}},"type":"object","required":["id","name","ad_type","format_w","format_h","is_interstitial","is_rewarded","avg_daily_impressions","avg_viewability","floor_price_cpm"],"title":"PlacementOut"},"Product":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"publisher_name":{"type":"string","title":"Publisher Name"},"category":{"type":"string","title":"Category"},"platform":{"type":"string","title":"Platform"},"bundle_id":{"type":"string","title":"Bundle Id"},"monthly_active_users":{"type":"integer","title":"Monthly Active Users"},"geo_distribution":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Geo Distribution"},"availability":{"items":{"$ref":"#/components/schemas/ProductAvailability"},"type":"array","title":"Availability","default":[]},"ad_types":{"items":{"type":"integer"},"type":"array","title":"Ad Types","default":[]},"status":{"type":"string","title":"Status","default":"active"}},"type":"object","required":["id","name","publisher_name","category","platform","bundle_id","monthly_active_users"],"title":"Product","description":"OpenDirect Product — maps to a BidMachine app with its placements."},"ProductAvailability":{"properties":{"placement_id":{"type":"string","title":"Placement Id"},"name":{"type":"string","title":"Name"},"ad_type":{"type":"string","title":"Ad Type"},"format":{"type":"string","title":"Format"},"avg_daily_impressions":{"type":"integer","title":"Avg Daily Impressions"},"floor_price_cpm":{"type":"string","title":"Floor Price Cpm"},"is_rewarded":{"type":"boolean","title":"Is Rewarded"},"supported_creatives":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Supported Creatives"}},"type":"object","required":["placement_id","name","ad_type","format","avg_daily_impressions","floor_price_cpm","is_rewarded"],"title":"ProductAvailability"},"ProductSearchRequest":{"properties":{"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform"},"ad_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ad Type"},"geo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Geo"},"min_impressions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Impressions"}},"type":"object","title":"ProductSearchRequest"},"SessionSignalIn":{"properties":{"app_id":{"type":"string","format":"uuid","title":"App Id"},"avg_session_duration_sec":{"type":"integer","title":"Avg Session Duration Sec"},"avg_sessions_per_day":{"type":"number","title":"Avg Sessions Per Day"},"avg_pages_per_session":{"type":"number","title":"Avg Pages Per Session"},"retention_d1":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Retention D1","description":"Day 1 retention rate"},"retention_d7":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Retention D7","description":"Day 7 retention rate"},"engagement_score":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Engagement Score","description":"Computed engagement score"}},"type":"object","required":["app_id","avg_session_duration_sec","avg_sessions_per_day","avg_pages_per_session","retention_d1","retention_d7","engagement_score"],"title":"SessionSignalIn","description":"Session engagement signal from BidMachine SDK."},"SessionSignalOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"app_id":{"type":"string","format":"uuid","title":"App Id"},"avg_session_duration_sec":{"type":"integer","title":"Avg Session Duration Sec"},"avg_sessions_per_day":{"type":"number","title":"Avg Sessions Per Day"},"avg_pages_per_session":{"type":"number","title":"Avg Pages Per Session"},"retention_d1":{"type":"number","title":"Retention D1"},"retention_d7":{"type":"number","title":"Retention D7"},"engagement_score":{"type":"number","title":"Engagement Score"},"collected_at":{"type":"string","format":"date-time","title":"Collected At"}},"type":"object","required":["id","app_id","avg_session_duration_sec","avg_sessions_per_day","avg_pages_per_session","retention_d1","retention_d7","engagement_score","collected_at"],"title":"SessionSignalOut"},"SetGatesRequest":{"properties":{"rules":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Rules","description":"Partial overlay of gate-name → rule-dict. Only listed gates are touched."}},"type":"object","required":["rules"],"title":"SetGatesRequest"},"SignalBatchIn":{"properties":{"device_signals":{"items":{"$ref":"#/components/schemas/DeviceSignalIn"},"type":"array","title":"Device Signals","default":[]},"geo_signals":{"items":{"$ref":"#/components/schemas/GeoSignalIn"},"type":"array","title":"Geo Signals","default":[]},"session_signals":{"items":{"$ref":"#/components/schemas/SessionSignalIn"},"type":"array","title":"Session Signals","default":[]}},"type":"object","title":"SignalBatchIn","description":"Batch ingestion of multiple signal types in a single request."},"SignalIngestResult":{"properties":{"device_signals_created":{"type":"integer","title":"Device Signals Created","default":0},"geo_signals_created":{"type":"integer","title":"Geo Signals Created","default":0},"session_signals_created":{"type":"integer","title":"Session Signals Created","default":0},"total":{"type":"integer","title":"Total","default":0},"errors":{"items":{"type":"string"},"type":"array","title":"Errors","default":[]}},"type":"object","title":"SignalIngestResult","description":"Result of a signal ingestion request."},"SignalSummaryOut":{"properties":{"app_id":{"type":"string","format":"uuid","title":"App Id"},"app_name":{"type":"string","title":"App Name"},"device_count":{"type":"integer","title":"Device Count"},"geo_count":{"type":"integer","title":"Geo Count"},"top_countries":{"items":{"type":"string"},"type":"array","title":"Top Countries"},"top_device_makes":{"items":{"type":"string"},"type":"array","title":"Top Device Makes"},"avg_engagement_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Engagement Score"},"idfa_availability_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Idfa Availability Rate"}},"type":"object","required":["app_id","app_name","device_count","geo_count","top_countries","top_device_makes"],"title":"SignalSummaryOut"},"SupplyPackage":{"properties":{"targeting":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Targeting","description":"Base targeting per docs/DEAL_TARGETING_REFERENCE.md §2."},"targeting_overlay":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Targeting Overlay","description":"AdCP v5.3 per-package overlay per docs/DEAL_TARGETING_REFERENCE.md §3."}},"additionalProperties":false,"type":"object","title":"SupplyPackage","description":"The supply targeting bundle a deal applies to.\n\nThe exchange's ``supplyPackageId`` concept maps to \"what inventory this\ndeal targets\" rather than a synthetic ID. We surface it as a structured\nobject composed of the two targeting JSON columns on Deal:\n\n- ``targeting`` — base targeting (geos, platforms, app_ids, ad_types,\n  categories, audience.segments, …)\n- ``targeting_overlay`` — AdCP v5.3 per-package overlay (property_list,\n  collection_list, collection_list_exclude, format_ids, bid_price, …)\n\nVocabulary inside both sub-objects is documented in\ndocs/DEAL_TARGETING_REFERENCE.md. NULL semantics in\ndocs/DEAL_TARGETING_CONTRACT.md."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WebhookCreate":{"properties":{"buyer_seat_id":{"type":"string","title":"Buyer Seat Id"},"url":{"type":"string","title":"Url"},"event_types":{"items":{"type":"string"},"type":"array","title":"Event Types"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["buyer_seat_id","url","event_types"],"title":"WebhookCreate"},"WebhookOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"buyer_seat_id":{"type":"string","title":"Buyer Seat Id"},"url":{"type":"string","title":"Url"},"event_types":{"items":{"type":"string"},"type":"array","title":"Event Types"},"is_active":{"type":"boolean","title":"Is Active"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"success_count":{"type":"integer","title":"Success Count"},"failure_count":{"type":"integer","title":"Failure Count"},"last_triggered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Triggered At"}},"type":"object","required":["id","buyer_seat_id","url","event_types","is_active","description","success_count","failure_count"],"title":"WebhookOut"},"WebhookUpdate":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"event_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Event Types"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"WebhookUpdate"},"WinNotification":{"properties":{"auction_id":{"type":"string","title":"Auction Id"},"deal_id":{"type":"string","title":"Deal Id"},"placement_id":{"type":"string","title":"Placement Id"},"seat":{"type":"string","title":"Seat"},"price":{"type":"number","title":"Price"},"bid_id":{"type":"string","title":"Bid Id"}},"type":"object","required":["auction_id","deal_id","placement_id","seat","price","bid_id"],"title":"WinNotification"},"src__aamp_agent__schemas__DealOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"created":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created"},"sellerstatus":{"type":"integer","title":"Sellerstatus","default":0},"origin":{"type":"string","title":"Origin","default":"bidmachine.io"},"seller":{"type":"string","title":"Seller","default":"bidmachine.io"},"desc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Desc"},"wseat":{"items":{"type":"string"},"type":"array","title":"Wseat","default":[]},"adtypes":{"items":{"type":"integer"},"type":"array","title":"Adtypes","default":[]},"terms":{"$ref":"#/components/schemas/DealTerms"},"inventory":{"anyOf":[{"$ref":"#/components/schemas/DealInventory"},{"type":"null"}]}},"type":"object","required":["id","terms"],"title":"DealOut","description":"IAB Deals API v1.0 deal object."},"src__api__schemas__deals__DealOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"deal_id":{"type":"string","title":"Deal Id"},"name":{"type":"string","title":"Name"},"buyer_name":{"type":"string","title":"Buyer Name"},"buyer_seat_id":{"type":"string","title":"Buyer Seat Id"},"deal_type":{"type":"string","title":"Deal Type"},"price_cpm":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Price Cpm"},"status":{"type":"string","title":"Status"},"protocol_origin":{"type":"string","title":"Protocol Origin"},"start_date":{"type":"string","format":"date","title":"Start Date"},"end_date":{"type":"string","format":"date","title":"End Date"},"daily_impression_cap":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Daily Impression Cap"},"total_impression_cap":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Impression Cap"},"targeting":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Targeting"},"version":{"type":"integer","title":"Version","default":0},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","deal_id","name","buyer_name","buyer_seat_id","deal_type","price_cpm","status","protocol_origin","start_date","end_date","created_at","updated_at"],"title":"DealOut"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}