API - IT - Post Edit Cost Preview
This method takes a list of translated requests and returns a cost estimation for post editing.
Typically, a user may (optionally) want to preview cost details prior to submitting requests for post editing.
URL
(GET) /api/it/requests/postedit/cost?token=&ids=
PARAMETERS
Parameters are:
token | The session token obtained when connecting. |
ids | Mandatory. A comma separated list of request IDs to cost, for example: "1000,2000, 645, 22" Please note that requesting the cost for 4 files may not give the same result as the sum of individually costed files. This depends how the platform administrator has configured cost calculation. |
RESULTS
An HTTP status of 200 indicates success. Other HTTP status values indicate an error.
The method returns a JSON object with property records.
records | An array of cost details. There will be one item per unique language couple and translation option. For example, if you cost 3 requests and each has a different language combination or translation option then you will receive 3 separate cost details (array elements). On the other hand, if all requests are for the same languages and the same translation option, you will get one cost details combining all items. In a user interface you simply list all array elements with the subtotals and then print at the end the grand total. |
Each records array element has these properties:
docs | Number of requests (aka documents) |
srct | The print name of the source language of all these documents. |
trgt | The print name of the target language of all these documents. |
mtoption | The print name of the translation option |
words | Total words to post edit |
chars | Total characters to post edit |
documents | Array of the documents in this array element. Example: "documents": [ "File1.docx", "File2.docx" ] |
costed | Boolean indicating if cost is available or not. The platform owner has the choice to automate or not automate costing. If costed is false then you may display "Cost preview not available". |
If costed is true, then the following properties are included: | |
currency | The currency code |
exvat | Decimal total excluding VAT |
exvatt | Text with the total amount excluding VAT (you should display this text). For example "2,000.20 EUR". |
incvat | Decimal total including VAT |
incvatt | Text with the total amount including VAT (you should display this text). For example "180.59 USD". |
vatrate | Decimal. The VAT rate. |
vatratet | Text with the VAT rate, such as "20.5%" |
EXAMPLE
We ask for the status of requests 39 and 40 using this URL:
(GET) /api/it/requests/postedit/cost?token=&ids=39,40
Cost is not available:
{ "records": [ { "docs": 2, "srct": "English", "trgt": "French", "mtoption": "Default", "words": 744, "chars": 4368, "documents": [ "Description v1.docx", "Appendix-A.docx" ], "costed": false } ] }
Cost is available:
{ "records": [ { "docs": 2, "srct": "English", "trgt": "French", "mtoption": "Default", "words": 744, "chars": 4368, "documents": [ "Description v1.docx", "Appendix-A.docx" ], "costed": true, "exvat": 120.50, "exvatt": "120.50 EUR", "incvat": 120.50, "incvatt": "120.50 EUR", "vat": 0.0, "vatt": "0%" } ] }
Cost with documents in different languages:
{ "records": [ { "docs": 1, "srct": "English", "trgt": "French", "mtoption": "Default", "words": 744, "chars": 4368, "documents": [ "English to French.docx" ], "costed": false }, { "docs": 1, "srct": "English", "trgt": "German", "mtoption": "Default", "words": 340, "chars": 2322, "documents": [ "English to German.docx" ], "costed": false } ] }
Copyright Wordbee - Buzzin' Outside the Box since 2008