Fixtures And League Subscription

Modified on Sun, 10 Sep, 2023 at 2:58 PM

In the following article, we will explain how you will be able to Subscribe and Unsubscribe to Sports fixtures and leagues,


TABLE OF CONTENTS

Subscribe to Fixtures

Subscribe to requested fixtures

Method - POST
URL - https://stm-api.lsports.eu/Fixtures/Subscribe

If you haven’t configured odds settings for the fixture that you subscribe to, you will receive no markets at all.
You should select the markets you want to receive in the Odds Settings window on our website.

Unsubscribe

Unsubscribe to requested fixtures

Method - POST
URL - https://stm-api.lsports.eu/Fixtures/Unsubscribe

Body Scheme

{
    "PackageId": YourPackageId,
    "UserName": "YourUserName",
    "Password": "YourPassword",
    "Fixtures": [1234567,2334224,2323234] // list of fixture ids
}

Parameter breakdown

ParameterDescriptionMandatory Field
UsernameUsername as it appears in the package
PasswordPassword as it appears the package
PackageIdPackageId as it provide by LSports
FixturesList of requested fixture ids

Response Scheme

{
    "Header": {
        "HttpStatusCode": 200
    },
    "Body": {
        "Fixtures": [
            {
                "FixtureId": 1234567,
                "Success": true
            }
             {
                "FixtureId": 2334224,
                "Success": true
            }
             {
                "FixtureId": 2323234,
                "Success": false
            }
        ]
    }
}

Response Description

ParameterValueDescription
SuccessbooleanIndicates if your subscription request succeeded or not per fixture. subscription mainly failed because your package is out of quota bounds

Subscribe/Unsubscribe Leagues

Subscribe to requested leagues

Method - POST
URL - https://stm-api.lsports.eu/Leagues/Subscribe

If you haven’t configured odds settings for the group you subscribe to (competition,location or sport), you will receive no markets at all.
You should select the markets you want to receive in the Odds Settings window on our website.

Unsubscribe

Unsubscribe to requested leagues

Method - POST
URL - https://stm-api.lsports.eu/Leagues/Unsubscribe

Body Scheme

{
    "PackageId": YourPackageId,
    "UserName": "YourUserName",
    "Password": "YourPassword",
    "Subscriptions":[{SportId:6046,LocationId:142,LeagueId:5}]

}

Parameter breakdown

ParameterDescriptionMandatory Field
UsernameUsername as it appears in the package
PasswordPassword as it appears the package
PackageIdPackageId as it provide by LSports
SubscriptionsList of filter to subscribe/not subscribed requested leagues, request can be only by SportId or SportId+LocationId or LeagueId or SportId+LocationId+LeagueId

Response Scheme

{
    "Header": {
        "HttpStatusCode": 200
    },
    "Body": {
        "Subscription": [
            {
                "LeagueId": 5,
                "SportId": 6046,
                "LocationId": 142,
                "Success": true
            }
        ]
    }
}

Response Description

ParameterValueDescription
SuccessbooleanIndicates if your subscription request succeeded or not per league. subscription mainly failed because your package is out of quota bounds


Get Subscribed Fixtures

Used to receive a list of the currently available fixtures that you've ordered in an InPlay package, this API request is unavailable for PreMatch.


Note that pending fixtures will not be available within the response

The response includes the following fixture statutes:

  • NSY
  • About To Start–only when the fixture's last update is within the last 24 hours
  • In Progress-only when the fixture's last update is within the last 24 hours
  • Lost Coverage-only when the fixture's last update is within the last 24 hours
  • Interrupted -only when the fixture's last update is within the last 24 hours
  • Finished-only when the fixture's last update is within the last 24 hours
  • Abandoned- only when fixture's last update is within the last 24 hours

The response does not include the following statutes: 

  • Canceled
  • Postponed


A list of subscribed fixtures is available under:

Method - POST
URL - https://stm-api.lsports.eu/Fixtures/Get

Body Scheme

{
    "PackageId": YourPackageId,
    "UserName": "YourUserName",
    "Password": "YourPassword",
    "LocationIds":[2],
    "SportIds":[6046]
}

Parameter breakdown

ParameterDescriptionMandatory Field
UsernameUsername as it appears in the package
PasswordPassword as it appears the package
PackageIdPackageId as it provide by LSports
SportIdssportsId as a filter opportunity
Type:List <int>
X
LocationIdslocationId as a filter opportunity
Type : List <int>
X
LeagueIdsleagueId as a filter opportunity
Type : List <int>
X

Response Scheme

{
    "Header": {
        "HttpStatusCode": 200
    },
    "Body": {
        "Fixtures": [
            4936668,
            4936627,
            4936714] 
            }
}


Subscribe/Unsubscribe Competitions

Subscribe to requested competitions

Method - POST
URL - https://stm-api.lsports.eu/Outright/Subscribe

Unsubscribe

Unsubscribe to requested competitions

Method - POST URL - https://stm-api.lsports.eu/Outright/Unsubscribe

Body Scheme

{
    "PackageId": YourPackageId,
    "UserName": "YourUserName",
    "Password": "YourPassword",
    "Subscriptions":[{"SportId":687893,"LocationId":2,"CompetitionId":9552}]

}

Parameter breakdown

ParameterDescriptionMandatory Field
UsernameUsername as it apparrs in the package
PasswordPassword as it appears the package
PackageIdPackageId as it provide by LSports
SubscriptionsList of filter to subscribe/not subscribed requested competition. Request must be by SportId or SportId+LocationId or ComptitionId or SportId+LocationId+ComptitionId

Response Scheme

{
    "Header": {
        "HttpStatusCode": 200
    },
    "Body": {
        "Subscription": [
            {
                "ComptitionId": 9552,
                "SportId": 687893,
                "LocationId": 2,
                "Success": true
            }
        ]
    }
}

Response Description

ParameterValueDescription
SuccessbooleanIndicates if your subscription request succeeded or not per competition.

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 at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article