This describes the endpoints that deal with Order on the Gengo API.
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.getTranslationOrderJobs(id=232))
|
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 25 26 27 28 29 30 31 32 33 34 35 36 | {
"opstat": "ok",
"response": {
"order": {
"jobs_queued": 0,
"jobs_reviewable": [
],
"jobs_available": [
"243646",
"243647",
"243645"
],
"jobs_pending": [
],
"jobs_approved": [
],
"jobs_revising": [
],
"jobs_cancelled": [
],
"jobs_held": [
],
"order_id": "232",
"total_credits": "0.30",
"total_units": 6,
"total_jobs": "3",
"currency": "USD"
}
}
}
|
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.deleteTranslationOrder(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 25 26 27 28 29 30 31 32 33 | {
"opstat": "ok",
"response": {
"order": {
"jobs_queued": 0,
"jobs_reviewable": [
"243648"
],
"jobs_available": [
],
"jobs_cancelled": [
"243646",
"243647",
"243645"
],
"jobs_pending": [
],
"jobs_approved": [
],
"order_id": "232",
"total_credits": "0.80",
"total_units": 10,
"total_jobs": "4",
"jobs_revising": [
],
"currency": "USD"
}
}
}
|
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.getOrderComments(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
}
]
}
}
|
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.postOrderComment(
id=42,
comment={
'body': 'I love lamp!'
}
)
|
Response
1 2 3 4 5 6 | {
"opstat": "ok",
"response": {
}
}
|