The following request returns all the leagues that are relevant for the requested filters.
*Leagues are relevant for all sports except Outright Sports.
Method - POST
URL - https://stm-api.lsports.eu/Leagues/Get
Body Scheme
{ "PackageId": YourPackageId, "UserName": "YourUserName", "Password": "YourPassword" "LocationIds":[1,30], "SportIds":[6046,54094], "SubscriptionStatus":1, "LanguageId": LanguageId }
Parameter breakdown
Parameter | Description | Mandatory Field |
---|---|---|
Username | Username as it apparrs in the package | ✓ |
Password | Password as it appears the package | ✓ |
PackageId | PackageId as it provide by LSports | ✓ |
SportIds | SportsIds as a filter opportunity Type:List <int> | X |
LocationIds | LocationIds as a filter opportunity Type : List <int> | X |
SubscriptionStatus | Filter on order to get your subscribed/not subscribed leagues (1 = Not Subscribed, 2 = Subscribed). empty field returns all leagues | X |
LanguageId | LanguageId as a filter opportunity | X |
Response Scheme
{ "Header": { "HttpStatusCode": 200 }, "Body": { "Leagues": [ { "Id": 4, "Name": "Serie A", "Season": "2021/2022" "SportId": 6046, "LocationId": 215, }, { "Id": 5, "Name": "Primera Division", "Season": "2021/2022" "SportId": 6046, "LocationId": 142, } ] } }
If the request is without “LanguageId” - the response returns a list of “Id” and “Name” in English.
If the request is with “LanguagesId” that InValid - ErrorCode 400 and error message - "Incorrect request, please enter a valid Language and resend your request."
If the request is with “LanguageId” and there are some sports that don't have a translation in this language - it's not returned (without an error).
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article