For the complete documentation index, see llms.txt. This page is also available as Markdown.

API Reference

This documentation describes the available API endpoints for customer integration process and bet-slips interactions

Customer Feed Integration API

Process fixture metadata updates

post

Receives and processes fixture metadata updates including sports events, participants, leagues, and event information. The API validates the request, enriches it with customer/platform identifiers, and produces messages to Kafka for downstream processing. Authentication is done via JWT Bearer token which is decoded by the proxy to extract the customer identifier.

Authorizations
AuthorizationstringRequired

JWT Bearer token for authentication. The token is decoded by the API gateway/proxy which extracts the customer identifier and forwards it to the API via the customerid header.

Body

Request structure for fixture metadata updates containing message header and fixture events

Responses
200

Fixture metadata processed successfully and sent to Kafka

application/json

Successful response indicating message was processed and sent to Kafka

statusstring · enumRequired

Processing status - always returns 'success'

Example: successPossible values:
messageIdstringRequired

Generated message identifier for tracking

Example: msg_ea1da91b-fd6b-45ba-a2b2-14e3d771a070
timestampstring · date-timeRequired

Response timestamp in ISO 8601 format

Example: 2024-04-01T18:15:27.000Z
post/customer-integration/fixture-metadata
POST /rms-customer-integration-api/v1/customer-integration/fixture-metadata HTTP/1.1
Host: rms.lsports.eu
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 745

{
  "Header": {
    "Type": 1,
    "MsgSeq": 2,
    "MsgGuid": "ea1da91b-fd6b-45ba-a2b2-14e3d771a070",
    "CreationDate": "2024-04-01T18:15:27.3452921Z",
    "ServerTimestamp": 1711995327345
  },
  "Body": {
    "Events": [
      {
        "FixtureId": 12604306,
        "Fixture": {
          "Subscription": {
            "Type": 1,
            "Status": 1
          },
          "Sport": {
            "Id": 265917,
            "Name": "Table Tennis"
          },
          "Location": {
            "Id": 187,
            "Name": "Belarus"
          },
          "League": {
            "Id": 53574,
            "Name": "Liga Pro - Men - Belarus"
          },
          "StartDate": "2024-04-01T18:00:00Z",
          "LastUpdate": "2024-04-01T18:15:26.480938Z",
          "Status": 2,
          "Participants": [
            {
              "Id": 52895937,
              "Name": "Alexander Dekhtyarenko",
              "Position": "2"
            },
            {
              "Id": 53063569,
              "Name": "Vitaliy Lyalkov",
              "Position": "1"
            }
          ],
          "FixtureExtraData": [
            {
              "Name": "WithLivescore",
              "Value": "true"
            },
            {
              "Name": "WithInPlay",
              "Value": "true"
            }
          ]
        },
        "Livescore": null,
        "Markets": null
      }
    ]
  }
}
{
  "status": "success",
  "messageId": "msg_ea1da91b-fd6b-45ba-a2b2-14e3d771a070",
  "timestamp": "2024-04-01T18:15:27.000Z"
}

Outright League Support — fixture-metadata

The endpoint also accepts Type 38 outright league fixture messages. Pass isOutright=true as a query parameter to explicitly mark the message as an outright league fixture. When omitted, the API auto-detects from Header.Type and body structure.

Parameter
Type
Required
Description

isOutright

boolean

No

Marks the message as a Type 38 outright league fixture. Auto-detected when omitted.

Outright league fixture messages use a nested Competition structure in the body instead of the standard Participants array. See Outright League Fixture Request Body (OutrightLeagueFixtureRequestDto) for the full schema.

Process prematch market updates

post

Receives and processes prematch (pre-game) market data including odds, betting lines, and market status. The API enriches the data with customer/platform identifiers and forwards it to Kafka for risk management processing. Authentication is done via JWT Bearer token which is decoded by the proxy to extract the customer identifier.

Authorizations
AuthorizationstringRequired

JWT Bearer token for authentication. The token is decoded by the API gateway/proxy which extracts the customer identifier and forwards it to the API via the customerid header.

Body

Request structure for prematch market updates containing message header and market data

Responses
200

Prematch market data processed successfully and sent to Kafka

application/json

Successful response indicating message was processed and sent to Kafka

statusstring · enumRequired

Processing status - always returns 'success'

Example: successPossible values:
messageIdstringRequired

Generated message identifier for tracking

Example: msg_ea1da91b-fd6b-45ba-a2b2-14e3d771a070
timestampstring · date-timeRequired

Response timestamp in ISO 8601 format

Example: 2024-04-01T18:15:27.000Z
post/customer-integration/prematch-market
POST /rms-customer-integration-api/v1/customer-integration/prematch-market HTTP/1.1
Host: rms.lsports.eu
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 429

{
  "Header": {
    "Type": 3,
    "MsgSeq": 3,
    "MsgGuid": "d99e7292-fcf7-4089-acea-31230409e6c9",
    "CreationDate": "2025-07-21T10:31:43.9719135Z",
    "ServerTimestamp": 1753093903971
  },
  "Body": {
    "Events": [
      {
        "FixtureId": 24605720,
        "Markets": [
          {
            "Id": 2,
            "Name": "Under/Over",
            "MainLine": "0.5",
            "Bets": [
              {
                "Id": "115615308324605720",
                "Name": "Under",
                "Line": "1.5",
                "Status": 1,
                "Price": "3"
              },
              {
                "Id": "115615308324605721",
                "Name": "Over",
                "Line": "1.5",
                "Status": 1,
                "Price": "1.35"
              }
            ]
          }
        ]
      }
    ]
  }
}
{
  "status": "success",
  "messageId": "msg_d99e7292-fcf7-4089-acea-31230409e6c9",
  "timestamp": "2025-07-21T10:31:43.000Z"
}

Outright League Support — prematch-market

The endpoint also accepts Type 40 outright league market messages. Pass isOutright=true to explicitly mark the message. When omitted, the API auto-detects from Header.Type and body structure.

Parameter
Type
Required
Description

isOutright

boolean

No

Marks the message as a Type 40 outright league market. Auto-detected when omitted.

Outright league market messages include a ProviderMarkets wrapper inside each market. See Outright League Market Request Body (OutrightLeagueMarketRequestDto) for the full schema.

Process inplay market updates

post

Receives and processes live (in-play) market data during ongoing sporting events. The API handles real-time odds updates, market status changes, and betting line adjustments, enriching them with customer/platform identifiers before forwarding to Kafka. Authentication is done via JWT Bearer token which is decoded by the proxy to extract the customer identifier.

Authorizations
AuthorizationstringRequired

JWT Bearer token for authentication. The token is decoded by the API gateway/proxy which extracts the customer identifier and forwards it to the API via the customerid header.

Body

Request structure for inplay market updates containing message header and live market data

Responses
200

Inplay market data processed successfully and sent to Kafka

application/json

Successful response indicating message was processed and sent to Kafka

statusstring · enumRequired

Processing status - always returns 'success'

Example: successPossible values:
messageIdstringRequired

Generated message identifier for tracking

Example: msg_ea1da91b-fd6b-45ba-a2b2-14e3d771a070
timestampstring · date-timeRequired

Response timestamp in ISO 8601 format

Example: 2024-04-01T18:15:27.000Z
post/customer-integration/inplay-market
POST /rms-customer-integration-api/v1/customer-integration/inplay-market HTTP/1.1
Host: rms.lsports.eu
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 431

{
  "Header": {
    "Type": 3,
    "MsgSeq": 4,
    "MsgGuid": "e88f8192-fcf7-4089-acea-31230409e6c9",
    "CreationDate": "2025-07-21T10:35:43.9719135Z",
    "ServerTimestamp": 1753094143971
  },
  "Body": {
    "Events": [
      {
        "FixtureId": 24605721,
        "Markets": [
          {
            "Id": 2,
            "Name": "Under/Over",
            "MainLine": "0.5",
            "Bets": [
              {
                "Id": "115615308324605721",
                "Name": "Under",
                "Line": "1.5",
                "Status": 1,
                "Price": "2.8"
              },
              {
                "Id": "115615308324605722",
                "Name": "Over",
                "Line": "1.5",
                "Status": 1,
                "Price": "1.45"
              }
            ]
          }
        ]
      }
    ]
  }
}
{
  "status": "success",
  "messageId": "msg_e88f8192-fcf7-4089-acea-31230409e6c9",
  "timestamp": "2025-07-21T10:35:43.000Z"
}

Outright League Support — inplay-market

The endpoint also accepts Type 40 outright league in-play market messages. The isOutright parameter and body structure are identical to the prematch-market endpoint. See Outright League Market Request Body (OutrightLeagueMarketRequestDto) for the full schema.

Parameter
Type
Required
Description

isOutright

boolean

No

Marks the message as a Type 40 outright league market. Auto-detected when omitted.

Outright League Fixture Request Body (OutrightLeagueFixtureRequestDto)

Request body for Type 38 outright league fixture messages sent to POST /fixture-metadata. Uses a nested Competition structure instead of the standard Participants array.

Field
Type
Required
Description

Type

integer

Yes

Message type — use 38 for outright league fixtures

MsgSeq

integer

No

Message sequence number for ordering

MsgGuid

string (UUID)

Yes

Unique message identifier

CreationDate

string (ISO 8601)

No

Timestamp when the message was created

ServerTimestamp

integer (int64)

Yes

Unix timestamp in milliseconds

Body.Competition

Field
Type
Required
Description

Id

integer

Yes

Tournament/competition identifier

Name

string

Yes

Tournament/competition name

Type

integer

Yes

Competition type code

Competitions

array

Yes

Array of competition seasons or sub-competitions (min 1 item)

League Details — Body.Competition.Competitions[].Events[].OutrightLeague

Field
Type
Required
Description

Name

string

Yes

Tournament or league name

Sport.Id

integer

Yes

Sport unique identifier

Sport.Name

string

Yes

Sport name

Location.Id

integer

Yes

Location/Country identifier

Location.Name

string

Yes

Location/Country name

StartDate

string (ISO 8601)

Yes

Tournament start date

EndDate

string (ISO 8601)

No

Tournament end date

LastUpdate

string (ISO 8601)

No

Last update timestamp from LSports

Status

integer

Yes

1 = Not Started, 2 = In Progress, 3 = Finished

Season.Id

integer

No

Season identifier

Season.Name

string

No

Season name

Subscription.Type

integer

No

Subscription type code

Subscription.Status

integer

No

Subscription status code

FixtureExtraData

array

No

Additional metadata flags as name-value pairs


Outright League Market Request Body (OutrightLeagueMarketRequestDto)

Request body for Type 40 outright league market messages sent to POST /prematch-market or POST /inplay-market. Markets include a ProviderMarkets wrapper with provider-specific odds.

Header

Field
Type
Required
Description

Type

integer

Yes

Message type — use 40 for outright league markets

MsgSeq

integer

No

Message sequence number for ordering

MsgGuid

string (UUID)

Yes

Unique message identifier

CreationDate

string (ISO 8601)

No

Timestamp when the message was created

ServerTimestamp

integer (int64)

Yes

Unix timestamp in milliseconds

Markets — Body.Competition.Competitions[].Events[].Markets[]

Field
Type
Required
Description

Id

integer

Yes

Market type identifier (e.g. 274 = Outright Winner)

Name

string

Yes

Market name

ProviderMarkets

array

Yes

Provider-specific odds for this market (min 1 item)

Provider Markets — Body.Competition.Competitions[].Events[].Markets[].ProviderMarkets[]

Field
Type
Required
Description

Id

integer

Yes

Provider identifier

Name

string

Yes

Provider name

LastUpdate

string (ISO 8601)

No

Last update timestamp for this provider's odds

Bets

array

Yes

Array of betting outcomes (competing teams/participants)

Body...ProviderMarkets[].Bets[]

Field
Type
Required
Description

Id

integer

Yes

Unique bet outcome identifier

Name

string

Yes

Competing team or participant name

Status

integer

Yes

1 = Active, 2 = Suspended

SuspensionReason

integer

No

Reason code for suspension (present when Status=2)

StartPrice

string

No

Opening odds for this outcome

Price

string

Yes

Current odds for this outcome

LastUpdate

string (ISO 8601)

No

Last update timestamp for this outcome's odds


BET SLIP

Place a bet slip

post

Place a bet slip - requires JWT token for authentication

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
betSlipIdstringOptional

Unique identifier for the bet slip

Example: bet_slip_12345
betSlipContextstring · enumRequired

Context of the bet slip

Example: prematchPossible values:
betTypestring · enumRequired

Type of bet being placed

Example: singlePossible values:
totalSelectionsinteger · min: 1Required

Total number of selections in the bet slip

Example: 2
Responses
200

Bet placed successfully

application/json
bet_codestringOptional

Generated bet code

Example: 7tnsd4d0d-h1d2r2lfs3
shortCodestringOptional

Short bet code

Example: 2518
resultbooleanOptional

Whether bet placement was successful

Example: true
post/cart/place-bet
POST /rms-bet/v1/cart/place-bet HTTP/1.1
Host: rms.lsports.eu
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 337

{
  "betSlipId": "bet_slip_12345",
  "betSlipContext": "prematch",
  "betType": "single",
  "stake": {
    "totalAmount": 100
  },
  "totalSelections": 1,
  "selections": [
    {
      "eventId": "4459816548",
      "eventType": "match",
      "eventContext": "prematch",
      "market": {
        "id": "2666973288",
        "line": "2.5"
      },
      "bet": {
        "id": "4273848547",
        "odds": 12.54
      }
    }
  ],
  "userInfo": {
    "id": "2222",
    "userName": "Jack21"
  }
}
{
  "bet_code": "7tnsd4d0d-h1d2r2lfs3",
  "shortCode": "2518",
  "result": true
}

Additional Fields — POST /cart/place-bet

Request: accept_odds

Field
Type
Required
Default
Description

accept_odds

boolean

No

false

Controls odds mismatch behavior. If false (default), the bet is rejected when the odds in the request differ from current server odds. If true, the bet is accepted and odds are automatically corrected to the current server value.

Response: HTTP 400 — Odds validation failed

Returned when the odds in the request do not match current server odds and accept_odds is false (or not provided). Also returned when an outcome is suspended/disabled, the event time has passed, or multiplicity rules have changed.

reason value

Meaning

changed_odd_value

Odds in request differ from current server odds

disabled

Outcome or market is suspended/deactivated

time_over

Event has started, finished, been cancelled, or outcome is already settled

changed_multiplicity

Server-side multiplicity rules have changed since the bet was constructed

Outright League Selection Constraints

When any selection in a bet slip has eventType set to "outright league", the following rules apply. Violating either constraint returns HTTP 400.

Field
Required value
Error when violated

betSlipContext

"prematch"

betSlipContext must be "prematch" for outright league selections

betType

"single"

Outright league selections can only be placed as a "single" bet

Get bet details for players

post

Retrieve bet information for player

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
codestringRequired

Unique bet code identifier

Example: 7tnsd4d0d-h1d2r2lfs3
Responses
200

Bet details retrieved successfully

application/json
successbooleanOptionalExample: true
post/bet/detail
POST /rms-bet/v1/bet/detail HTTP/1.1
Host: rms.lsports.eu
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 31

{
  "code": "7tnsd4d0d-h1d2r2lfs3"
}
{
  "success": true,
  "data": {
    "code": "7tnsd4d0d-h1d2r2lfs3",
    "platform_id": 1001,
    "user_id": 9999,
    "type": "single",
    "bet_context": "prematch",
    "status": "accepted",
    "result": "pending",
    "odds": [
      {
        "id_market": 2666973288,
        "market_unique_id": "2666973288",
        "market_name": "1X2",
        "id_outcome": 4273848547,
        "unique_id": "4459816548;2666973288;4273848547",
        "outcome_alias": "2",
        "ext_id": "32941765015720230",
        "outcome_name": "Away",
        "outcome_odd_value": "12.54",
        "outcome_odd_value_original": "12.54",
        "outcome_odd_percent": "62.79",
        "outcome_odd_percent_original": "62.79",
        "outcome_key_value": 7.974481658692185,
        "outcome_key_value_original": 7.974481658692185,
        "outcome_odd_value_for_order": 12.54,
        "active": true,
        "multiplicity": "1-30",
        "multiplicity_min": "1",
        "multiplicity_max": "30",
        "market_fixed": 0,
        "spec": "",
        "type": "prematch",
        "specifier": "",
        "event_description": "Panama - Guadeloupe",
        "time": 1750114800000,
        "event_source": 4459816548,
        "sport": {
          "id": 8412615417,
          "_id": "60703069a936cb5d3422bb59",
          "source": 8412615417,
          "name": "Football",
          "order": 1,
          "status": true
        },
        "category": {
          "id": 1402297580,
          "_id": "6082e765e7ddcf34a099ff0e",
          "source": 1402297580,
          "name": "International",
          "order": 3,
          "status": true
        },
        "tournament": {
          "id": 8299480767,
          "_id": "60ddf1567d050b8659761d23",
          "source": 8299480767,
          "name": "CONCACAF Gold Cup",
          "order": 9999,
          "status": true
        },
        "quickbet": "43008",
        "status_event": "active"
      }
    ],
    "odds_sources": [
      "4459816548;2666973288;4273848547"
    ],
    "amount_real": 100,
    "currency": "EUR",
    "currencySymbol": "€",
    "created_at": 1735123456789,
    "sent_time": 1735123456789,
    "oddHash": "U2FsdGVkX19EtRS0QPasdfsdf",
    "betCode": "2518",
    "_multiple_detail": {
      "amount": 100,
      "odds_total": 12.54,
      "multiplicity": 1,
      "winning": 1254,
      "bonus_percentage": 0,
      "bonus": 0,
      "winning_total": 1254,
      "profit": 1154,
      "expectedTaxOnWonAmount": 0,
      "expectedTotalTaxedWinnings": 1254,
      "expectedProfitTaxed": 1154
    },
    "_system_detail": {
      "amount_system": 50,
      "fixed_bases": [],
      "combinations": 3,
      "winning_min_taxed": "56.50",
      "winning_max_taxed": "358.77",
      "winning_total_min_taxed": "56.50",
      "winning_total_max_taxed": "358.77",
      "winning_all_taxed": "521.10",
      "winning_all_total_taxed": "521.10",
      "winning_min": "56.50",
      "winning_max": "358.77",
      "winning_total_min": "56.50",
      "winning_total_max": "358.77",
      "bonus_min": "0.00",
      "bonus_max": "0.00",
      "winning_all": "521.10",
      "winning_all_total": "521.10",
      "valid_combinations_all": 3
    },
    "system_parts": [
      {
        "amount": 16.67,
        "checked": true,
        "multiplicity": 1,
        "num_combo": 2,
        "combinationsOdds": [],
        "show": false,
        "context": "prematch",
        "bets": [
          {}
        ]
      }
    ]
  }
}

Settle a bet slip

post

Settle a bet slip with a given code and status. Requires JWT Bearer token authentication.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
codestringRequired

Unique bet code identifier

Example: wzc3457n7-h1d2q27q109
statusstring · enumRequired

Status of the bet

Example: winPossible values:
subCodestring · nullableOptional

Unique sub bet code identifier (required for system bet slip)

Example: pnme81n2-h1ch2k2r2i9
multiplicitynumber · nullableOptional

The multiplicity number of markets in the bet slip (required for system bet slip)

Example: 1
Responses
200

Bet successfully updated

application/json
messagestringOptional

Settlement confirmation message

Example: Bet with code 'wzc3457n7-h1d2q27q109' updated to status 'win'.
post/bet/define
POST /rms-bet/v1/bet/define HTTP/1.1
Host: rms.lsports.eu
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 47

{
  "code": "wzc3457n7-h1d2q27q109",
  "status": "win"
}
{
  "message": "Bet with code 'wzc3457n7-h1d2q27q109' updated to status 'win'."
}

Bet Slip ID Support

DEFEND supports an optional betSlipId (on placement) and bet_slip_id (on lookup and settlement) field across the BET SLIP endpoints. This lets you track bet slips using your own identifiers alongside the DEFEND-generated code.

POST /cart/place-bet — betSlipId field

The betSlipId field in the placement request accepts an optional operator-defined identifier.

Field
Type
Max length
Required
Description

betSlipId

string

50

No

Optional bet slip identifier. Must be a unique, non-empty string.

Validation errors (HTTP 400)

Scenario
Error message

betSlipId is not a string

betSlipId must be a string type, but received number. This identifier must be in text format.

betSlipId is empty or whitespace

betSlipId cannot be empty or contain only whitespace. A valid identifier is required for bet slip tracking.

betSlipId exceeds 50 characters

betSlipId exceeds maximum allowed length. Identifiers should be concise for optimal processing.

A duplicate betSlipId is rejected with HTTP 400. The error uses the standard placement-error shape — a dedicated duplicate error code is planned as a follow-up.


POST /bet/detail — lookup by bet_slip_id

The /bet/detail endpoint accepts either code or bet_slip_id to locate a bet slip. At least one is required.

Request

Field
Type
Required
Description

code

string

Either code or bet_slip_id

DEFEND-generated bet code

bet_slip_id

string

Either code or bet_slip_id

Operator-defined bet slip identifier

When both are provided, bet_slip_id takes precedence. code is used as a fallback.

Response

The BetData response object includes bet_slip_id alongside code.

Field
Type
Description

bet_slip_id

string

Bet slip identifier. Empty or absent when none was provided at placement.


POST /bet/define — settle by bet_slip_id

The /bet/define endpoint accepts either code or bet_slip_id to identify the bet slip to settle. status is always required.

Field
Type
Required
Description

code

string

Either code or bet_slip_id

DEFEND-generated bet code

bet_slip_id

string

Either code or bet_slip_id

Operator-defined bet slip identifier

status

string

Yes

Bet outcome: win, lose, void, pending, cancelled, half_won, half_lost. Half outcomes (half_won/half_lost) apply to single bet slips only; trade-style aliases HalfWon/HalfLost (any case) are also accepted.

When both code and bet_slip_id are provided, bet_slip_id takes precedence.


Half outcomes (half_won / half_lost)

DEFEND supports half-won and half-lost settlement statuses for single bet slips. Use these statuses on POST /bet/define when a market resolves to a half-win or half-loss outcome.

Accepted status values

You send
DEFEND stores

half_won, HalfWon, halfwon

half_won

half_lost, HalfLost, halflost

half_lost

Status values are matched case-insensitively and normalized to half_won or half_lost.

Eligibility

Half outcomes apply only when all of the following are true:

  • Bet type — The bet slip is a single. Half outcomes are not supported for multiple or system bets.

  • Market configuration — Your platform has eligible market types configured for half settlements. Contact your CSM to set this up.

  • Market line — The bet's market is a quarter line, meaning the line ends in .25 or .75 (for example, 2.25 or 1.75).

If a settlement request doesn't meet these conditions, POST /bet/define returns an error and the bet slip status is not changed.

Payout

Status
Payout

half_won

Half the stake plus half the full theoretical win

half_lost

Half the stake

Last updated

Was this helpful?