{"components":{"schemas":{"Error":{"properties":{"error":{"example":"missing_token","type":"string"},"message":{"type":"string"},"ok":{"example":false,"type":"boolean"}},"type":"object"},"Product":{"properties":{"category":{"type":"string"},"delivery_type":{"enum":["auto","manual"],"type":"string"},"id":{"type":"integer"},"in_stock":{"type":"boolean"},"name":{"type":"string"},"price":{"description":"Wholesale INR you pay","type":"integer"},"retail_price":{"type":"integer"},"stock":{"nullable":true,"type":"integer"},"supplier_name":{"type":"string"}},"type":"object"}},"securitySchemes":{"BearerAuth":{"description":"Token from the reseller panel API page. Header: Authorization: Bearer TOKEN","scheme":"bearer","type":"http"},"ResellerToken":{"in":"header","name":"X-Reseller-Token","type":"apiKey"}}},"info":{"description":"Wholesale catalogue and purchase API for unlocked resellers. Issue a Bearer token at the reseller panel API page after paying the activation amount. The versioned root is /api/v2; legacy /reseller/* routes remain available.","title":"OTT24x7 Reseller API","version":"2.0.0"},"openapi":"3.0.3","paths":{"/balance":{"get":{"responses":{"200":{"description":"Balances"}},"security":[{"BearerAuth":[]},{"ResellerToken":[]}],"summary":"Wallet, spendable, and held INR"}},"/categories":{"get":{"responses":{"200":{"description":"Categories"}},"security":[{"BearerAuth":[]},{"ResellerToken":[]}],"summary":"Category list"}},"/check-token":{"post":{"responses":{"200":{"description":"Token ok"}},"security":[{"BearerAuth":[]},{"ResellerToken":[]}],"summary":"Validate the Bearer token"}},"/disable-token":{"post":{"responses":{"200":{"description":"Disabled"}},"security":[{"BearerAuth":[]},{"ResellerToken":[]}],"summary":"Disable the current key"}},"/orders":{"get":{"parameters":[{"in":"query","name":"filter","schema":{"enum":["all","today","7d","30d","delivered","pending","failed","refunded"],"type":"string"}}],"responses":{"200":{"description":"Orders"}},"security":[{"BearerAuth":[]},{"ResellerToken":[]}],"summary":"Recent API orders"}},"/orders/{order_id}":{"get":{"parameters":[{"in":"path","name":"order_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Order"}},"security":[{"BearerAuth":[]},{"ResellerToken":[]}],"summary":"One order including delivery keys"}},"/products":{"get":{"responses":{"200":{"description":"Product list"},"401":{"description":"Auth failed"}},"security":[{"BearerAuth":[]},{"ResellerToken":[]}],"summary":"List wholesale products"}},"/products/{product_id}":{"get":{"parameters":[{"in":"path","name":"product_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Product"},"404":{"description":"Not found"}},"security":[{"BearerAuth":[]},{"ResellerToken":[]}],"summary":"One product at your wholesale rate"}},"/purchase":{"post":{"requestBody":{"content":{"application/json":{"schema":{"properties":{"buyer_info":{"type":"object"},"product_id":{"type":"integer"},"quantity":{"default":1,"type":"integer"},"voucher_code":{"type":"string"}},"required":["product_id"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Order placed; auto products include delivery_payload keys"}},"security":[{"BearerAuth":[]},{"ResellerToken":[]}],"summary":"Buy stock at wholesale"}},"/rotate-token":{"post":{"responses":{"200":{"description":"New token"}},"security":[{"BearerAuth":[]},{"ResellerToken":[]}],"summary":"Rotate key (raw token returned once)"}},"/settings":{"get":{"responses":{"200":{"description":"Connection settings"}},"security":[{"BearerAuth":[]},{"ResellerToken":[]}],"summary":"API root and reseller summary"}}},"security":[{"BearerAuth":[]},{"ResellerToken":[]}],"servers":[{"url":"http://ott24x7.com/api/v2"}]}
