Skip to content

Returns, Regjected and Resettle bets API

Returns and Rejects

Returns queue in RabbotMQ: bet-returns-queue

Resettle queue in RabbitMQ: bet-resettled-queue

Blocked/Ublocked queue in RabbitMQ: bet-blocked-queue

Rejects queue in RabbitMQL: bet-rejected-queue

Crucial fields:

Field Data Types Description
rejectReason String rejection reasons for rejected bets, should be empty for returned bets
rejectReasonMessage String detailed rejection reasons message
rejectTime Date Rejection time
settlementStatus String type of settle - Resettled or CanceledSettle
betId Date Information about bet id
result enum type of result - for return: 3 - "Return" and 6 - "TechnicalReturn"
actionType enum actionType: 4 - "Blocked" and 5 - "Unblocked"

Returns - bet returns Resettle - manual resettlment of actual result or result cancellation
Blocked/Ublocked - bet was blocked or unblocked after blocking

in message hedaer you can see bet-status header with text "Return", "TechnicalRetun" - for bet-returns-queue and "Blocked", "Unblocked" for bet-blocked-queue

Full schema

{
    "name": "Bet",
    "doc": "The sport bet metadata",
    "fields": [
        {
            "name": "RejectReason",
            "type": [
                "null",
                "string"
            ],
            "doc": "Information about reject reason",
            "default": null
        },
        {
            "name": "RejectReasonMessage",
            "type": [
                "null",
                "string"
            ],
            "doc": "Information about reject reason message",
            "default": null
        },
        {
            "name": "RejectTime",
            "type": [
                "null",
                "string"
            ],
            "doc": "Information about reject time",
            "default": null
        },
        {
            "name": "BetId",
            "type": "string",
            "doc": "Information about bet id"
        },
        {
            "name": "CreateTime",
            "type": "string",
            "doc": "Information about create time"
        },
        {
            "name": "AcceptTime",
            "type": [
                "null",
                "string"
            ],
            "doc": "Information about accept time",
            "default": null
        },
        {
            "name": "SettlementTime",
            "type": [
                "null",
                "string"
            ],
            "doc": "Information about settlement time",
            "default": null
        },
        {
            "name": "UpdateTime",
            "type": [
                "null",
                "string"
            ],
            "doc": "Information about update time",
            "default": null
        },
        {
            "name": "RejectTimestamp",
            "type": [
                "null",
                {
                    "type": "long",
                    "logicalType": "timestamp-micros"
                }
            ],
            "doc": "Information about reject timestamp",
            "default": null
        },
        {
            "name": "CreateTimestamp",
            "type": [
                "null",
                {
                    "type": "long",
                    "logicalType": "timestamp-micros"
                }
            ],
            "doc": "Information about create timestamp",
            "default": null
        },
        {
            "name": "AcceptTimestamp",
            "type": [
                "null",
                {
                    "type": "long",
                    "logicalType": "timestamp-micros"
                }
            ],
            "doc": "Information about accept timestamp",
            "default": null
        },
        {
            "name": "SettlementTimestamp",
            "type": [
                "null",
                {
                    "type": "long",
                    "logicalType": "timestamp-micros"
                }
            ],
            "doc": "Information about settlement timestamp",
            "default": null
        },
        {
            "name": "UpdateTimestamp",
            "type": [
                "null",
                {
                    "type": "long",
                    "logicalType": "timestamp-micros"
                }
            ],
            "doc": "Information about update timestamp",
            "default": null
        },
        {
            "name": "Delay",
            "type": [
                "null",
                "string"
            ],
            "doc": "Information about delay",
            "default": null
        },
        {
            "name": "PlayerId",
            "type": "string",
            "doc": "Information about player id"
        },
        {
            "name": "PlayerBetNumber",
            "type": [
                "null",
                "int"
            ],
            "doc": "Information about player bet number",
            "default": null
        },
        {
            "name": "PriceChangePolicy",
            "type": {
                "type": "enum",
                "name": "PriceChangePolicy",
                "symbols": [
                    "Rise",
                    "None",
                    "Any"
                ]
            },
            "doc": "Information about price change policy",
            "default": "None"
        },
        {
            "name": "playerProfitStatus",
            "type": [
                "null",
                "int"
            ],
            "doc": "Information about player profit status",
            "default": null
        },
        {
            "name": "PlayerSegmentId",
            "type": [
                "null",
                "int"
            ],
            "doc": "Information about player segment id",
            "default": null
        },
        {
            "name": "PlayerFairplaySegmentId",
            "type": [
                "null",
                "int"
            ],
            "doc": "Information about player fairplay segment id",
            "default": null
        },
        {
            "name": "PlayerIp",
            "type": [
                "null",
                "string"
            ],
            "doc": "Information about player ip",
            "default": null
        },
        {
            "name": "Amount",
            "type": "double",
            "doc": "Information about amount"
        },
        {
            "name": "BaseAmount",
            "type": "double",
            "doc": "Information about base amount",
            "default": 0
        },
        {
            "name": "RemainingAmount",
            "type": [
                "null",
                "double"
            ],
            "doc": "Information about remaining bet amount",
            "default": null
        },
        {
            "name": "RemainingBaseAmount",
            "type": [
                "null",
                "double"
            ],
            "doc": "Information about remaining bet base amount",
            "default": null
        },
        {
            "name": "Currency",
            "type": "string",
            "doc": "Information about currency"
        },
        {
            "name": "ExchangeRate",
            "type": [
                "null",
                "double"
            ],
            "doc": "Information about exchange rate",
            "default": null
        },
        {
            "name": "BetType",
            "type": {
                "type": "enum",
                "name": "BetType",
                "symbols": [
                    "None",
                    "Ordinar",
                    "Express",
                    "System"
                ]
            },
            "doc": "Information about bet type"
        },
        {
            "name": "BetSize",
            "type": "int",
            "doc": "Information about bet size"
        },
        {
            "name": "SystemSize",
            "type": "int",
            "doc": "Information about system size"
        },
        {
            "name": "OriginalBetOdd",
            "type": [
                "null",
                "double"
            ],
            "doc": "Information about original bet odd",
            "default": null
        },
        {
            "name": "AcceptedBetOdd",
            "type": [
                "null",
                "double"
            ],
            "doc": "Information about accepted bet odd",
            "default": null
        },
        {
            "name": "Channel",
            "type": "string",
            "doc": "Information about channel"
        },
        {
            "name": "Brand",
            "type": "string",
            "doc": "Information about brand"
        },
        {
            "name": "OperatorId",
            "type": "string",
            "doc": "Information about operator id"
        },
        {
            "name": "IsBlocked",
            "type": "boolean",
            "doc": "Information about is blocked",
            "default": false
        },
        {
            "name": "IsMaxBet",
            "type": "boolean",
            "doc": "Information about is max bet",
            "default": false
        },
        {
            "name": "IsOverask",
            "type": "boolean",
            "doc": "Information about is overask",
            "default": false
        },
        {
            "name": "IsTestBet",
            "type": "boolean",
            "doc": "Information about is test bet",
            "default": false
        },
        {
            "name": "IsOpenBet",
            "type": "boolean",
            "doc": "Information about is open bet",
            "default": false
        },
        {
            "name": "Bonus",
            "type": [
                "null",
                {
                    "type": "record",
                    "name": "Bonus",
                    "doc": "Information about bonus",
                    "fields": [
                        {
                            "name": "IsExpressBoost",
                            "type": "boolean",
                            "doc": "Information about is express boost",
                            "default": false
                        },
                        {
                            "name": "ExpressBoostPayout",
                            "type": [
                                "null",
                                "double"
                            ],
                            "doc": "Information about express boost payout",
                            "default": null
                        },
                        {
                            "name": "ExpressBoostAcceptedTotalItems",
                            "type": [
                                "null",
                                "double"
                            ],
                            "doc": "Information about express boost accepted total items",
                            "default": null
                        },
                        {
                            "name": "ExpressBoostOriginalOdd",
                            "type": [
                                "null",
                                "double"
                            ],
                            "doc": "Information about express boost original odd",
                            "default": null
                        },
                        {
                            "name": "ExpressBoostOriginalTotalItems",
                            "type": [
                                "null",
                                "double"
                            ],
                            "doc": "Information about express boost original total items",
                            "default": null
                        },
                        {
                            "name": "IsFreeBet",
                            "type": "boolean",
                            "doc": "Information about is free bet",
                            "default": false
                        },
                        {
                            "name": "FreeBetId",
                            "type": [
                                "null",
                                "string"
                            ],
                            "doc": "Information about free bet id",
                            "default": null
                        }
                    ]
                }
            ],
            "doc": "Information about bonus",
            "default": null
        },
        {
            "name": "PayoutBalances",
            "type": [
                "null",
                {
                    "type": "record",
                    "name": "PayoutBalances",
                    "doc": "List of payout balances records",
                    "fields": [
                        {
                            "name": "BonusPayout",
                            "type": [
                                "null",
                                "double"
                            ],
                            "doc": "Information about bonus payout",
                            "default": null
                        },
                        {
                            "name": "LockedPayout",
                            "type": [
                                "null",
                                "double"
                            ],
                            "doc": "Information about locked payout",
                            "default": null
                        },
                        {
                            "name": "RetractPayout",
                            "type": [
                                "null",
                                "double"
                            ],
                            "doc": "Information about retract payout",
                            "default": null
                        }
                    ]
                }
            ],
            "doc": "Information about payout balances",
            "default": null
        },
        {
            "name": "PlayerBonusOffer",
            "type": [
                "null",
                {
                    "type": "record",
                    "name": "PlayerBonusOffer",
                    "doc": "Information about player bonus offer",
                    "fields": [
                        {
                            "name": "PlayerOfferId",
                            "type": "string",
                            "doc": "Information about player bonus offer"
                        },
                        {
                            "name": "OfferId",
                            "type": "string",
                            "doc": "Information about offer id"
                        },
                        {
                            "name": "OfferType",
                            "type": "string",
                            "doc": "Information about offer type"
                        },
                        {
                            "name": "BonusAmountRate",
                            "type": [
                                "null",
                                "double"
                            ],
                            "doc": "Information about bonus amount rate",
                            "default": null
                        }
                    ]
                }
            ],
            "doc": "Information about player bonus offer",
            "default": null
        },
        {
            "name": "Result",
            "type": [
                "null",
                {
                    "type": "enum",
                    "name": "SettlementResult",
                    "symbols": [
                        "Unknown",
                        "Win",
                        "Lose",
                        "Return",
                        "Return025",
                        "Return075",
                        "TechnicalReturn",
                        "Cashout",
                        "DeadHeat"
                    ]
                }
            ],
            "doc": "Information about settlement result",
            "default": null
        },
        {
            "name": "SettlementStatus",
            "type": [
                "null",
                {
                    "type": "enum",
                    "name": "SettlementStatus",
                    "symbols": [
                        "Unsettled",
                        "Settled",
                        "Resettled",
                        "Unchanged",
                        "CanceledSettle"
                    ]
                }
            ],
            "doc": "Information about settlement status",
            "default": null
        },
        {
            "name": "BlockState",
            "type": [
                "null",
                {
                    "type": "enum",
                    "name": "BlockState",
                    "symbols": [
                        "NeverBlocked",
                        "Blocked",
                        "WasBlocked"
                    ]
                }
            ],
            "doc": "Information about block state",
            "default": null
        },
        {
            "name": "SettlementExchangeRate",
            "type": [
                "null",
                "double"
            ],
            "doc": "Information about settlement exchange rate",
            "default": null
        },
        {
            "name": "IsManual",
            "type": [
                "null",
                "boolean"
            ],
            "doc": "Information about is manual",
            "default": null
        },
        {
            "name": "Payout",
            "type": [
                "null",
                "double"
            ],
            "doc": "Information about payout",
            "default": null
        },
        {
            "name": "Profit",
            "type": [
                "null",
                "double"
            ],
            "doc": "Information about profit",
            "default": null
        },
        {
            "name": "BasePayout",
            "type": [
                "null",
                "double"
            ],
            "doc": "Information about base payout",
            "default": null
        },
        {
            "name": "BaseProfit",
            "type": [
                "null",
                "double"
            ],
            "doc": "Information about base profit",
            "default": null
        },
        {
            "name": "Tax",
            "type": [
                "null",
                "double"
            ],
            "doc": "Information about tax",
            "default": null
        },
        {
            "name": "payoutWithTax",
            "type": [
                "null",
                "double"
            ],
            "doc": "Information about payout with tax",
            "default": null
        },
        {
            "name": "ActionType",
            "type": [
                "null",
                {
                    "type": "enum",
                    "name": "ActionType",
                    "symbols": [
                        "Rejected",
                        "Accepted",
                        "ItemsSettled",
                        "ItemsAdded",
                        "Blocked",
                        "Unblocked"
                    ]
                }
            ],
            "doc": "Information about action type",
            "default": null
        },
        {
            "name": "PlacementMode",
            "type": {
                "type": "enum",
                "name": "PlacementMode",
                "symbols": [
                    "None",
                    "Fancy"
                ],
                "default": "None"
            },
            "doc": "Information about placement mode",
            "default": "None"
        },
        {
            "name": "PartialCashouts",
            "type": [
                "null",
                {
                    "type": "array",
                    "items": {
                        "type": "record",
                        "name": "PartialCashout",
                        "fields": [
                            {
                                "name": "Index",
                                "type": "int",
                                "doc": "Information about partial cashout index"
                            },
                            {
                                "name": "TransactionTime",
                                "type": [
                                    "null",
                                    "string"
                                ],
                                "doc": "Information about partial cashout settle time",
                                "default": null
                            },
                            {
                                "name": "Odd",
                                "type": [
                                    "null",
                                    "double"
                                ],
                                "doc": "Information about partial cashout odd",
                                "default": null
                            },
                            {
                                "name": "SettlementExchangeRate",
                                "type": [
                                    "null",
                                    "double"
                                ],
                                "doc": "Information about partial cashout exchange rate",
                                "default": null
                            },
                            {
                                "name": "ResettlementComment",
                                "type": [
                                    "null",
                                    "string"
                                ],
                                "doc": "Information about resettlement comment",
                                "default": null
                            },
                            {
                                "name": "SettlementData",
                                "type": {
                                    "type": "record",
                                    "name": "SettlementData",
                                    "doc": "Settlement info",
                                    "fields": [
                                        {
                                            "name": "Amount",
                                            "type": [
                                                "null",
                                                "double"
                                            ],
                                            "doc": "Information about partial cashout amount",
                                            "default": null
                                        },
                                        {
                                            "name": "BaseAmount",
                                            "type": [
                                                "null",
                                                "double"
                                            ],
                                            "doc": "Information about partial cashout base amount",
                                            "default": null
                                        },
                                        {
                                            "name": "Payout",
                                            "type": [
                                                "null",
                                                "double"
                                            ],
                                            "doc": "Information about partial cashout payout",
                                            "default": null
                                        },
                                        {
                                            "name": "BasePayout",
                                            "type": [
                                                "null",
                                                "double"
                                            ],
                                            "doc": "Information about partial cashout base payout",
                                            "default": null
                                        },
                                        {
                                            "name": "Profit",
                                            "type": [
                                                "null",
                                                "double"
                                            ],
                                            "doc": "Information about partial cashout profit",
                                            "default": null
                                        },
                                        {
                                            "name": "BaseProfit",
                                            "type": [
                                                "null",
                                                "double"
                                            ],
                                            "doc": "Information about partial cashout base profit",
                                            "default": null
                                        },
                                        {
                                            "name": "Tax",
                                            "type": [
                                                "null",
                                                "double"
                                            ],
                                            "doc": "Information about partial cashout tax",
                                            "default": null
                                        },
                                        {
                                            "name": "Result",
                                            "type": [
                                                "null",
                                                "SettlementResult"
                                            ],
                                            "doc": "Information about partial cashout result",
                                            "default": null
                                        }
                                    ]
                                },
                                "doc": "Details of partial settlement."
                            }
                        ]
                    }
                }
            ],
            "doc": "Information about partial cashouts",
            "default": null
        },
        {
            "name": "Items",
            "type": {
                "type": "array",
                "items": {
                    "type": "record",
                    "name": "BetItem",
                    "fields": [
                        {
                            "name": "ItemIndex",
                            "type": "int",
                            "doc": "Information about item index"
                        },
                        {
                            "name": "OutcomeType",
                            "type": {
                                "type": "enum",
                                "name": "OutcomeType",
                                "symbols": [
                                    "Simple",
                                    "Built"
                                ]
                            },
                            "doc": "Information about outcome type"
                        },
                        {
                            "name": "EventStage",
                            "type": {
                                "type": "enum",
                                "name": "EventStage",
                                "symbols": [
                                    "None",
                                    "Prematch",
                                    "Live"
                                ]
                            },
                            "doc": "Information about event stage"
                        },
                        {
                            "name": "OriginalOdd",
                            "type": "double",
                            "doc": "Information about original odd"
                        },
                        {
                            "name": "AcceptedOdd",
                            "type": [
                                "null",
                                "double"
                            ],
                            "doc": "Information about accepted odd",
                            "default": null
                        },
                        {
                            "name": "CashoutOdd",
                            "type": [
                                "null",
                                "double"
                            ],
                            "doc": "Information about cashout odd",
                            "default": null
                        },
                        {
                            "name": "Amount",
                            "type": "double",
                            "doc": "Information about amount"
                        },
                        {
                            "name": "BaseAmount",
                            "type": [
                                "null",
                                "double"
                            ],
                            "doc": "Information about base amount",
                            "default": null
                        },
                        {
                            "name": "RemainingAmount",
                            "type": [
                                "null",
                                "double"
                            ],
                            "doc": "Information about remaining amount in bet item",
                            "default": null
                        },
                        {
                            "name": "RemainingBaseAmount",
                            "type": [
                                "null",
                                "double"
                            ],
                            "doc": "Information about remaining base amount in bet item",
                            "default": null
                        },
                        {
                            "name": "PossiblePayout",
                            "type": [
                                "null",
                                "double"
                            ],
                            "doc": "Information about possible payout",
                            "default": null
                        },
                        {
                            "name": "Payout",
                            "type": [
                                "null",
                                "double"
                            ],
                            "doc": "Information about payout",
                            "default": null
                        },
                        {
                            "name": "profit",
                            "type": [
                                "null",
                                "double"
                            ],
                            "doc": "Information about profit",
                            "default": null
                        },
                        {
                            "name": "Result",
                            "type": [
                                "null",
                                "SettlementResult"
                            ],
                            "doc": "Information about result",
                            "default": null
                        },
                        {
                            "name": "IsAdded",
                            "type": "boolean",
                            "doc": "Information about is added",
                            "default": false
                        },
                        {
                            "name": "Tax",
                            "type": [
                                "null",
                                "double"
                            ],
                            "doc": "Information about tax",
                            "default": null
                        },
                        {
                            "name": "Event",
                            "type": [
                                "null",
                                {
                                    "type": "record",
                                    "name": "Event",
                                    "fields": [
                                        {
                                            "name": "Id",
                                            "type": "string",
                                            "doc": "Information about id"
                                        },
                                        {
                                            "name": "SportTypeKey",
                                            "type": [
                                                "null",
                                                "string"
                                            ],
                                            "doc": "Information about sport type key",
                                            "default": null
                                        },
                                        {
                                            "name": "CategoryId",
                                            "type": "string",
                                            "doc": "Information about category id"
                                        },
                                        {
                                            "name": "TournamentId",
                                            "type": "string",
                                            "doc": "Information about tournament id"
                                        },
                                        {
                                            "name": "CompetitorsIds",
                                            "type": {
                                                "type": "array",
                                                "items": "string"
                                            },
                                            "doc": "Information about competitors ids"
                                        },
                                        {
                                            "name": "Limit",
                                            "type": [
                                                "null",
                                                "double"
                                            ],
                                            "doc": "Information about limit",
                                            "default": null
                                        },
                                        {
                                            "name": "LimitType",
                                            "type": [
                                                "null",
                                                {
                                                    "type": "enum",
                                                    "name": "LimitType",
                                                    "symbols": [
                                                        "Bet",
                                                        "Liability"
                                                    ]
                                                }
                                            ],
                                            "doc": "Information about limit type",
                                            "default": null
                                        }
                                    ]
                                }
                            ],
                            "default": null
                        },
                        {
                            "name": "SourceOutcomes",
                            "type": {
                                "type": "array",
                                "items": {
                                    "type": "record",
                                    "name": "SourceOutcome",
                                    "fields": [
                                        {
                                            "name": "SourceOutcomeIndex",
                                            "type": [
                                                "null",
                                                "int"
                                            ],
                                            "doc": "Information about source outcome index",
                                            "default": null
                                        },
                                        {
                                            "name": "OriginalOdd",
                                            "type": "double",
                                            "doc": "Information about original odd"
                                        },
                                        {
                                            "name": "AcceptedOdd",
                                            "type": [
                                                "null",
                                                "double"
                                            ],
                                            "doc": "Information about accepted odd",
                                            "default": null
                                        },
                                        {
                                            "name": "DefaultOdd",
                                            "type": [
                                                "null",
                                                "double"
                                            ],
                                            "doc": "Information about default odd",
                                            "default": null
                                        },
                                        {
                                            "name": "DefaultSelectionKey",
                                            "type": [
                                                "null",
                                                "string"
                                            ],
                                            "doc": "Information about default selection key",
                                            "default": null
                                        },
                                        {
                                            "name": "Amount",
                                            "type": [
                                                "null",
                                                "double"
                                            ],
                                            "doc": "Information about amount",
                                            "default": null
                                        },
                                        {
                                            "name": "BaseAmount",
                                            "type": [
                                                "null",
                                                "double"
                                            ],
                                            "doc": "Information about base amount",
                                            "default": null
                                        },
                                        {
                                            "name": "PossiblePayout",
                                            "type": [
                                                "null",
                                                "double"
                                            ],
                                            "doc": "Information about possiblep ayout",
                                            "default": null
                                        },
                                        {
                                            "name": "LineItemId",
                                            "type": [
                                                "null",
                                                "string"
                                            ],
                                            "doc": "Information about line item id",
                                            "default": null
                                        },
                                        {
                                            "name": "TradingType",
                                            "type": [
                                                "null",
                                                "string"
                                            ],
                                            "doc": "Information about trading type",
                                            "default": null
                                        },
                                        {
                                            "name": "SelectionKey",
                                            "type": "string",
                                            "doc": "Information about selection key"
                                        },
                                        {
                                            "name": "Trader",
                                            "type": [
                                                "null",
                                                "string"
                                            ],
                                            "doc": "Information about trader",
                                            "default": null
                                        },
                                        {
                                            "name": "DeadHeatFactor",
                                            "type": [
                                                "null",
                                                "double"
                                            ],
                                            "doc": "Information about dead heat factor",
                                            "default": null
                                        },
                                        {
                                            "name": "OriginalScore",
                                            "type": [
                                                "null",
                                                "string"
                                            ],
                                            "doc": "Information about original score",
                                            "default": null
                                        },
                                        {
                                            "name": "Payout",
                                            "type": [
                                                "null",
                                                "double"
                                            ],
                                            "doc": "Information about payout",
                                            "default": null
                                        },
                                        {
                                            "name": "Profit",
                                            "type": [
                                                "null",
                                                "double"
                                            ],
                                            "doc": "Information about profit",
                                            "default": null
                                        },
                                        {
                                            "name": "Result",
                                            "type": [
                                                "null",
                                                "SettlementResult"
                                            ],
                                            "doc": "Information about result",
                                            "default": null
                                        },
                                        {
                                            "name": "ResettlementComment",
                                            "type": [
                                                "null",
                                                "string"
                                            ],
                                            "doc": "Information about resettlement comment",
                                            "default": null
                                        },
                                        {
                                            "name": "Source",
                                            "type": [
                                                "null",
                                                "string"
                                            ],
                                            "doc": "Information about source",
                                            "default": null
                                        }
                                    ]
                                }
                            }
                        },
                        {
                            "name": "PartialCashouts",
                            "type": [
                                "null",
                                {
                                    "type": "array",
                                    "items": {
                                        "type": "record",
                                        "name": "PartialCashoutItem",
                                        "fields": [
                                            {
                                                "name": "ItemIndex",
                                                "type": "int",
                                                "doc": "Information about partial cashout item index"
                                            },
                                            {
                                                "name": "SettlementData",
                                                "type": "SettlementData",
                                                "doc": "Details of partial settlement."
                                            }
                                        ]
                                    }
                                }
                            ],
                            "doc": "Information about partial cashout items",
                            "default": null
                        }
                    ]
                }
            },
            "doc": "Information about items"
        }
    ]
}

possible results: 3 - Return 6 - TechnicalReturn

possible settlementStatus: - Resettled - CanceledSettle