{"openapi":"3.1.0","info":{"title":"RetroBoost API","version":"3.1.0","description":"Customer API for account balance, live stock and Discord boost orders. All monetary values are returned in RUB.\n\nAuthenticate with X-API-Key or Authorization: Bearer. Generate the key in the Telegram bot.","contact":{"name":"Support","url":"https://t.me/rrelaxo"}},"servers":[{"url":"https://api.relaxo.dev"}],"tags":[{"name":"Account"},{"name":"Stock"},{"name":"Orders"}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"X-API-Key"},"Bearer":{"type":"http","scheme":"bearer","bearerFormat":"API key"}},"schemas":{"Account":{"type":"object","required":["user_id","balance_rub","total_deposited_rub","language"],"properties":{"user_id":{"type":"integer","example":123456789},"username":{"type":["string","null"],"example":"reseller"},"balance_rub":{"type":"number","example":2500},"total_deposited_rub":{"type":"number","example":5000},"language":{"type":"string","enum":["ru","en","de"]},"api_rate_limit_per_minute":{"type":"integer","example":60}}},"StockPeriod":{"type":"object","required":["stock","price_per_boost_rub"],"properties":{"stock":{"type":"integer","example":120},"price_per_boost_rub":{"type":"number","example":85}}},"Stock":{"type":"object","required":["currency","month_1","month_3","updated_at"],"properties":{"currency":{"type":"string","const":"RUB"},"month_1":{"$ref":"#/components/schemas/StockPeriod"},"month_3":{"$ref":"#/components/schemas/StockPeriod"},"updated_at":{"type":"string","format":"date-time"}}},"OrderCreate":{"type":"object","additionalProperties":false,"required":["invite","months","quantity"],"properties":{"invite":{"type":"string","example":"https://discord.gg/example"},"months":{"type":"integer","enum":[1,3],"example":1},"quantity":{"type":"integer","minimum":2,"maximum":30,"multipleOf":2,"example":10}}},"Order":{"type":"object","required":["order_id","months","quantity","delivered","status","invite","total_rub","refunded_rub","created_at","updated_at"],"properties":{"order_id":{"type":"string","example":"BLY4F6D4A91C2"},"months":{"type":"integer","enum":[1,3]},"quantity":{"type":"integer","example":10},"delivered":{"type":"integer","example":0},"status":{"type":"string","enum":["creating","processing","retrying","completed","partial","failed","manual_review"]},"invite":{"type":"string","example":"https://discord.gg/example"},"total_rub":{"type":"number","example":850},"refunded_rub":{"type":"number","example":0},"error_code":{"type":["string","null"],"enum":["PARTIAL_DELIVERY","DELIVERY_FAILED","MANUAL_REVIEW_REQUIRED",null]},"error":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"example":{"order_id":"BLY4F6D4A91C2","months":1,"quantity":10,"delivered":0,"status":"processing","invite":"https://discord.gg/example","total_rub":850,"refunded_rub":0,"error_code":null,"error":null,"created_at":"2026-07-12T14:30:00.000Z","updated_at":"2026-07-12T14:30:02.000Z"}},"OrderList":{"type":"object","required":["count","orders"],"properties":{"count":{"type":"integer","example":1},"orders":{"type":"array","items":{"$ref":"#/components/schemas/Order"}}}},"Error":{"type":"object","required":["code","error","request_id"],"properties":{"code":{"type":"string","example":"INSUFFICIENT_BALANCE"},"error":{"type":"string","example":"Insufficient balance"},"request_id":{"type":"string","format":"uuid"}},"additionalProperties":true,"example":{"code":"INSUFFICIENT_BALANCE","error":"Insufficient balance","request_id":"b28abf23-0f7d-4a3a-8a90-60d42d77514a","required_rub":850,"balance_rub":300}}},"responses":{"BadRequest":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"Invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"PaymentRequired":{"description":"Insufficient balance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"INSUFFICIENT_BALANCE","error":"Insufficient balance","request_id":"b28abf23-0f7d-4a3a-8a90-60d42d77514a","required_rub":850,"balance_rub":300}}}},"NotFound":{"description":"Order not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Conflict":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unavailable":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"security":[{"ApiKey":[]},{"Bearer":[]}],"paths":{"/v1/me":{"get":{"tags":["Account"],"summary":"Get account and balance","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/v1/stock":{"get":{"tags":["Stock"],"summary":"Get live stock and selling prices","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Stock"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/v1/orders":{"get":{"tags":["Orders"],"summary":"List own orders","parameters":[{"in":"query","name":"limit","required":false,"description":"Maximum number of orders to return (1–100).","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderList"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"tags":["Orders"],"summary":"Create order","parameters":[{"in":"header","name":"Idempotency-Key","required":true,"description":"Unique key required for safe retries. Reuse it only for the exact same request.","schema":{"type":"string","minLength":1,"maxLength":191},"example":"order-2026-0001"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCreate"}}}},"responses":{"201":{"description":"Order created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"},"example":{"order_id":"BLY4F6D4A91C2","months":1,"quantity":10,"delivered":0,"status":"processing","invite":"https://discord.gg/example","total_rub":850,"refunded_rub":0,"error_code":null,"error":null,"created_at":"2026-07-12T14:30:00.000Z","updated_at":"2026-07-12T14:30:02.000Z"}}}},"202":{"description":"Order accepted and processing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"},"example":{"order_id":"BLY4F6D4A91C2","months":1,"quantity":10,"delivered":0,"status":"processing","invite":"https://discord.gg/example","total_rub":850,"refunded_rub":0,"error_code":null,"error":null,"created_at":"2026-07-12T14:30:00.000Z","updated_at":"2026-07-12T14:30:02.000Z"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/v1/orders/{order_id}":{"get":{"tags":["Orders"],"summary":"Get own order","parameters":[{"in":"path","name":"order_id","required":true,"schema":{"type":"string"},"example":"BLY4F6D4A91C2"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"},"example":{"order_id":"BLY4F6D4A91C2","months":1,"quantity":10,"delivered":0,"status":"processing","invite":"https://discord.gg/example","total_rub":850,"refunded_rub":0,"error_code":null,"error":null,"created_at":"2026-07-12T14:30:00.000Z","updated_at":"2026-07-12T14:30:02.000Z"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}}}}