Projects
New Project
Resource URL
POST /v1/projects
Parameters
-
- organization_id
- Organization ID
-
- language_id
- Original language of the request
-
- translated_language_id
- Language the request is to be translated to
Attributes in Question
-
- type
-
-
string
: text request type
-
-
text_html
: text request type
-
-
- escape_text
- Text surrounded with
{{{}}}
will not be translated. 0
or 1
-
- source_id
- ID of the file to be translated. Used only when
type=string
-
- body
- The body (contents) of the request
-
- title
- Title of the request. If left empty, the beginning text of your request will be used. If the request is of type ‘file’, the filename will be used.
-
- description
- Additional information (or instructions) for translators regarding the translation request
-
- double_check
- double check option will be enabled.
0
or 1
-
- custom_field
- custom field . maximum length 255
-
- individual
- premium options will be enabled.
0
or 1
-
- translator_list_ids
- only translators within those LIST IDs will be allowed to take the request.this works when
individual=1
e.g. [3,5,7]
{
"language_id": "ja",
"translated_language_id": "en",
"questions": [
{
"description": "intoroduction etc..",
"title": "Test Request",
"custom_field": "test1",
"body": null,
"type": "file",
"source_id": 1
},
{
"body": "body2<hoge>ddd</hoge>",
"type": "text_html"
}
],
"access_token": "8c1525a501a5b10671b148003c65b1ed5c0598da5907f0a7855dc248faac8b76"
}
{
"individual": "1",
"translator_list_ids": [
1
],
"language_id": "ja",
"translated_language_id": "en",
"questions": [
{
"body": "hogehoge2",
"type": "string"
}
],
"access_token": "8c1525a501a5b10671b148003c65b1ed5c0598da5907f0a7855dc248faac8b76"
}
Example Response
$ curl -i -H "Accept: application/json" -H "Content-type: application/json" -X POST https://biz.conyac.cc/api/v1/projects -d '{"language_id":"ja","translated_language_id":"en","questions":[{"description":"intoroduction etc..","title":"Test Request","custom_field":"test1","body":null,"type":"file","source_id":1},{"body":"body2ddd","type":"text_html"}],"access_token":"8c1525a501a5b10671b148003c65b1ed5c0598da5907f0a7855dc248faac8b76"}'
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
Location: https://biz.conyac.cc/api/v1/projects/3
{
"success": true,
"message": "the project is found.",
"project": {
"id": 3,
"organization_id": 4,
"user_id": 107,
"point": 7088,
"created_at": "2014-06-10T10:32:50.756+09:00",
"updated_at": "2014-06-10T10:32:50.756+09:00",
"language_id": "ja",
"translated_language_id": "en",
"individual": false,
"url": "https://biz.conyac.cc/api/v1/projects/3",
"html_url": "https://conyac.cc/b/projects/3",
"question_count": 2,
"organization": {
"id": 4,
"name": "test10",
"plan_id": 1,
"user_id": 107,
"default": 1,
"description": null,
"created_at": "2014-06-10T10:32:38.000+09:00",
"updated_at": "2014-06-10T10:32:50.767+09:00",
"url": "https://biz.conyac.cc/api/v1/organizations/4",
"html_url": "https://conyac.cc/b/organizations/4",
"point": 78986,
"available_point": 78986
},
"questions": [
{
"id": 5,
"project_id": 3,
"question_source_id": 1,
"user_id": 107,
"title": "Test Request",
"letter_count": 1764,
"language_id": "ja",
"translated_language_id": "en",
"status": 0,
"status_text": "pending",
"total_point": 7056,
"created_at": "2014-06-10T10:32:50.757+09:00",
"updated_at": "2014-06-10T10:32:50.757+09:00",
"custom_field": "test1",
"description": "intoroduction etc..",
"ended_at": null,
"grab_expires_at": null,
"translated_at": null,
"individual": false,
"double_check": false,
"escape_text": false,
"url": "https://biz.conyac.cc/api/v1/questions/5",
"html_url": "https://conyac.cc/b/projects/3/questions/5",
"cancelable": true,
"organization_id": 4,
"file_type": "pptx"
},
{
"id": 6,
"project_id": 3,
"question_source_id": 7,
"user_id": 107,
"title": "body2<hoge>ddd</hoge>",
"letter_count": 8,
"language_id": "ja",
"translated_language_id": "en",
"status": 0,
"status_text": "pending",
"total_point": 32,
"created_at": "2014-06-10T10:32:50.761+09:00",
"updated_at": "2014-06-10T10:32:50.761+09:00",
"custom_field": null,
"description": "",
"ended_at": null,
"grab_expires_at": null,
"translated_at": null,
"individual": false,
"double_check": false,
"escape_text": false,
"url": "https://biz.conyac.cc/api/v1/questions/6",
"html_url": "https://conyac.cc/b/projects/3/questions/6",
"cancelable": true,
"organization_id": 4,
"file_type": "html_text"
}
],
"language": {
"id": "ja",
"localized_name": "Japanese"
},
"translated_language": {
"id": "en",
"localized_name": "English"
}
}
}
Project confirmation
Resource URL
GET /v1/projects/:project_id
Example Response
$ curl -i -H "Accept: application/json" -H "Content-type: application/json" -X GET https://biz.conyac.cc/api/v1/projects/3?access_token=8c1525a501a5b10671b148003c65b1ed5c0598da5907f0a7855dc248faac8b76
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"success": true,
"message": "the project is found.",
"project": {
"id": 3,
"organization_id": 4,
"user_id": 107,
"point": 7088,
"created_at": "2014-06-10T10:32:50.000+09:00",
"updated_at": "2014-06-10T10:32:50.000+09:00",
"language_id": "ja",
"translated_language_id": "en",
"individual": false,
"url": "https://biz.conyac.cc/api/v1/projects/3",
"html_url": "https://conyac.cc/b/projects/3",
"question_count": 2,
"organization": {
"id": 4,
"name": "test10",
"plan_id": 1,
"user_id": 107,
"default": 1,
"description": null,
"created_at": "2014-06-10T10:32:38.000+09:00",
"updated_at": "2014-06-10T10:32:50.000+09:00",
"url": "https://biz.conyac.cc/api/v1/organizations/4",
"html_url": "https://conyac.cc/b/organizations/4",
"point": 78986,
"available_point": 78986
},
"questions": [
{
"id": 5,
"project_id": 3,
"question_source_id": 1,
"user_id": 107,
"title": "Test Request",
"letter_count": 1764,
"language_id": "ja",
"translated_language_id": "en",
"status": 0,
"status_text": "pending",
"total_point": 7056,
"created_at": "2014-06-10T10:32:50.000+09:00",
"updated_at": "2014-06-10T10:32:50.000+09:00",
"custom_field": "test1",
"description": "intoroduction etc..",
"ended_at": null,
"grab_expires_at": null,
"translated_at": null,
"individual": false,
"double_check": false,
"escape_text": false,
"url": "https://biz.conyac.cc/api/v1/questions/5",
"html_url": "https://conyac.cc/b/projects/3/questions/5",
"cancelable": true,
"organization_id": 4,
"file_type": "pptx"
},
{
"id": 6,
"project_id": 3,
"question_source_id": 7,
"user_id": 107,
"title": "body2<hoge>ddd</hoge>",
"letter_count": 8,
"language_id": "ja",
"translated_language_id": "en",
"status": 0,
"status_text": "pending",
"total_point": 32,
"created_at": "2014-06-10T10:32:50.000+09:00",
"updated_at": "2014-06-10T10:32:50.000+09:00",
"custom_field": null,
"description": "",
"ended_at": null,
"grab_expires_at": null,
"translated_at": null,
"individual": false,
"double_check": false,
"escape_text": false,
"url": "https://biz.conyac.cc/api/v1/questions/6",
"html_url": "https://conyac.cc/b/projects/3/questions/6",
"cancelable": true,
"organization_id": 4,
"file_type": "html_text"
}
],
"language": {
"id": "ja",
"localized_name": "Japanese"
},
"translated_language": {
"id": "en",
"localized_name": "English"
}
}
}
Project validation
Resource URL
POST /v1/projects/check
Example Response
$ curl -i -H "Accept: application/json" -H "Content-type: application/json" -X POST https://biz.conyac.cc/api/v1/projects/check -d '{"language_id":"ja","translated_language_id":"en","questions":[{"description":"intoroduction etc..","title":"Test Request","custom_field":"test1","body":null,"type":"file","source_id":1},{"body":"body2ddd","type":"text_html"}],"access_token":"8c1525a501a5b10671b148003c65b1ed5c0598da5907f0a7855dc248faac8b76"}'
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"success": true,
"message": "the project is checked.",
"project": {
"organization_id": 4,
"user_id": 107,
"point": 7088,
"language_id": "ja",
"translated_language_id": "en",
"individual": false,
"question_count": 0,
"organization": {
"id": 4,
"name": "test10",
"plan_id": 1,
"user_id": 107,
"default": 1,
"description": null,
"created_at": "2014-06-10T10:32:38.000+09:00",
"updated_at": "2014-06-10T10:32:49.000+09:00",
"url": "https://biz.conyac.cc/api/v1/organizations/4",
"html_url": "https://conyac.cc/b/organizations/4",
"point": 86074,
"available_point": 86074
},
"questions": [
{
"user_id": 107,
"title": "Test Request",
"letter_count": 1764,
"language_id": "ja",
"translated_language_id": "en",
"total_point": 7056,
"custom_field": "test1",
"description": "intoroduction etc..",
"individual": false,
"escape_text": false,
"organization_id": 4
},
{
"user_id": 107,
"title": "body2<hoge>ddd</hoge>",
"letter_count": 8,
"language_id": "ja",
"translated_language_id": "en",
"total_point": 32,
"custom_field": null,
"description": "",
"individual": false,
"escape_text": false,
"organization_id": 4
}
],
"language": {
"id": "ja",
"localized_name": "Japanese"
},
"translated_language": {
"id": "en",
"localized_name": "English"
}
}
}