openapi: 3.0.3
info:
  title: SaaSCol Marketplace API
  version: 1.1.0
  description: API satélite marketplace (comercio). Core solo IAM/storage/events/UAP editorial.
servers:
  - url: http://localhost:3015
paths:
  /healthz:
    get:
      summary: Liveness
      responses: { "200": { description: ok } }
  /readyz:
    get:
      summary: Readiness Core+DB
      responses: { "200": { description: ready } }
  /api/v1/me:
    get:
      summary: Perfil sesión
      responses: { "200": { description: BFF } }
  /api/v1/products:
    get:
      summary: List published products
      responses: { "200": { description: BFF } }
    post:
      summary: Create product
      responses: { "201": { description: created } }
  /api/v1/products/{id}:
    get:
      summary: Get product
      parameters:
        - name: id
          in: path
          required: true
          schema: { type: string }
      responses: { "200": { description: BFF } }
    patch:
      summary: Update product
      parameters:
        - name: id
          in: path
          required: true
          schema: { type: string }
      responses: { "200": { description: BFF } }
  /api/v1/orders:
    post:
      summary: Create order (server-side price)
      responses: { "201": { description: created } }
  /api/v1/orders/{id}:
    get:
      summary: Get order
      parameters:
        - name: id
          in: path
          required: true
          schema: { type: string }
      responses: { "200": { description: BFF } }
  /api/v1/payments/wompi/signature:
    post:
      summary: Integrity checksum (DB amount preferred)
      responses: { "200": { description: signature } }
  /api/v1/payments/wompi/webhook:
    post:
      summary: Wompi webhook idempotent
      responses: { "200": { description: processed } }
  /api/v1/payments/reconcile:
    post:
      summary: Reconcile pending payment
      responses: { "200": { description: ok } }
  /api/v1/realtime/sse:
    get:
      summary: SSE realtime
      parameters:
        - name: topic
          in: query
          required: true
          schema: { type: string }
      responses: { "200": { description: event stream } }
  /api/v1/search/products:
    get:
      summary: Search products
      parameters:
        - name: q
          in: query
          schema: { type: string }
      responses: { "200": { description: BFF } }
  /api/v1/flags:
    get:
      summary: Feature / cutover flags
      responses: { "200": { description: BFF } }
