{"openapi":"3.1.0","info":{"title":"Jawaker Pro Reseller API Contract","version":"1.0.0","description":"Jawaker distributor API on the dedicated API host. Same client/api paths and api-token authentication as Sigma Store. Token quantities and balances are in TOKENS."},"servers":[{"url":"https://api.jawaker-panel.mr-omegastore.shop"}],"security":[{"ApiToken":[]},{"XApiKey":[]},{"BearerAuth":[]}],"paths":{"/client/api/profile":{"get":{"summary":"Account balance and identity","responses":{"200":{"description":"Profile or business error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Profile"},{"$ref":"#/components/schemas/BusinessError"}]}}}}}},"post":{"summary":"Account balance and identity (POST alias)","description":"POST accepts the same parameters in the JSON or form body. Query parameters take precedence if repeated.","responses":{"200":{"description":"Profile or business error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Profile"},{"$ref":"#/components/schemas/BusinessError"}]}}}}}}},"/client/api/categories":{"get":{"summary":"Visible categories","responses":{"200":{"description":"Bare category array or business error","content":{"application/json":{"schema":{"oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/Category"}},{"$ref":"#/components/schemas/BusinessError"}]}}}}}},"post":{"summary":"Visible categories (POST alias)","description":"POST accepts the same parameters in the JSON or form body. Query parameters take precedence if repeated.","responses":{"200":{"description":"Bare category array or business error","content":{"application/json":{"schema":{"oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/Category"}},{"$ref":"#/components/schemas/BusinessError"}]}}}}}}},"/client/api/products":{"get":{"summary":"Available catalogue for the authenticated account","parameters":[{"name":"products_id","in":"query","description":"Comma-separated product IDs","schema":{"type":"string"}},{"name":"price","in":"query","description":"Return the lightweight price view when set to 1","schema":{"type":"string","enum":["1"]}},{"name":"base","in":"query","description":"Return the basic product view when set to 1","schema":{"type":"string","enum":["1"]}}],"responses":{"200":{"description":"Bare product array or business error","content":{"application/json":{"schema":{"oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/Product"}},{"$ref":"#/components/schemas/BusinessError"}]}}}}}},"post":{"summary":"Available catalogue for the authenticated account (POST alias)","description":"POST accepts the same parameters in the JSON or form body. Query parameters take precedence if repeated.","responses":{"200":{"description":"Bare product array or business error","content":{"application/json":{"schema":{"oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/Product"}},{"$ref":"#/components/schemas/BusinessError"}]}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"products_id":{"type":"string"},"price":{"type":"string","enum":["1"]},"base":{"type":"string","enum":["1"]}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"products_id":{"type":"string"},"price":{"type":"string","enum":["1"]},"base":{"type":"string","enum":["1"]}}}}}}}},"/client/api/content/{categoryId}":{"get":{"summary":"Category content; use 0 for the catalogue root","parameters":[{"name":"categoryId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Categories and products in the standard wrapper, or business error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ContentResponse"},{"$ref":"#/components/schemas/BusinessError"}]}}}}}},"post":{"summary":"Category content; use 0 for the catalogue root (POST alias)","description":"POST accepts the same parameters in the JSON or form body. Query parameters take precedence if repeated.","responses":{"200":{"description":"Categories and products in the standard wrapper, or business error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ContentResponse"},{"$ref":"#/components/schemas/BusinessError"}]}}}}},"parameters":[{"name":"categoryId","in":"path","required":true,"schema":{"type":"integer"}}]}},"/client/api/newOrder/{productId}/params":{"get":{"summary":"Create a charge order; use order_uuid when retrying","parameters":[{"name":"productId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"qty","in":"query","required":true,"schema":{"type":"integer","minimum":1}},{"name":"playerId","in":"query","required":true,"schema":{"type":"string"}},{"name":"order_uuid","in":"query","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"New order in wait state, or business error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NewOrderResponse"},{"$ref":"#/components/schemas/BusinessError"}]}}}}}},"post":{"summary":"POST alias for the same create order operation","description":"Body values are read like query parameters. Query values win when duplicated.","parameters":[{"name":"productId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["qty","playerId","order_uuid"],"properties":{"qty":{"type":"integer"},"playerId":{"type":"string"},"order_uuid":{"type":"string","format":"uuid"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["qty","playerId","order_uuid"],"properties":{"qty":{"type":"integer"},"playerId":{"type":"string"},"order_uuid":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Same response as GET","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NewOrderResponse"},{"$ref":"#/components/schemas/BusinessError"}]}}}}}}},"/client/api/check":{"get":{"summary":"Check up to 100 orders belonging to the token owner","parameters":[{"name":"orders","in":"query","required":true,"description":"Bracketed comma-separated order IDs, e.g. [JW-91042]","schema":{"type":"string"}},{"name":"uuid","in":"query","description":"Set to 1 to search using order_uuid","schema":{"type":"string","enum":["1"]}}],"responses":{"200":{"description":"Matching order rows or business error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/OrdersResponse"},{"$ref":"#/components/schemas/BusinessError"}]}}}}}},"post":{"summary":"Check up to 100 orders belonging to the token owner (POST alias)","description":"POST accepts the same parameters in the JSON or form body. Query parameters take precedence if repeated.","responses":{"200":{"description":"Matching order rows or business error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/OrdersResponse"},{"$ref":"#/components/schemas/BusinessError"}]}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"orders":{"type":"string"},"uuid":{"type":"string","enum":["1"]}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"orders":{"type":"string"},"uuid":{"type":"string","enum":["1"]}}}}}}}},"/client/api/changeStateHistory":{"get":{"summary":"API order changes, newest first","parameters":[{"name":"since","in":"query","description":"ISO timestamp or Unix seconds/milliseconds; defaults to last 12 hours","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Defaults to 50, maximum 200","schema":{"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"Same order rows as check, plus updated_at","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/OrdersResponse"},{"$ref":"#/components/schemas/BusinessError"}]}}}}}},"post":{"summary":"API order changes, newest first (POST alias)","description":"POST accepts the same parameters in the JSON or form body. Query parameters take precedence if repeated.","responses":{"200":{"description":"Same order rows as check, plus updated_at","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/OrdersResponse"},{"$ref":"#/components/schemas/BusinessError"}]}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"since":{"type":"string"},"limit":{"type":"integer","minimum":1,"maximum":200}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"since":{"type":"string"},"limit":{"type":"integer","minimum":1,"maximum":200}}}}}}}}},"webhooks":{"orderStateChanged":{"post":{"summary":"Best-effort state update sent to the HTTPS URL configured on the active API token","description":"One retry on transport failure. Poll /client/api/check as the source of truth.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderWebhook"}}}},"responses":{"2XX":{"description":"Accepted by the merchant endpoint"}}}}},"components":{"securitySchemes":{"ApiToken":{"type":"apiKey","in":"header","name":"api-token"},"XApiKey":{"type":"apiKey","in":"header","name":"x-api-key"},"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Profile":{"type":"object","required":["balance","currency","email"],"properties":{"balance":{"type":"string"},"currency":{"type":"string","example":"TOKENS"},"email":{"type":"string","format":"email"}}},"Category":{"type":"object","required":["id","name"],"properties":{"id":{"type":"integer"},"name":{"type":"string"}}},"Product":{"type":"object","required":["id","name","price","base_price","available","params","params_keys","qty_values","product_type"],"properties":{"id":{"type":"integer"},"name":{"type":"string"},"price":{"type":"number"},"base_price":{"type":"number"},"currency":{"type":"string","example":"TOKENS"},"params":{"type":"array","items":{"type":"string"}},"params_keys":{"type":"array","items":{"type":"string"}},"category_name":{"type":"string"},"category_img":{"type":["string","null"]},"available":{"type":"boolean"},"qty_values":{"type":"object","properties":{"min":{"type":"integer"},"max":{"type":"integer"}}},"product_type":{"type":"string","const":"quantity"},"parent_id":{"type":"integer"}}},"ContentResponse":{"type":"object","required":["status","data"],"properties":{"status":{"const":"OK"},"data":{"type":"object","required":["categories","products"],"properties":{"categories":{"type":"array","items":{"$ref":"#/components/schemas/Category"}},"products":{"type":"array","items":{"$ref":"#/components/schemas/Product"}}}}}},"NewOrderResponse":{"type":"object","required":["status","data"],"properties":{"status":{"const":"OK"},"data":{"type":"object","required":["order_id","status","price","currency","data","replay_api"],"properties":{"order_id":{"type":"string"},"status":{"type":"string","enum":["accept","reject","wait"]},"price":{"type":"number"},"currency":{"type":"string"},"data":{"type":"object","properties":{"playerId":{"type":"string"},"player_name":{"type":["string","null"]},"player_level":{"type":["integer","null"]},"player_image":{"type":["string","null"]},"execution_ms":{"type":["integer","null"]}}},"replay_api":{"type":"null"},"reply":{"type":["string","null"]},"execution_ms":{"type":["integer","null"]}}}}},"OrderRow":{"type":"object","required":["order_id","quantity","data","created_at","product_name","price","currency","status","replay_api"],"properties":{"order_id":{"type":"string"},"quantity":{"type":"string"},"data":{"type":"object","properties":{"playerId":{"type":"string"},"player_name":{"type":["string","null"]},"player_level":{"type":["integer","null"]},"player_image":{"type":["string","null"]},"execution_ms":{"type":["integer","null"]}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"product_name":{"type":"string"},"price":{"type":"string"},"currency":{"type":"string"},"status":{"type":"string","enum":["wait","accept","reject"]},"replay_api":{"type":"null"},"uuid":{"type":"string"},"reply":{"type":["string","null"]}}},"OrdersResponse":{"type":"object","required":["status","data"],"properties":{"status":{"const":"OK"},"data":{"type":"array","items":{"$ref":"#/components/schemas/OrderRow"}}}},"OrderWebhook":{"type":"object","required":["order_id","uuid","status","reply","player_id","player_name","player_level","player_image","execution_ms","quantity","updated_at"],"properties":{"order_id":{"type":"string"},"uuid":{"type":"string"},"status":{"type":"string","enum":["accept","reject"]},"reply":{"type":["string","null"]},"player_id":{"type":"string"},"player_name":{"type":["string","null"]},"player_level":{"type":["integer","null"]},"player_image":{"type":["string","null"]},"execution_ms":{"type":["integer","null"]},"quantity":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}}},"BusinessError":{"type":"object","required":["status","code","message"],"properties":{"status":{"const":"error"},"code":{"type":"integer","enum":[100,105,106,107,108,109,110,111,112,113,114,120,121,122,123,130,500]},"message":{"type":"string"}}}}}}