Compatible Legacy Routes
Legacy routes remain supported, and there are currently no plans to remove them.
This section is only for existing integrations. For a new integration, use:
/api/partner/**
The complete code-upgrade sequence is in Migrating from the Legacy API.
Legacy Route Map
| Method | Legacy route | Purpose | Recommended replacement |
|---|---|---|---|
POST | /api/v2/login | Obtain a JWT under the legacy contract. | /api/partner/login |
POST | /bet/place | Create a coupon under the legacy contract. | /api/partner/coupons/place |
GET | /coupons/get | One coupon in the legacy DTO. | /api/partner/coupons/get |
GET | /coupons/calculated | Recent settlements in the legacy DTO. | /api/partner/coupons/calculated |
GET | /coupons/list | Coupons by creation period. | POST /api/partner/coupons/results |
GET | /api/v3/partner/bet/list | Alias for the legacy list. | POST /api/partner/coupons/results |
GET | /coupons/cashout | Experimental cashout quote. | No new route yet |
Legacy Response Envelope
Legacy routes return five top-level fields:
{
"code": 1,
"body": {},
"error_code": null,
"error_message": null,
"date": 1784970000000
}
The legacy envelope does not contain:
time_ms;path.
A business error usually uses HTTP 200 with code = 0.
Legacy API Authentication
Obtaining a Token
POST /api/v2/login
Request:
{
"login": "<login>",
"password": "<password>"
}
Response:
{
"code": 1,
"body": {
"token": "eyJhbGciOiJIUzI1NiJ9..."
},
"error_code": null,
"error_message": null,
"date": 1784970000000
}
Invalid credentials:
{
"code": 0,
"body": null,
"error_code": 99,
"error_message": "Wrong login or password",
"date": 1784970000000
}
Legacy login returns this same response for every authentication rejection: unknown username, incorrect password, disabled account, expired access, or insufficient balance. Separate reasons are available only through the new POST /api/partner/login.
Invalid JWT
Protected legacy routes preserve the previous behavior:
{
"code": 0,
"body": false,
"error_code": 1003,
"error_message": "Wrong token",
"date": 1784970000000
}
The response uses HTTP 200.
The new API uses HTTP 401 and 403 instead.
Coupon Creation
POST /bet/place
The legacy route preserves its previous request and response contract.
Its fields are:
list_bets;amount;callback_url;currency;lang;mode;mode_type;multi.
For the legacy route, lang, mode, and multi are required. Invalid or incomplete data returns error_code = 505.
Successful Result
The current compatible route returns created coupons as a direct array in body, without a body.coupons object:
{
"code": 1,
"body": [
{
"coupon_code": "000000000272",
"amount": 10,
"win": 18.5,
"coef": 1.85,
"status": 0,
"calculate_date": null,
"coupon_type": 1,
"events_count": 1,
"events_data": [
{
"uuid": "912",
"game_id": 737779544,
"status": 0,
"coef": 1.85,
"calc_coef": null,
"calculate_date": null
}
]
}
],
"error_code": null,
"error_message": null,
"date": 1784970000000
}
Historical versions of the legacy documentation included examples where one coupon was returned directly as an object in body. When migrating an existing integration, verify the actual contract of the environment in use. The new /api/partner/coupons/place always uses the unambiguous body.coupons[] array.
Feed Validation Errors
For all four reasons, legacy /bet/place uses:
error_code = 501
error_message = "Coefficient is change"
Reasons are sent as a direct array in body:
{
"code": 0,
"body": [
{
"game_id": 738917381,
"bet_coefficient": 3.6,
"actual_coefficient": null,
"change_type": null,
"status": "no_data"
}
],
"error_code": 501,
"error_message": "Coefficient is change",
"date": 1784970000000
}
Possible status values:
rejected;no_data;block;error.
change_type:
1— odds increased;2— odds decreased;null— blocked, absent outcome, or validation error.
String values increase and decrease are not used.
The new /api/partner/coupons/place separates these reasons into 501–504 and returns the array in body.changes.
Retrieving One Coupon
GET /coupons/get?coupon_code=000000000272
Requirements:
- Bearer JWT;
- a code containing exactly 12 digits.
Errors:
error_code | Meaning |
|---|---|
560 | Code is missing or incorrectly formatted. |
561 | Coupon was not found or belongs to another client. |
The legacy route returns the legacy coupon model. The internal bet ID is named uuid and is sent as a string.
Recently Settled Coupons
GET /coupons/calculated?time={minutes}
time rules:
- default is 5 minutes;
time <= 0is replaced with 5;- maximum is 120 minutes;
- filtering uses final settlement time;
- active coupons and coupons owned by another client are not returned.
The result is a direct array of legacy DTOs in body.
The current replacement preserves the window logic but returns the complete new model:
GET /api/partner/coupons/calculated?time={minutes}
Coupon List
GET /coupons/list
GET /api/v3/partner/bet/list
Query parameters:
| Field | Type | Description |
|---|---|---|
start_date | integer/null | Start of creation period, Unix milliseconds. |
end_date | integer/null | End of creation period, Unix milliseconds. |
Rules:
- without dates, the last 24 hours are returned;
- with only
start_date, the 24 hours after it are returned; - with only
end_date, the 24 hours before it are returned; - with both dates, the interval must be positive and no longer than 24 hours;
- coupons are returned in the legacy DTO.
Current replacement:
POST /api/partner/coupons/results
It accepts either both dates in JSON or up to 100 coupon_ids values.
Compatible /api/v3/partner/bet/** Routes
Despite the /api/v3 prefix, the routes serve different purposes:
| Route | Format |
|---|---|
POST /api/v3/partner/bet/place | Alias for new /api/partner/coupons/place. |
GET /api/v3/partner/bet/get | Alias for new /api/partner/coupons/get. |
GET /api/v3/partner/bet/active | Alias for new /api/partner/coupons/active. |
GET /api/v3/partner/bet/list | Alias for legacy /coupons/list; returns the legacy DTO. |
Do not use a mixed set of /api/v3/** routes in a new integration. Move to the consistent /api/partner/** routes.
Legacy DTO Differences
In the legacy model:
- a bet is identified by string
uuid; - there is no complete separation of
potential_winandreal_win; - there is no complete set of original and settlement odds;
- there is less sub-event information;
- there are fewer extended score fields;
- some compatible fields use historical names.
Starting from version 1.2.0, a legacy-model bet also contains:
settlement_reason_code— stable code for the reason for settlement or return;settlement_reason— explanatory reason text.
Do not use settlement_reason text as a programmatic key. The set of codes may expand.
In the new model:
- a bet has numeric
events_data[].id; uuidis used in callbacks;potential_win,real_win,original_coef, andcalculate_coefwere added;- live and sub-event information was added;
- complete names and extended score fields were added.
Legacy Error Codes
| Code | Meaning |
|---|---|
99 | Incorrect username or password. |
501 | General outcome-validation error. |
505 | Invalid or incomplete /bet/place data. |
506 | Multiple bets from one match in a coupon. |
507 | Insufficient client account balance; no coupons are created. |
560 | Invalid coupon code. |
561 | Coupon not found. |
565 | Cashout unavailable. |
1003 | Invalid JWT. |
10000 | Unknown or internal error. |
Historical documentation associated 507 with a general server error. In the current 1.2.0 contract, it means Insufficient balance: creation is rejected completely, no coupons are created, and the client balance does not change. Code 540 is historical and is not part of the current OpenAPI contract.
Cashout
GET /coupons/cashout?coupon_code={coupon_code}
The function:
- is under development;
- is not fully tested;
- is not recommended for production;
- only calculates an estimate;
- does not sell a coupon or change any balance.
There is no new /api/partner/** route yet.
See Cashout for details.
Changes Required in Existing Code
Do not mix legacy and new DTOs in one implicit handler.
During gradual migration:
- explicitly identify the contract by the route called;
- store
coupon_codeas a string; - support the new
body.couponsobject during creation; - match the new bet
idto legacy or callbackuuid; - add the new statuses and settlement fields;
- move to the new API’s HTTP
401/403behavior; - after verification, disable legacy routes one at a time.
Complete checklist: Migrating from the Legacy API.
Legacy Support Checklist
- Legacy routes are used only by existing code.
- New code uses
/api/partner/**. - The legacy envelope does not expect
time_msorpath. - Invalid legacy JWT is handled through
error_code = 1003. - A legacy
/bet/placeerror is read from the directbodyarray. coupon_codeis stored as a string.- Legacy
uuidis not confused withbatchId. /api/v3/partner/bet/listis recognized as a legacy DTO.- Cashout is not used in production.
Next section: Glossary.