The '/suggestions' method enables you to get suggestions for short texts during the development process.

GET {{baseUrl}}/suggestions?search=<string>&searchLanguage=<string>&language=<string>&domain=<string>&texttype=<string>&maxLength=<string>

Provides suggestions for short texts based on complete or partial texts and their translations. You can, for example, use the '/suggestions' method to propose texts while you type texts in a development environment. The texts that the method proposes are already available in additional languages in the multilingual text repository (MLTR).

Request Params

KeyDatatypeRequiredDescription
searchstring(Required) Allows you to search for a text in SAP Translation Hub in English. You can enter a complete text or part of a text. If you want to search for a text in a language other than English, enter the text in the required language here and specify the language in the searchLanguage parameter.
searchLanguagestringAllows you to search for a text in any of the languages that SAP Translation Hub supports. Specify the language using the language ID, for example, de.
languagestringAllows you to search for a text that has translations in the specified language(s). For example, you can search for texts that have translations in German (de) and French (fr).
domainstringSearches for texts in the specified domain(s) or domain group(s). For example, you can search for terms that are assigned to the domain for Customer Relationship Management (B2) or logistics (03). To see which domains and domain groups are supported, use the '/domains' method.
texttypestringAllows you to search for a text that is assigned to one or more text types. For example, you can search for terms that are assigned to the text type for field labels (XFLD). To see which text types are supported, use the '/texttypes' method. If you use the suggestion service with ABAP systems, you can specify a four-character object type, such as DTEL for data elements, in this parameter.
maxLengthstringSearches for texts up to the specified number of characters. For example, if a UI element can accommodate only 5 characters, you can search for texts that comprise 5 characters or fewer. If the suggestion service cannot find any texts that match the length criteria, the response is empty.

HEADERS

KeyDatatypeRequiredDescription
Acceptstring

RESPONSES

status: OK

{&quot;suggestions&quot;:[{&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;value&quot;:&quot;\u003cstring\u003e&quot;,&quot;domainId&quot;:&quot;\u003cstring\u003e&quot;,&quot;domainName&quot;:&quot;\u003cstring\u003e&quot;,&quot;texttypeId&quot;:&quot;\u003cstring\u003e&quot;,&quot;texttypeName&quot;:&quot;\u003cstring\u003e&quot;,&quot;englishValue&quot;:&quot;\u003cstring\u003e&quot;,&quot;availableLanguages&quot;:&quot;\u003cstring\u003e&quot;,&quot;availableFilteredLanguages&quot;:&quot;\u003cstring\u003e&quot;,&quot;textSpace&quot;:{&quot;inputChars&quot;:&quot;\u003cstring\u003e&quot;,&quot;minRecEm&quot;:&quot;\u003cstring\u003e&quot;,&quot;minRecChars&quot;:&quot;\u003cstring\u003e&quot;}},{&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;value&quot;:&quot;\u003cstring\u003e&quot;,&quot;domainId&quot;:&quot;\u003cstring\u003e&quot;,&quot;domainName&quot;:&quot;\u003cstring\u003e&quot;,&quot;texttypeId&quot;:&quot;\u003cstring\u003e&quot;,&quot;texttypeName&quot;:&quot;\u003cstring\u003e&quot;,&quot;englishValue&quot;:&quot;\u003cstring\u003e&quot;,&quot;availableLanguages&quot;:&quot;\u003cstring\u003e&quot;,&quot;availableFilteredLanguages&quot;:&quot;\u003cstring\u003e&quot;,&quot;textSpace&quot;:{&quot;inputChars&quot;:&quot;\u003cstring\u003e&quot;,&quot;minRecEm&quot;:&quot;\u003cstring\u003e&quot;,&quot;minRecChars&quot;:&quot;\u003cstring\u003e&quot;}}]}