LogoLogo
FeedsIntelligenceEngagementsHelpHome
SEC
SEC
  • User Guide
  • Tips Tracker
  • Widget Integration
  • Tips API
  • Fixtures API
  • Chat API
Powered by GitBook
On this page

Was this helpful?

Chat API

PreviousFixtures API

Last updated 7 months ago

Was this helpful?

  • POSTConversate with the LLM using a fixture-based prompt.
  • POSTRetrieves supported LSports market IDs for conversation.
  • POSTRetrieve supported fixtures for conversation.

Conversate with the LLM using a fixture-based prompt.

post
Header parameters
AuthorizationstringRequired

JWT token for authorization

Example: Bearer {jwt_token}
LanguagestringRequired

Language code (e.g., "en" for English)

Example: en
Body
PromptstringOptional

The prompt or question for the LLM

Example: Who is likely to score first?
CorrelationIdstringOptional

Correlation ID for tracking the request

Example: abc123xyz
ConversationSessionIdstringOptional

Identifier for the conversation session

Example: 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
}

Retrieves supported LSports market IDs for conversation.

post
Header parameters
AuthorizationstringRequired

JWT token for authorization

Example: Bearer {jwt_token}
Body
Responses
200
Successfully retrieved list of supported LSports market IDs.
application/json
Responsestring[]

List of market IDs supported for conversation.

Example: ["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"
]

Retrieve supported fixtures for conversation.

post
Header parameters
AuthorizationstringRequired

JWT token for authorization

Example: 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
    }
  ]
}