Documents
List documents of a project
OAuth: This endpoint requires one of the following scopes: project:manage
, project:write
or project:read
.
Code samples
Filter documents of a project
OAuth: This endpoint requires one of the following scopes: project:manage
, project:write
or project:read
.
Parameters
You can use the Filter API to filter documents on a collection of criteria.
Code samples
Get a document
OAuth: This endpoint requires one of the following scopes: project:manage
, project:write
or project:read
.
Code samples
Create a document
TextMaster supports automated word-counting for translation and proofreading documents. An automated count can be scheduled by setting the perform_word_count
to true
. In this case word_count
can be omitted and will be ignored if provided.
In case of an error, the API response will contain a word_count_error: true
node. The two most common failure reasons are:
Unsupported file format for file attachments, in this case a new file must be uploaded
For key/value and plain text documents, the only possible reason is a temporary service issue
For translation documents, the automated word-counting can be configured to count translatable content in HTML/XML documents, using the markup_in_content
option.
Warning: If you're using this parameter, you must wait for word_count_finished
callback for all documents before attempting to launch the project.
Original Content
Warning: Due to HTTP protocol limitation, prefere using remote_file_url
field than original_content
field to avoid server timeout. HTTP protocol purpose is not to transfer large amount of data, like file or various document. See Providing content as a file Section for more information
For translation or proofreading documents, the content can be provided directly or by using the Upload API. For standard documents, the original content is a sentence in a readable format (txt, html, …). For key/value documents, the original content has to be an object with a unique key associated to a value.
Markup in content
The markup_in_content
option indicates whether the original content contains markup (HTML, XML, …) or not. Always set it to true
for HTML/XML files. Failing to doing so could result in tag names being counted as words and translated, and you being charged for that work. For files with a .html
or .xml
extension, this parameter is assumed to be true
. It defaults to false
otherwise.
Tips: Always set markup_in_content
to true
for content which contains HTML or XML.
Providing content as a file
You can choose to provide the original content as a file instead of providing as raw data. To do so, provide the URL of the file as remote_file_url
. To learn more about uploading files, see:
Callbacks
You can specify callbacks using the callback
property. It's an object listing URLs to call for each document status. See the list of supported events.
OAuth: This endpoint requires one of the following scopes: project:manage
or project:write
.
Code samples
Create batch of documents
Creates several documents at once. Accepts the same document parameters as singular version, but there can be several of them and they must be placed into a documents
array.
OAuth: This endpoint requires one of the following scopes: project:manage
or project:write
.
Code samples
Get a document review URL
Generates the document's review URL which points to the work that requires author review. You can for example, copy this URL into the message sent to the assigned author when completed the document.
OAuth: This endpoint requires one of the following scopes: project:manage
, project:write
or project:read
.
Code samples
Update a document
The update document endpoint takes the same parameters as the create endpoint. Note that you can't update a document once its project has been launched.
OAuth: This endpoint requires one of the following scopes: project:manage
or project:write
.
Code samples
Complete a document
Approve the work done by the assigned author and mark the document as completed
. Note that when all documents in a project are completed, the project is considered completed too.
OAuth: This endpoint requires one of the following scopes: project:manage
or project:write
.
Code samples
Complete batch of documents
OAuth: This endpoint requires one of the following scopes: project:manage
or project:write
.
Code samples
Delete a document
Note that you can't delete a document once its project has been launched.
OAuth: This endpoint requires one of the following scopes: project:manage
or project:write
.
Code samples
Last updated