{ "swagger": "2.0", "info": { "description": "This is server for FortuneBet.", "title": "FortuneBet API", "termsOfService": "http://swagger.io/terms/", "contact": { "name": "API Support", "url": "http://www.swagger.io/support", "email": "support@swagger.io" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" }, "version": "1.0" }, "paths": { "/auth/login": { "post": { "description": "Login customer", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "Login customer", "parameters": [ { "description": "Login customer", "name": "login", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.loginCustomerReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.loginCustomerRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/auth/logout": { "post": { "description": "Logout customer", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "Logout customer", "parameters": [ { "description": "Logout customer", "name": "logout", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.logoutReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/auth/refresh": { "post": { "description": "Refresh token", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "Refresh token", "parameters": [ { "description": "tokens", "name": "refresh", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.refreshToken" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.loginCustomerRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/bet": { "get": { "description": "Gets all the bets", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "bet" ], "summary": "Gets all bets", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/handlers.BetRes" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "post": { "description": "Creates a bet", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "bet" ], "summary": "Create a bet", "parameters": [ { "description": "Creates bet", "name": "createBet", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.CreateBetReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.BetRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/bet/{id}": { "get": { "description": "Gets a single bet by id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "bet" ], "summary": "Gets bet by id", "parameters": [ { "type": "integer", "description": "Bet ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.BetRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "delete": { "description": "Deletes bet by id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "bet" ], "summary": "Deletes bet by id", "parameters": [ { "type": "integer", "description": "Bet ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "patch": { "description": "Updates the cashed out field", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "bet" ], "summary": "Updates the cashed out field", "parameters": [ { "type": "integer", "description": "Bet ID", "name": "id", "in": "path", "required": true }, { "description": "Updates Cashed Out", "name": "updateCashOut", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.UpdateCashOutReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/branch": { "get": { "description": "Gets all branches", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "branch" ], "summary": "Gets all branches", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/handlers.BranchDetailRes" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "post": { "description": "Creates a branch", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "branch" ], "summary": "Create a branch", "parameters": [ { "description": "Creates branch", "name": "createBranch", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.CreateBranchReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.BranchRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/branch/{id}": { "get": { "description": "Gets a single branch by id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "branch" ], "summary": "Gets branch by id", "parameters": [ { "type": "integer", "description": "Branch ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.BranchDetailRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "put": { "description": "Updates a branch", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "branch" ], "summary": "Updates a branch", "parameters": [ { "type": "integer", "description": "Branch ID", "name": "id", "in": "path", "required": true }, { "description": "Update Branch", "name": "updateBranch", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.CreateBranchReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.BranchRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "delete": { "description": "Delete the branch", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "branch" ], "summary": "Delete the branch", "parameters": [ { "type": "integer", "description": "Branch ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/branch/{id}/bets": { "get": { "description": "Gets bets by its branch id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "branch" ], "summary": "Gets bets by its branch id", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/handlers.BetRes" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/branch/{id}/operation": { "get": { "description": "Gets branch operations", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "branch" ], "summary": "Gets branch operations", "parameters": [ { "type": "integer", "description": "Branch ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/handlers.BranchOperationRes" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/branch/{id}/operation/{opID}": { "delete": { "description": "Delete the branch operation", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "branch" ], "summary": "Delete the branch operation", "parameters": [ { "type": "integer", "description": "Branch ID", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "Branch Operation ID", "name": "opID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/branchWallet": { "get": { "description": "Retrieve all branch wallets", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "wallet" ], "summary": "Get all branch wallets", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/handlers.WalletRes" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/cashiers": { "get": { "description": "Get all cashiers", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cashier" ], "summary": "Get all cashiers", "parameters": [ { "type": "integer", "description": "Page number", "name": "page", "in": "query" }, { "type": "integer", "description": "Page size", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "post": { "description": "Create cashier", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cashier" ], "summary": "Create cashier", "parameters": [ { "description": "Create cashier", "name": "cashier", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.CreateCashierReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/cashiers/{id}": { "put": { "description": "Update cashier", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cashier" ], "summary": "Update cashier", "parameters": [ { "description": "Update cashier", "name": "cashier", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.updateUserReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/company/{id}/branch": { "get": { "description": "Gets branches by company id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "branch" ], "summary": "Gets branches by company id", "parameters": [ { "type": "integer", "description": "Company ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/handlers.BranchDetailRes" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/manager/{id}/branch": { "get": { "description": "Gets a branches by manager id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "branch" ], "summary": "Gets branches by manager id", "parameters": [ { "type": "integer", "description": "User ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/handlers.BranchDetailRes" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/managers": { "get": { "description": "Get all Managers", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "manager" ], "summary": "Get all Managers", "parameters": [ { "type": "integer", "description": "Page number", "name": "page", "in": "query" }, { "type": "integer", "description": "Page size", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "post": { "description": "Create Managers", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "manager" ], "summary": "Create Managers", "parameters": [ { "description": "Create manager", "name": "manger", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.CreateManagerReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/managers/{id}": { "put": { "description": "Update Managers", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Managers" ], "summary": "Update Managers", "parameters": [ { "description": "Update Managers", "name": "Managers", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.updateUserReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/operation": { "post": { "description": "Creates a operation", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "branch" ], "summary": "Create a operation", "parameters": [ { "description": "Creates operation", "name": "createBranchOperation", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.CreateBranchOperationReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.BranchOperationRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/prematch/events": { "get": { "description": "Retrieve all upcoming events from the database", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "prematch" ], "summary": "Retrieve all upcoming events", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/domain.UpcomingEvent" } } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/prematch/events/{id}": { "get": { "description": "Retrieve an upcoming event by ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "prematch" ], "summary": "Retrieve an upcoming by ID", "parameters": [ { "type": "string", "description": "ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.UpcomingEvent" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/prematch/odds": { "get": { "description": "Retrieve all prematch odds from the database", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "prematch" ], "summary": "Retrieve all prematch odds", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/domain.Odd" } } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/prematch/odds/raw/{market_id}": { "get": { "description": "Retrieve raw odds records using a Market ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "prematch" ], "summary": "Retrieve raw odds by Market ID", "parameters": [ { "type": "string", "description": "Market ID", "name": "market_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/domain.RawOddsByMarketID" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/prematch/odds/upcoming/{upcoming_id}": { "get": { "description": "Retrieve prematch odds by upcoming event ID (FI from Bet365) with optional pagination", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "prematch" ], "summary": "Retrieve prematch odds by upcoming ID (FI)", "parameters": [ { "type": "string", "description": "Upcoming Event ID (FI)", "name": "upcoming_id", "in": "path", "required": true }, { "type": "integer", "description": "Number of results to return (default: 10)", "name": "limit", "in": "query" }, { "type": "integer", "description": "Number of results to skip (default: 0)", "name": "offset", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/domain.Odd" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/prematch/odds/{event_id}": { "get": { "description": "Retrieve prematch odds for a specific event by event ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "prematch" ], "summary": "Retrieve prematch odds for an event", "parameters": [ { "type": "string", "description": "Event ID", "name": "event_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/domain.Odd" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/search/branch": { "get": { "description": "Search branches by name or location", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "branch" ], "summary": "Search branches", "parameters": [ { "type": "string", "description": "Search query", "name": "q", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/handlers.BranchDetailRes" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/supportedOperation": { "get": { "description": "Gets all supported operations", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "branch" ], "summary": "Gets all supported operations", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/handlers.BranchDetailRes" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "post": { "description": "Creates a supported operation", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "branch" ], "summary": "Create a supported operation", "parameters": [ { "description": "Creates supported operation", "name": "createSupportedOperation", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.CreateSupportedOperationReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.SupportedOperationRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/ticket": { "get": { "description": "Retrieve all tickets", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "ticket" ], "summary": "Get all tickets", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/handlers.TicketRes" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "post": { "description": "Creates a temporary ticket", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "ticket" ], "summary": "Create a temporary ticket", "parameters": [ { "description": "Creates ticket", "name": "createTicket", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.CreateTicketReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.CreateTicketRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/ticket/{id}": { "get": { "description": "Retrieve ticket details by ticket ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "ticket" ], "summary": "Get ticket by ID", "parameters": [ { "type": "integer", "description": "Ticket ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.TicketRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/transaction": { "get": { "description": "Gets all the transactions", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "transaction" ], "summary": "Gets all transactions", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/handlers.TransactionRes" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "post": { "description": "Creates a transaction", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "transaction" ], "summary": "Create a transaction", "parameters": [ { "description": "Creates transaction", "name": "createBet", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.CreateTransactionReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.TransactionRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/transaction/{id}": { "get": { "description": "Gets a single transaction by id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "transaction" ], "summary": "Gets transaction by id", "parameters": [ { "type": "integer", "description": "Transaction ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.TransactionRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "patch": { "description": "Updates the cashed out field", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "transaction" ], "summary": "Updates the cashed out field", "parameters": [ { "type": "integer", "description": "Transaction ID", "name": "id", "in": "path", "required": true }, { "description": "Updates Transaction Verification", "name": "updateCashOut", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.UpdateTransactionVerifiedReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/transfer/refill/:id": { "post": { "description": "Super Admin route to refill a wallet", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "transfer" ], "summary": "Refill wallet", "parameters": [ { "description": "Create Transfer", "name": "refillWallet", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.CreateTransferReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.TransferWalletRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/transfer/wallet/:id": { "post": { "description": "Create a transfer to wallet", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "transfer" ], "summary": "Create a transfer to wallet", "parameters": [ { "description": "Create Transfer", "name": "transferToWallet", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.CreateTransferReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.TransferWalletRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/transfer/wallet/{id}": { "get": { "description": "Get transfer by wallet", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "transfer" ], "summary": "Get transfer by wallet", "parameters": [ { "description": "Create Transfer", "name": "transferToWallet", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.CreateTransferReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.TransferWalletRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/user/checkPhoneEmailExist": { "post": { "description": "Check if phone number or email exist", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Check if phone number or email exist", "parameters": [ { "description": "Check phone number or email exist", "name": "checkPhoneEmailExist", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.CheckPhoneEmailExistReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.CheckPhoneEmailExistRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/user/profile": { "get": { "security": [ { "Bearer": [] } ], "description": "Get user profile", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Get user profile", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.UserProfileRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/user/register": { "post": { "description": "Register user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Register user", "parameters": [ { "description": "Register user", "name": "registerUser", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.RegisterUserReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/user/resetPassword": { "post": { "description": "Reset password", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Reset password", "parameters": [ { "description": "Reset password", "name": "resetPassword", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.ResetPasswordReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/user/search": { "post": { "description": "Search for user using name or phone", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Search for user using name or phone", "parameters": [ { "description": "Search for using his name or phone", "name": "searchUserByNameOrPhone", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.SearchUserByNameOrPhoneReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.UserProfileRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/user/sendRegisterCode": { "post": { "description": "Send register code", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Send register code", "parameters": [ { "description": "Send register code", "name": "registerCode", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.RegisterCodeReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/user/sendResetCode": { "post": { "description": "Send reset code", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Send reset code", "parameters": [ { "description": "Send reset code", "name": "resetCode", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.ResetCodeReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/user/wallet": { "get": { "security": [ { "Bearer": [] } ], "description": "Retrieve customer wallet details", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "wallet" ], "summary": "Get customer wallet", "parameters": [ { "type": "integer", "description": "Company ID", "name": "company_id", "in": "header", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.CustomerWalletRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/wallet": { "get": { "description": "Retrieve all wallets", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "wallet" ], "summary": "Get all wallets", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/handlers.WalletRes" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/wallet/{id}": { "get": { "description": "Retrieve wallet details by wallet ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "wallet" ], "summary": "Get wallet by ID", "parameters": [ { "type": "integer", "description": "Wallet ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.WalletRes" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "patch": { "description": "Can activate and deactivate wallet", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "wallet" ], "summary": "Activate and Deactivate Wallet", "parameters": [ { "type": "integer", "description": "Wallet ID", "name": "id", "in": "path", "required": true }, { "description": "Update Wallet Active", "name": "updateCashOut", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.UpdateWalletActiveReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } } }, "definitions": { "domain.BetOutcome": { "type": "object", "properties": { "betID": { "type": "integer" }, "eventID": { "type": "integer" }, "id": { "type": "integer" }, "oddID": { "type": "integer" } } }, "domain.BetStatus": { "type": "integer", "enum": [ 0, 1, 2, 3 ], "x-enum-varnames": [ "BET_STATUS_PENDING", "BET_STATUS_WIN", "BET_STATUS_LOSS", "BET_STATUS_ERROR" ] }, "domain.Odd": { "type": "object", "properties": { "category": { "type": "string" }, "event_id": { "type": "string" }, "fetched_at": { "type": "string" }, "fi": { "type": "string" }, "handicap": { "type": "string" }, "is_active": { "type": "boolean" }, "market_category": { "type": "string" }, "market_id": { "type": "string" }, "market_name": { "type": "string" }, "market_type": { "type": "string" }, "name": { "type": "string" }, "odds_value": { "type": "number" }, "raw_odds": { "type": "array", "items": {} }, "section": { "type": "string" }, "source": { "type": "string" } } }, "domain.PaymentOption": { "type": "integer", "enum": [ 0, 1, 2, 3 ], "x-enum-varnames": [ "CASH_TRANSACTION", "TELEBIRR_TRANSACTION", "ARIFPAY_TRANSACTION", "BANK" ] }, "domain.RawOddsByMarketID": { "type": "object", "properties": { "fetched_at": { "type": "string" }, "id": { "type": "integer" }, "raw_odds": { "type": "array", "items": {} } } }, "domain.Role": { "type": "string", "enum": [ "super_admin", "admin", "branch_manager", "customer", "cashier" ], "x-enum-varnames": [ "RoleSuperAdmin", "RoleAdmin", "RoleBranchManager", "RoleCustomer", "RoleCashier" ] }, "domain.TicketOutcome": { "type": "object", "properties": { "event_id": { "type": "integer", "example": 1 }, "id": { "type": "integer", "example": 1 }, "odd_id": { "type": "integer", "example": 1 }, "ticket_id": { "type": "integer", "example": 1 } } }, "domain.UpcomingEvent": { "type": "object", "properties": { "awayKitImage": { "description": "Kit or image for away team (optional)", "type": "string" }, "awayTeam": { "description": "Away team name (can be empty/null)", "type": "string" }, "awayTeamID": { "description": "Away team ID (can be empty/null)", "type": "string" }, "homeKitImage": { "description": "Kit or image for home team (optional)", "type": "string" }, "homeTeam": { "description": "Home team name (if available)", "type": "string" }, "homeTeamID": { "description": "Home team ID", "type": "string" }, "id": { "description": "Event ID", "type": "string" }, "leagueCC": { "description": "League country code", "type": "string" }, "leagueID": { "description": "League ID", "type": "string" }, "leagueName": { "description": "League name", "type": "string" }, "matchName": { "description": "Match or event name", "type": "string" }, "sportID": { "description": "Sport ID", "type": "string" }, "startTime": { "description": "Converted from \"time\" field in UNIX format", "type": "string" } } }, "handlers.BetOutcome": { "type": "object", "properties": { "event_id": { "type": "integer", "example": 1 }, "odd_id": { "type": "integer", "example": 1 } } }, "handlers.BetRes": { "type": "object", "properties": { "amount": { "type": "number", "example": 100 }, "branch_id": { "type": "integer", "example": 2 }, "full_name": { "type": "string", "example": "John" }, "id": { "type": "integer", "example": 1 }, "is_shop_bet": { "type": "boolean", "example": false }, "outcomes": { "type": "array", "items": { "$ref": "#/definitions/domain.BetOutcome" } }, "phone_number": { "type": "string", "example": "1234567890" }, "status": { "allOf": [ { "$ref": "#/definitions/domain.BetStatus" } ], "example": 1 }, "total_odds": { "type": "number", "example": 4.22 }, "user_id": { "type": "integer", "example": 2 } } }, "handlers.BranchDetailRes": { "type": "object", "properties": { "branch_manager_id": { "type": "integer", "example": 1 }, "company_id": { "type": "integer", "example": 1 }, "id": { "type": "integer", "example": 1 }, "is_self_owned": { "type": "boolean", "example": false }, "location": { "type": "string", "example": "Addis Ababa" }, "manager_name": { "type": "string", "example": "John Smith" }, "manager_phone_number": { "type": "string", "example": "0911111111" }, "name": { "type": "string", "example": "4-kilo Branch" }, "wallet_id": { "type": "integer", "example": 1 } } }, "handlers.BranchOperationRes": { "type": "object", "properties": { "description": { "type": "string", "example": "Betting on sport events" }, "name": { "type": "string", "example": "SportsBook" } } }, "handlers.BranchRes": { "type": "object", "properties": { "branch_manager_id": { "type": "integer", "example": 1 }, "company_id": { "type": "integer", "example": 1 }, "id": { "type": "integer", "example": 1 }, "is_self_owned": { "type": "boolean", "example": false }, "location": { "type": "string", "example": "Addis Ababa" }, "name": { "type": "string", "example": "4-kilo Branch" }, "wallet_id": { "type": "integer", "example": 1 } } }, "handlers.CheckPhoneEmailExistReq": { "type": "object", "properties": { "email": { "type": "string", "example": "john.doe@example.com" }, "phone_number": { "type": "string", "example": "1234567890" } } }, "handlers.CheckPhoneEmailExistRes": { "type": "object", "properties": { "email_exist": { "type": "boolean" }, "phone_number_exist": { "type": "boolean" } } }, "handlers.CreateBetReq": { "type": "object", "properties": { "amount": { "type": "number", "example": 100 }, "full_name": { "type": "string", "example": "John" }, "is_shop_bet": { "type": "boolean", "example": false }, "outcomes": { "type": "array", "items": { "$ref": "#/definitions/handlers.BetOutcome" } }, "phone_number": { "type": "string", "example": "1234567890" }, "status": { "allOf": [ { "$ref": "#/definitions/domain.BetStatus" } ], "example": 1 }, "total_odds": { "type": "number", "example": 4.22 } } }, "handlers.CreateBranchOperationReq": { "type": "object", "properties": { "branch_id": { "type": "integer", "example": 1 }, "operation_id": { "type": "integer", "example": 1 } } }, "handlers.CreateBranchReq": { "type": "object", "properties": { "branch_manager_id": { "type": "integer", "example": 1 }, "company_id": { "type": "integer", "example": 1 }, "is_self_owned": { "type": "boolean", "example": false }, "location": { "type": "string", "example": "Addis Ababa" }, "name": { "type": "string", "example": "4-kilo Branch" }, "operations": { "type": "array", "items": { "type": "integer" } } } }, "handlers.CreateCashierReq": { "type": "object", "properties": { "branch_id": { "type": "integer", "example": 1 }, "email": { "type": "string", "example": "john.doe@example.com" }, "first_name": { "type": "string", "example": "John" }, "last_name": { "type": "string", "example": "Doe" }, "password": { "type": "string", "example": "password123" }, "phone_number": { "type": "string", "example": "1234567890" } } }, "handlers.CreateManagerReq": { "type": "object", "properties": { "email": { "type": "string", "example": "john.doe@example.com" }, "first_name": { "type": "string", "example": "John" }, "last_name": { "type": "string", "example": "Doe" }, "password": { "type": "string", "example": "password123" }, "phone_number": { "type": "string", "example": "1234567890" } } }, "handlers.CreateSupportedOperationReq": { "type": "object", "properties": { "description": { "type": "string", "example": "Betting on sport events" }, "name": { "type": "string", "example": "SportsBook" } } }, "handlers.CreateTicketReq": { "type": "object", "properties": { "amount": { "type": "number", "example": 100 }, "outcomes": { "type": "array", "items": { "$ref": "#/definitions/handlers.TicketOutcome" } }, "total_odds": { "type": "number", "example": 4.22 } } }, "handlers.CreateTicketRes": { "type": "object", "properties": { "created_number": { "type": "integer", "example": 3 }, "fast_code": { "type": "integer", "example": 1234 } } }, "handlers.CreateTransactionReq": { "type": "object", "properties": { "account_name": { "type": "string" }, "account_number": { "type": "string" }, "amount": { "type": "number", "example": 100 }, "bank_code": { "description": "Payment Details for bank", "type": "string" }, "beneficiary_name": { "type": "string" }, "bet_id": { "type": "integer", "example": 1 }, "branch_id": { "type": "integer", "example": 1 }, "cashier_id": { "type": "integer", "example": 1 }, "full_name": { "type": "string", "example": "John Smith" }, "payment_option": { "allOf": [ { "$ref": "#/definitions/domain.PaymentOption" } ], "example": 1 }, "phone_number": { "type": "string", "example": "0911111111" }, "reference_number": { "type": "string" }, "type": { "type": "integer", "example": 1 } } }, "handlers.CreateTransferReq": { "type": "object", "properties": { "amount": { "type": "number", "example": 100 }, "payment_method": { "type": "string", "example": "cash" } } }, "handlers.CustomerWalletRes": { "type": "object", "properties": { "company_id": { "type": "integer", "example": 1 }, "created_at": { "type": "string" }, "customer_id": { "type": "integer", "example": 1 }, "id": { "type": "integer", "example": 1 }, "regular_balance": { "type": "number", "example": 100 }, "regular_id": { "type": "integer", "example": 1 }, "regular_updated_at": { "type": "string" }, "static_balance": { "type": "number", "example": 100 }, "static_id": { "type": "integer", "example": 1 }, "static_updated_at": { "type": "string" } } }, "handlers.RegisterCodeReq": { "type": "object", "properties": { "email": { "type": "string", "example": "john.doe@example.com" }, "phone_number": { "type": "string", "example": "1234567890" } } }, "handlers.RegisterUserReq": { "type": "object", "properties": { "email": { "type": "string", "example": "john.doe@example.com" }, "first_name": { "type": "string", "example": "John" }, "last_name": { "type": "string", "example": "Doe" }, "otp": { "description": "Role string", "type": "string", "example": "123456" }, "password": { "type": "string", "example": "password123" }, "phone_number": { "type": "string", "example": "1234567890" }, "referal_code": { "type": "string", "example": "ABC123" } } }, "handlers.ResetCodeReq": { "type": "object", "properties": { "email": { "type": "string", "example": "john.doe@example.com" }, "phone_number": { "type": "string", "example": "1234567890" } } }, "handlers.ResetPasswordReq": { "type": "object", "properties": { "email": { "type": "string" }, "otp": { "type": "string" }, "password": { "type": "string" }, "phoneNumber": { "type": "string" } } }, "handlers.SearchUserByNameOrPhoneReq": { "type": "object", "properties": { "searchString": { "type": "string" } } }, "handlers.SupportedOperationRes": { "type": "object", "properties": { "description": { "type": "string", "example": "Betting on sport events" }, "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "SportsBook" } } }, "handlers.TicketOutcome": { "type": "object", "properties": { "event_id": { "type": "integer", "example": 1 }, "odd_id": { "type": "integer", "example": 1 } } }, "handlers.TicketRes": { "type": "object", "properties": { "amount": { "type": "number", "example": 100 }, "id": { "type": "integer", "example": 1 }, "outcomes": { "type": "array", "items": { "$ref": "#/definitions/domain.TicketOutcome" } }, "total_odds": { "type": "number", "example": 4.22 } } }, "handlers.TransactionRes": { "type": "object", "properties": { "account_name": { "type": "string" }, "account_number": { "type": "string" }, "amount": { "type": "number", "example": 100 }, "bank_code": { "type": "string" }, "beneficiary_name": { "type": "string" }, "bet_id": { "type": "integer", "example": 1 }, "branch_id": { "type": "integer", "example": 1 }, "cashier_id": { "type": "integer", "example": 1 }, "full_name": { "type": "string", "example": "John Smith" }, "id": { "type": "integer", "example": 1 }, "payment_option": { "allOf": [ { "$ref": "#/definitions/domain.PaymentOption" } ], "example": 1 }, "phone_number": { "type": "string", "example": "0911111111" }, "reference_number": { "type": "string" }, "type": { "type": "integer", "example": 1 }, "verified": { "type": "boolean", "example": true } } }, "handlers.TransferWalletRes": { "type": "object", "properties": { "amount": { "type": "number", "example": 100 }, "cashier_id": { "type": "integer", "example": 789 }, "created_at": { "type": "string", "example": "2025-04-08T12:00:00Z" }, "id": { "type": "integer", "example": 1 }, "payment_method": { "type": "string", "example": "bank" }, "receiver_wallet_id": { "type": "integer", "example": 1 }, "sender_wallet_id": { "type": "integer", "example": 1 }, "type": { "type": "string", "example": "transfer" }, "updated_at": { "type": "string", "example": "2025-04-08T12:30:00Z" }, "verified": { "type": "boolean", "example": true } } }, "handlers.UpdateCashOutReq": { "type": "object", "properties": { "cashedOut": { "type": "boolean" } } }, "handlers.UpdateTransactionVerifiedReq": { "type": "object", "properties": { "verified": { "type": "boolean" } } }, "handlers.UpdateWalletActiveReq": { "type": "object", "properties": { "isActive": { "type": "boolean" } } }, "handlers.UserProfileRes": { "type": "object", "properties": { "created_at": { "type": "string" }, "email": { "type": "string" }, "email_verified": { "type": "boolean" }, "first_name": { "type": "string" }, "id": { "type": "integer" }, "last_name": { "type": "string" }, "phone_number": { "type": "string" }, "phone_verified": { "type": "boolean" }, "role": { "$ref": "#/definitions/domain.Role" }, "suspended": { "type": "boolean" }, "suspended_at": { "type": "string" }, "updated_at": { "type": "string" } } }, "handlers.WalletRes": { "type": "object", "properties": { "amount": { "type": "number", "example": 100 }, "created_at": { "type": "string" }, "id": { "type": "integer", "example": 1 }, "is_active": { "type": "boolean", "example": true }, "is_bettable": { "type": "boolean", "example": true }, "is_transferable": { "type": "boolean", "example": true }, "is_withdraw": { "type": "boolean", "example": true }, "updated_at": { "type": "string" }, "user_id": { "type": "integer", "example": 1 } } }, "handlers.loginCustomerReq": { "type": "object", "properties": { "email": { "type": "string", "example": "john.doe@example.com" }, "password": { "type": "string", "example": "password123" }, "phone_number": { "type": "string", "example": "1234567890" } } }, "handlers.loginCustomerRes": { "type": "object", "properties": { "access_token": { "type": "string" }, "refresh_token": { "type": "string" }, "role": { "type": "string" } } }, "handlers.logoutReq": { "type": "object", "properties": { "refresh_token": { "type": "string" } } }, "handlers.refreshToken": { "type": "object", "properties": { "access_token": { "type": "string" }, "refresh_token": { "type": "string" } } }, "handlers.updateUserReq": { "type": "object", "properties": { "first_name": { "type": "string", "example": "John" }, "last_name": { "type": "string", "example": "Doe" }, "suspended": { "type": "boolean", "example": false } } }, "response.APIResponse": { "type": "object", "properties": { "data": {}, "message": { "type": "string" }, "metadata": {}, "status": { "$ref": "#/definitions/response.Status" }, "timestamp": { "type": "string" } } }, "response.Status": { "type": "string", "enum": [ "error", "success" ], "x-enum-varnames": [ "Error", "Success" ] } }, "securityDefinitions": { "Bearer": { "type": "apiKey", "name": "Authorization", "in": "header" } } }