openapi: 3.1.0
info:
  title: StorePulse AI iOS API
  version: 0.1.0
  summary: Versioned REST API for the StorePulse AI native iOS app.
  license:
    name: Proprietary
    url: https://storepulse.orustudio.com/terms
servers:
  - url: https://storepulse.orustudio.com/v1
    description: Production
paths:
  /:
    get:
      operationId: getApiRoot
      summary: API root
      security: []
      responses:
        "200":
          description: API metadata
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiEnvelope"
              examples:
                ok:
                  value:
                    data:
                      name: StorePulse AI API
                      version: v1
                      status: ok
                      requestId: 5bba4f0f-9972-43c9-a5da-88ea1d5944e2
        "429":
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorEnvelope"
              examples:
                rateLimited:
                  value:
                    error:
                      code: RATE_LIMITED
                      message: Too many requests. Please retry shortly.
                      requestId: 5bba4f0f-9972-43c9-a5da-88ea1d5944e2
components:
  schemas:
    ApiEnvelope:
      type: object
      required: [data]
      properties:
        data:
          type: object
          additionalProperties: true
    ErrorEnvelope:
      type: object
      required: [error]
      properties:
        error:
          type: object
          required: [code, message, requestId]
          properties:
            code:
              type: string
            message:
              type: string
            requestId:
              type: string
            details:
              type: object
              additionalProperties: true
