Skip to content

Latest commit

 

History

History
333 lines (304 loc) · 8.83 KB

File metadata and controls

333 lines (304 loc) · 8.83 KB

Order

List - retrieve all orders

GET https://platform.api.onesky.io/1/projects/:project_id/orders

Authentication

Required. Details described here

Parameters

Name Required? Default Sample Description
page optional 1 Set page number to retrieve. (min: 1)
per_page optional 50 Set how many groups to retrieve for each time. (max: 100, min: 1)
file_name optional string.po Filter orders by file name.

Response

status 200 OK
{
    "meta": {
        "status": 200,
        "record_count": 26
    },
    "data": [
        {
            "id": 123,
            "status": "in-progress",
            "ordered_at": "2013-08-15T08:12:40+0000",
            "ordered_at_timestamp":13283746583
        },
        {
            "id": 122,
            "status": "completed",
            "ordered_at": "2013-08-15T08:12:40+0000",
            "ordered_at_timestamp":13283746583
        },
        ...
    ]
}

Back to top

Remark: status can be either pending, in-progress, completed or failed. Details please refer to Order Status

Show - retrieve details of an order

GET https://platform.api.onesky.io/1/projects/:project_id/orders/:order_id

Authentication

Required. Details described here

Parameters

NONE

Response

status 200 OK
{
    "meta": {
        "status": 200
    },
    "data": {
        "id": 123,
        "status": "in-progress",
        "amount": "695.00",
        "files": [
            {
                "name": "string.po"
            },
            {
                "name": "string2.po"
            },
            ...
        ],
        "from_language": {
            "code": "en-US",
            "english_name": "English (United States)",
            "local_name": "English (United States)",
            "locale": "en",
            "region" : "US"
        },
        "tasks": [
            {
                "status": "completed",
                "to_language": {
                    "code": "ko-KR",
                    "english_name": "Korean",
                    "local_name": "한국어",
                    "locale": "ko",
                    "region" : "KR"
                },
                "translator":{
                    "name": "Jinny O."
                },
                "string_count": 835,
                "word_count": 3056,
                "will_complete_at": null,
                "will_complete_at_timestamp": null,
                "seconds_to_complete": 0,
                "completed_at": "2013-08-17T13:05:20+0000",
                "completed_at_timestamp": 1376744720
            },
            ...
        ],
        "order_type": "translate-only",
        "tone": "formal",
        "specialization": "general",
        "note": "Message to translator",
        "ordered_at": "2013-08-15T08:12:40+0000",
        "ordered_at_timestamp":13283746583
    }
}

Remark:

  • status of order (inside data) can be either pending, in-progress, completed or failed. Details please refer to Order Status
  • status of order tasks (inside tasks) can be either in-progress or completed. Details please refer to Order Task Status

Back to top

Create - create a new order

POST https://platform.api.onesky.io/1/projects/:project_id/orders

Authentication

Required. Details described here

Parameters

Name Required? Default Sample Description
files required ['string.po'] Files to be translated in the order
to_locale required zh-TW Target language to tranlate. Please refer to GET locales
order_type optional translate-only review-only Specify type of order.
Types:
  • translate-only - perform translation only
  • review-only - review translation only
  • translate-review - perform translation and review afterwards
is_including_not_translated optional true false Include not translated phrases to translate
is_including_not_approved optional true false Include not approved phrases to translate
is_including_outdated optional true false Include outdated phrases to translate that is updated since last order.
translator_type optional preferred fastest Specify type of translator used in translation.
Types:
  • preferred - select translator who helped translated your projects previously for consistency
  • fastest - select translator who has fewest jobs and is able to pick up your job faster
tone optional not-specified formal Specify the tone used in translation.
Currently supported:
  • not-specified - no preference
  • formal - translate in formal tone
  • informal - translate in informal tone
specialization optional general game Specify specialization in order to translate phrases in a specific area.
Currently supported:
  • general - genreal translations
  • game - translations of game
note optional Note to translator.

Response

status 201 Created
{
    "meta": {
        "status": 201
    },
    "data": {
        "id": 372,
        "files": [
            {
                "name": "string.po"
            },
            {
                "name": "string2.po"
            },
            ...
        ],
        "from_language": {
            "code": "en-US",
            "english_name": "English (United States)",
            "local_name": "English (United States)",
            "locale": "en",
            "region" : "US"
        },
        "to_language": {
            "code": "ja-JP",
            "english_name": "Japanese",
            "local_name": "日本語",
            "locale": "ja",
            "region" : "JP"
        },
        "order_type": "translate-only",
        "is_including_not_translated": true,
        "is_including_not_approved": false,
        "is_including_outdated": true,
        "tone": "formal",
        "specialization": "general",
        "note": "Message to translator",
        "ordered_at": "2013-08-15T08:12:40+0000",
        "ordered_at_timestamp":13283746583,
    }
}

Back to top