openapi: 3.0.3
info:
  title: Gouaklô API
  version: 4.2.1
servers:
  - url: https://www.gouaklo.com/api/v1
paths:
  /health: { get: { responses: { '200': { description: OK } } } }
  /auth/register: { post: { responses: { '201': { description: Created }, '409': { description: Conflict } } } }
  /auth/login: { post: { responses: { '200': { description: OK }, '401': { description: Unauthorized }, '429': { description: Rate limited } } } }
  /auth/logout: { post: { security: [{ bearerAuth: [] }], responses: { '200': { description: OK } } } }
  /catalog/products: { get: { responses: { '200': { description: Product list } } } }
  /cart: { get: { security: [{ bearerAuth: []}], responses: { '200': { description: Cart } } }, post: { security: [{ bearerAuth: []}], responses: { '201': { description: Added } } } }
  /checkout: { post: { security: [{ bearerAuth: []}], parameters: [{ in: header, name: Idempotency-Key, required: true, schema: { type: string } }], responses: { '201': { description: Reserved order }, '409': { description: Stock conflict } } } }
  /payments: { post: { security: [{ bearerAuth: []}], parameters: [{ in: header, name: Idempotency-Key, required: true, schema: { type: string } }], responses: { '201': { description: Payment intent } } } }
  /payments/webhook: { post: { responses: { '200': { description: Processed }, '401': { description: Invalid signature } } } }
  /vendor/me: { get: { security: [{ bearerAuth: []}], responses: { '200': { description: Vendor profile } } } }
  /vendor/orders: { get: { security: [{ bearerAuth: []}], responses: { '200': { description: Vendor orders } } } }
  /vendor/wallet: { get: { security: [{ bearerAuth: []}], responses: { '200': { description: Wallet } } } }
  /vendor/payouts: { post: { security: [{ bearerAuth: []}], responses: { '201': { description: Payout request } } } }
  /public/legal: { get: { responses: { '200': { description: Published legal documents } } } }
  /public/cookies/config: { get: { responses: { '200': { description: Cookie categories } } } }
  /consents: { post: { responses: { '201': { description: Recorded consent } } } }
  /cookies/consents: { post: { responses: { '201': { description: Recorded cookie choices } } } }
  /privacy/requests: { post: { security: [{ bearerAuth: []}], responses: { '201': { description: Privacy request } } } }
components:
  securitySchemes:
    bearerAuth: { type: http, scheme: bearer }
