Translation Service 翻訳サービス خدمة الترجمة Сервис Переводов Übersetzungsservice שרותי תרגום Service de Traduction Servicio de Traducción Servizio di traduzioni Serviço de Tradução Vertaalservice Υπηρεσία Μετάφρασης
Welcome Login | Register

New Translation Project (API)

Initialize a new project on OneHourTranslation™

API v2 is released with many new features. This API is still supported but for new API implementations please visit the Translation API v2 documentation
Start a new project by submitting the following request:
  • URL: https://<base-url>/api/1/project/new/
  • Method: POST
  • Response scheme: JSON

Request Parameters

Name Description Remarks
account_id Your Account ID as provided by OneHourTranslation
secret_key Your API Secret Key as provided by One Hour Translation
source Source language see supported languages
target Target language see supported languages
source_text (string) The source text to be translated See Content Formats for further information about supported content types
CHANGE: previously called 'content' (backward compatible)
word_count (integer>0) Number of words in the source text. If missing or 0, will be calculated automatically. optional
notes Any additional notes for the translator. optional
content_type Format of the submitted content for translation.
Options are:
  • "text/plain" - for regular text
  • "text/xml" - for XML documentd
optional. Default is "text/plain".
callback_url Callback URL to receive project-related notifications optional
user_reference Client's internal user reference optional. This field will be reported back on each callback request.
project_reference Client's internal reference to this project optional. This field will be reported back on each callback request.
custom0 .. 9 Client's internal custom fields. optional, 1000 chars maximum. Those fields will be reported back on each callback request.
*mandatory fields are marked as bold.

Response Parameters

On success, the following parameters are returned:

Name Description Remarks
status_code Numerical indication of your request status
status_msg String indication of your request status
project_id (integer) Project ID for reference
word_count (integer) Reported or calculated word count
credits (integer) Credits charged

Response Example - Success:

{"status_code":0,"status_msg":"ok","project_id":2695,"word_count":432,"credits":3024}

On failure, the appropriate status_code and status_msg will be reported:

Name Description Remarks
status_code Numerical indication of your request status
status_msg String indication of your request status
errors JSON formatted representation of various errors Applicable only on fields-validation errors

Response Example - Failure (insufficient credits):

{"status_code":200, "status_msg":"insufficient credits to fullfil your request - action required"}

Response Example - Failure (fields validation):

{"status_code":103,"status_msg":"request validation failed" , "errors": {"source":"source language is missing","target":"target language is missing","content":"content is missing"}}

Callbacks

We currently issue callback requests for two types of events that occur on your projects: "project status changed" event and "translation submitted" event.
If a callback URL is defined on your request, a "POST" request will be submitted to the callback URL according to the event type:

  1. Project Status Change - refer to "Get project details" for information about returned parameters.
  2. Translation Submitted - refer to "Get project content" for information about returned parameters.

A "type" parameter will be added to the callback request for event type indication. Possible values:

  1. 'status_change' - for status change event
  2. 'translation_submitted' - for translation submission event

One Hour Translation provides professional, fast and affordable human translation services, available 24/7.

Our community of over 10000 professional certified translators around the world guarantee you will get high quality translation FAST!
One Hour Translation is the leading web-based Professional Translation Agency.
All rights reserved. © 2008-2011 OneHourTranslation™