Chat API
Header parameters
AuthorizationstringRequiredExample:
JWT token for authorization
Bearer {jwt_token}
LanguagestringRequiredExample:
Language code (e.g., "en" for English)
en
Body
PromptstringOptionalExample:
The prompt or question for the LLM
Who is likely to score first?
CorrelationIdstringOptionalExample:
Correlation ID for tracking the request
abc123xyz
ConversationSessionIdstringOptionalExample:
Identifier for the conversation session
session_12345
Responses
200
Successfully received response from LLM
application/json
400
Bad request. Please verify the input parameters.
application/json
401
Unauthorized. Authentication failed or token is invalid.
application/json
500
Internal server error. Please try again later.
application/json
post
POST /chat/api/v2/chat HTTP/1.1
Host: sec-gw.lsports.eu
Authorization: Bearer {jwt_token}
Language: en
Content-Type: application/json
Accept: */*
Content-Length: 676
{
"Prompt": "Who is likely to score first?",
"Fixture": {
"Id": "22231141",
"Date": "2024-10-27T14:00:00Z",
"Participants": [
{
"Id": "Chelsea",
"Name": "Chelsea",
"DisplayName": "Chelsea FC"
}
],
"Markets": [
{
"Id": "1",
"Name": "1X2",
"DisplayName": "Match Result",
"Bets": [
{
"Id": "1_2",
"Name": "2",
"Odds": 1.9,
"Selected": false,
"Line": "0.5",
"DisplayName": "Away Win",
"Player": {
"Id": "101",
"Name": "John Doe",
"DisplayName": "J. Doe"
}
}
]
}
],
"League": {
"Id": "67",
"Name": "Premier League",
"DisplayName": "EPL"
},
"Sport": {
"Id": "1",
"Name": "Football",
"DisplayName": "Soccer"
},
"Location": {
"Id": "701",
"Name": "Old Trafford",
"DisplayName": "Man Utd Stadium"
}
},
"CorrelationId": "abc123xyz",
"ConversationSessionId": "session_12345"
}
{
"Message": {
"Id": "269598d9-9af4-41ba-bc3a-18488e8912ab",
"Type": "received",
"Status": "delivered",
"Timestamp": "2024-10-15T11:21:42",
"Text": "How can I help you today?",
"BetId": null,
"MarketId": null,
"PlayerId": null,
"FixtureId": "22231141",
"LSportsFixtureId": 22231141,
"LSportsSportId": 6046,
"LSportsLocationId": 243,
"LSportsPlayerId": null
},
"RelatedQuestions": [
"What are the odds for Chelsea to win?"
],
"Error": 3
}
Header parameters
AuthorizationstringRequiredExample:
JWT token for authorization
Bearer {jwt_token}
Body
Responses
200
Successfully retrieved list of supported LSports market IDs.
application/json
Responsestring[]Example:
List of market IDs supported for conversation.
["52","1002","950"]
400
Bad request. Please verify the input parameters.
401
Unauthorized. Authentication failed or token is invalid.
500
Internal server error. Please try again later.
post
POST /chat/api/v2/suggestedquestions HTTP/1.1
Host: sec-gw.lsports.eu
Authorization: Bearer {jwt_token}
Content-Type: application/json
Accept: */*
Content-Length: 567
{
"Fixture": {
"Id": "22231141",
"Date": "2024-10-27T14:00:00Z",
"Participants": [
{
"Id": "Chelsea",
"Name": "Chelsea",
"DisplayName": "Chelsea FC"
}
],
"Markets": [
{
"Id": "1",
"Name": "1X2",
"DisplayName": "Match Result",
"Bets": [
{
"Id": "1_2",
"Name": "2",
"Odds": 1.9,
"Selected": false,
"Line": "0.5",
"DisplayName": "Away Win",
"Player": {
"Id": "101",
"Name": "John Doe",
"DisplayName": "J. Doe"
}
}
]
}
],
"League": {
"Id": "67",
"Name": "Premier League",
"DisplayName": "EPL"
},
"Sport": {
"Id": "1",
"Name": "Football",
"DisplayName": "Soccer"
},
"Location": {
"Id": "701",
"Name": "Old Trafford",
"DisplayName": "Man Utd Stadium"
}
}
}
[
"52",
"1002",
"950"
]
Header parameters
AuthorizationstringRequiredExample:
JWT token for authorization
Bearer {jwt_token}
Body
Responses
200
Successfully retrieved supported fixtures for conversation.
application/json
400
Bad request. Please verify the input parameters.
401
Unauthorized. Authentication failed or token is invalid.
500
Internal server error. Please try again later.
post
POST /chat/api/v2/fixtures HTTP/1.1
Host: sec-gw.lsports.eu
Authorization: Bearer {jwt_token}
Content-Type: application/json
Accept: */*
Content-Length: 570
{
"Fixtures": [
{
"Id": "22231141",
"Date": "2024-10-27T14:00:00Z",
"Participants": [
{
"Id": "Chelsea",
"Name": "Chelsea",
"DisplayName": "Chelsea FC"
}
],
"Markets": [
{
"Id": "1",
"Name": "1X2",
"DisplayName": "Match Result",
"Bets": [
{
"Id": "1_2",
"Name": "2",
"Odds": 1.9,
"Selected": false,
"Line": "0.5",
"DisplayName": "Away Win",
"Player": {
"Id": "101",
"Name": "John Doe",
"DisplayName": "J. Doe"
}
}
]
}
],
"League": {
"Id": "67",
"Name": "Premier League",
"DisplayName": "EPL"
},
"Sport": {
"Id": "1",
"Name": "Football",
"DisplayName": "Soccer"
},
"Location": {
"Id": "701",
"Name": "Old Trafford",
"DisplayName": "Man Utd Stadium"
}
}
]
}
{
"Fixtures": [
{
"Id": "22231141",
"Date": "2024-10-27T14:00:00Z",
"FixtureId": "22231141",
"LSportsFixtureId": 22231141,
"LSportsSportId": 6046,
"LSportsLocationId": 243
}
]
}
Last updated
Was this helpful?