{ "openapi": "3.0.3", "info": { "title": "Skinique storefront API", "version": "2026-08-22", "description": "Public machine-readable surface of skinique.lv (Shopify storefront). Read endpoints need no authentication. Cart endpoints operate only on the caller's own session cart (cookie-scoped) - there is no cross-customer access and no privileged write surface here. Transactional agent commerce (catalog search, cart, checkout with mandatory buyer approval) is served via the Universal Commerce Protocol: discovery at /.well-known/ucp, MCP JSON-RPC at /api/ucp/mcp; tool schemas are published at https://ucp.dev/2026-04-08/services/shopping/mcp.openrpc.json. Agent onboarding: /llms.txt and /agents.md. Locale-prefixed variants (/ru, /en) of HTML routes exist; the JSON endpoints below are locale-independent.", "contact": { "name": "Skinique", "url": "https://skinique.lv/pages/contact", "email": "info@skinique.lv" } }, "externalDocs": { "description": "Agent instructions (llms.txt mirror at /agents.md); UCP discovery at /.well-known/ucp", "url": "https://skinique.lv/llms.txt" }, "servers": [ { "url": "https://skinique.lv" } ], "security": [], "paths": { "/products.json": { "get": { "operationId": "listProducts", "summary": "List published products", "parameters": [ { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 250 }, "description": "Products per page (default 30, max 250)." }, { "name": "page", "in": "query", "schema": { "type": "integer", "minimum": 1 } } ], "responses": { "200": { "description": "Product list", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProductList" } } } } } } }, "/products/{handle}.json": { "get": { "operationId": "getProduct", "summary": "One product by handle", "parameters": [ { "name": "handle", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Product", "content": { "application/json": { "schema": { "type": "object", "properties": { "product": { "$ref": "#/components/schemas/Product" } } } } } }, "404": { "description": "Unknown handle. Content type is application/json; the body is empty." } } } }, "/collections/{handle}/products.json": { "get": { "operationId": "listCollectionProducts", "summary": "Products in a collection", "parameters": [ { "name": "handle", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Collection handle; see /sitemap.xml for the full set." }, { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 250 } } ], "responses": { "200": { "description": "Product list (empty products array for an unknown collection handle on some Shopify versions; otherwise 404)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProductList" } } } }, "404": { "description": "Unknown handle. Content type is application/json; the body is empty." } } } }, "/search/suggest.json": { "get": { "operationId": "searchSuggest", "summary": "Predictive search", "parameters": [ { "name": "q", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "resources[type]", "in": "query", "schema": { "type": "string", "enum": ["product", "page", "article", "collection", "query"] }, "description": "Comma-separable resource types." } ], "responses": { "200": { "description": "Suggestions", "content": { "application/json": { "schema": { "type": "object", "properties": { "resources": { "type": "object" } } } } } } } } }, "/cart.js": { "get": { "operationId": "getCart", "summary": "The caller's session cart", "security": [ { "cartSession": [] } ], "responses": { "200": { "description": "Cart (content type text/javascript, body is JSON)", "content": { "text/javascript": { "schema": { "$ref": "#/components/schemas/Cart" } } } } } } }, "/cart/add.js": { "post": { "operationId": "addToCart", "summary": "Add variant(s) to the session cart", "security": [ { "cartSession": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": ["id"], "properties": { "id": { "type": "integer", "description": "Variant id (from product JSON variants[].id)" }, "quantity": { "type": "integer", "default": 1 } } } } } } } } }, "responses": { "200": { "description": "Added items", "content": { "application/json": { "schema": { "type": "object" } } } }, "422": { "description": "Cart error (unknown variant, sold out, quantity rules)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CartError" } } } } } } }, "/.well-known/ucp": { "get": { "operationId": "ucpDiscovery", "summary": "Universal Commerce Protocol merchant profile", "description": "Shopify-served discovery document: supported UCP versions, service endpoints, capabilities, payment handlers. See https://ucp.dev.", "responses": { "200": { "description": "UCP profile", "content": { "application/json": { "schema": { "type": "object" } } } } } } }, "/api/ucp/mcp": { "post": { "operationId": "ucpMcp", "summary": "UCP shopping service (MCP transport, JSON-RPC 2.0)", "description": "POST JSON-RPC 2.0. Start with method tools/list to discover tools (search_catalog, cart and checkout operations; get_checkout verified live). Payment completion always requires contemporaneous buyer approval - agents must not finalize payment autonomously. Rate-limited per IP: back off on 429. Authoritative contract: https://ucp.dev/2026-04-08/services/shopping/mcp.openrpc.json", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["jsonrpc", "id", "method"], "properties": { "jsonrpc": { "type": "string", "enum": ["2.0"] }, "id": {}, "method": { "type": "string" }, "params": { "type": "object" } } } } } }, "responses": { "200": { "description": "JSON-RPC response (result or error object)", "content": { "application/json": { "schema": { "type": "object" } } } }, "429": { "description": "Rate limited - back off" } } } } }, "components": { "securitySchemes": { "cartSession": { "type": "apiKey", "in": "cookie", "name": "cart", "description": "Shopify session cart cookie, created automatically on first cart call. Scope: the caller's own cart only - no customer data, no order history, no admin surface. Checkout/payment is NOT reachable through these endpoints; transactional flows go through UCP/MCP (buyer approval enforced by the platform) or the Shop skill (https://shop.app/SKILL.md)." } }, "schemas": { "Product": { "type": "object", "properties": { "id": { "type": "integer" }, "title": { "type": "string" }, "handle": { "type": "string" }, "body_html": { "type": "string" }, "vendor": { "type": "string" }, "product_type": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" }, "description": "Products tagged consultation_only cannot be added to the cart; the product page routes to a consultation request instead." }, "variants": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "title": { "type": "string" }, "price": { "type": "string" }, "available": { "type": "boolean" } } } }, "images": { "type": "array", "items": { "type": "object" } } } }, "ProductList": { "type": "object", "properties": { "products": { "type": "array", "items": { "$ref": "#/components/schemas/Product" } } } }, "Cart": { "type": "object", "properties": { "token": { "type": "string" }, "item_count": { "type": "integer" }, "items": { "type": "array", "items": { "type": "object" } }, "total_price": { "type": "integer", "description": "Minor currency units (EUR cents)" }, "currency": { "type": "string" } } }, "CartError": { "type": "object", "required": ["status", "message", "description"], "properties": { "status": { "type": "integer", "example": 422 }, "message": { "type": "string", "example": "Cart Error" }, "description": { "type": "string", "example": "Cannot find variant", "description": "Human-readable resolution hint" } } } } } }