openapi: 3.1.0
info:
  title: BS Enterprises Web & Commerce API
  version: 11.0.0
  description: Modular BSE catalogue, PKR pricing, RFQ, AI and future commerce API.
servers:
  - url: https://bsentr.com
paths:
  /api/catalog/search:
    get:
      summary: Search BSE and enabled supplier catalogues
      parameters:
        - {name: q, in: query, required: true, schema: {type: string}}
        - {name: provider, in: query, schema: {type: string, enum: [all,bse,digikey,mouser,element14]}}
        - {name: qty, in: query, schema: {type: integer, minimum: 1, default: 1}}
      responses: {"200": {description: Normalized supplier results with BSE PKR price when configuration permits}}
  /api/catalog/product:
    get:
      summary: Re-query one supplier product and calculate BSE PKR price
      parameters:
        - {name: provider, in: query, required: true, schema: {type: string}}
        - {name: productNumber, in: query, required: true, schema: {type: string}}
        - {name: qty, in: query, schema: {type: integer, minimum: 1, default: 1}}
      responses: {"200": {description: Product, supplier data, price breakdown and BSE delivery estimate}}
  /api/commerce/capabilities:
    get: {summary: Report which supplier/commerce routes are enabled, responses: {"200": {description: Capability matrix}}}
  /api/commerce/intent:
    post: {summary: Route an item to RFQ or re-verification/checkout, responses: {"200": {description: Commerce route}}}
  /api/contact:
    post: {summary: Submit technical RFQ/contact request, responses: {"200": {description: RFQ accepted}}}
  /api/chat:
    post: {summary: BSE AI capability assistant, responses: {"200": {description: Assistant response}}}
  /api/handoff:
    post: {summary: AI-to-human sales/technical handoff, responses: {"200": {description: Handoff created}}}
