Getting Started With Smartling APIs

Third-Party Providers

Smartling allows third-party providers to integrate their services into Smartling's workflow. Smartling sends content for translation as an XLIFF file, via an HTTPS POST request. A third-party provider can then translate the strings and return a translated file to Smartling.

Prerequisites for Integration

The following are a list of prerequisites for integrating with a Smartling third-party provider:

  1. Your service must be able to translate a standard XLIFF file.
  2. You must be able to provide an endpoint URL that accepts XLIFF files via a POST request over HTTPS.
  3. You must be able to upload translated XLIFF files back to a pre-defined Smartling endpoint using a provided API key.

Become a Third-Party Provider

Contact Smartling at integration@smartling.com to discuss becoming a third-party provider. You will need to provide the following details:

  • Endpoint: A URL to receive source files via POST request.
  • Global Parameters: Field name and value for any parameters you wish to be provided with for every POST request to your endpoint URL.
  • Client Parameters: Field name and brief label for any parameters used to identify the client, such as API key, username, etc.

Receiving Source Files for Smartling

Source language files will be transmitted via an HTTPS POST request to your specified endpoint. The request will have the following parameters:

  • URL: As specified by the provider.
  • Header: Content-Type multipart/form-data.
  • Body:
Parameter  Description
<ClientField> Any Client Parameters specified by the provider - API key, username, etc.
<GlobalField> Any Global Parameters specified by the provider.
id A unique identifier for the file, needed for the return request.
file XLIFF file with source language strings.
srcLocale Source language-country code (based on ISO 639-1 and ISO 3166-1 alpha-2). E.g. en-US (English-UNITED STATES). Locales will always have a language code but may not have a country code.
targetLocale Target language-country code (based on ISO 639-1 and ISO 3166-1 alpha-2). E.g. es-ES (Spanish-SPAIN). Locales will always have a language code but may not have a country code.
externalStepID Identifier for a Smartling workflow step, needed for the return request.
projectID Identifier for a Smartling project, needed for the return request.
returnUrl URL to POST translated file back to Smartling.
stringCount Number of strings in the file.

Your service should use standard HTTP status codes in response headers. Response body should be in JSON. Accepted response fields are:

  • requestId: A unique identifier that you have allocated to the request.
  • message: String explaining any error.

{
        "requestId" : "wer53vyh6y53",
        "message" : "Error message"
}

Returning Translated Files to Smartling

You should return the translated file to Smartling using a POST request with the following parameters:

  • URL: Provided with the original file as returURL.
  • Header: Content-Type multipart/form-data
  • Body:
Parameter Description
apiKey API key provided by Smartling.
id Provided in Smartling POST request with original file.
projectId Provided in Smartling POST request with original file.
externalStepID Provided in Smartling POST request with original file.
locale Provided in Smartling POST request with original file as `targetLocale`.
file The translated XLIFF file.

Smartling responses will follow our standard API Response Format.

Was this article helpful?