API Data Types

From Memsource
Jump to: navigation, search

Request Parameters

Data Type Sample Value Description
charset windows-1250 Any supported character set.
currency EUR Any supported currency.
datetime 2012-07-30 17:30 Date and time in yyyy-MM-dd HH:mm format. UTC timezone is always used when reading the date.
domain(type) 348 Identifier (id property) of a domain object of the specified type. For example, when creating a project, id (e.g., 348) is returned in the JSON structure. This identifier can be later used to change the status of the project by setting project=348 parameter.
enum(name) A value from a fixed set of values. Each set of values (enum) has a name - see below. Enums are always case-insensitive.
file Binary data. The whole request has to be sent in multipart/form-data format. See examples of code in Java and C++.
exfile Compatible with the file type. It also accepts handles from File API.
jsonObject(type) { 'id': 'xyz' } An object of the specified type (represented using JSON notation). See below for the description of particular types.
jsonObjectList(type) [{ 'id': 'xyz' }] List of objects of the specified type (represented using JSON notation). See below for the description of particular types.
lang en Any supported language code.
list(type) List of values of another type. When calling an API action, the list is defined using the same parameter name multiple times (e.g., param=value1&param=value2).
string My Project Sequence of characters (UTF-8 encoded).
task RiYnxBD0xBY1lwhf1 Identifier of a translation task. More job parts (if they were created by splitting the parent job part) may share the same task.
map(type, type) Map of keys and values of given type. When calling an API action, the map is defined using the same parameter name multiple times (e.g., map.key1=value1&map.key2=value2).


The body of an HTTP may contain these data types:

  • JSON - data structure (UTF-8 encoded). Each API call returning JSON contains an example of a response.
  • binary - binary data.

Task vs. Job Part

A task represents one translation job (i.e. file to be translated) in one target language. If one job is uploaded in more target languages, an independent task is created for every target language.
If a job is translated in multiple workflows, each workflow shares the same task but differs in workflow level (the reason why some API calls have two arguments for task and level). A task identifier is composed of alphanumeric characters (e.g., RiYnxBD0xBY1lwhf1) while a level is identified by an integer (usually 1-10). The first level in each project that uses workflows has always identifier 1.
Job split into multiple parts will again have the same task id and parameter "isParentJobSplit" will be "true".
Job Part
A jobPart represents a job per target language(s) and workflow steps. For instance, a single file imported to a project with 2 workflow steps and 3 target languages will result 6 jobParts. Each jobPart can be assigned to a different linguist, have a different due date or status.
Each jobPart can be also split into multiple jobParts which will get their own jobPart ID.
A jobPart is always unique.


Name Values
AnalyseType PreAnalyse, PostAnalyse, Compare
AnalyticsIndex analysis, api, costs, jobPart
BilingualFormat Mxlf, Docx, Tmx
BillingUnit Character, Word, Page
Concept.Term.Status New, Approved
EmailTemplateType JobAssigned, JobStatusChanged, NextWorkflowStep, LoginInfo
GengoTranslateSettings.Level PRO, STANDARD
JobStatus * New, Emailed, Assigned, Declined_By_Linguist, Completed_By_Linguist, Completed, Cancelled
MachineTranslator GoogleTranslate, MicrosoftTranslator, MicrosoftTranslatorHub, MicrosoftTranslatorWithFeedback, Systran
PreviewFormat ORIGINAL, PDF
PriceList.Currency CZK, EUR, USD
ProjectStatus New, Assigned, Completed, Cancelled
TermBaseFormat Tbx, Xlsx
TransMemory.Format TMX, XLSX
TransMemSave All, Confirmed, None
UserRole Admin, ProjectManager, Linguist, Guest
XlsCellFlow DownRight, RightDown, DownLeft, LeftDown
XmlRulesFormat PLAIN, XPATH
fileFormat see API File Type List
* to work with job status 'Accepted', use value 'Assigned'

Object Types (used in JSON parameters)

TagMetadata {
  string id
  string type
  string content
  string transAttributes