orders/{orderId}/workprogress
This method permits a user to obtain detailed work progress information for an order, beyond the order status. It can be called by clients or any other person authorized to access an order.
An order that is “In Progress” indicates that some work is going on. Use this API to obtain more details on the exact job work progress, such as: Is a translation job completed? Are we already doing a review? Is preparation for delivery job active, and so on. In order for these details to be returned and accessible, you need to make sure that:
You have configured the jobs you want to expose in the related project’s workflow. You can provide visibility to the entire workflow or on some steps only. See Workflow template Automation Options for more information.
The connected user must have the right to access the order. Clients can access their own orders but not orders from other companies. Make sure the access rights are configured accordingly, see Edit the Access Rights for an existing profile for more information.
The workflow progress for the configured steps is shown if and only if:
The order status is “In Progress”. For any other statuses, no work progress will be reported.
The order is attached to a project (or otherwise there cannot be any jobs to report on).
- 1 URL
- 2 PARAMETERS
- 3 RESULTS
- 4 EXAMPLES
URL
(GET) /api/orders/{orderId}/workprogress
PARAMETERS
URL parameters are:
orderId | The numeric order ID. See orders/list to find orders. | int, Mandatory |
RESULTS
The method returns a JSON object with these properties:
available | If false, means one of the following cases:
| bool |
order | An object including order information such as ID, reference or status. See further below for details. | object |
project | An object with project information such as the project languages and the project ID. If the order is not (yet) linked to a project, this object will be null and no work progress information will be returned. See further below for details. | object? |
workflow | An array of jobs with their status. The array is empty if “available” is false or there are no jobs currently active. See further below for details. | object[] |
The order JSON has these properties:
oid | The order ID. | int |
reference | The order reference. | string |
status | The job status as a number. See Order status. | int |
statust | The order status title. | string |
The project JSON has these properties:
pid | The project ID. | int |
srcs | Array of the project’s source language codes. | object[] |
trgs | Array of the project’s target language codes. | object[] |
The workflow node is an array of objects. Each object has these properties:
jid | The job ID. | int |
did | The document ID. | int |
dname | The document name. | string |
status | The job status as a number. See Job Status. | int |
statust | The job status title. | string |
task | The task code such as “TR” for Translation or “RV” for Revision. See also settings/tasks/codes to enumerate all codes configured in the platform. | string |
taskt | The task name. | string |
src | The source language code. | string |
srct | The source language name. | string |
trg | The target language code. | string |
trgt | The target language name. | string |
deadline | The job deadline. Note: Available only if canSeeDates is true. | datetime? |
started | The job start date. Note: Available only if canSeeDates is true. | datetime? |
completed | The job complete date. Note: Available only if canSeeDates is true. | datetime? |
canSeeDates | If false then the job deadline, started and completed date is not included (disclosed) in the results of this method. The project manager must explicitly enable this option in the project / order workflow profile. See Job options. | bool |
EXAMPLES
A typical result:
{
"available": true,
"order": {
"oid": 2582,
"reference": "Demo Order",
"status": 2,
"statust": "In progress"
},
"project": {
"pid": 5169,
"srcs": [
{
"t": "English (en)",
"v": "en"
},
{
"t": "French (fr)",
"v": "fr"
}
],
"trgs": [
{
"t": "English (en)",
"v": "en"
},
{
"t": "French (fr)",
"v": "fr"
}
]
},
"workflow": [
{
"jid": 9253,
"did": 14662,
"dname": "One word.txt",
"status": 10,
"statust": "Inactive",
"task": "TR",
"taskt": "Translation",
"src": "en",
"srct": "English (en)",
"trg": "fr",
"trgt": "French (fr)",
"deadline": 2022-08-12T09:24:17.613Z,
"started": null,
"completed": null,
"canSeeDates": false
},
{
"jid": 9253,
"did": 14662,
"dname": "One word.txt",
"status": 10,
"statust": "Inactive",
"task": "RV",
"taskt": "Revision",
"src": "en",
"srct": "English (en)",
"trg": "fr",
"trgt": "French (fr)",
"deadline": null,
"started": null,
"completed": null,
"canSeeDates": false
}
]
}
Copyright Wordbee - Buzzin' Outside the Box since 2008