The following API will return the entity ID and its translation in different languages according to the request
Method - POST
URL - https://stm-api.lsports.eu/Translation/Get
Body Scheme
{ "UserName":"YourUserName", "Password":"YourPassword", "PackageId":YourPackageId, "SportIds":[6046,48242], "LocationIds":[], "LeagueIds":[64,67] "MarketIds":[], "ParticipantIds":[] "Languages":[de,en,cz] }
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 | ✓ |
Languages | Languages as a filter opportunity Type : List <int> | ✓ |
SportIds | SportIds as a filter opportunity Type : List <int> | X |
LocationIds | LocationIds as a filter opportunity Type : List <int> | X |
LeagueIds | LeagueIds as a filter opportunity Type : List <int> | X |
MarketIds | MarketIds as a filter opportunity Type : List <int> | X |
ParticipantIds | ParticipantIds as a filter opportunity Type : List <int> | X |
You will have to supply at least one of the non mandatory fields, in order to request the ids that you want to translate.
If you want to translate SportId = 6046 (Football) to German, you will have to send the following request:
Url: https://stm-api.lsports.eu/Translation/Get
Body:
{ "UserName":"YourUserName", "Password":"YourPassword", "PackageId":YourPackageId, "Languages":[de] "SportIds":[6046] }
Response Scheme
{ "Header": { "HttpStatusCode": 200 }, "Body": { "Sports": { "6046": [ { "LanguageId": 3, "Value": "Футбол" }, { "LanguageId": 4, "Value": "ფეხბურთი" }, { "LanguageId": 5, "Value": "サッカー" } ], "48242": [ { "LanguageId": 3, "Value": "Баскетбол" }, { "LanguageId": 4, "Value": "კალათბურთი" }, { "LanguageId": 5, "Value": "バスケットボール" } ] }, "Leagues": { "64": [ { "LanguageId": 3, "Value": "НБА" }, { "LanguageId": 4, "Value": "ნბა" }, { "LanguageId": 5, "Value": "NBA" } ], "67": [ { "LanguageId": 3, "Value": "Английская Премьер-Лига" }, { "LanguageId": 4, "Value": "პრემიერ ლიგა" }, { "LanguageId": 5, "Value": "プレミアリーグ" } ] } } }
If the request does not have any optional field to translate- the response will return an ErrorCode 400 and the message will include the error.
If the request is without Languages field- the response will return an error with an informative message.
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