{
  "openapi": "3.0.3",
  "info": {
    "title": "Umney Connect Commerce API",
    "version": "1.0.0",
    "description": "Public Commerce API (commerce:read). Read-only products, orders, loyalty, statistics. Writes remain JWT Growth. Docs: https://umneyconnect.com/developers/commerce"
  },
  "servers": [
    { "url": "https://umneyconnect.com/api", "description": "Production" },
    { "url": "https://www.staging.umneyconnect.com/api", "description": "Staging" }
  ],
  "tags": [{ "name": "Products" }, { "name": "Orders" }, { "name": "Loyalty" }, { "name": "Statistics" }],
  "components": {
    "securitySchemes": {
      "ApiKeyBearer": { "type": "http", "scheme": "bearer", "bearerFormat": "umk_live_commerce_…" },
      "ApiKeyHeader": { "type": "apiKey", "in": "header", "name": "X-API-Key" }
    },
    "parameters": {
      "Id": { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }
    }
  },
  "security": [{ "ApiKeyBearer": [] }, { "ApiKeyHeader": [] }],
  "paths": {
    "/v1/commerce/products": {
      "get": { "tags": ["Products"], "summary": "List products", "operationId": "listCommerceProducts", "responses": { "200": { "description": "OK" } } }
    },
    "/v1/commerce/products/{id}": {
      "get": { "tags": ["Products"], "summary": "Get product", "operationId": "getCommerceProduct", "parameters": [{ "$ref": "#/components/parameters/Id" }], "responses": { "200": { "description": "OK" } } }
    },
    "/v1/commerce/orders": {
      "get": { "tags": ["Orders"], "summary": "List orders", "operationId": "listCommerceOrders", "responses": { "200": { "description": "OK" } } }
    },
    "/v1/commerce/orders/{id}": {
      "get": { "tags": ["Orders"], "summary": "Get order", "operationId": "getCommerceOrder", "parameters": [{ "$ref": "#/components/parameters/Id" }], "responses": { "200": { "description": "OK" } } }
    },
    "/v1/commerce/loyalty": {
      "get": { "tags": ["Loyalty"], "summary": "List loyalty accounts", "operationId": "listCommerceLoyalty", "responses": { "200": { "description": "OK" } } }
    },
    "/v1/commerce/loyalty/{id}": {
      "get": { "tags": ["Loyalty"], "summary": "Get loyalty account", "operationId": "getCommerceLoyalty", "parameters": [{ "$ref": "#/components/parameters/Id" }], "responses": { "200": { "description": "OK" } } }
    },
    "/v1/commerce/statistics": {
      "get": { "tags": ["Statistics"], "summary": "Commerce aggregates", "operationId": "getCommerceStatistics", "responses": { "200": { "description": "OK" } } }
    }
  }
}
