Bet Placement Flow and Responses
Every response POST /cart/place-bet can return, what triggers it, and how to handle it
This page explains how DEFEND processes a bet slip sent to POST /cart/place-bet, and lists every response you can receive. Use it to map each response to an action in your sportsbook.
How DEFEND Processes a Bet Slip
DEFEND runs each bet slip through four stages, in this order. The first stage that fails returns its response, and later stages do not run.
Access check. DEFEND confirms your access token belongs to an operator with active DEFEND access.
Request validation and fixture/market lookup. DEFEND validates the request body and finds every fixture and market in your selections.
Placement checks. DEFEND confirms the player is not blocked, then confirms the odds and markets in the bet slip are still current and open. Then it checks the bet slip against the bet slip rules LSports set up for your platform, such as allowed bet types, InPlay betting, stake range, and number of selections. Contact your CSM to change these rules.
Risk limits. DEFEND checks the bet slip against your Platform Limits, Tiers, and Player Platform Limits. The result is accepted, under review, or rejected.
Response Shapes
Each stage returns a different body shape. Read the HTTP status first, then parse the body that matches it.
Access check
{ "message": "..." }
message
Request validation and lookup
{ "message", "details", "errorType", "errors", "warnings" }
errorType (when present), errors
Placement checks and risk limits
{ "result", "error_code", "reason" }
error_code, reason
1. Access Check
DEFEND checks access before it reads the bet slip. Your access token identifies your account (see Authentication).
401
Unauthorized: customerid header is missing.
The request does not identify your account
Send a valid Authorization: Bearer <accessToken> header
400
Bad Request: customerid should be a valid number.
The account identifier on the request is not valid
Contact your CSM
403
User {id} is unauthorized, the user does not have access to rms.
Your account has no DEFEND access
Contact your CSM
402
User {id} is unauthorized, his rms asset is not active.
Your DEFEND access is inactive
Contact your CSM
402
User {id} is unauthorized, his rms asset has expired.
Your DEFEND access has expired
Contact your CSM
500
Internal Server Error.
DEFEND could not complete the access check
Retry. Contact your CSM if it persists
Example (HTTP 402)
2. Request Validation and Fixture/Market Lookup
DEFEND validates the request and looks up each fixture and market.
HTTP 400: Request Validation Failed
Returned when a required field is missing or invalid: betSlipContext, betType, stake.totalAmount, totalSelections, selections, userInfo, or systemStructure (for betType: system). errors holds one message per failed field. Outright league and betSlipId rules return this response too (see API Reference).
DEFEND also enforces these fixed limits for every platform. They are not configurable in ARENA360. The error message names the field but not the limit:
totalSelections: at most 20stake.totalAmount: greater than 0 and at most 1,000,000betSlipId: at most 50 charactersuserInfo.userName: at most 100 charactersSelection odds: greater than 1
HTTP 400: Invalid Selection Data
Returned when DEFEND cannot read the fixture IDs or market IDs in your selections.
HTTP 404: Fixture or Market Not Found
Returned when DEFEND cannot find a fixture or market from your selections.
External data sources: Make sure you sent the fixture and market data to DEFEND through the Customer Feed Integration API before placing the bet slip
TRADE-exclusive: LSports sends fixture and market data to DEFEND for you. Check that the fixture and market are part of your TRADE setup, or contact your CSM
See the Integration Guide to confirm which setup applies to you.
errorType
Meaning
EVENTS_NOT_FOUND
None of the fixtures exist in DEFEND
PARTIAL_EVENTS_NOT_FOUND
Some of the fixtures are missing. missingCount and totalRequested show how many
MARKETS_NOT_FOUND
None of the markets exist in DEFEND
PARTIAL_MARKETS_NOT_FOUND
Some of the markets are missing. missingCount and totalRequested show how many
HTTP 422: Bet Construction Failed
Returned when the fixtures and markets exist, but none of the selections could be matched to an open market and outcome. Common causes are an outcome that does not belong to the market, missing odds, or a market that is not open for betting.
HTTP 500 and 503: Processing Errors
These responses mean DEFEND could not finish processing. Retry the request. If the error repeats, contact your CSM with the errorType and the time of the request.
HTTP
errorType
Meaning
500
DATABASE_ERROR_EVENTS
DEFEND could not load the fixtures
500
DATABASE_ERROR_MARKETS
DEFEND could not load the markets
500
MISSING_CART_RULE
Your platform's bet slip configuration is incomplete. Contact your CSM
500
INTERNAL_PROCESSING_ERROR
An unexpected error occurred while processing the bet slip
503
DATABASE_SERVICE_ERROR
DEFEND storage is temporarily unavailable
400
PROCESSING_VALIDATION_ERROR
The bet slip failed a data check during processing
A request body that is not valid JSON returns HTTP 500 with { "description": "Internal Error" }.
3. Placement Checks
After validation and lookup, DEFEND confirms the player is not blocked, then confirms the odds and markets in the bet slip are still current and open. Then it checks the bet slip against the bet slip rules LSports set up for your platform, and applies your risk limits (see section 4).
Every response from this stage uses the same body:
HTTP 200: Accepted
The bet slip passed every check and is stored.
HTTP 200: Under Review
The bet slip goes to Bet Referral, where a trader accepts or rejects it. The trader's decision arrives through the RESERVE_BET_ACCEPT and RESERVE_BET_REJECT events on the WebSocket connection.
A bet slip goes to review in one case: it exceeds a limit whose action is Check, and no limit set to Reject. When several limits are exceeded, Reject takes priority.
reason is always Bet under review. The limit that caused the review is shown to the trader in Bet Referral, not in the response.
HTTP 400: Rejected
Each error_code below means the bet slip was not placed.
error_code
reason
Trigger
update_odds
Invalid odds
A selection no longer matches current odds or market state. See Odds validation failed
constraints_check_failed
Invalid constraints: <messages>
The bet slip breaks one or more of your platform's bet slip rules (see below)
totals_incorrect
Totals incorrect
DEFEND could not confirm the bet slip totals from the stake and odds sent. Resend the bet slip with current odds. If you use accept_odds, send it as the boolean true. Contact your CSM if it repeats
external_save_failed
One or more risk limit messages
The bet slip exceeds a limit set to Reject. See section 4
duplicate_bet_slip_id
Bet slip id already exists
The betSlipId was already used. See Bet Slip ID Support
generic_error
Generic Error
An unexpected error occurred during placement. Retry, and contact your CSM if it repeats
Bet Slip Rule Messages (constraints_check_failed)
When several rules fail, reason lists every message, separated by commas.
singleNotAllowed
Single bet slips are not enabled on your platform
multipleNotAllowed
Multiple bet slips are not enabled on your platform
systemNotAllowed
System bet slips are not enabled on your platform
live or mixed contexts are not allowed for system bet-slips
System bet slips can only contain PreMatch selections
liveNotEnabled
InPlay betting is not enabled on your platform
antepostCombinabilityNotAllowed
Outright selections cannot be combined with other selections
maximumOddsSystem
The system bet slip has more than 10 selections
minimumAmountNotRespected
The stake on a PreMatch bet slip is below the minimum in your bet slip rules
<fixture> Multiplicity not respected
A selection from this fixture cannot be placed in a bet slip with this number of selections
Odds Validation Reasons (update_odds)
The data_to_update array lists each failing selection with its own reason.
reason
Meaning
changed_odd_value
Odds in the request differ from current odds
disabled
The outcome or market is suspended or deactivated
time_over
The fixture has started, finished, or been cancelled, or the outcome is already settled
changed_multiplicity
The combination rules for the selection have changed
Setting accept_odds to true only corrects a changed_odd_value selection. All other reasons in this table still return update_odds.
4. Risk Limit Rejection Reasons
When a bet slip exceeds a limit set to Reject, DEFEND returns HTTP 400 with error_code: external_save_failed. reason holds the message for each limit the bet slip exceeded.
Reading the Reason
Values. Most messages end in
(actual/limit). In the example above, the potential win of 22920 exceeds the market limit of 7525.Several limits. When more than one limit is exceeded,
reasonlists every message, separated by a blank line (\n\n).Language. Messages are returned in your platform language (English, Spanish, Italian, or Portuguese). The tables below show the English text.
Bet type.
{type}in a message issingle,multiple, orsystem. Some messages usesimplefor single bet slips.Context.
{context}islive,prematch, ormixed. Mixed covers bet slips that contain both InPlay and PreMatch selections.
A limit set to Check sends the bet slip to review instead. The same messages appear as the review reason in Bet Referral.
Stake and Winnings
Error min amount for {type} bet (stake/limit)
Min Bet Amount: the stake is below the minimum. PreMatch bet slips only
Error max played for {type} bet (stake/limit)
Max Bet Amount: the stake is above the maximum
Error max winning for {type} bet
Max Winning or Max Win InPlay: the potential win is above the maximum
Error maximum winning for {type} bet exceeded (total/limit)
Bet Max Risk: the monthly limit for this bet type was exceeded. PreMatch bet slips only
Block error on maximum amount (stake/limit)
The stake is above the blocking amount set for your platform or player. Contact your CSM to review it
Odds
Error odds range not respected
Min-Max Odds: at least one selection in the bet slip has odds outside the allowed range. PreMatch bet slips only
Repeated Bets
Repeated bet limits count the same bet placed by the same player within a rolling 24-hour window.
Error max repeated {type} bet for user(count/limit)
Cumulative For Repeated Bet: the bet was placed too many times
Error max amount for repeated {type} bet for user(stake/limit)
Max Repeated For Bet: total stake on the repeated bet is too high
Winning Percentage
Error max percentage for winning in {type} {context} bet {actual} > {limit}
Max Winning Percentage: of the player's winning bet slips in this context, the share that are this bet type is above the maximum. {actual} and {limit} are percentages. Checked only for players with a Player Platform Limit
Ongoing Winnings
Ongoing winnings limits cap the total potential winnings from bets that are not yet settled. Mixed bet slips have their own ongoing winnings cap, set by LSports for your platform. Contact your CSM to review it.
Error ongoing winning in progress for {type} live bet(limit)
Max Winning for Ongoing Bet: the player's InPlay limit
Error max ongoing winning for system live bet(limit)
Max Winning for Ongoing Bet: the player's InPlay limit for system bet slips
Error ongoing winning for {type} prematch bet(limit)
Max Winning for Ongoing PreMatch Bet: the player's PreMatch limit
Error ongoing winning for mixed bet(limit)
The player's ongoing winnings cap for mixed bet slips, set by LSports.
Error platform-wide ongoing winning exceeded for {type} {context} bet (limit)
Platform-wide cap on ongoing winnings across all players. For mixed bet slips, the cap is set by LSports
Market Limit
Rule entity Market Error: (potential win/limit)
The potential win is above the market limit
Related
API Reference: Request and response schemas for
POST /cart/place-betPlatform Limits: Configure the limits behind each rejection reason
Tiers: Configure market Lay to Lose limits
Bet Monitor: Review bet slips held for Bet Referral
Last updated
Was this helpful?