# API Reference

## Customer Feed Integration API

## Process fixture metadata updates

> 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.

```json
{"openapi":"3.0.1","info":{"title":"LSports RMS Customer Integration API","version":"v1.0"},"servers":[{"url":"https://rms.lsports.eu/rms-customer-integration-api/v1","variables":{"host":{"default":"https://rms.lsports.eu/rms-customer-integration-api/v1"}},"description":"Production server"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"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."}},"schemas":{"FixtureMetadataRequestDto":{"title":"Fixture Metadata Request","type":"object","required":["Header","Body"],"properties":{"Header":{"$ref":"#/components/schemas/MessageHeaderDto"},"Body":{"$ref":"#/components/schemas/FixtureMetadataUpdateDto"}},"additionalProperties":false},"MessageHeaderDto":{"title":"Message Header","type":"object","required":["Type","MsgGuid","ServerTimestamp"],"properties":{"Type":{"type":"integer","description":"Message type identifier (1 for fixture metadata, 3 for market updates)"},"MsgSeq":{"type":"integer","description":"Message sequence number for ordering"},"MsgGuid":{"type":"string","format":"uuid","description":"Unique message identifier in UUID format"},"CreationDate":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the message was created"},"ServerTimestamp":{"type":"integer","format":"int64","description":"Unix timestamp in milliseconds"}},"additionalProperties":false},"FixtureMetadataUpdateDto":{"title":"Fixture Metadata Update","type":"object","required":["Events"],"properties":{"Events":{"type":"array","description":"Array of fixture events with metadata","items":{"$ref":"#/components/schemas/FixtureEventDto"},"minItems":1}},"additionalProperties":false},"FixtureEventDto":{"title":"Fixture Event","type":"object","required":["FixtureId","Fixture"],"properties":{"FixtureId":{"type":"integer","description":"Unique identifier for the fixture/event"},"Fixture":{"$ref":"#/components/schemas/FixtureDto"},"Livescore":{"type":"object","nullable":true,"description":"Current livescore data for the event"},"Markets":{"type":"object","nullable":true,"description":"Market data associated with the fixture"}},"additionalProperties":false},"FixtureDto":{"title":"Fixture Details","type":"object","required":["Sport","Location","League","StartDate","Status"],"properties":{"Subscription":{"type":"object","properties":{"Type":{"type":"integer"},"Status":{"type":"integer"}}},"Sport":{"type":"object","required":["Id","Name"],"properties":{"Id":{"type":"integer","description":"Sport unique identifier"},"Name":{"type":"string","description":"Sport name"}}},"Location":{"type":"object","required":["Id","Name"],"properties":{"Id":{"type":"integer","description":"Location/Country identifier"},"Name":{"type":"string","description":"Location/Country name"}}},"League":{"type":"object","required":["Id","Name"],"properties":{"Id":{"type":"integer","description":"League/Tournament identifier"},"Name":{"type":"string","description":"League/Tournament name"}}},"StartDate":{"type":"string","format":"date-time","description":"Event start date and time in ISO 8601 format"},"LastUpdate":{"type":"string","format":"date-time","description":"Last update timestamp for the fixture"},"Status":{"type":"integer","description":"Fixture status code (1=Not Started, 2=In Progress, 3=Finished, etc.)"},"Participants":{"type":"array","description":"Array of participants (teams or players) in the event","items":{"type":"object","required":["Id","Name"],"properties":{"Id":{"type":"integer","description":"Participant unique identifier"},"Name":{"type":"string","description":"Participant name"},"Position":{"type":"string","description":"Participant position (1=Home, 2=Away)"}}}},"FixtureExtraData":{"type":"array","description":"Additional fixture metadata as name-value pairs","items":{"type":"object","properties":{"Name":{"type":"string","description":"Property name"},"Value":{"type":"string","description":"Property value"}}}}},"additionalProperties":false},"SuccessResponseDto":{"title":"Success Response","type":"object","required":["status","messageId","timestamp"],"properties":{"status":{"type":"string","description":"Processing status - always returns 'success'","enum":["success"]},"messageId":{"type":"string","description":"Generated message identifier for tracking"},"timestamp":{"type":"string","format":"date-time","description":"Response timestamp in ISO 8601 format"}},"additionalProperties":false},"ValidationErrorResponseDto":{"title":"Validation Error Response","type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"timestamp":{"type":"string","format":"date-time","description":"Error timestamp"},"correlationId":{"type":"string","description":"Unique error correlation ID for tracking and debugging"},"message":{"type":"string","description":"Main error message"},"errors":{"type":"array","description":"Array of specific validation errors","items":{"type":"object","properties":{"message":{"type":"string","description":"Validation error detail"}}}}},"additionalProperties":false},"ErrorResponseDto":{"title":"Error Response","type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"timestamp":{"type":"string","format":"date-time","description":"Error timestamp"},"correlationId":{"type":"string","description":"Unique error correlation ID for tracking and debugging"},"message":{"type":"string","description":"Error message"},"hint":{"type":"string","description":"Hint for resolving the error","nullable":true}},"additionalProperties":false}}},"paths":{"/customer-integration/fixture-metadata":{"post":{"tags":["Fixture Management"],"summary":"Process fixture metadata updates","description":"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.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FixtureMetadataRequestDto"}}}},"responses":{"200":{"description":"Fixture metadata processed successfully and sent to Kafka","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponseDto"}}}},"400":{"description":"Validation error - invalid request body structure or missing required fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponseDto"}}}},"401":{"description":"Authentication failed - missing or invalid customerid header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal server error - database, Kafka, or processing error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}}}}}}
```

## Process prematch market updates

> 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.

```json
{"openapi":"3.0.1","info":{"title":"LSports RMS Customer Integration API","version":"v1.0"},"servers":[{"url":"https://rms.lsports.eu/rms-customer-integration-api/v1","variables":{"host":{"default":"https://rms.lsports.eu/rms-customer-integration-api/v1"}},"description":"Production server"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"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."}},"schemas":{"PrematchMarketRequestDto":{"title":"Prematch Market Request","type":"object","required":["Header","Body"],"properties":{"Header":{"$ref":"#/components/schemas/MessageHeaderDto"},"Body":{"$ref":"#/components/schemas/MarketUpdateDto"}},"additionalProperties":false},"MessageHeaderDto":{"title":"Message Header","type":"object","required":["Type","MsgGuid","ServerTimestamp"],"properties":{"Type":{"type":"integer","description":"Message type identifier (1 for fixture metadata, 3 for market updates)"},"MsgSeq":{"type":"integer","description":"Message sequence number for ordering"},"MsgGuid":{"type":"string","format":"uuid","description":"Unique message identifier in UUID format"},"CreationDate":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the message was created"},"ServerTimestamp":{"type":"integer","format":"int64","description":"Unix timestamp in milliseconds"}},"additionalProperties":false},"MarketUpdateDto":{"title":"Market Update","type":"object","required":["Events"],"properties":{"Events":{"type":"array","description":"Array of market events with betting data","items":{"$ref":"#/components/schemas/MarketEventDto"},"minItems":1}},"additionalProperties":false},"MarketEventDto":{"title":"Market Event","type":"object","required":["FixtureId","Markets"],"properties":{"FixtureId":{"type":"integer","description":"Unique identifier for the fixture/event"},"Markets":{"type":"array","description":"Array of betting markets for the event","items":{"$ref":"#/components/schemas/MarketDto"},"minItems":1}},"additionalProperties":false},"MarketDto":{"title":"Market","type":"object","required":["Id","Name","Bets"],"properties":{"Id":{"type":"integer","description":"Market type identifier (e.g., 1=1X2, 2=Over/Under)"},"Name":{"type":"string","description":"Market name"},"MainLine":{"type":"string","description":"Main betting line for the market","nullable":true},"Bets":{"type":"array","description":"Array of betting outcomes with odds","items":{"$ref":"#/components/schemas/BetDto"},"minItems":1}},"additionalProperties":false},"BetDto":{"title":"Bet","type":"object","required":["Id","Name","Status","Price"],"properties":{"Id":{"type":"string","description":"Unique bet outcome identifier"},"Name":{"type":"string","description":"Bet outcome name"},"Line":{"type":"string","description":"Specific betting line for this outcome","nullable":true},"Status":{"type":"integer","description":"Bet status (1=Active, 2=Suspended, 3=Deactivated, 4=Settled)"},"Price":{"type":"string","description":"Odds/Price for the bet outcome (decimal format)"}},"additionalProperties":false},"SuccessResponseDto":{"title":"Success Response","type":"object","required":["status","messageId","timestamp"],"properties":{"status":{"type":"string","description":"Processing status - always returns 'success'","enum":["success"]},"messageId":{"type":"string","description":"Generated message identifier for tracking"},"timestamp":{"type":"string","format":"date-time","description":"Response timestamp in ISO 8601 format"}},"additionalProperties":false},"ValidationErrorResponseDto":{"title":"Validation Error Response","type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"timestamp":{"type":"string","format":"date-time","description":"Error timestamp"},"correlationId":{"type":"string","description":"Unique error correlation ID for tracking and debugging"},"message":{"type":"string","description":"Main error message"},"errors":{"type":"array","description":"Array of specific validation errors","items":{"type":"object","properties":{"message":{"type":"string","description":"Validation error detail"}}}}},"additionalProperties":false},"ErrorResponseDto":{"title":"Error Response","type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"timestamp":{"type":"string","format":"date-time","description":"Error timestamp"},"correlationId":{"type":"string","description":"Unique error correlation ID for tracking and debugging"},"message":{"type":"string","description":"Error message"},"hint":{"type":"string","description":"Hint for resolving the error","nullable":true}},"additionalProperties":false}}},"paths":{"/customer-integration/prematch-market":{"post":{"tags":["Market Management"],"summary":"Process prematch market updates","description":"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.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrematchMarketRequestDto"}}}},"responses":{"200":{"description":"Prematch market data processed successfully and sent to Kafka","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponseDto"}}}},"400":{"description":"Validation error - invalid market data structure or missing required fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponseDto"}}}},"401":{"description":"Authentication failed - missing or invalid customerid header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal server error - database, Kafka, or processing error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}}}}}}
```

## Process inplay market updates

> 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.

```json
{"openapi":"3.0.1","info":{"title":"LSports RMS Customer Integration API","version":"v1.0"},"servers":[{"url":"https://rms.lsports.eu/rms-customer-integration-api/v1","variables":{"host":{"default":"https://rms.lsports.eu/rms-customer-integration-api/v1"}},"description":"Production server"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"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."}},"schemas":{"InplayMarketRequestDto":{"title":"Inplay Market Request","type":"object","required":["Header","Body"],"properties":{"Header":{"$ref":"#/components/schemas/MessageHeaderDto"},"Body":{"$ref":"#/components/schemas/MarketUpdateDto"}},"additionalProperties":false},"MessageHeaderDto":{"title":"Message Header","type":"object","required":["Type","MsgGuid","ServerTimestamp"],"properties":{"Type":{"type":"integer","description":"Message type identifier (1 for fixture metadata, 3 for market updates)"},"MsgSeq":{"type":"integer","description":"Message sequence number for ordering"},"MsgGuid":{"type":"string","format":"uuid","description":"Unique message identifier in UUID format"},"CreationDate":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the message was created"},"ServerTimestamp":{"type":"integer","format":"int64","description":"Unix timestamp in milliseconds"}},"additionalProperties":false},"MarketUpdateDto":{"title":"Market Update","type":"object","required":["Events"],"properties":{"Events":{"type":"array","description":"Array of market events with betting data","items":{"$ref":"#/components/schemas/MarketEventDto"},"minItems":1}},"additionalProperties":false},"MarketEventDto":{"title":"Market Event","type":"object","required":["FixtureId","Markets"],"properties":{"FixtureId":{"type":"integer","description":"Unique identifier for the fixture/event"},"Markets":{"type":"array","description":"Array of betting markets for the event","items":{"$ref":"#/components/schemas/MarketDto"},"minItems":1}},"additionalProperties":false},"MarketDto":{"title":"Market","type":"object","required":["Id","Name","Bets"],"properties":{"Id":{"type":"integer","description":"Market type identifier (e.g., 1=1X2, 2=Over/Under)"},"Name":{"type":"string","description":"Market name"},"MainLine":{"type":"string","description":"Main betting line for the market","nullable":true},"Bets":{"type":"array","description":"Array of betting outcomes with odds","items":{"$ref":"#/components/schemas/BetDto"},"minItems":1}},"additionalProperties":false},"BetDto":{"title":"Bet","type":"object","required":["Id","Name","Status","Price"],"properties":{"Id":{"type":"string","description":"Unique bet outcome identifier"},"Name":{"type":"string","description":"Bet outcome name"},"Line":{"type":"string","description":"Specific betting line for this outcome","nullable":true},"Status":{"type":"integer","description":"Bet status (1=Active, 2=Suspended, 3=Deactivated, 4=Settled)"},"Price":{"type":"string","description":"Odds/Price for the bet outcome (decimal format)"}},"additionalProperties":false},"SuccessResponseDto":{"title":"Success Response","type":"object","required":["status","messageId","timestamp"],"properties":{"status":{"type":"string","description":"Processing status - always returns 'success'","enum":["success"]},"messageId":{"type":"string","description":"Generated message identifier for tracking"},"timestamp":{"type":"string","format":"date-time","description":"Response timestamp in ISO 8601 format"}},"additionalProperties":false},"ValidationErrorResponseDto":{"title":"Validation Error Response","type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"timestamp":{"type":"string","format":"date-time","description":"Error timestamp"},"correlationId":{"type":"string","description":"Unique error correlation ID for tracking and debugging"},"message":{"type":"string","description":"Main error message"},"errors":{"type":"array","description":"Array of specific validation errors","items":{"type":"object","properties":{"message":{"type":"string","description":"Validation error detail"}}}}},"additionalProperties":false},"ErrorResponseDto":{"title":"Error Response","type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"timestamp":{"type":"string","format":"date-time","description":"Error timestamp"},"correlationId":{"type":"string","description":"Unique error correlation ID for tracking and debugging"},"message":{"type":"string","description":"Error message"},"hint":{"type":"string","description":"Hint for resolving the error","nullable":true}},"additionalProperties":false}}},"paths":{"/customer-integration/inplay-market":{"post":{"tags":["Market Management"],"summary":"Process inplay market updates","description":"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.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InplayMarketRequestDto"}}}},"responses":{"200":{"description":"Inplay market data processed successfully and sent to Kafka","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponseDto"}}}},"400":{"description":"Validation error - invalid market data structure or missing required fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponseDto"}}}},"401":{"description":"Authentication failed - missing or invalid customerid header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal server error - database, Kafka, or processing error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}}}}}}
```

## The PrematchMarketRequestDto object

```json
{"openapi":"3.0.1","info":{"title":"LSports RMS Customer Integration API","version":"v1.0"},"components":{"schemas":{"PrematchMarketRequestDto":{"title":"Prematch Market Request","type":"object","required":["Header","Body"],"properties":{"Header":{"$ref":"#/components/schemas/MessageHeaderDto"},"Body":{"$ref":"#/components/schemas/MarketUpdateDto"}},"additionalProperties":false},"MessageHeaderDto":{"title":"Message Header","type":"object","required":["Type","MsgGuid","ServerTimestamp"],"properties":{"Type":{"type":"integer","description":"Message type identifier (1 for fixture metadata, 3 for market updates)"},"MsgSeq":{"type":"integer","description":"Message sequence number for ordering"},"MsgGuid":{"type":"string","format":"uuid","description":"Unique message identifier in UUID format"},"CreationDate":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the message was created"},"ServerTimestamp":{"type":"integer","format":"int64","description":"Unix timestamp in milliseconds"}},"additionalProperties":false},"MarketUpdateDto":{"title":"Market Update","type":"object","required":["Events"],"properties":{"Events":{"type":"array","description":"Array of market events with betting data","items":{"$ref":"#/components/schemas/MarketEventDto"},"minItems":1}},"additionalProperties":false},"MarketEventDto":{"title":"Market Event","type":"object","required":["FixtureId","Markets"],"properties":{"FixtureId":{"type":"integer","description":"Unique identifier for the fixture/event"},"Markets":{"type":"array","description":"Array of betting markets for the event","items":{"$ref":"#/components/schemas/MarketDto"},"minItems":1}},"additionalProperties":false},"MarketDto":{"title":"Market","type":"object","required":["Id","Name","Bets"],"properties":{"Id":{"type":"integer","description":"Market type identifier (e.g., 1=1X2, 2=Over/Under)"},"Name":{"type":"string","description":"Market name"},"MainLine":{"type":"string","description":"Main betting line for the market","nullable":true},"Bets":{"type":"array","description":"Array of betting outcomes with odds","items":{"$ref":"#/components/schemas/BetDto"},"minItems":1}},"additionalProperties":false},"BetDto":{"title":"Bet","type":"object","required":["Id","Name","Status","Price"],"properties":{"Id":{"type":"string","description":"Unique bet outcome identifier"},"Name":{"type":"string","description":"Bet outcome name"},"Line":{"type":"string","description":"Specific betting line for this outcome","nullable":true},"Status":{"type":"integer","description":"Bet status (1=Active, 2=Suspended, 3=Deactivated, 4=Settled)"},"Price":{"type":"string","description":"Odds/Price for the bet outcome (decimal format)"}},"additionalProperties":false}}}}
```

## The InplayMarketRequestDto object

```json
{"openapi":"3.0.1","info":{"title":"LSports RMS Customer Integration API","version":"v1.0"},"components":{"schemas":{"InplayMarketRequestDto":{"title":"Inplay Market Request","type":"object","required":["Header","Body"],"properties":{"Header":{"$ref":"#/components/schemas/MessageHeaderDto"},"Body":{"$ref":"#/components/schemas/MarketUpdateDto"}},"additionalProperties":false},"MessageHeaderDto":{"title":"Message Header","type":"object","required":["Type","MsgGuid","ServerTimestamp"],"properties":{"Type":{"type":"integer","description":"Message type identifier (1 for fixture metadata, 3 for market updates)"},"MsgSeq":{"type":"integer","description":"Message sequence number for ordering"},"MsgGuid":{"type":"string","format":"uuid","description":"Unique message identifier in UUID format"},"CreationDate":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the message was created"},"ServerTimestamp":{"type":"integer","format":"int64","description":"Unix timestamp in milliseconds"}},"additionalProperties":false},"MarketUpdateDto":{"title":"Market Update","type":"object","required":["Events"],"properties":{"Events":{"type":"array","description":"Array of market events with betting data","items":{"$ref":"#/components/schemas/MarketEventDto"},"minItems":1}},"additionalProperties":false},"MarketEventDto":{"title":"Market Event","type":"object","required":["FixtureId","Markets"],"properties":{"FixtureId":{"type":"integer","description":"Unique identifier for the fixture/event"},"Markets":{"type":"array","description":"Array of betting markets for the event","items":{"$ref":"#/components/schemas/MarketDto"},"minItems":1}},"additionalProperties":false},"MarketDto":{"title":"Market","type":"object","required":["Id","Name","Bets"],"properties":{"Id":{"type":"integer","description":"Market type identifier (e.g., 1=1X2, 2=Over/Under)"},"Name":{"type":"string","description":"Market name"},"MainLine":{"type":"string","description":"Main betting line for the market","nullable":true},"Bets":{"type":"array","description":"Array of betting outcomes with odds","items":{"$ref":"#/components/schemas/BetDto"},"minItems":1}},"additionalProperties":false},"BetDto":{"title":"Bet","type":"object","required":["Id","Name","Status","Price"],"properties":{"Id":{"type":"string","description":"Unique bet outcome identifier"},"Name":{"type":"string","description":"Bet outcome name"},"Line":{"type":"string","description":"Specific betting line for this outcome","nullable":true},"Status":{"type":"integer","description":"Bet status (1=Active, 2=Suspended, 3=Deactivated, 4=Settled)"},"Price":{"type":"string","description":"Odds/Price for the bet outcome (decimal format)"}},"additionalProperties":false}}}}
```

## The MessageHeaderDto object

```json
{"openapi":"3.0.1","info":{"title":"LSports RMS Customer Integration API","version":"v1.0"},"components":{"schemas":{"MessageHeaderDto":{"title":"Message Header","type":"object","required":["Type","MsgGuid","ServerTimestamp"],"properties":{"Type":{"type":"integer","description":"Message type identifier (1 for fixture metadata, 3 for market updates)"},"MsgSeq":{"type":"integer","description":"Message sequence number for ordering"},"MsgGuid":{"type":"string","format":"uuid","description":"Unique message identifier in UUID format"},"CreationDate":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the message was created"},"ServerTimestamp":{"type":"integer","format":"int64","description":"Unix timestamp in milliseconds"}},"additionalProperties":false}}}}
```

## The FixtureMetadataUpdateDto object

```json
{"openapi":"3.0.1","info":{"title":"LSports RMS Customer Integration API","version":"v1.0"},"components":{"schemas":{"FixtureMetadataUpdateDto":{"title":"Fixture Metadata Update","type":"object","required":["Events"],"properties":{"Events":{"type":"array","description":"Array of fixture events with metadata","items":{"$ref":"#/components/schemas/FixtureEventDto"},"minItems":1}},"additionalProperties":false},"FixtureEventDto":{"title":"Fixture Event","type":"object","required":["FixtureId","Fixture"],"properties":{"FixtureId":{"type":"integer","description":"Unique identifier for the fixture/event"},"Fixture":{"$ref":"#/components/schemas/FixtureDto"},"Livescore":{"type":"object","nullable":true,"description":"Current livescore data for the event"},"Markets":{"type":"object","nullable":true,"description":"Market data associated with the fixture"}},"additionalProperties":false},"FixtureDto":{"title":"Fixture Details","type":"object","required":["Sport","Location","League","StartDate","Status"],"properties":{"Subscription":{"type":"object","properties":{"Type":{"type":"integer"},"Status":{"type":"integer"}}},"Sport":{"type":"object","required":["Id","Name"],"properties":{"Id":{"type":"integer","description":"Sport unique identifier"},"Name":{"type":"string","description":"Sport name"}}},"Location":{"type":"object","required":["Id","Name"],"properties":{"Id":{"type":"integer","description":"Location/Country identifier"},"Name":{"type":"string","description":"Location/Country name"}}},"League":{"type":"object","required":["Id","Name"],"properties":{"Id":{"type":"integer","description":"League/Tournament identifier"},"Name":{"type":"string","description":"League/Tournament name"}}},"StartDate":{"type":"string","format":"date-time","description":"Event start date and time in ISO 8601 format"},"LastUpdate":{"type":"string","format":"date-time","description":"Last update timestamp for the fixture"},"Status":{"type":"integer","description":"Fixture status code (1=Not Started, 2=In Progress, 3=Finished, etc.)"},"Participants":{"type":"array","description":"Array of participants (teams or players) in the event","items":{"type":"object","required":["Id","Name"],"properties":{"Id":{"type":"integer","description":"Participant unique identifier"},"Name":{"type":"string","description":"Participant name"},"Position":{"type":"string","description":"Participant position (1=Home, 2=Away)"}}}},"FixtureExtraData":{"type":"array","description":"Additional fixture metadata as name-value pairs","items":{"type":"object","properties":{"Name":{"type":"string","description":"Property name"},"Value":{"type":"string","description":"Property value"}}}}},"additionalProperties":false}}}}
```

## The FixtureEventDto object

```json
{"openapi":"3.0.1","info":{"title":"LSports RMS Customer Integration API","version":"v1.0"},"components":{"schemas":{"FixtureEventDto":{"title":"Fixture Event","type":"object","required":["FixtureId","Fixture"],"properties":{"FixtureId":{"type":"integer","description":"Unique identifier for the fixture/event"},"Fixture":{"$ref":"#/components/schemas/FixtureDto"},"Livescore":{"type":"object","nullable":true,"description":"Current livescore data for the event"},"Markets":{"type":"object","nullable":true,"description":"Market data associated with the fixture"}},"additionalProperties":false},"FixtureDto":{"title":"Fixture Details","type":"object","required":["Sport","Location","League","StartDate","Status"],"properties":{"Subscription":{"type":"object","properties":{"Type":{"type":"integer"},"Status":{"type":"integer"}}},"Sport":{"type":"object","required":["Id","Name"],"properties":{"Id":{"type":"integer","description":"Sport unique identifier"},"Name":{"type":"string","description":"Sport name"}}},"Location":{"type":"object","required":["Id","Name"],"properties":{"Id":{"type":"integer","description":"Location/Country identifier"},"Name":{"type":"string","description":"Location/Country name"}}},"League":{"type":"object","required":["Id","Name"],"properties":{"Id":{"type":"integer","description":"League/Tournament identifier"},"Name":{"type":"string","description":"League/Tournament name"}}},"StartDate":{"type":"string","format":"date-time","description":"Event start date and time in ISO 8601 format"},"LastUpdate":{"type":"string","format":"date-time","description":"Last update timestamp for the fixture"},"Status":{"type":"integer","description":"Fixture status code (1=Not Started, 2=In Progress, 3=Finished, etc.)"},"Participants":{"type":"array","description":"Array of participants (teams or players) in the event","items":{"type":"object","required":["Id","Name"],"properties":{"Id":{"type":"integer","description":"Participant unique identifier"},"Name":{"type":"string","description":"Participant name"},"Position":{"type":"string","description":"Participant position (1=Home, 2=Away)"}}}},"FixtureExtraData":{"type":"array","description":"Additional fixture metadata as name-value pairs","items":{"type":"object","properties":{"Name":{"type":"string","description":"Property name"},"Value":{"type":"string","description":"Property value"}}}}},"additionalProperties":false}}}}
```

## The FixtureDto object

```json
{"openapi":"3.0.1","info":{"title":"LSports RMS Customer Integration API","version":"v1.0"},"components":{"schemas":{"FixtureDto":{"title":"Fixture Details","type":"object","required":["Sport","Location","League","StartDate","Status"],"properties":{"Subscription":{"type":"object","properties":{"Type":{"type":"integer"},"Status":{"type":"integer"}}},"Sport":{"type":"object","required":["Id","Name"],"properties":{"Id":{"type":"integer","description":"Sport unique identifier"},"Name":{"type":"string","description":"Sport name"}}},"Location":{"type":"object","required":["Id","Name"],"properties":{"Id":{"type":"integer","description":"Location/Country identifier"},"Name":{"type":"string","description":"Location/Country name"}}},"League":{"type":"object","required":["Id","Name"],"properties":{"Id":{"type":"integer","description":"League/Tournament identifier"},"Name":{"type":"string","description":"League/Tournament name"}}},"StartDate":{"type":"string","format":"date-time","description":"Event start date and time in ISO 8601 format"},"LastUpdate":{"type":"string","format":"date-time","description":"Last update timestamp for the fixture"},"Status":{"type":"integer","description":"Fixture status code (1=Not Started, 2=In Progress, 3=Finished, etc.)"},"Participants":{"type":"array","description":"Array of participants (teams or players) in the event","items":{"type":"object","required":["Id","Name"],"properties":{"Id":{"type":"integer","description":"Participant unique identifier"},"Name":{"type":"string","description":"Participant name"},"Position":{"type":"string","description":"Participant position (1=Home, 2=Away)"}}}},"FixtureExtraData":{"type":"array","description":"Additional fixture metadata as name-value pairs","items":{"type":"object","properties":{"Name":{"type":"string","description":"Property name"},"Value":{"type":"string","description":"Property value"}}}}},"additionalProperties":false}}}}
```

## The MarketUpdateDto object

```json
{"openapi":"3.0.1","info":{"title":"LSports RMS Customer Integration API","version":"v1.0"},"components":{"schemas":{"MarketUpdateDto":{"title":"Market Update","type":"object","required":["Events"],"properties":{"Events":{"type":"array","description":"Array of market events with betting data","items":{"$ref":"#/components/schemas/MarketEventDto"},"minItems":1}},"additionalProperties":false},"MarketEventDto":{"title":"Market Event","type":"object","required":["FixtureId","Markets"],"properties":{"FixtureId":{"type":"integer","description":"Unique identifier for the fixture/event"},"Markets":{"type":"array","description":"Array of betting markets for the event","items":{"$ref":"#/components/schemas/MarketDto"},"minItems":1}},"additionalProperties":false},"MarketDto":{"title":"Market","type":"object","required":["Id","Name","Bets"],"properties":{"Id":{"type":"integer","description":"Market type identifier (e.g., 1=1X2, 2=Over/Under)"},"Name":{"type":"string","description":"Market name"},"MainLine":{"type":"string","description":"Main betting line for the market","nullable":true},"Bets":{"type":"array","description":"Array of betting outcomes with odds","items":{"$ref":"#/components/schemas/BetDto"},"minItems":1}},"additionalProperties":false},"BetDto":{"title":"Bet","type":"object","required":["Id","Name","Status","Price"],"properties":{"Id":{"type":"string","description":"Unique bet outcome identifier"},"Name":{"type":"string","description":"Bet outcome name"},"Line":{"type":"string","description":"Specific betting line for this outcome","nullable":true},"Status":{"type":"integer","description":"Bet status (1=Active, 2=Suspended, 3=Deactivated, 4=Settled)"},"Price":{"type":"string","description":"Odds/Price for the bet outcome (decimal format)"}},"additionalProperties":false}}}}
```

## The MarketEventDto object

```json
{"openapi":"3.0.1","info":{"title":"LSports RMS Customer Integration API","version":"v1.0"},"components":{"schemas":{"MarketEventDto":{"title":"Market Event","type":"object","required":["FixtureId","Markets"],"properties":{"FixtureId":{"type":"integer","description":"Unique identifier for the fixture/event"},"Markets":{"type":"array","description":"Array of betting markets for the event","items":{"$ref":"#/components/schemas/MarketDto"},"minItems":1}},"additionalProperties":false},"MarketDto":{"title":"Market","type":"object","required":["Id","Name","Bets"],"properties":{"Id":{"type":"integer","description":"Market type identifier (e.g., 1=1X2, 2=Over/Under)"},"Name":{"type":"string","description":"Market name"},"MainLine":{"type":"string","description":"Main betting line for the market","nullable":true},"Bets":{"type":"array","description":"Array of betting outcomes with odds","items":{"$ref":"#/components/schemas/BetDto"},"minItems":1}},"additionalProperties":false},"BetDto":{"title":"Bet","type":"object","required":["Id","Name","Status","Price"],"properties":{"Id":{"type":"string","description":"Unique bet outcome identifier"},"Name":{"type":"string","description":"Bet outcome name"},"Line":{"type":"string","description":"Specific betting line for this outcome","nullable":true},"Status":{"type":"integer","description":"Bet status (1=Active, 2=Suspended, 3=Deactivated, 4=Settled)"},"Price":{"type":"string","description":"Odds/Price for the bet outcome (decimal format)"}},"additionalProperties":false}}}}
```

## The MarketDto object

```json
{"openapi":"3.0.1","info":{"title":"LSports RMS Customer Integration API","version":"v1.0"},"components":{"schemas":{"MarketDto":{"title":"Market","type":"object","required":["Id","Name","Bets"],"properties":{"Id":{"type":"integer","description":"Market type identifier (e.g., 1=1X2, 2=Over/Under)"},"Name":{"type":"string","description":"Market name"},"MainLine":{"type":"string","description":"Main betting line for the market","nullable":true},"Bets":{"type":"array","description":"Array of betting outcomes with odds","items":{"$ref":"#/components/schemas/BetDto"},"minItems":1}},"additionalProperties":false},"BetDto":{"title":"Bet","type":"object","required":["Id","Name","Status","Price"],"properties":{"Id":{"type":"string","description":"Unique bet outcome identifier"},"Name":{"type":"string","description":"Bet outcome name"},"Line":{"type":"string","description":"Specific betting line for this outcome","nullable":true},"Status":{"type":"integer","description":"Bet status (1=Active, 2=Suspended, 3=Deactivated, 4=Settled)"},"Price":{"type":"string","description":"Odds/Price for the bet outcome (decimal format)"}},"additionalProperties":false}}}}
```

## The BetDto object

```json
{"openapi":"3.0.1","info":{"title":"LSports RMS Customer Integration API","version":"v1.0"},"components":{"schemas":{"BetDto":{"title":"Bet","type":"object","required":["Id","Name","Status","Price"],"properties":{"Id":{"type":"string","description":"Unique bet outcome identifier"},"Name":{"type":"string","description":"Bet outcome name"},"Line":{"type":"string","description":"Specific betting line for this outcome","nullable":true},"Status":{"type":"integer","description":"Bet status (1=Active, 2=Suspended, 3=Deactivated, 4=Settled)"},"Price":{"type":"string","description":"Odds/Price for the bet outcome (decimal format)"}},"additionalProperties":false}}}}
```

## The SuccessResponseDto object

```json
{"openapi":"3.0.1","info":{"title":"LSports RMS Customer Integration API","version":"v1.0"},"components":{"schemas":{"SuccessResponseDto":{"title":"Success Response","type":"object","required":["status","messageId","timestamp"],"properties":{"status":{"type":"string","description":"Processing status - always returns 'success'","enum":["success"]},"messageId":{"type":"string","description":"Generated message identifier for tracking"},"timestamp":{"type":"string","format":"date-time","description":"Response timestamp in ISO 8601 format"}},"additionalProperties":false}}}}
```

## The ValidationErrorResponseDto object

```json
{"openapi":"3.0.1","info":{"title":"LSports RMS Customer Integration API","version":"v1.0"},"components":{"schemas":{"ValidationErrorResponseDto":{"title":"Validation Error Response","type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"timestamp":{"type":"string","format":"date-time","description":"Error timestamp"},"correlationId":{"type":"string","description":"Unique error correlation ID for tracking and debugging"},"message":{"type":"string","description":"Main error message"},"errors":{"type":"array","description":"Array of specific validation errors","items":{"type":"object","properties":{"message":{"type":"string","description":"Validation error detail"}}}}},"additionalProperties":false}}}}
```

## The ErrorResponseDto object

```json
{"openapi":"3.0.1","info":{"title":"LSports RMS Customer Integration API","version":"v1.0"},"components":{"schemas":{"ErrorResponseDto":{"title":"Error Response","type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP status code"},"timestamp":{"type":"string","format":"date-time","description":"Error timestamp"},"correlationId":{"type":"string","description":"Unique error correlation ID for tracking and debugging"},"message":{"type":"string","description":"Error message"},"hint":{"type":"string","description":"Hint for resolving the error","nullable":true}},"additionalProperties":false}}}}
```

## The FixtureMetadataRequestDto object

```json
{"openapi":"3.0.1","info":{"title":"LSports RMS Customer Integration API","version":"v1.0"},"components":{"schemas":{"FixtureMetadataRequestDto":{"title":"Fixture Metadata Request","type":"object","required":["Header","Body"],"properties":{"Header":{"$ref":"#/components/schemas/MessageHeaderDto"},"Body":{"$ref":"#/components/schemas/FixtureMetadataUpdateDto"}},"additionalProperties":false},"MessageHeaderDto":{"title":"Message Header","type":"object","required":["Type","MsgGuid","ServerTimestamp"],"properties":{"Type":{"type":"integer","description":"Message type identifier (1 for fixture metadata, 3 for market updates)"},"MsgSeq":{"type":"integer","description":"Message sequence number for ordering"},"MsgGuid":{"type":"string","format":"uuid","description":"Unique message identifier in UUID format"},"CreationDate":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the message was created"},"ServerTimestamp":{"type":"integer","format":"int64","description":"Unix timestamp in milliseconds"}},"additionalProperties":false},"FixtureMetadataUpdateDto":{"title":"Fixture Metadata Update","type":"object","required":["Events"],"properties":{"Events":{"type":"array","description":"Array of fixture events with metadata","items":{"$ref":"#/components/schemas/FixtureEventDto"},"minItems":1}},"additionalProperties":false},"FixtureEventDto":{"title":"Fixture Event","type":"object","required":["FixtureId","Fixture"],"properties":{"FixtureId":{"type":"integer","description":"Unique identifier for the fixture/event"},"Fixture":{"$ref":"#/components/schemas/FixtureDto"},"Livescore":{"type":"object","nullable":true,"description":"Current livescore data for the event"},"Markets":{"type":"object","nullable":true,"description":"Market data associated with the fixture"}},"additionalProperties":false},"FixtureDto":{"title":"Fixture Details","type":"object","required":["Sport","Location","League","StartDate","Status"],"properties":{"Subscription":{"type":"object","properties":{"Type":{"type":"integer"},"Status":{"type":"integer"}}},"Sport":{"type":"object","required":["Id","Name"],"properties":{"Id":{"type":"integer","description":"Sport unique identifier"},"Name":{"type":"string","description":"Sport name"}}},"Location":{"type":"object","required":["Id","Name"],"properties":{"Id":{"type":"integer","description":"Location/Country identifier"},"Name":{"type":"string","description":"Location/Country name"}}},"League":{"type":"object","required":["Id","Name"],"properties":{"Id":{"type":"integer","description":"League/Tournament identifier"},"Name":{"type":"string","description":"League/Tournament name"}}},"StartDate":{"type":"string","format":"date-time","description":"Event start date and time in ISO 8601 format"},"LastUpdate":{"type":"string","format":"date-time","description":"Last update timestamp for the fixture"},"Status":{"type":"integer","description":"Fixture status code (1=Not Started, 2=In Progress, 3=Finished, etc.)"},"Participants":{"type":"array","description":"Array of participants (teams or players) in the event","items":{"type":"object","required":["Id","Name"],"properties":{"Id":{"type":"integer","description":"Participant unique identifier"},"Name":{"type":"string","description":"Participant name"},"Position":{"type":"string","description":"Participant position (1=Home, 2=Away)"}}}},"FixtureExtraData":{"type":"array","description":"Additional fixture metadata as name-value pairs","items":{"type":"object","properties":{"Name":{"type":"string","description":"Property name"},"Value":{"type":"string","description":"Property value"}}}}},"additionalProperties":false}}}}
```

## BET SLIP

## Place a bet slip

> Place a bet slip - requires JWT token for authentication

```json
{"openapi":"3.0.1","info":{"title":"LSports RMS Bet API","version":"v1.0"},"servers":[{"url":"https://rms.lsports.eu/rms-bet/v1","variables":{"host":{"default":"https://rms.lsports.eu/rms-bet/v1"}},"description":"Production server"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PlaceBetRequestDto":{"type":"object","required":["betSlipContext","betType","stake","totalSelections","selections","userInfo"],"properties":{"betSlipId":{"type":"string","description":"Unique identifier for the bet slip"},"betSlipContext":{"type":"string","description":"Context of the bet slip","enum":["prematch","live","mixed"]},"betType":{"type":"string","description":"Type of bet being placed","enum":["single","multiple","system"]},"stake":{"$ref":"#/components/schemas/StakeInfo"},"totalSelections":{"type":"integer","description":"Total number of selections in the bet slip","minimum":1},"selections":{"type":"array","description":"Array of betting selections","items":{"$ref":"#/components/schemas/Selection"},"minItems":1},"systemStructure":{"type":"array","description":"System bet configuration (required for system bets)","items":{"$ref":"#/components/schemas/SystemStructureItem"},"nullable":true},"userInfo":{"$ref":"#/components/schemas/NewUserInfo"}},"additionalProperties":false},"StakeInfo":{"type":"object","required":["totalAmount"],"properties":{"totalAmount":{"type":"number","description":"Total stake amount for the bet slip","minimum":0.01}},"additionalProperties":false},"Selection":{"type":"object","required":["eventId","eventType","eventContext","market","bet"],"properties":{"eventId":{"type":"string","description":"Unique identifier for the event"},"eventType":{"type":"string","description":"Type of the event","enum":["match"]},"eventContext":{"type":"string","description":"Context of the event","enum":["prematch","live"]},"market":{"$ref":"#/components/schemas/MarketInfo"},"bet":{"$ref":"#/components/schemas/BetInfo"}},"additionalProperties":false},"MarketInfo":{"type":"object","required":["id"],"properties":{"id":{"type":"string","description":"Unique market identifier"},"line":{"type":"string","description":"Market line specifier or handicap value","nullable":true}},"additionalProperties":false},"BetInfo":{"type":"object","required":["id","odds"],"properties":{"id":{"type":"string","description":"Unique bet outcome identifier"},"odds":{"type":"number","description":"Odds value for the bet","minimum":1.01}},"additionalProperties":false},"SystemStructureItem":{"type":"object","required":["selections","quantity","betAmount"],"properties":{"selections":{"type":"integer","description":"Number of selections for this system part, 1 - for singles, 2 - for doubles, ...","minimum":1},"quantity":{"type":"integer","description":"Number of combinations for this system part","minimum":1},"betAmount":{"type":"number","description":"Stake amount per combination","minimum":0.01}},"additionalProperties":false},"NewUserInfo":{"type":"object","required":["id","userName"],"properties":{"id":{"type":"string","description":"Unique user identifier"},"userName":{"type":"string","description":"User name for the bet slip"}},"additionalProperties":false},"PlaceBetResponseDto":{"type":"object","properties":{"bet_code":{"type":"string","description":"Generated bet code"},"shortCode":{"type":"string","description":"Short bet code"},"result":{"type":"boolean","description":"Whether bet placement was successful"}},"additionalProperties":false},"NotFoundErrorResponseDto":{"type":"object","properties":{"message":{"type":"string","description":"Main error message"},"details":{"type":"string","description":"Detailed explanation of the error"},"errorType":{"type":"string","description":"Specific error type identifier"},"missingCount":{"type":"integer","description":"Number of missing entities","nullable":true},"totalRequested":{"type":"integer","description":"Total number of entities requested","nullable":true}},"additionalProperties":false},"BetConstructionErrorResponseDto":{"type":"object","properties":{"message":{"type":"string"},"details":{"type":"string"},"errorType":{"type":"string"},"totalSelectionsProvided":{"type":"number"},"validBetsCreated":{"type":"number"}},"additionalProperties":false},"InternalErrorResponseDto":{"type":"object","properties":{"message":{"type":"string","description":"Main error message"},"details":{"type":"string","description":"Detailed explanation of the error"},"errorType":{"type":"string","description":"Specific error type identifier"}},"additionalProperties":false},"ServiceUnavailableErrorResponseDto":{"type":"object","properties":{"message":{"type":"string","description":"Main error message"},"details":{"type":"string","description":"Detailed explanation of the error"},"errorType":{"type":"string","description":"Specific error type identifier"}},"additionalProperties":false},"ValidationErrorResponseDto":{"type":"object","properties":{"message":{"type":"string","description":"Main error message"},"errors":{"type":"array","description":"Array of specific validation errors","items":{"type":"string"}},"warnings":{"type":"array","description":"Array of validation warnings","items":{"type":"string"},"nullable":true},"details":{"type":"string","description":"Detailed explanation of the error","nullable":true}},"additionalProperties":false},"ErrorResponseDto":{"type":"object","properties":{"result":{"type":"boolean"},"error_code":{"type":"string"},"reason":{"type":"string"},"data_to_update":{"type":"object","description":"Additional data for odds update errors","nullable":true}},"additionalProperties":false}}},"paths":{"/cart/place-bet":{"post":{"tags":["Bet Management"],"summary":"Place a bet slip","description":"Place a bet slip - requires JWT token for authentication","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaceBetRequestDto"}}}},"responses":{"200":{"description":"Bet placed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaceBetResponseDto"}}}},"404":{"description":"Event or market data not found in the system","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorResponseDto"}}}},"422":{"description":"Bet construction failed. No valid betting combinations could be created from the provided selections.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BetConstructionErrorResponseDto"}}}},"500":{"description":"Internal server error during bet slip processing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorResponseDto"}}}},"503":{"description":"Database service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableErrorResponseDto"}}}},"400 (1)":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponseDto"}}}},"400 (2)":{"description":"Bet Slip Rejected by the risk system, or error saving the bet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}}}}}}
```

### 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.

```json
{
  "result": false,
  "error_code": "update_odds",
  "reason": "Invalid odds",
  "data_to_update": [
    {
      "source": "eventId;marketUniqueId;outcomeId",
      "type": "prematch",
      "result": false,
      "reason": "changed_odd_value",
      "newOdd": { ... }
    }
  ]
}
```

| `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  |

## Get bet details for players

> Retrieve bet information for player

```json
{"openapi":"3.0.1","info":{"title":"LSports RMS Bet API","version":"v1.0"},"servers":[{"url":"https://rms.lsports.eu/rms-bet/v1","variables":{"host":{"default":"https://rms.lsports.eu/rms-bet/v1"}},"description":"Production server"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"BetDetailRequestDto":{"type":"object","required":["code"],"properties":{"code":{"type":"string","description":"Unique bet code identifier"}},"additionalProperties":false},"BetDetailResponseDto":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/BetData"}},"additionalProperties":false},"BetData":{"type":"object","properties":{"code":{"type":"string","description":"Unique bet code"},"platform_id":{"type":"number","description":"Platform identifier"},"user_id":{"type":"number","description":"User identifier"},"type":{"type":"string","description":"Type of bet","enum":["single","multiple","system","integral"]},"bet_context":{"type":"string","description":"Betting context","enum":["prematch","live","mixed","antepost"]},"status":{"type":"string","description":"Current bet status","enum":["accepted","review","cancelled","finished"]},"result":{"type":"string","description":"Bet result","enum":["pending","win","lose","void","cancelled"]},"odds":{"type":"array","description":"Array of bet odds","items":{"$ref":"#/components/schemas/BetOdd"}},"odds_sources":{"type":"array","description":"Array of odds source identifiers","items":{"type":"string"}},"amount_real":{"type":"number","description":"Real bet amount"},"currency":{"type":"string","description":"Currency code"},"currencySymbol":{"type":"string","description":"Currency symbol"},"created_at":{"type":"number","description":"Bet creation timestamp"},"sent_time":{"type":"number","description":"Time when bet was sent"},"oddHash":{"type":"string","description":"Hash of odds for repetition checking"},"betCode":{"type":"string","description":"Short bet code"},"_multiple_detail":{"$ref":"#/components/schemas/MultipleDetail"},"_system_detail":{"$ref":"#/components/schemas/SystemDetail"},"system_parts":{"type":"array","description":"System bet parts","items":{"$ref":"#/components/schemas/SystemPart"}}},"additionalProperties":false},"BetOdd":{"type":"object","properties":{"id_market":{"type":"number"},"market_unique_id":{"type":"string"},"market_name":{"type":"string"},"id_outcome":{"type":"number"},"unique_id":{"type":"string"},"outcome_alias":{"type":"string"},"ext_id":{"type":"string"},"outcome_name":{"type":"string"},"outcome_odd_value":{"type":"string"},"outcome_odd_value_original":{"type":"string"},"outcome_odd_percent":{"type":"string"},"outcome_odd_percent_original":{"type":"string"},"outcome_key_value":{"type":"number"},"outcome_key_value_original":{"type":"number"},"outcome_odd_value_for_order":{"type":"number"},"active":{"type":"boolean"},"multiplicity":{"type":"string"},"multiplicity_min":{"type":"string"},"multiplicity_max":{"type":"string"},"market_fixed":{"type":"number"},"spec":{"type":"string"},"type":{"type":"string"},"specifier":{"type":"string"},"event_description":{"type":"string"},"time":{"type":"number"},"event_source":{"type":"number"},"sport":{"$ref":"#/components/schemas/SportInfo"},"category":{"$ref":"#/components/schemas/CategoryInfo"},"tournament":{"$ref":"#/components/schemas/TournamentInfo"},"quickbet":{"type":"string"},"status_event":{"type":"string"}},"additionalProperties":false},"SportInfo":{"type":"object","properties":{"id":{"type":"number"},"_id":{"type":"string"},"source":{"type":"number"},"name":{"type":"string"},"order":{"type":"number"},"status":{"type":"boolean"}},"additionalProperties":false},"CategoryInfo":{"type":"object","properties":{"id":{"type":"number"},"_id":{"type":"string"},"source":{"type":"number"},"name":{"type":"string"},"order":{"type":"number"},"status":{"type":"boolean"}},"additionalProperties":false},"TournamentInfo":{"type":"object","properties":{"id":{"type":"number"},"_id":{"type":"string"},"source":{"type":"number"},"name":{"type":"string"},"order":{"type":"number"},"status":{"type":"boolean"}},"additionalProperties":false},"MultipleDetail":{"type":"object","properties":{"amount":{"type":"number"},"odds_total":{"type":"number"},"multiplicity":{"type":"number"},"winning":{"type":"number"},"bonus_percentage":{"type":"number"},"bonus":{"type":"number"},"winning_total":{"type":"number"},"profit":{"type":"number"},"expectedTaxOnWonAmount":{"type":"number"},"expectedTotalTaxedWinnings":{"type":"number"},"expectedProfitTaxed":{"type":"number"}},"additionalProperties":false},"SystemDetail":{"type":"object","properties":{"amount_system":{"type":"number"},"fixed_bases":{"type":"array","items":{"type":"string"}},"combinations":{"type":"number"},"winning_min_taxed":{"type":"string"},"winning_max_taxed":{"type":"string"},"winning_total_min_taxed":{"type":"string"},"winning_total_max_taxed":{"type":"string"},"winning_all_taxed":{"type":"string"},"winning_all_total_taxed":{"type":"string"},"winning_min":{"type":"string"},"winning_max":{"type":"string"},"winning_total_min":{"type":"string"},"winning_total_max":{"type":"string"},"bonus_min":{"type":"string"},"bonus_max":{"type":"string"},"winning_all":{"type":"string"},"winning_all_total":{"type":"string"},"valid_combinations_all":{"type":"number"}},"additionalProperties":false},"SystemPart":{"type":"object","properties":{"amount":{"type":"number"},"checked":{"type":"boolean"},"multiplicity":{"type":"number"},"num_combo":{"type":"number"},"combinationsOdds":{"type":"array","items":{"type":"string"}},"show":{"type":"boolean"},"context":{"type":"string"},"bets":{"type":"array","description":"System bet combinations","items":{"type":"object"}}},"additionalProperties":false}}},"paths":{"/bet/detail":{"post":{"tags":["Bet Information"],"summary":"Get bet details for players","description":"Retrieve bet information for player","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BetDetailRequestDto"}}}},"responses":{"200":{"description":"Bet details retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BetDetailResponseDto"}}}},"401":{"description":"Unauthorized - Missing customerid header","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"403":{"description":"User unauthorized - No access to RMS","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}}}}
```

## Settle a bet slip

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

```json
{"openapi":"3.0.1","info":{"title":"LSports RMS Bet API","version":"v1.0"},"servers":[{"url":"https://rms.lsports.eu/rms-bet/v1","variables":{"host":{"default":"https://rms.lsports.eu/rms-bet/v1"}},"description":"Production server"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"DefineBetRequestDto":{"type":"object","required":["code","status"],"properties":{"code":{"type":"string","description":"Unique bet code identifier"},"status":{"type":"string","description":"Status of the bet","enum":["win","lose","void","pending","cancelled"]},"subCode":{"type":"string","description":"Unique sub bet code identifier (required for system bet slip)","nullable":true},"multiplicity":{"type":"number","description":"The multiplicity number of markets in the bet slip (required for system bet slip)","nullable":true}},"additionalProperties":false},"DefineBetResponseDto":{"type":"object","properties":{"message":{"type":"string","description":"Settlement confirmation message"}},"additionalProperties":false},"ErrorResponseDto":{"type":"object","properties":{"result":{"type":"boolean"},"error_code":{"type":"string"},"reason":{"type":"string"},"data_to_update":{"type":"object","description":"Additional data for odds update errors","nullable":true}},"additionalProperties":false}}},"paths":{"/bet/define":{"post":{"tags":["Bet Settlement"],"summary":"Settle a bet slip","description":"Settle a bet slip with a given code and status. Requires JWT Bearer token authentication.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefineBetRequestDto"}}}},"responses":{"200":{"description":"Bet successfully updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefineBetResponseDto"}}}},"401":{"description":"Unauthorized - Missing customerid header","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"402":{"description":"User unauthorized - RMS asset not active","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"400 (1)":{"description":"Bet not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"400 (2)":{"description":"Invalid bet status parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"400 (3)":{"description":"Missing required fields","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"400 (4)":{"description":"Bet already settled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lsports.eu/u/defend/api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
