Get Fixtures MetaData

Modified on Tue, 31 Oct 2023 at 06:55 PM

 

Overview

With the newly introduced feature, users can now easily retrieve metadata for all booked events. This helps users gather precise and up-to-date information about upcoming fixtures, ensuring that they are always informed.

 

 

Endpoint Details

Method: GET (requires adding the credentials in the Params section)

URL: https://stm-api.lsports.eu/Fixtures/GetSubscribedMetaData

 

Supported Packages: 

- Prematch

- Inplay

 

Request Input Fields:

To make a successful request, the user needs to provide the following fields:

 

1. PackageId: The unique identifier for your package.

2. UserName: Your registered username.

3. Password: Your registered password.

4. FromDate (in UTC): The starting date from the Present date 

5. ToDate (in UTC): The end date up to which you'd like to retrieve event data.

 

Note: All input fields are mandatory to get a response.

 

Output Details:

The output will provide comprehensive data related to the user’s package. However, it's essential to keep in mind the following conditions:

 

- The data covers a maximum of 7 days at a time.

- The FromDate cannot be in the past (earlier than the present day of the request submission). Any start date prior to that will be considered invalid.


Error Handling:

 

1. Incorrect Date Range: If a user submits a start date that has already passed, it will lead to the following error message:

   `Incorrect request, the date range is not consistent. Please enter a valid date and resend your request.`

 

2.Date Range Exceeds One Week: If a user specifies a date range that exceeds one week, the response will automatically trim and provide data only for the upcoming week.

 

3.FromDate Field is Empty: If the user fails to fill the FromDate field.

This will lead to the following error message:

Incorrect request. Please enter a valid FromDate and resend your request.

 

4.ToDate Field is Empty: If the user fails to fill the ToDate field.

This will lead to the following error message:

Incorrect request. Please enter a valid ToDate and resend your request.

 

5. Authentication Error: In case the user either omits one of the credentials (username, password, package ID) or enters it incorrectly.

This will lead to the following error message:

Incorrect username or password for the requested package.

 

6. Invalid Date Submission: If a user submits a date that doesn’t exist (e.g 29.02, 20.13 etc.).

This will lead to the following error message:

Incorrect request, please enter a valid FromDate / ToDate and resend your request.

 

7. Mandatory Field Omission: If the user fails to submit any of the mandatory fields.

  • In case of no input in the FromDate field:
    Incorrect request, please enter a valid FromDate and resend your request.
  • In case of no input in the ToDate field:
    Incorrect request, please enter a valid ToDate and resend your request.
  • In case the user either omits one of the credentials (username, password, package ID) or enters it incorrectly.
    Incorrect username or password for the requested package. 

 

 

Parameter breakdown

 

Parameter

 

Description

Mandatory Field

Username

 

Username as it appears in the package

Password

 

Password as it appears the package

PackageId

 

PackageId as provided by LSports

FromDate

 

FromDate is mandatory

field format (MM/DD/YYYY) Type : String

ToDate

 

ToDate is mandatory

Field format (MM/DD/YYYY) Type : String

 


Request example:
{
 
"PackageId": YourPackageId,
"UserName": "YourUserName",
"Password": "YourPassword",
"FromDate": "10/31/2023",
"ToDate": "11/02/2023"
}


Response example

 

"Header": {

    "HttpStatusCode": 200

},

"Body": {

    "SubscribedFixtures": [

    {

        "FixtureId": 21159404,

        "FixtureName": "Unión La Calera VS Palestino",

        "StartDate": "2023-08-07T00:00:00",

        "LastUpdate": "2023-08-05T02:17:00.828347",

        "SportId": 6046,

        "LocationId": 195,

        "LeagueId": 18279,

        "FixtureStatus": 1,

        "Participants": [

        {

            "ParticipantId": 130885,

            "ParticipantName": "Palestino"

        },

        {

            "ParticipantId": 237549,

            "ParticipantName": "Unión La Calera"

        }

        ]

    }



 

 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article