Skip to main content

documents/{id}/pricing (GET)

This method returns the prices for costing the client. For example, it may tell the translation cost per word in each language.

For this to work, you need to first configure the price information for a client. See Costing / Flex for prerequisites.   

URL

(GET) /api/apps/wbflex/documents/{id}/pricing

PARAMETERS

URL parameters are:

id

Specify either a document ID (such as 1000) or a job ID (such as c300).

Mandatory, string


RESULTS

A JSON object with unit price details and discounts, per language.

success

True if the pricing information is available and accessible and included.

False, if the pricing information is not available or accessible.

bool
message

Contains a user-friendly message if success is false. It gives the reason why pricing information is not available.

See Costing error messages / Flex for the different messages.

string?
messageCode

Each message is assigned a unique code. This is useful if the default messages should be replaced in a user interface.

See Costing error messages / Flex for the different message codes.

string?
languagesAn array of all Flex document target languages. Each element contains the price information when processing content in that language.object[]


Each languages element is an object with these properties:

srcThe source language code.string
srctThe source language name.string
trgThe target language code.string
trgtThe target language name.string
services

The list of one or more services with unit prices and discounts.

When calculating the cost for work in this language, the system will sum up the cost of each service.

For example, you might have a cost for translation, for revision and proofreading work. Or, if it is simple, just a unit price for translation.

object[]


Each services element is an object with these properties:

task

The type of work that is costed. See this list for default task codes: settings/tasks/codes

Note that the platform administrator can add custom task codes in the system. 

string
tasktThe name of the task such as "Translation", "Revision" etc.string
unitprice

The applicable unit price, including a title:

CODE
unitprice": {
	"title": "Translation",
	"value": "EUR 0.20 per Word"
}

The unit price is configured in the price list.

This information can be printed as is and shows in the UI language of the connected user.

object
discounts

Any applicable discounts in an easy to process text format. It is an array of elements each with the discount type and discount information.

CODE
"discounts": [
	{
		"title": "100-110% match/rep:",
		"value": "-40.00%"
	}
]

his information can be printed as is and shows in the UI language of the connected user.

object


EXAMPLES

Typical price information

Here the project is configured to cost work for Translation. The unit price per language is retrieved from the client price list assigned to the project.  

CODE
{
    "success": true,
    "message": null,
    "messageCode": null,
    "languages": [
        {
            "src": "en",
            "srct": "English (en)",
            "trg": "de",
            "trgt": "German (de)",
            "services": [
                {
                    "task": "TR",
                    "taskt": "Translation",
                    "unitprice": {
                        "title": "Translation",
                        "value": "EUR 0.20 per Word"
                    },
                    "discounts": [
                        {
                            "title": "100-110% match/rep:",
                            "value": "-40.00%"
                        },
                        {
                            "title": "75-99% match/rep:",
                            "value": "-10.00%"
                        }
                    ]
                }
            ]
        },
        {
            "src": "en",
            "srct": "English (en)",
            "trg": "fr",
            "trgt": "French (fr)",
            "services": [
                {
                    "task": "TR",
                    "taskt": "Translation",
                    "unitprice": {
                        "title": "Translation",
                        "value": "EUR 0.21 per Word"
                    },
                    "discounts": []
                }
            ]
        }
    ]
}


Costing for Translation and Revision

In the following example, the project is configured to cost both translation and revision work:

CODE
{
	"success": true,
	"message": null,
	"messageCode": null,
	"languages": [
		{
			"src": "en",
			"srct": "English (en)",
			"trg": "de",
			"trgt": "German (de)",
			"services": [
				{
					"task": "TR",
					"taskt": "Translation",
					"unitprice": {
						"title": "Translation",
						"value": "EUR 0.20 per Word"
					},
					"discounts": [
						{
							"title": "100-110% match/rep:",
							"value": "-40.00%"
						}
					]
				},
				{
					"task": "RV",
					"taskt": "Revision",
					"unitprice": {
						"title": "Revision",
						"value": "EUR 0.08 per Word"
					},
					"discounts": []
				}
			]
		}
	]
}


Costing is not enabled

If a user has no access to costing information, or if costing is not configured in the project then you will see error information:

CODE
{
    "success": false,
    "message": "Costing is currently not activated. Please contact your translation service provider.",
    "messageCode": "NOT-ACTIVATED"
}






JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.