Add strings
Changed onUploads an array of strings to a Smartling project. A maximum of 100 strings can be created per request. A request with more than 100 items will return an error. Each string has a character limit of 10,000.
Smartling creates a unique hashcode for each string based on the parsed string text and any variant or namespace metadata provided. If you upload a string with the same text, variant and namespace, and therefore the same hashcode, the existing string will be overwritten. This will not change the text of the string, but may update other metadata, such as placeholder and callback values. If the string is currently inactive, overwriting it will reactivate it. Overwritten strings return "overWritten": "true" in the response object.
Most uploads will return a 200 response indicating success. If processing the request takes longer than 60 seconds, a 202 response will be returned, including a processUid value that can be used to check the progress of the request.
If you set up a POST callback for the string, you can automatically receive the translation for a string as soon as it is complete. See Callbacks for more details.
Request
- Base URLhttps://api.smartling.com
- AuthHTTP bearer
Path parameters
Unique identifier of a Smartling project — 9 lowercase alphanumeric characters.
A unique project identifier. This can be found in the Smartling Dashboard under Account Settings > API.
Request body
Example request
{
"uri": "/content/en/home.json",
"authorization": {
"localeWorkflows": [
{
"targetLocaleId": "fr-FR",
"workflowUid": "5449a8595ae4"
}
],
"translationJobUid": "j45v1uvsi3tx"
}
}Response
OK
Example response
{
"response": {
"data": {
"items": [
{
"hashcode": "d41d8cd98f00b204e9800998ecf8427e"
}
],
"processUid": "097ecbc2-8f1b-4ce5-b5c4-d48c3f0e5d9e"
}
}
}Changes
- info
endpoint added
- info