Translation API

Modified on Wed, 06 Dec 2023 at 11:21 AM

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

ParameterDescriptionMandatory Field
UsernameUsername as it apparrs in the package
PasswordPassword as it appears the package
PackageIdPackageId as it provide by LSports
LanguagesLanguages as a filter opportunity
Type : List <int>
SportIdsSportIds as a filter opportunity
Type : List <int>
X
LocationIdsLocationIds as a filter opportunity
Type : List <int>
X
LeagueIdsLeagueIds as a filter opportunity
Type : List <int>
X
MarketIdsMarketIds as a filter opportunity
Type : List <int>
X
ParticipantIdsParticipantIds 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

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article