Create job
An API call to create a job within a specified project. The source file can be provided directly in the message body or downloaded from connector.
Job import is asynchronous. The file is processed in the background after this call returns. The response
body includes an asyncRequest object; poll Get asynchronous request
(action: IMPORT_JOB) to track import progress. To check whether individual jobs are ready, poll
Get job and inspect the importStatus.status field (RUNNING, ERROR, OK).
Please supply job metadata in Memsource header. For file in the request body provide also the
filename in Content-Disposition header.
Accepted metadata:
- targetLangs - This parameter specifies what languages should the job be created in. Only languages that are
present in the project are supported, but this parameter accepts a subset of languages. When the file is uploaded, the
number of jobs created (and returned) corresponds to the number of target languages and the workflow steps of the
project. For example,
sample.jsonimported forEN>DEandEN>FRlanguage combination into a project withTranslationandReviewworkflow steps will result in 4 jobs being created, one for each language and step. Note: Each time a file is uploaded, the resulting wordcount for each target language (not workflow step) is counted towards the organization’s allowance. - due - ISO 8601
- workflowSettings - This parameter is used to set up assignments and due date for projects with workflow steps. When a project is created, the global workflow steps available via List workflow steps are instantiated for the given project at hand. To assign users or due dates, these project specific IDs need to be used instead of the global ones.
- assignments - If a project does not contain workflow steps, this parameter can be used to assign users directly.
- importSettings - Re-usable import settings
- useProjectFileImportSettings - When project is created, either global default setting or settings of a project template are copied into it. This parameter can be used to reference these project settings instead of using the API defaults. Mutually exclusive with importSettings
- callbackUrl - A URL that can be notified when the job creation has been finished.
Unlike webhooks which are global for the
entire account, the
callbackUrlis set only for the specific operation at hand. - path - A parameter that can be used to specify a location of the source file and preserved for later download. This is automatically created when importing ZIP files.
- preTranslate - When
true, the system automatically starts pre-translation after import completes. Recommended when pre-translation is the goal: the platform handles the import-ready gate internally, removing the need to manually pollimportStatus.status. - semanticMarkup - Set semantic markup processing after import when enabled for organization
- xmlAssistantProfile - Apply XML import settings defined using XML assistant
- jobPreviewPackageFileUidRef - reference to a job preview package file to create a preview for the imported file
For remote file jobs also remoteFile can be added. To retrieve the information below,
use the connector APIs.
- connectorToken - Token of the connector for the purposes of the APIs
- remoteFolder - An encoded name of the folder, retrieved by e.g. List files in a subfolder
- remoteFileName - An encoded name of the file, retrieved similarly to above.
- continuous - Jobs created with files from a connector can be created as continuous
Create and assign job in project without workflow step:
{
"targetLangs": [
"cs_cz"
],
"callbackUrl": "https://my-shiny-service.com/consumeCallback",
"importSettings": {
"uid": "abcd123"
},
"due": "2007-12-03T10:15:30.00Z",
"path": "destination directory",
"assignments": [
{
"targetLang": "cs_cz",
"providers": [
{
"id": "4321",
"type": "USER"
}
]
}
],
"notifyProvider": {
"organizationEmailTemplate": {
"id": "39"
},
"notificationIntervalInMinutes": "10"
}
}
Create job from remote file without workflow steps:
{
"remoteFile": {
"connectorToken": "948123ef-e1ef-4cd3-a90e-af1617848af3",
"remoteFolder": "/",
"remoteFileName": "Few words.docx",
"continuous": false
},
"assignments": [],
"workflowSettings": [],
"targetLangs": [
"cs"
]
}
Create and assign job in project with workflow step:
{
"targetLangs": [
"de"
],
"useProjectFileImportSettings": "true",
"workflowSettings": [
{
"id": "64",
"due": "2007-12-03T10:15:30.00Z",
"assignments": [
{
"targetLang": "de",
"providers": [
{
"id": "3",
"type": "VENDOR"
}
]
}
],
"notifyProvider": {
"organizationEmailTemplate": {
"id": "39"
},
"notificationIntervalInMinutes": "10"
}
}
]
}
Create a job with job preview package reference:
{
"targetLangs": [
"de"
],
"jobPreviewPackageFileUidRef": {"uid": "jobPreviewPackageFileUid123"}
}
Documentation Index
Fetch the complete documentation index at: https://developers.phrase.com/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
Get a token from auth/login endpoint and then pass it in the Authorization HTTP header in every subsequent API call. For more information visit our help center.
Headers
Required when remoteFile is empty. Must match pattern ((inline|attachment); )?(filename\*=UTF-8''(.+)|filename="?(.+)"?)
Path Parameters
Body
The body is of type object.