Domain API: Specifying the language for a Document Printout (v.22)

Back in version 2019.1 this Domain API feature for getting a printout for a document (aka GetPrintout) was introduced.

In short, if you send such a request,

POST /api/domain/odata/Crm_Invoicing_Invoices(51a63a99-c96d-4876-b205-fced610143ae)/GetPrintout HTTP/1.1
Content-Type: application/json

    "fileFormat": "pdf",
    "printout": {
        "": "General_Printouts(f5229037-b420-46a4-81a0-f11f7d112879)"

You'll receive a printout of the corresponding invoice as a pdf file, base64 encoded.

In English.

But you don't always need a printout in English, do you?

It's now possible to specify the language of the printout. Here's how,

POST /api/domain/odata/Crm_Invoicing_Invoices(51a63a99-c96d-4876-b205-fced610143ae)/GetPrintout HTTP/1.1
Content-Type: application/json
Accept-Language: de { "fileFormat": "pdf", "printout": { "": "General_Printouts(f5229037-b420-46a4-81a0-f11f7d112879)" } }

The only difference is the additional HTTP request header Accept-Language: de. This way, the result will be the same printout, but in German (of course if you have specified the corresponding translations in your multilanguage strings).

If you are not OK, adding a new HTTP header, you have two more options:

  • to specify a URL parameter culture=de
  • or set a cookie, containing the following key=value .AspNetCore.Culture=de


More information is available in our official documentation:

Have more questions? Submit a request


  • 0
    Dobri Kostadinov


    I pass bg or en for Accept-Language header but the Printout is always coming in English. We are sure that there are translations in Bulgarian language. Why is that happening?

  • 0
    Peter Kostov [ERP.NET]


    Please create a new forum post (or client ticket) and provide your exact version as well as the HTTP request you're using.

    Peter Kostov

Please sign in to leave a comment.
Powered by Zendesk