openapi: 3.2.0 info: title: Ad Buyer Agent Buyer Orders API description: Automated advertising buyer agent using CrewAI and IAB OpenDirect 2.1. Orchestrates budget allocation, inventory research, recommendation consolidation, and deal booking against seller agent APIs. contact: name: IAB Tech Lab url: https://iabtechlab.com/ license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0 version: 1.0.0 tags: - name: Buyer Orders paths: /api/v1/buyer/orders: get: tags: - Buyer Orders summary: List Buyer Orders description: 'List buyer''s orders from local DB with optional status filter. Args: status: Optional status string to filter orders by. Returns: Dict with ``orders`` list and ``count``.' operationId: list_buyer_orders_api_v1_buyer_orders_get parameters: - 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/buyer/orders/{order_id}/audit: get: tags: - Buyer Orders summary: Get Order Audit description: 'Get the local audit trail for an order. Args: order_id: The order ID to query. Returns: Dict with order_id, current_status, transitions list, and transition_count. Raises: HTTPException(404): If the order is not found locally.' operationId: get_order_audit_api_v1_buyer_orders__order_id__audit_get parameters: - name: order_id in: path required: true schema: type: string title: Order Id responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: 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 HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError