Chat API
JWT token for authorization
Bearer {jwt_token}
Language code (e.g., "en" for English)
en
The prompt or question for the LLM
Who is likely to score first?
Correlation ID for tracking the request
abc123xyz
Identifier for the conversation session
session_12345
Successfully received response from LLM
Bad request. Please verify the input parameters.
Unauthorized. Authentication failed or token is invalid.
Internal server error. Please try again later.
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
}
JWT token for authorization
Bearer {jwt_token}
Successfully retrieved list of supported LSports market IDs.
List of market IDs supported for conversation.
["52","1002","950"]
Bad request. Please verify the input parameters.
Unauthorized. Authentication failed or token is invalid.
Internal server error. Please try again later.
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"
]
JWT token for authorization
Bearer {jwt_token}
Successfully retrieved supported fixtures for conversation.
Bad request. Please verify the input parameters.
Unauthorized. Authentication failed or token is invalid.
Internal server error. Please try again later.
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?