Collect your translated content
After creating a Translation Request, creating a quote, or ordering a quote, you can retrieve your completed translations.
Two Ways to Get Your Translations
-
GET Translation Request
Using the id returned by the original
POST
request you can get back your translations. -
Callback
If you set the
callback_url
in your translation request you will be called back to that url once the translation is finished and reviewed.
Recommendation: We strongly advise using callbacks instead of polling with GET
requests. Callbacks provide a much better automated workflow and reduce unnecessary API calls.
Example: Completed Translation
The translation request from our previous example is completed within seconds (typical for machine translations). Both GET Translation Request and callback URL methods would return:
{
"id": 7,
"name": null,
"slug": "untitled-7",
"context_url": null,
"description": null,
"created_at": "2016-03-02T10:23:32.441Z",
"completed_at": "2016-03-02T10:23:32.638Z",
"quality": "machine",
"target_language_code": "tq",
"style_guide_reference_id": 1,
"status": "finished",
"orders": [
{
"quality": "machine",
"target_language_code": "tq",
"status": "finished",
"ordered_words": 22,
"price": 0.0,
"total_words": 22
}
],
"original": {
"title": "The example",
"intro": "An example on how to use Tolq",
"body": "Tolq is a platform that allows you to easily translate lots of content"
},
"translations": {
"tq": {
"title": "Arcu pretium",
"intro": "Et ultricies ex elit ut ante Vitae",
"body": "Augue ut a consectetur magna lacus enim ac euismod elementum morbi eu lobortis"
}
},
"total_orders": 1,
"total_ordered_words": 22,
"total_words": 22,
"total_cost": 0.0,
"total_keys": 3,
"callback_response_code": null,
"last_callback_at": null,
"_links": {
"review": [
{
"target_language_code": "tq",
"target_language_name": "Tolq Latin",
"href": "https://clients.tolq.com/api/7/review/tq"
}
]
}
}
Key Response Fields
status
:"finished"
indicates translation is complete and readyoriginal
: Your source content organized by keystranslations
: Translated content organized by target languagetotal_cost
: Final cost for the translation_links.review
: URLs for reviewing translations in the web interface
Getting Requests Before Translation
Callbacks are triggered only when translations are finished and accepted. If you poll with GET requests before completion, you might encounter different lifecycle stages.
Example - Unordered Request:
{
"id": 10,
"name": null,
"slug": "untitled-10",
"context_url": null,
"description": null,
"created_at": "2016-03-02T12:33:30.678Z",
"completed_at": null,
"quality": "machine",
"target_language_code": "es",
"style_guide_reference_id": 1,
"status": "unordered",
"es": {
"previous_words": 0,
"new_words": 22,
"total_words": 22,
"cost": 0.07
}
}
Status Meanings:
"unordered"
: Request created but not yet paid/processed"pending"
: Translation in progress"finished"
: Translation completed and ready
For complete status lifecycle details, see the status documentation.
- Previous step: Create a Translation Request
- Next step: Stay in sync