openapi: 3.1.0
info:
  title: CatalogHub Agent API
  version: 0.1.0-draft
  description: Draft REST API for agent-ready hospitality catalogue discovery, baskets, orders, invoices, and deliveries.
servers:
  - url: https://api.cataloghub.example
    description: Draft production API hostname
security:
  - bearerAuth: []
paths:
  /v1/catalog/search:
    get:
      summary: Search products
      description: Search authorised supplier catalogues by product query and structured fields.
      parameters:
        - name: q
          in: query
          required: true
          schema:
            type: string
          description: Search query, for example olive oil.
        - name: include
          in: query
          required: false
          schema:
            type: string
          description: Comma-separated fields such as allergens,nutrition,availability.
      responses:
        "200":
          description: Matching catalogue products.
  /v1/suppliers:
    get:
      summary: Discover suppliers
      responses:
        "200":
          description: Suppliers visible to the authenticated workspace.
  /v1/baskets:
    post:
      summary: Create basket
      responses:
        "201":
          description: Draft basket.
  /v1/orders:
    post:
      summary: Submit order
      responses:
        "202":
          description: Order accepted for processing.
  /v1/invoices:
    get:
      summary: Query invoices
      responses:
        "200":
          description: Invoice records for the authenticated workspace.
  /v1/deliveries:
    get:
      summary: Query deliveries
      responses:
        "200":
          description: Delivery records for the authenticated workspace.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
x-cataloghub-status: draft
