SportAPI Documentation
EN
C Product documentationCoupon API
v1
Service & pricing ↗ Get access ↗
Coupon API / Odds changes

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
}
FieldPossible valuesPurpose
modereject, acceptReject changed odds or allow them to be accepted.
mode_type1, 2, 3, nullSpecify 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_typeBehavior
1Accept odds increases only.
2Accept odds decreases only.
3Accept 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.

ModeCurrent oddsChangeResult
reject2.20IncreaseCoupon rejected.
reject1.80DecreaseCoupon rejected.
accept, mode_type = 12.20IncreaseCoupon accepted at odds of 2.20.
accept, mode_type = 11.80DecreaseCoupon rejected.
accept, mode_type = 22.20IncreaseCoupon rejected.
accept, mode_type = 21.80DecreaseCoupon accepted at odds of 1.80.
accept, mode_type = 32.20IncreaseCoupon accepted at odds of 2.20.
accept, mode_type = 31.80DecreaseCoupon 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

FieldTypeDescription
game_idintegerEvent ID from the submitted pointer.
bet_coefficientnumberOdds submitted by the partner.
actual_coefficientnumber/nullCurrent odds. May be null when the outcome is unavailable or validation was not completed.
change_typeinteger/nullDirection of the odds change.
statusstringReason why the outcome failed validation.

change_type values

change_type is a number or null:

ValueDescription
1The current odds are higher than the submitted odds.
2The current odds are lower than the submitted odds.
nullThe 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

Situationstatuschange_typeerror_code
The odds changed and were not accepted by the selected moderejected1 or 2501
The outcome is unavailable in the current sports lineno_datanull502
The outcome is blockedblocknull503
An error occurred while validating the outcomeerrornull504

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

  1. Do not store the bet slip data as an accepted coupon.
  2. Show the user both the submitted and current odds.
  3. Obtain an updated pointer from the sports line.
  4. 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:

  1. do not store the coupon as accepted;
  2. remove or disable the outcome in the bet slip;
  3. inform the user that the bet is no longer available.

block

The outcome exists but is temporarily or permanently blocked:

  1. do not store the coupon as accepted;
  2. disable confirmation of this outcome;
  3. refresh the sports line data before retrying.

error

The API was unable to validate the outcome:

  1. do not treat the coupon as accepted;
  2. inform the user that the bet cannot currently be validated;
  3. 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/place returns the common error_code = 501. The array of reasons is located directly in body, and an unavailable outcome uses the old nodata value. The new /api/partner/coupons/place uses separate codes 501–504, the body.changes array, and the no_data value.

Use only the new format for a new integration. A complete comparison is provided in Migrating from the old API.

Next section: Settlement lifecycle.