{"openapi":"3.1.1","info":{"title":"CraftBox Public Product Catalog","version":"1.0.0","description":"Unauthenticated, read-only storefront product discovery. Prices are in Georgian tetri (100 tetri = 1 GEL)."},"servers":[{"url":"https://craftbox.ge"}],"paths":{"/api/products":{"x-unsupported-methods":{"methods":["POST","PUT","PATCH","DELETE"],"description":"These methods are rejected. Only GET reads the catalog; HEAD is handled by Next.js, and OPTIONS returns the allowed methods.","response":{"status":405,"headers":{"Allow":"GET, HEAD, OPTIONS"},"schema":{"allOf":[{"$ref":"#/components/schemas/ApiError"},{"properties":{"code":{"const":"METHOD_NOT_ALLOWED"}}}]}}},"get":{"operationId":"listPublicStorefrontProducts","summary":"List published storefront products","description":"Returns one page of active, public-eligible products and optional managed taxonomy labels. The total and nextPage reflect the underlying active catalog before public eligibility filtering, so items can contain fewer than perPage entries. Follow nextPage until it is null. No authentication is required.","parameters":[{"name":"category","in":"query","description":"Optional category filter. A managed category slug or name is resolved when public facets are enabled; otherwise the legacy workshop category text is matched. An unknown value can return an empty list.","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"One-based page number. Omission selects page 1. The server rejects zero, signs, fractions, whitespace and non-digits; the upper bound comes from the shared taxonomy pagination parser.","required":false,"schema":{"type":"integer","minimum":1,"maximum":89478485,"default":1}},{"name":"limit","in":"query","description":"Requested page size, default 24, clamped to 1–200. The current server parses a leading decimal integer; missing or unparsable values use 24.","required":false,"schema":{"type":"integer","default":24,"minimum":1,"maximum":200}}],"responses":{"200":{"description":"A catalog page. items can be empty even when total is positive because public eligibility is applied after pagination.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductListResponse"}}}},"400":{"description":"The page parameter is invalid.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiError"},{"properties":{"code":{"const":"BAD_REQUEST"}}}]}}}},"429":{"description":"The request rate limit was exceeded. Retry-After is measured in seconds.","headers":{"Retry-After":{"description":"Seconds until retry is allowed.","schema":{"type":"integer","minimum":0}}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiError"},{"properties":{"code":{"const":"RATE_LIMITED"}}}]}}}},"500":{"description":"The catalog could not be loaded.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiError"},{"properties":{"code":{"const":"INTERNAL_ERROR"}}}]}}}}}}}},"components":{"schemas":{"CatalogRef":{"type":"object","additionalProperties":false,"required":["id","slug","name"],"properties":{"id":{"type":"integer"},"slug":{"type":"string"},"name":{"type":"string"}}},"CatalogCategory":{"type":"object","additionalProperties":false,"required":["id","slug","name","parentId","displayOrder"],"properties":{"id":{"type":"integer"},"slug":{"type":"string"},"name":{"type":"string"},"parentId":{"type":["integer","null"]},"displayOrder":{"type":"integer"}}},"CatalogTag":{"type":"object","additionalProperties":false,"required":["id","slug","name","color"],"properties":{"id":{"type":"integer"},"slug":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"}}},"CatalogAttribute":{"type":"object","additionalProperties":false,"required":["id","slug","name","kind","values"],"properties":{"id":{"type":"integer"},"slug":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string"},"values":{"type":"array","items":{"$ref":"#/components/schemas/CatalogRef"}}}},"ProductCatalog":{"type":"object","additionalProperties":false,"required":["brand","category","tags","attributes"],"properties":{"brand":{"oneOf":[{"$ref":"#/components/schemas/CatalogRef"},{"type":"null"}]},"category":{"oneOf":[{"$ref":"#/components/schemas/CatalogRef"},{"type":"null"}]},"tags":{"type":"array","items":{"$ref":"#/components/schemas/CatalogTag"}},"attributes":{"type":"array","items":{"$ref":"#/components/schemas/CatalogAttribute"}}}},"Product":{"type":"object","additionalProperties":false,"required":["id","slug","category","categoryLabel","nameKa","nameEn","mainImageUrl","availableLocales","basePriceTetri","effectivePriceTetri","priceCurrency","priceBasis","availability","inStock","hasAvailableOptions","descriptionKa","descriptionEn","url","urlEn","catalog"],"properties":{"id":{"type":"integer"},"slug":{"type":"string"},"category":{"type":"string","description":"Legacy workshop category text."},"categoryLabel":{"type":"string","description":"Managed public category name when present; otherwise the legacy category."},"nameKa":{"type":"string"},"nameEn":{"type":"string","description":"Stored English name; may be empty or untranslated. Check availableLocales before using English fields."},"mainImageUrl":{"type":["string","null"]},"availableLocales":{"type":"array","items":{"type":"string","enum":["ka","en"]},"minItems":1,"maxItems":2},"basePriceTetri":{"type":"integer","description":"Compare-at price of the default options, in tetri."},"effectivePriceTetri":{"type":"integer","description":"Current price of the default options, in tetri. Selected options may change the final price."},"priceCurrency":{"type":"string","const":"GEL"},"priceBasis":{"type":"string"},"availability":{"type":"string","enum":["InStock","OutOfStock"]},"inStock":{"type":"boolean"},"hasAvailableOptions":{"type":"boolean"},"descriptionKa":{"type":"string"},"descriptionEn":{"type":["string","null"]},"url":{"type":"string","format":"uri"},"urlEn":{"type":["string","null"],"format":"uri"},"catalog":{"$ref":"#/components/schemas/ProductCatalog"}}},"ProductListResponse":{"type":"object","additionalProperties":false,"required":["items","total","page","perPage","nextPage","filters"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"total":{"type":"integer","minimum":0},"page":{"type":"integer","minimum":1},"perPage":{"type":"integer","minimum":1,"maximum":200},"nextPage":{"type":["integer","null"],"minimum":2},"filters":{"type":"object","additionalProperties":false,"required":["categories"],"properties":{"categories":{"type":"array","items":{"$ref":"#/components/schemas/CatalogCategory"}}}}}},"ApiError":{"type":"object","additionalProperties":false,"required":["ok","error","code","message","hint","requestId"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"},"code":{"type":"string","enum":["BAD_REQUEST","RATE_LIMITED","INTERNAL_ERROR","METHOD_NOT_ALLOWED"]},"message":{"type":"string"},"hint":{"type":"string"},"requestId":{"type":"string"}}}}}}