swagger: '2.0'
info:
description: This API allows 3rd party developers to translate item titles.
version: v1_beta.1.6
title: Translation API
contact:
name: eBay Inc,
license:
name: eBay API License Agreement
url: https://go.developer.ebay.com/api-license-agreement
host: api.ebay.com
basePath: /commerce/translation/v1_beta
schemes:
- https
paths:
/translate:
post:
tags:
- language
description: This method translates listing title and listing description text from one language into another. For a full list of supported language translations, see the table in the API Overview page.
operationId: translate
consumes:
- application/json
produces:
- application/json
parameters:
- in: body
name: body
required: true
schema:
$ref: '#/definitions/TranslateRequest'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/TranslateResponse'
'400':
description: Bad Request
x-response-codes:
errors:
'110001':
domain: API_TRANSLATION
category: REQUEST
description: From language is invalid, missing or not supported. For more information, see the API call reference documentation.
'110002':
domain: API_TRANSLATION
category: REQUEST
description: To language is invalid, missing or not supported. For more information, see the API call reference documentation.
'110003':
domain: API_TRANSLATION
category: REQUEST
description: Context is not supported. For more information, see the API call reference documentation.
'110004':
domain: API_TRANSLATION
category: REQUEST
description: Maximum number of input text reached. For more information, see the API call reference documentation.
'110005':
domain: API_TRANSLATION
category: REQUEST
description: Maximum length of input text reached. For more information, see the API call reference documentation.
'110006':
domain: API_TRANSLATION
category: REQUEST
description: Unsupported from and to combination.
'110007':
domain: API_TRANSLATION
category: REQUEST
description: Markups are not supported in input texts for title translation context.
'110008':
domain: API_TRANSLATION
category: REQUEST
description: Input text missing.
'500':
description: Internal Server Error
x-response-codes:
errors:
'110000':
domain: API_TRANSLATION
category: APPLICATION
description: There was a problem with an eBay internal system or process. Contact eBay developer support for assistance.
security:
- Client Credentials:
- https://api.ebay.com/oauth/api_scope
securityDefinitions:
Client Credentials:
description: The security definitions for this API. Please check individual operations for applicable scopes.
type: oauth2
tokenUrl: https://api.ebay.com/identity/v1/oauth2/token
flow: application
scopes:
https://api.ebay.com/oauth/api_scope: View public data from eBay
definitions:
TranslateRequest:
type: object
properties:
from:
type: string
description: The language of the input text to be translated. Not all LanguageEnum values are supported in this field. For a full list of supported language translations, see the table in the API Overview page. For implementation help, refer to eBay API documentation
text:
type: array
description: 'The input text to translate. The maximum number of characters permitted is determined by the translationContext
value:
ITEM_TITLE
: 1000 characters maximumITEM_DESCRIPTION
: 20,000 characters maximum.ITEM_DESCRIPTION
text, HTML/CSS markup and links can be included and will not count toward this 20,000 character limit.ITEM_TITLE
and ITEM_DESCRIPTION
For implementation help, refer to eBay API documentation
description: This is the base type of the translate method request payload.
TranslateResponse:
type: object
properties:
from:
type: string
description: The enumeration value indicates the language of the input text. For implementation help, refer to eBay API documentation
to:
type: string
description: The enumeration value indicates the language of the translated text. For implementation help, refer to eBay API documentation
translations:
type: array
description: An array showing the input and translated text. Only one input string can be translated at this time. Support for multiple continuous text strings is expected in the future.
items:
$ref: '#/definitions/Translation'
description: This is the base type of the translate method response payload.
Translation:
type: object
properties:
originalText:
type: string
description: The original text, in the language specified in the from field, that was input into the text field in the request.
translatedText:
type: string
description: The translation of the original text into the language specified in the to field.
description: This type is used by the translations array, which shows the original text supplied by the user in the request payload, and the text translated by eBay.