Jobs

This adds all non-published strings from a file to a job. By default, the file will be added for all locales of the job, but you can change this by specifying targetLocaleIds for the job you wish to add the file into.

Validation rules:

  • A job can contain a maximum of 5000 files.
  • Content can't be added to the job if the job doesn't contain any locales, and the request to add a file doesn't specify any locales.
  • The file (specified by the fileUri) can't be in the process of being uploaded / modified within Smartling. It should complete its upload process before being added to a job.
  • Any targetLocales specified must be valid within the project the job has been created for.

When the system can quickly add the file and its content to the job, it synchronously responds with status 200. When the system cannot quickly add the file and its content to the job, then a 202 response is returned. The response contains a link to check the progress of the request. When a 202 is received, the process of adding the content to the job will not be complete until the returned process has completed.

post/jobs-api/v3/projects/{projectId}/jobs/{translationJobUid}/file/add

Request

  • Base URL
    https://api.smartling.com
  • Auth
    HTTP bearer

Path parameters

projectIdstring required

Unique identifier of a Smartling project — 9 lowercase alphanumeric characters.

Example:84c012a33

A unique project identifier. This can be found in the Smartling Dashboard under Account Settings > API.

translationJobUidstring required

Translation job unique identifier — 12 lowercase alphanumeric characters.

Example:j45v1uvsi3tx

Request body

fileUristring

URI path of a source file within a Smartling project.

targetLocaleIdsLocaleId[]

The array of localeIds that the file should be added to. If not specified, the file will be added to all locales. If specified, the file will only be added for the locales provided. If the locales were not already part of the job, then the job will be extended to contain the additional locales.

Example request

{
  "fileUri": "/content/en/home.json",
  "targetLocaleIds": [
    "fr-FR"
  ]
}

Response

OK

Changes

    • breaking

      added the pattern ^[a-z0-9]{12}$ to the path request parameter translationJobUid

    • breaking

      added the pattern ^[a-z0-9]{9}$ to the path request parameter projectId

    • breaking

      added to the request property allOf list

    • breaking

      added the pattern ^[a-z]{2}(-[A-Z]{2})?$ to the request property /

    • breaking

      the request property type changed from string to no type

    • breaking

      the response property /// became nullable for the status

    • breaking

      the response property /// became nullable for the status

    • breaking

      the response property /// became nullable for the status

    • breaking

      the response property /// became nullable for the status

    • breaking

      the response property /// became nullable for the status

    • breaking

      the response property /// became nullable for the status

    • breaking

      the response property /// became nullable for the status

    • breaking

      the response property /// became nullable for the status

    • breaking

      the response property /// became nullable for the status

    • breaking

      the response property /// became nullable for the status

    • info

      the // response's property pattern ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$ was added for the status

    • breaking

      the /// response's property type changed from string to integer for status

    • breaking

      the /// response's property type changed from string to integer for status

    • warning

      added the new VALIDATION_ERROR enum value to the / response property for the response status

    • info

      removed the RESOURCE_LOCKED enum value from the / response property for the response status