# Smartling

> Run translation jobs, upload files and strings, follow progress and handle issues in Smartling.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/smartling

## Actions

### Add file to job

Add a file's unpublished strings to a job, for all of the job's languages or only some.

**Inputs**

- Project (`project_id`, text, required): The Smartling project.
- Job (`job_id`, text, required): The translation job.
- File (`file_uri`, text, required): The file, by the URI it was uploaded with, such as /content/en/home.json.
- Languages (`target_locales`, list): Languages to translate into. Leave empty for all of the job's languages.

**Outputs**

- `data` (object): The response from Smartling.

**Example output**

```json
{
  "data": {
    "code": "example",
    "failCount": 1,
    "message": "example",
    "processUid": "example",
    "successCount": 1,
    "url": "example"
  }
}
```

### Add strings

Add up to 100 pieces of text to a project for translation, without a file. Returns each string's hashcode.

**Inputs**

- Project (`project_id`, text, required): The Smartling project.
- Texts (`texts`, list, required): The text of each string, up to 10,000 characters each.
- Instruction for translators (`instruction`, text): A note shown to translators for these strings.
- Maximum length (`max_length`, number): The longest a translation should be, in characters. At least 1.
- File URI (`file_uri`, text): Group the strings under this virtual file URI. Smartling uses /Strings when empty.
- Placeholder format (`placeholder_format`, text): How placeholders such as %s or {name} are written in the text. One of: `none`, `c` (C (printf)), `ios`, `python`, `java`, `yaml`, `qt`, `resx` (.NET RESX).

**Outputs**

- `data` (object): The response from Smartling.

**Example output**

```json
{
  "data": {
    "items": [
      {
        "hashcode": "example",
        "overWritten": "example",
        "parsedStringText": "example",
        "stringText": "example",
        "variant": "example"
      }
    ],
    "processUid": "example",
    "stringCount": 1,
    "totalCount": 1,
    "wordCount": 1
  }
}
```

### Add strings to job

Add strings to a job by their hashcodes, from Add strings or List source strings.

**Inputs**

- Project (`project_id`, text, required): The Smartling project.
- Job (`job_id`, text, required): The translation job.
- Hashcodes (`hashcodes`, list, required): The strings' hashcodes.
- Languages (`target_locales`, list): Languages to translate into. Leave empty for all of the job's languages.
- Move from other jobs (`move_from_other_jobs`, true/false): Move strings that are already in another job into this one. Otherwise they are skipped.

**Outputs**

- `data` (object): The response from Smartling.

**Example output**

```json
{
  "data": {
    "code": "example",
    "failCount": 1,
    "message": "example",
    "processUid": "example",
    "successCount": 1,
    "url": "example"
  }
}
```

### Authorize job

Send a job's content to translation. The job must have content and be awaiting authorization; this can incur translation costs.

**Inputs**

- Project (`project_id`, text, required): The Smartling project.
- Job (`job_id`, text, required): The translation job.

**Outputs**

- `data` (object): The response from Smartling.

**Example output**

```json
{
  "data": {
    "code": "example"
  }
}
```

### Cancel job

Cancel a draft, awaiting or in-progress job. Its content is removed from the job and unauthorized.

**Inputs**

- Project (`project_id`, text, required): The Smartling project.
- Job (`job_id`, text, required): The translation job.
- Reason (`reason`, text): Why the job is canceled.

**Outputs**

- `data` (object): The response from Smartling.

**Example output**

```json
{
  "data": {
    "code": "example",
    "message": "example",
    "processUid": "example",
    "url": "example"
  }
}
```

### Comment on issue

Add a comment to an issue.

**Inputs**

- Project (`project_id`, text, required): The Smartling project.
- Issue (`issue_id`, text, required): The issue.
- Comment (`comment`, text, required): The comment.

**Outputs**

- `data` (object): The response from Smartling.

**Example output**

```json
{
  "data": {
    "commentText": "example",
    "commentTextModifiedDate": "example",
    "createdByUserUid": "example",
    "createdDate": "example",
    "issueCommentUid": "example"
  }
}
```

### Create issue

Raise an issue on a string, such as a question about the source text or a problem with a translation.

**Inputs**

- Project (`project_id`, text, required): The Smartling project.
- Issue type (`issue_type`, text, required): What kind of issue it is. One of: `CLARIFICATION` (Source text needs clarification), `MISSPELLING` (Source text is misspelled), `POOR_TRANSLATION` (Poor translation), `DOES_NOT_FIT_SPACE` (Translation doesn't fit the space), `PLACEHOLDER_ISSUE` (Placeholder problem in the translation), `REVIEW_TRANSLATION` (Translation needs review), `MT_ERROR` (Machine translation error).
- Issue (`issue_text`, text, required): What the issue is, up to 4,000 characters.
- String hashcode (`hashcode`, text, required): The string's hashcode, from Add strings or List source strings.
- Language (`locale`, text, required): The language the issue is about.
- Severity (`severity`, text): How serious the issue is. One of: `LOW`, `MEDIUM`, `HIGH`.

**Outputs**

- `data` (object): The response from Smartling.

**Example output**

```json
{
  "data": {
    "accountUid": "example",
    "answered": true,
    "assigneeUserUid": "example",
    "createdDate": "example",
    "issueCommentsCount": 1,
    "issueNumber": 1,
    "issueSeverityLevelCode": "example",
    "issueStateCode": "example",
    "issueSubTypeCode": "example",
    "issueText": "example",
    "issueTypeCode": "example",
    "issueUid": "example",
    "lastCommentDate": "example",
    "projectId": "example",
    "reopened": true,
    "reportedByUserUid": "example",
    "resolvedDate": "example",
    "string": {
      "hashcode": "example",
      "localeId": "example"
    }
  }
}
```

### Create job

Create a translation job in a project. Add files or strings to it afterwards, then authorize it.

**Inputs**

- Project (`project_id`, text, required): The Smartling project.
- Job name (`job_name`, text, required): The job's name. It must be unique within the project.
- Languages (`target_locales`, list): Languages to translate into. You can also add them later with Add language to job.
- Description (`description`, text): What the job is for. Up to 8,000 characters.
- Due date (`due_date`, date and time): When the translations are needed.
- Reference number (`reference_number`, text): Your own reference for the job, such as an order or ticket number.
- Completion callback URL (`callback_url`, text): A web address Smartling calls when the job is completed.
- Callback method (`callback_method`, text): How Smartling calls the completion callback URL. One of: `GET`, `POST`.

**Outputs**

- `data` (object): The response from Smartling.

**Example output**

```json
{
  "data": {
    "callbackMethod": "example",
    "callbackUrl": "example",
    "createdByUserUid": "example",
    "createdDate": "example",
    "customFields": [
      {
        "fieldName": "example",
        "fieldUid": "example",
        "fieldValue": "example"
      }
    ],
    "description": "example",
    "dueDate": "example",
    "firstAuthorizedDate": "example",
    "firstCompletedDate": "example",
    "issues": {
      "sourceIssuesCount": 1,
      "translationIssuesCount": 1
    },
    "jobName": "example",
    "jobNumber": "example",
    "jobStatus": "example",
    "lastAuthorizedDate": "example",
    "lastCompletedDate": "example",
    "modifiedByUserUid": "example",
    "modifiedDate": "example",
    "referenceNumber": "example",
    "targetLocaleIds": [
      "example"
    ],
    "translationJobUid": "example"
  }
}
```

### Delete file

Delete a source file from a project. Finished translations stay available in Smartling.

**Inputs**

- Project (`project_id`, text, required): The Smartling project.
- File (`file_uri`, text, required): The file, by the URI it was uploaded with, such as /content/en/home.json.

**Outputs**

- `data` (object): The response from Smartling.

**Example output**

```json
{
  "data": {
    "code": "example"
  }
}
```

### Delete job

Delete a canceled job.

**Inputs**

- Project (`project_id`, text, required): The Smartling project.
- Job (`job_id`, text, required): The translation job.

**Outputs**

- `data` (object): The response from Smartling.

**Example output**

```json
{
  "data": {
    "code": "example"
  }
}
```

### Get file status

Get a file's string and word counts and, for each language, how many are authorized and published.

**Inputs**

- Project (`project_id`, text, required): The Smartling project.
- File (`file_uri`, text, required): The file, by the URI it was uploaded with, such as /content/en/home.json.

**Outputs**

- `data` (object): The response from Smartling.

**Example output**

```json
{
  "data": {
    "created": "example",
    "fileType": "example",
    "fileUri": "example",
    "hasInstructions": true,
    "items": [
      {
        "authorizedStringCount": 1,
        "authorizedWordCount": 1,
        "completedStringCount": 1,
        "completedWordCount": 1,
        "excludedStringCount": 1,
        "excludedWordCount": 1,
        "localeId": "example"
      }
    ],
    "lastUploaded": "example",
    "parserVersion": 1,
    "totalCount": 1,
    "totalStringCount": 1,
    "totalWordCount": 1
  }
}
```

### Get job

Get a translation job with its status, languages, dates and issue counts.

**Inputs**

- Project (`project_id`, text, required): The Smartling project.
- Job (`job_id`, text, required): The translation job.

**Outputs**

- `data` (object): The response from Smartling.

**Example output**

```json
{
  "data": {
    "callbackMethod": "example",
    "callbackUrl": "example",
    "createdByUserUid": "example",
    "createdDate": "example",
    "customFields": [
      {
        "fieldName": "example",
        "fieldUid": "example",
        "fieldValue": "example"
      }
    ],
    "description": "example",
    "dueDate": "example",
    "firstAuthorizedDate": "example",
    "firstCompletedDate": "example",
    "issues": {
      "sourceIssuesCount": 1,
      "translationIssuesCount": 1
    },
    "jobName": "example",
    "jobNumber": "example",
    "jobStatus": "example",
    "lastAuthorizedDate": "example",
    "lastCompletedDate": "example",
    "modifiedByUserUid": "example",
    "modifiedDate": "example",
    "referenceNumber": "example",
    "targetLocaleIds": [
      "example"
    ],
    "translationJobUid": "example"
  }
}
```

### Get job progress

Get how far a job's translation has got, overall and for each language and workflow step.

**Inputs**

- Project (`project_id`, text, required): The Smartling project.
- Job (`job_id`, text, required): The translation job.
- Language (`locale`, text): Only this language. Leave empty for every language.

**Outputs**

- `data` (object): The response from Smartling.

**Example output**

```json
{
  "data": {
    "contentProgressReport": [
      {
        "targetLocaleDescription": "example",
        "targetLocaleId": "example",
        "unuathorizedProgressReport": {
          "stringCount": 1,
          "wordCount": 1
        },
        "workflowProgressReportList": [
          {
            "workflowName": "example",
            "workflowStepSummaryReportItemList": [
              {
                "stringCount": 1,
                "wordCount": 1,
                "workflowStepName": "example",
                "workflowStepType": "example",
                "workflowStepUid": "example"
              }
            ],
            "workflowUid": "example"
          }
        ]
      }
    ],
    "progress": {
      "percentComplete": 1,
      "totalWordCount": 1
    },
    "summaryReport": [
      {
        "stringCount": 1,
        "wordCount": 1,
        "workflowStepType": "example"
      }
    ]
  }
}
```

### Get project

Get a project with its source language and the languages it translates into.

**Inputs**

- Project (`project_id`, text, required): The Smartling project.
- Include disabled languages (`include_disabled_locales`, true/false): Also list languages that are switched off for the project.

**Outputs**

- `data` (object): The response from Smartling.

**Example output**

```json
{
  "data": {
    "accountUid": "example",
    "archived": true,
    "projectId": "example",
    "projectName": "example",
    "projectTypeCode": "example",
    "sourceLocaleDescription": "example",
    "sourceLocaleId": "example",
    "targetLocales": [
      {
        "description": "example",
        "enabled": true,
        "localeId": "example"
      }
    ]
  }
}
```

### List files

List the source files recently uploaded to a project, up to 100.

**Inputs**

- Project (`project_id`, text, required): The Smartling project.
- URI contains (`uri_contains`, text): Only files whose URI contains this text, such as .json.
- File types (`file_types`, list): Only files of these formats. One or more of: `android` (Android XML), `arb` (Flutter ARB), `asciidoc`, `csv`, `dita`, `ditaZip` (DITA (ZIP)), `doc` (Word 97-2003 (.doc)), `docm` (Word with macros (.docm)), `docx` (Word (.docx)), `flare` (MadCap Flare), and 37 more.
- Uploaded after (`uploaded_after`, date and time): Only files last uploaded after this time.
- Uploaded before (`uploaded_before`, date and time): Only files last uploaded before this time.
- Order (`order`, text): How to sort the files. One of: `lastUploaded_desc` (Last uploaded, newest first), `lastUploaded_asc` (Last uploaded, oldest first), `created_desc` (Created, newest first), `created_asc` (Created, oldest first), `fileUri_asc` (File URI, A to Z), `fileUri_desc` (File URI, Z to A).
- Limit (`limit`, number): How many files to return, up to 100. From 1 to 100.
- Offset (`offset`, number): How many files to skip, to read the next page. At least 0.

**Outputs**

- `data` (object): The response from Smartling.

**Example output**

```json
{
  "data": {
    "items": [
      {
        "created": "example",
        "fileType": "example",
        "fileUri": "example",
        "hasInstructions": true,
        "lastUploaded": "example"
      }
    ],
    "totalCount": 1
  }
}
```

### List glossaries

List your account's glossaries and the languages each covers.

**Inputs**

- Search (`query`, text): Only glossaries whose name or description contains this text.
- Count entries (`include_entry_counts`, true/false): Also count each glossary's entries.
- Limit (`limit`, number): How many glossaries to return, up to 500. From 1 to 500.
- Offset (`offset`, number): How many glossaries to skip, to read the next page. At least 0.

**Outputs**

- `data` (object): The response from Smartling.

**Example output**

```json
{
  "data": {
    "items": [
      {
        "archived": true,
        "createdDate": "example",
        "description": "example",
        "entriesCount": 1,
        "glossaryName": "example",
        "glossaryUid": "example",
        "localeIds": [
          "example"
        ],
        "modifiedDate": "example",
        "verificationMode": true
      }
    ],
    "totalCount": 1
  }
}
```

### List issues

List a project's issues, newest first, optionally only open or resolved ones of some types.

**Inputs**

- Project (`project_id`, text, required): The Smartling project.
- States (`states`, list): Only issues in these states. One or more of: `OPENED` (Open), `RESOLVED`.
- About (`issue_types`, list): Only issues about the source text or about translations. One or more of: `SOURCE` (Source text), `TRANSLATION`.
- Created after (`created_after`, date and time): Only issues created after this time.
- Created before (`created_before`, date and time): Only issues created before this time.
- Limit (`limit`, number): How many issues to return, up to 30. From 1 to 30.
- Offset (`offset`, number): How many issues to skip, to read the next page. At least 0.

**Outputs**

- `data` (object): The response from Smartling.

**Example output**

```json
{
  "data": {
    "items": [
      {
        "accountUid": "example",
        "answered": true,
        "assigneeUserUid": "example",
        "createdDate": "example",
        "issueCommentsCount": 1,
        "issueNumber": 1,
        "issueSeverityLevelCode": "example",
        "issueStateCode": "example",
        "issueSubTypeCode": "example",
        "issueText": "example",
        "issueTypeCode": "example",
        "issueUid": "example",
        "lastCommentDate": "example",
        "projectId": "example",
        "reopened": true,
        "reportedByUserUid": "example",
        "resolvedDate": "example",
        "string": {
          "hashcode": "example",
          "localeId": "example"
        }
      }
    ],
    "totalCount": 1
  }
}
```

### List jobs

List translation jobs across your account, newest first, optionally for one project or status.

**Inputs**

- Project (`project_id`, text): Only jobs in this project. Leave empty for every project.
- Name contains (`name_contains`, text): Only jobs whose name contains this text.
- Statuses (`statuses`, list): Only jobs in these statuses. One or more of: `DRAFT`, `AWAITING_AUTHORIZATION` (Awaiting authorization), `IN_PROGRESS` (In progress), `COMPLETED`, `CANCELLED`, `CLOSED`, `DELETED`.
- Limit (`limit`, number): How many jobs to return, up to 1000. From 1 to 1000.
- Offset (`offset`, number): How many jobs to skip, to read the next page. At least 0.
- Order (`sort_direction`, text): Newest first (the default) or oldest first, by creation date. One of: `DESC` (Newest first), `ASC` (Oldest first).

**Outputs**

- `data` (object): The response from Smartling.

**Example output**

```json
{
  "data": {
    "items": [
      {
        "createdDate": "example",
        "description": "example",
        "dueDate": "example",
        "jobName": "example",
        "jobNumber": "example",
        "jobStatus": "example",
        "priority": 1,
        "projectId": "example",
        "referenceNumber": "example",
        "targetLocaleIds": [
          "example"
        ],
        "translationJobUid": "example"
      }
    ],
    "totalCount": 1
  }
}
```

### List projects

List the projects in your Smartling account, with their source language.

**Inputs**

- Name contains (`name_contains`, text): Only projects whose name contains this text.
- Include archived (`include_archived`, true/false): Also list archived projects.
- Limit (`limit`, number): How many projects to return, up to 500. From 1 to 500.
- Offset (`offset`, number): How many projects to skip, to read the next page. At least 0.

**Outputs**

- `data` (object): The response from Smartling.

**Example output**

```json
{
  "data": {
    "items": [
      {
        "accountUid": "example",
        "archived": true,
        "projectId": "example",
        "projectName": "example",
        "projectTypeCode": "example",
        "sourceLocaleDescription": "example",
        "sourceLocaleId": "example"
      }
    ],
    "totalCount": 1
  }
}
```

### List source strings

List the source strings of a file, or of strings given by hashcode, with their hashcodes and keys.

**Inputs**

- Project (`project_id`, text, required): The Smartling project.
- File (`file_uri`, text): The file, by the URI it was uploaded with, such as /content/en/home.json.
- Hashcodes (`hashcodes`, list): Only these strings, by hashcode.
- Limit (`limit`, number): How many strings to return, up to 500. From 1 to 500.
- Offset (`offset`, number): How many strings to skip, to read the next page. At least 0.

**Outputs**

- `data` (object): The response from Smartling.

**Example output**

```json
{
  "data": {
    "items": [
      {
        "hashcode": "example",
        "keys": [
          {
            "fileUri": "example",
            "key": "example"
          }
        ],
        "maxLength": 1,
        "parsedStringText": "example",
        "stringInstructions": [
          "example"
        ],
        "stringText": "example",
        "stringVariant": "example"
      }
    ],
    "totalCount": 1
  }
}
```

### List translations

List the translations of a file's strings, or of strings given by hashcode, in one language.

**Inputs**

- Project (`project_id`, text, required): The Smartling project.
- Language (`locale`, text, required): The language of the translations.
- File (`file_uri`, text): The file, by the URI it was uploaded with, such as /content/en/home.json.
- Hashcodes (`hashcodes`, list): Only these strings, by hashcode.
- Translations (`translation_state`, text): Any saved translation (the default), or only published ones. One of: `pending` (Any saved translation), `published` (Published translations only).
- Limit (`limit`, number): How many strings to return, up to 10000. From 1 to 10000.
- Offset (`offset`, number): How many strings to skip, to read the next page. At least 0.

**Outputs**

- `data` (object): The response from Smartling.

**Example output**

```json
{
  "data": {
    "items": [
      {
        "hashcode": "example",
        "keys": [
          {
            "fileUri": "example",
            "key": "example"
          }
        ],
        "parsedStringText": "example",
        "stringText": "example",
        "stringVariant": "example",
        "targetLocaleId": "example",
        "translations": [
          {
            "modifiedDate": "example",
            "pluralForm": "example",
            "translation": "example"
          }
        ],
        "workflowStepUid": "example"
      }
    ],
    "totalCount": 1
  }
}
```

### Resolve or reopen issue

Mark an issue resolved, or open it again.

**Inputs**

- Project (`project_id`, text, required): The Smartling project.
- Issue (`issue_id`, text, required): The issue.
- State (`state`, text, required): Resolved, or open again. One of: `RESOLVED`, `OPENED` (Open).

**Outputs**

- `data` (object): The response from Smartling.

**Example output**

```json
{
  "data": {
    "issueStateCode": "example",
    "reopened": true
  }
}
```

### Search glossary entries

Find terms in a glossary, with their translations in the languages you choose.

**Inputs**

- Glossary (`glossary_id`, text, required): The glossary.
- Languages (`locales`, list, required): The languages to show translations in. Each must be one of the glossary's languages.
- Search (`query`, text): Only entries with a term containing this text.
- Limit (`limit`, number): How many entries to return, up to 500. From 1 to 500.
- Offset (`offset`, number): How many entries to skip, to read the next page. At least 0.

**Outputs**

- `data` (object): The response from Smartling.

**Example output**

```json
{
  "data": {
    "items": [
      {
        "archived": true,
        "createdDate": "example",
        "definition": "example",
        "entryUid": "example",
        "glossaryUid": "example",
        "labelUids": [
          "example"
        ],
        "modifiedDate": "example",
        "partOfSpeech": "example",
        "translations": [
          {
            "caseSensitive": true,
            "disabled": true,
            "doNotTranslate": true,
            "exactMatch": true,
            "localeId": "example",
            "notes": "example",
            "term": "example",
            "variants": [
              "example"
            ]
          }
        ]
      }
    ],
    "totalCount": 1
  }
}
```

### Update job

Change a job's name, description, due date or reference number. Details you leave empty stay as they are.

**Inputs**

- Project (`project_id`, text, required): The Smartling project.
- Job (`job_id`, text, required): The translation job.
- Job name (`job_name`, text): A new name for the job.
- Description (`description`, text): A new description, up to 8,000 characters.
- Due date (`due_date`, date and time): A new due date.
- Reference number (`reference_number`, text): A new reference number.

**Outputs**

- `data` (object): The response from Smartling.

**Example output**

```json
{
  "data": {
    "callbackMethod": "example",
    "callbackUrl": "example",
    "createdByUserUid": "example",
    "createdDate": "example",
    "customFields": [
      {
        "fieldName": "example",
        "fieldUid": "example",
        "fieldValue": "example"
      }
    ],
    "description": "example",
    "dueDate": "example",
    "firstAuthorizedDate": "example",
    "firstCompletedDate": "example",
    "issues": {
      "sourceIssuesCount": 1,
      "translationIssuesCount": 1
    },
    "jobName": "example",
    "jobNumber": "example",
    "jobStatus": "example",
    "lastAuthorizedDate": "example",
    "lastCompletedDate": "example",
    "modifiedByUserUid": "example",
    "modifiedDate": "example",
    "referenceNumber": "example",
    "targetLocaleIds": [
      "example"
    ],
    "translationJobUid": "example"
  }
}
```

### Upload file

Upload a source file to a project, so Smartling picks out its text for translation. Uploading to an existing file URI replaces that file.

**Inputs**

- Project (`project_id`, text, required): The Smartling project.
- File (`file`, text, required): Upload a file, choose one from an earlier step, or enter a link to one.
- File URI (`file_uri`, text, required): A unique name for the file in Smartling, such as /content/en/home.json. Use it to find the file later.
- File type (`file_type`, text, required): The file's format. One of: `android` (Android XML), `arb` (Flutter ARB), `asciidoc`, `csv`, `dita`, `ditaZip` (DITA (ZIP)), `doc` (Word 97-2003 (.doc)), `docm` (Word with macros (.docm)), `docx` (Word (.docx)), `flare` (MadCap Flare), and 37 more.
- Completion callback URL (`callback_url`, text): A web address Smartling calls when a language's translation of the file is fully published.

**Outputs**

- `data` (object): The response from Smartling.

**Example output**

```json
{
  "data": {
    "overWritten": true,
    "stringCount": 1,
    "wordCount": 1
  }
}
```
