Overview
API Use Case
Secure retrieval of user authentication and profile information
Retrieve accurate translations for marketplace visibility
The Translation API is used to translate listing titles and listing descriptions from one language to another. This can be helpful to buyers if they are searching for items on a marketplace that uses a different language than their own native language.
Below is the process to use when using the translate method to translate an item title or item description from one language to another:
- In the translationContext field, specify either ITEM_TITLE or ITEM_DESCRIPTION depending on which entity you want to translate.
- In the from field, identify the language of the original text and use the to field to select the target language. See the table below for the full list of supported language translations.
- In the text field, input the text that needs translation, adhering to character limits defined in the text field description.
- The translated text will be shown in the translations.translatedText field in the response.
Supported languages
|
From |
To |
|
(en) English |
(de) German, (zh) Chinese (Mandarin), (ja) Japanese, (fr) French, (it) Italian, (pt) Portuguese, (es) Spanish, (ru) Russian |
|
(de) German |
(en) English, (fr) French, (it) Italian, (es) Spanish, (pl) Polish |
|
(fr) French |
(en) English, (de) German, (it) Italian, (es) Spanish |
|
(it) Italian |
(en) English, (de) German, (fr) French, (es) Spanish |
|
(es) Spanish |
(en) English, (de) German, (fr) French, (it) Italian |
|
(pl) Polish |
(de) German |
|
(zh) Chinese (Mandarin) |
(en) English |
|
(ja) Japanese |
(en) English |
Secure retrieval of user authentication and profile information
The Identity API allows retrieval of some high-level information on the authenticated user's eBay account profile. Access is controlled by scopes and is available to approved developers.
Note: When using getUser, you must adhere to data privacy regulations, ensuring that personal data is handled according to eBay's guidelines and relevant legal requirements.
Through the Identity API's getUser method, account information is retrieved using a user access token. For business accounts, all public fields within the businessAccount container are accessible, including address, country code, primary contact, and phone. For individual accounts, public details such as the eBay user ID are retrieved. The API also provides account type (BUSINESS or INDIVIDUAL), registration marketplace ID, and account status (CONFIRMED, UNCONFIRMED, ACCOUNTONHOLD, or UNDETERMINED).
Code Samples
Translate an item title from English to German
curl -X POST "https://api.ebay.com/commerce/translation/v1_beta/translate"
-H "Authorization:Bearer OAUTH_token"
-H "Content-Type:application/json"
{
"from": "en",
"to": "de",
"text": [
"iphone 16 pro max"
],
"translationContext": "ITEM_TITLE"
}Retrieve eBay user identity information
curl -X POST "https://apiz.ebay.com/commerce/identity/v1/user/" -H "Authorization:Bearer OAUTH_token"
Error Handling
- See the maximum character limits for item titles and item descriptions in the text field description to avoid an error.
- When setting the from and to values in the translate method, make sure that eBay supports that translation. See the supported language table.
- If translating an item title, do not use HTML or CSS markup in the text field.
- When using getUser, make sure your application has the necessary OAuth scopes.
Best Practices
- Check the supported language table to make sure your desired translation is supported.
- The Identity API can be used to let users log into your app or site using eBay, which frees you from needing to store and protect user's PII (Personal Identifiable Information) data.