Odds Changes and Outcome Availability
The state of a sports-line outcome may change between the user selecting a bet and the coupon placement request being submitted:
- the odds may increase or decrease;
- the outcome may be blocked;
- the outcome may disappear from the sports line;
- outcome validation may end with an error.
Before creating a coupon, the SportAPI Coupon Settlement System validates every entry in list_bets against the current sports line.
Odds in the pointer
The pointer contains the odds that were shown to the user:
line#737779544#1#1#0#1.85
The final value, 1.85, is the odds value submitted by the partner. When placing the coupon, the API compares it with the current odds for the outcome.
If the values match and the outcome is available, validation succeeds regardless of the selected mode.
The mode and mode_type parameters
Two fields define how odds changes are handled:
{
"mode": "reject",
"mode_type": null
}
| Field | Possible values | Purpose |
|---|---|---|
mode | reject, accept | Reject changed odds or allow them to be accepted. |
mode_type | 1, 2, 3, null | Specify which direction of change may be accepted when mode = "accept". |
If mode is omitted or is null, reject is used.
reject mode
reject is the safe default mode:
{
"mode": "reject",
"mode_type": null
}
The coupon is created only when the submitted odds match the current odds. If the odds change in either direction, the API rejects the request with error_code = 501.
Use this mode when the user must personally confirm every odds change.
accept mode
accept allows the current odds to be accepted without asking for separate confirmation again:
{
"mode": "accept",
"mode_type": 1
}
When mode = "accept", mode_type must be provided:
mode_type | Behavior |
|---|---|
1 | Accept odds increases only. |
2 | Accept odds decreases only. |
3 | Accept both odds increases and decreases. |
If the change is allowed by the selected mode_type, the coupon is created using the current odds from the sports line.
accept applies only to odds changes. It does not allow a blocked or unavailable outcome to be accepted, and it does not ignore a validation error.
Mode behavior example
The partner submitted odds of 2.00.
| Mode | Current odds | Change | Result |
|---|---|---|---|
reject | 2.20 | Increase | Coupon rejected. |
reject | 1.80 | Decrease | Coupon rejected. |
accept, mode_type = 1 | 2.20 | Increase | Coupon accepted at odds of 2.20. |
accept, mode_type = 1 | 1.80 | Decrease | Coupon rejected. |
accept, mode_type = 2 | 2.20 | Increase | Coupon rejected. |
accept, mode_type = 2 | 1.80 | Decrease | Coupon accepted at odds of 1.80. |
accept, mode_type = 3 | 2.20 | Increase | Coupon accepted at odds of 2.20. |
accept, mode_type = 3 | 1.80 | Decrease | Coupon accepted at odds of 1.80. |
The partner should explain the selected behavior to the user in advance. It is especially important to account for the fact that mode_type = 2 and mode_type = 3 may accept odds lower than those displayed in the bet slip.
Four primary rejection scenarios
If at least one outcome fails validation, the new API returns details about affected outcomes in the following array:
body.changes
body.changes is always an array, even when only one bet is affected.
1. Odds decreased
The submitted odds were 2.19, the current odds decreased to 2.09, and the selected mode does not allow decreases:
{
"code": 0,
"body": {
"changes": [
{
"game_id": 737779544,
"bet_coefficient": 2.19,
"actual_coefficient": 2.09,
"change_type": 2,
"status": "rejected"
}
]
},
"error_code": 501,
"error_message": "Coefficient is change",
"date": 1784970000000,
"time_ms": 20,
"path": "/api/partner/coupons/place"
}
Key values:
status = rejected
change_type = 2
error_code = 501
2. Odds increased
The submitted odds were 2.19, the current odds increased to 2.39, and the selected mode does not allow increases:
{
"code": 0,
"body": {
"changes": [
{
"game_id": 737779544,
"bet_coefficient": 2.19,
"actual_coefficient": 2.39,
"change_type": 1,
"status": "rejected"
}
]
},
"error_code": 501,
"error_message": "Coefficient is change",
"date": 1784970000000,
"time_ms": 20,
"path": "/api/partner/coupons/place"
}
Key values:
status = rejected
change_type = 1
error_code = 501
3. Outcome blocked
The outcome exists in the sports line, but bet placement on it is blocked:
{
"code": 0,
"body": {
"changes": [
{
"game_id": 737779544,
"bet_coefficient": 2.19,
"actual_coefficient": null,
"change_type": null,
"status": "block"
}
]
},
"error_code": 503,
"error_message": "Bet outcome is blocked",
"date": 1784970000000,
"time_ms": 20,
"path": "/api/partner/coupons/place"
}
Key values:
status = block
change_type = null
error_code = 503
The direction of an odds change does not apply to a blocked outcome, so change_type is null. actual_coefficient may also be null.
4. Outcome unavailable
The outcome is no longer available in the current sports line:
{
"code": 0,
"body": {
"changes": [
{
"game_id": 737779544,
"bet_coefficient": 2.19,
"actual_coefficient": null,
"change_type": null,
"status": "no_data"
}
]
},
"error_code": 502,
"error_message": "Bet outcome is not available",
"date": 1784970000000,
"time_ms": 20,
"path": "/api/partner/coupons/place"
}
Key values:
status = no_data
change_type = null
error_code = 502
The current odds are unknown for an unavailable outcome, so both actual_coefficient and change_type are null.
body.changes fields
| Field | Type | Description |
|---|---|---|
game_id | integer | Event ID from the submitted pointer. |
bet_coefficient | number | Odds submitted by the partner. |
actual_coefficient | number/null | Current odds. May be null when the outcome is unavailable or validation was not completed. |
change_type | integer/null | Direction of the odds change. |
status | string | Reason why the outcome failed validation. |
change_type values
change_type is a number or null:
| Value | Description |
|---|---|
1 | The current odds are higher than the submitted odds. |
2 | The current odds are lower than the submitted odds. |
null | The direction of change does not apply or could not be determined. |
String values such as "increase" or "decrease" are not used.
For a blocked or unavailable outcome, or a validation error, use status rather than change_type.
Rejection reasons
| Situation | status | change_type | error_code |
|---|---|---|---|
| The odds changed and were not accepted by the selected mode | rejected | 1 or 2 | 501 |
| The outcome is unavailable in the current sports line | no_data | null | 502 |
| The outcome is blocked | block | null | 503 |
| An error occurred while validating the outcome | error | null | 504 |
Responses 502 and 503 are results of validating the current sports line state, not transport errors.
No accept mode allows an outcome with the no_data, block, or error status to be accepted.
Required partner-system behavior
rejected
- Do not store the bet slip data as an accepted coupon.
- Show the user both the submitted and current odds.
- Obtain an updated pointer from the sports line.
- Ask the user to confirm the bet again if the interface supports this flow.
Do not manually change the odds inside the old pointer. Obtain a current pointer from the sports line.
no_data
The outcome is no longer available in the current sports line:
- do not store the coupon as accepted;
- remove or disable the outcome in the bet slip;
- inform the user that the bet is no longer available.
block
The outcome exists but is temporarily or permanently blocked:
- do not store the coupon as accepted;
- disable confirmation of this outcome;
- refresh the sports line data before retrying.
error
The API was unable to validate the outcome:
- do not treat the coupon as accepted;
- inform the user that the bet cannot currently be validated;
- refresh the sports line and allow another attempt later.
Accumulator handling
body.changes may contain multiple entries, one for every changed or unavailable outcome.
If the response contains code = 0, do not store the accumulator as accepted even if some of its outcomes passed validation. First process every entry in body.changes, update the bet slip, and only then create a new request.
Compatible legacy endpoint
For all four rejection reasons, the legacy
POST /bet/placereturns the commonerror_code = 501. The array of reasons is located directly inbody, and an unavailable outcome uses the oldnodatavalue. The new/api/partner/coupons/placeuses separate codes501–504, thebody.changesarray, and theno_datavalue.
Use only the new format for a new integration. A complete comparison is provided in Migrating from the old API.
Next section: Settlement lifecycle.