{"openapi":"3.0.3","info":{"title":"Royal Platform Internal Operations API","version":"2.4.1","description":"Internal operations API used by back-office automation (wallet adjustments, bonus grants, withdrawal approvals and round settlement). Automation agents authenticate with the X-Agent-Key header. Sandbox key: rbs_agent_c8113dbd20826ec143ad4e3876d3dca6"},"servers":[{"url":"/"}],"components":{"securitySchemes":{"AgentKey":{"type":"apiKey","in":"header","name":"X-Agent-Key","description":"Sandbox key: rbs_agent_c8113dbd20826ec143ad4e3876d3dca6"}},"schemas":{"Result":{"type":"object","properties":{"success":{"type":"boolean"},"transaction_id":{"type":"string"},"new_balance":{"type":"number"}}}}},"security":[{"AgentKey":[]}],"paths":{"/api/v1/wallet/adjust":{"post":{"summary":"Credit or debit a player wallet","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["user_id","amount"],"properties":{"user_id":{"type":"string","description":"Player id"},"amount":{"type":"number","description":"Amount in BRL (negative to debit)"},"currency":{"type":"string","enum":["BRL","BONUS"]},"reason":{"type":"string"}}}}}},"responses":{"200":{"description":"Wallet adjusted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}},"/api/v1/bonus/grant":{"post":{"summary":"Grant a bonus to a player","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["user_id","amount"],"properties":{"user_id":{"type":"string"},"amount":{"type":"number"},"rollover":{"type":"number"}}}}}},"responses":{"200":{"description":"Bonus granted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}},"/api/v1/withdrawals/{id}/approve":{"post":{"summary":"Approve a pending withdrawal and send the PIX","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Withdrawal approved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}},"/internal/v2/rounds/reconcile":{"post":{"summary":"Reconcile pending game rounds","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["user_id"],"properties":{"user_id":{"type":"string"},"round_id":{"type":"string"},"win":{"type":"number"}}}}}},"responses":{"200":{"description":"Rounds reconciled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}}}}}}}