{"openapi":"3.1.0","info":{"title":"Blaze OTT Shop Public API","description":"Public Developer API for Blaze OTT Shop — browse products, place orders, and check wallet balance/profile from your own bot, site, or script. Authenticate with a blaze_sk_ API key generated from Settings → Reseller API inside the bot.","version":"0.1.0"},"paths":{"/api/products":{"get":{"summary":"Public List Products","operationId":"public_list_products_api_products_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/product/{product_id}":{"get":{"summary":"Public Get Product","operationId":"public_get_product_api_product__product_id__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/categories":{"get":{"summary":"Public List Categories","operationId":"public_list_categories_api_categories_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/balance":{"get":{"summary":"Public Get Balance","operationId":"public_get_balance_api_balance_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/profile":{"get":{"summary":"Public Get Profile","operationId":"public_get_profile_api_profile_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/orders":{"get":{"summary":"Public List Orders","operationId":"public_list_orders_api_orders_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/order":{"post":{"summary":"Public Place Order","description":"Places an order paid from the caller's own wallet balance — the\nonly payment method this API supports. Reuses the exact same database\nprimitives the bot's own wallet-purchase flow uses (db.deduct_balance,\ndb.claim_stock_items with its row-level locking, same min-buy-qty and\nstock checks) rather than reimplementing money-handling logic a\nsecond time. Pricing uses pricing.effective_price — the same shared\nmodule the bot uses — so a buyer's flash-sale/loyalty/bulk discounts\napply identically here.\n\nDeliberately simpler than the bot in two ways: manual-delivery\nproducts are rejected outright (that flow means \"an admin activates\nthis by hand,\" which doesn't fit an automated caller), and a 0-stock\nproduct is rejected rather than queued as a preorder.\n\nA reseller API key (Admin Panel -> API Resellers) can additionally\nrestrict this to certain product categories, cap the quantity per\norder, and/or carry its own discount applied instead of the normal\neffective_price — see require_public_reseller.","operationId":"public_place_order_api_order_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/docs":{"get":{"summary":"Docs Page","operationId":"docs_page_docs_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/health":{"get":{"summary":"Health","operationId":"health_api_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}