Job methods

This describes the endpoints that deal with singular Job tasks and information on Gengo API.

Job (GET)

Summary :
Retrieves a specific job.
URL :
http://api.gengo.com/v2/translate/job/{id}
Authentication :
Required
Parameters :
  • api_key (required) - Your API key
  • api_sig (required) - Your API signature
  • ts (required) - Current Unix epoch time as an integer
Data arguments :
  • id (required) - Job ID
Note
  • If the job is a file job, the response will include file_url_src and file_url_tgt

Example call

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#!/usr/bin/python
# -*- coding: utf-8 -*-

from gengo import Gengo


gengo = Gengo(
    public_key='your_public_key',
    private_key='your_private_key',
    sandbox=False,
    debug=False)

gengo.getTranslationJob(id=42)

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
  "opstat": "ok",
  "response": {
    "job": {
      "job_id": 384985,
      "credits": 0.05,
      "auto_approve": 0,
      "eta": 25056,
      "file_download_ready": false,
      "order_id": 54632,
      "lc_tgt": "ja",
      "unit_count": 1,
      "lc_src": "en",
      "slug": "APIJobtest",
      "callback_url": "http://gengo.callback/",
      "currency": "USD",
      "tier": "standard",
      "body_src": "This is text.",
      "body_tgt": "これはテキストです。",
      "ctime": 1313475693,
      "status": "available"
    }
  }
}

Job (PUT)

Summary :
Updates a job to translate. Request should be no larger than 100MB. Comments should not exceed more than 25,000 characters.
URL :
http://api.gengo.com/v2/translate/job/{id}
Authentication :
Required
Parameters :
  • api_key (required) - Your API key
  • api_sig (required) - Your API signature
  • ts (required) - Current Unix epoch time as an integer
Data arguments :
action (required) :
“revise“ - Returns this job back to the translator for revisions.

Other parameters

  • comment (required) - The reason to the translator for sending the job back for revisions.
“approve“ - Approves job.

Other parameters

  • rating (optional) 1 (poor) to 5 (fantastic)
  • for_translator (optional) - Comments for the translator
  • for_mygengo (optional) - Comments for Gengo staff (private)
  • public (optional) 1 (true) / 0 (false, default) - Whether Gengo can share this feedback publicly, including the source and target text (see Open Data).
“reject“ - Rejects the translation. Please see our FAQs for details of the rejection process.

Other parameters

  • reason (required) - “quality”, “incomplete”, “other”
  • comment (required)
  • follow_up (optional) “requeue” (default) or “cancel” - If you choose “requeue” the job will be rejected and then passed onto another translator. If you choose “cancel” the job will be completely cancelled upon rejection.

“archive“ - Archive approved job.

Example call

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/python
# -*- coding: utf-8 -*-

from gengo import Gengo


gengo = Gengo(
    public_key='your_public_key',
    private_key='your_private_key',
    sandbox=False,
    debug=False)

gengo.updateTranslationJob(
    id=42,
    action={
        'action': 'reject',
        'reason': 'quality',
        'comment': 'My grandmother does better.',
    }
)

Response

1
2
3
4
5
6
{
  "opstat": "ok",
  "response": {

  }
}

Job (DELETE)

Summary :
Cancels the job. You can only cancel a job if it has not been started already by a translator.
URL :
http://api.gengo.com/v2/translate/job/{id}
Authentication :
Required
Parameters :
  • api_key (required) - Your API key
  • api_sig (required) - Your API signature
  • ts (required) - Current Unix epoch time as an integer
Data arguments :
  • id (required) - Job ID

Example call

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#!/usr/bin/python
# -*- coding: utf-8 -*-

from gengo import Gengo


gengo = Gengo(
    public_key='your_public_key',
    private_key='your_private_key',
    sandbox=False,
    debug=False)

gengo.deleteTranslationJob(id=42)

Response

1
2
3
4
5
6
{
  "opstat": "ok",
  "response": {

  }
}

Revisions (GET)

Summary :
Gets list of revision resources for a job. Revisions are created each time a translator or Senior Translator updates the text.
URL :
http://api.gengo.com/v2/translate/job/{id}/revisions
Authentication :
Required
Parameters :
  • api_key (required) - Your API key
  • api_sig (required) - Your API signature
  • ts (required) - Current Unix epoch time as an integer

Example call

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#!/usr/bin/python
# -*- coding: utf-8 -*-

from gengo import Gengo


gengo = Gengo(
    public_key='your_public_key',
    private_key='your_private_key',
    sandbox=False,
    debug=False)

print(gengo.getTranslationJobRevisions(id=42))

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
{
  "opstat": "ok",
  "response": {
    "job_id": 42,
    "revisions": [
      {
        "rev_id": 1234,
        "ctime": "..."
      },
      {
        "rev_id": 1235,
        "ctime": "..."
      },
      {
        "rev_id": 1236,
        "ctime": "..."
      },
      "..."
    ]
  }
}

Revision (GET)

Summary :
Gets a specific revision for a job.
URL :
http://api.gengo.com/v2/translate/job/{id}/revision/{rev_id}
Authentication :
Required
Parameters :
  • api_key (required) - Your API key
  • api_sig (required) - Your API signature
  • ts (required) - Current Unix epoch time as an integer

Example call

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#!/usr/bin/python
# -*- coding: utf-8 -*-

from gengo import Gengo


gengo = Gengo(
    public_key='your_public_key',
    private_key='your_private_key',
    sandbox=False,
    debug=False)

print(gengo.getTranslationJobRevision(id=42, revision_id=1))

Response

1
2
3
4
5
6
7
8
9
{
  "opstat": "ok",
  "response": {
    "revision": {
      "body_tgt": "...",
      "ctime": "..."
    }
  }
}

Feedback (GET)

Summary :
Retrieves the feedback you have submitted for a particular job.
URL :
http://api.gengo.com/v2/translate/job/{id}/feedback
Authentication :
Required
Parameters :
  • api_key (required) - Your API key
  • api_sig (required) - Your API signature
  • ts (required) - Current Unix epoch time as an integer
Data arguments :
  • id (required) - Job ID

Example call

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#!/usr/bin/python
# -*- coding: utf-8 -*-

from gengo import Gengo


gengo = Gengo(
    public_key='your_public_key',
    private_key='your_private_key',
    sandbox=False,
    debug=False)

print(gengo.getTranslationJobFeedback(id=42))

Response

1
2
3
4
5
6
7
8
9
{
  "opstat": "ok",
  "response": {
    "feedback": {
      "for_translator": "...",
      "rating": 8
    }
  }
}

Comments (GET)

Summary :
Retrieves the comment thread for a job.
URL :
http://api.gengo.com/v2/translate/job/{id}/comments
Authentication :
Required
Parameters :
  • api_key (required) - Your API key
  • api_sig (required) - Your API signature
  • ts (required) - Current Unix epoch time as an integer
Data arguments :
  • id (required) - Job ID

Note : Possible values for “author” are “customer” or “translator”.

Example call

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#!/usr/bin/python
# -*- coding: utf-8 -*-

from gengo import Gengo


gengo = Gengo(
    public_key='your_public_key',
    private_key='your_private_key',
    sandbox=False,
    debug=False)

print(gengo.getTranslationJobComments(id=42))

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
{
  "opstat": "ok",
  "response": {
    "thread": [
      {
        "body": "....",
        "author": "translator",
        "ctime": 1266322028
      },
      {
        "body": "....",
        "author": "customer",
        "ctime": 1266324432
      }
    ]
  }
}

Comment (POST)

Summary :
Submits a new comment to the job’s comment thread.
URL :
http://api.gengo.com/v2/translate/job/{id}/comment
Authentication :
Required
Parameters :
  • api_key (required) - Your API key
  • api_sig (required) - Your API signature
  • ts (required) - Current Unix epoch time as an integer
Data arguments :
  • id (required) - Job ID
  • body (required) - The comment body

Example call

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
#!/usr/bin/python
# -*- coding: utf-8 -*-

from gengo import Gengo


gengo = Gengo(
    public_key='your_public_key',
    private_key='your_private_key',
    sandbox=False,
    debug=False)

gengo.postTranslationJobComment(
    id=42,
    comment={
        'body': 'I love lamp!'
    }
)

Response

1
2
3
4
5
6
{
  "opstat": "ok",
  "response": {

  }
}