Web Services: Retrieval of Localized Reports Through the REST API

MYOB Acumatica 2024.1.1 introduced the ability to retrieve a report through the REST API. A developer could create a custom endpoint or extend an existing endpoint with an entity of the Report type and use this entity to obtain the report from MYOB Acumatica. The developer sent the POST HTTP method to the entity URL with the format of the report in the Accept header and the parameters of the report in the request body.

In MYOB Acumatica 2024.1, this functionality has been extended. Now a developer can also specify the language in which the report should be returned from MYOB Acumatica.

Requesting the Report in the Specified Language

To obtain the report from MYOB Acumatica in the specified language, the developer adds the Accept-Language header to the POST request. The header value can be one of the following:

  • A locale name that is defined on the System Locales (SM200550) form, such as fr-FR: If this locale is defined on the form and is active, the report in this language will be returned. If this locale is not defined on the form or is inactive, the active locale with the lowest sequence number that is defined on the form is used for the returned report.
  • Empty or *: The returned report uses the active locale with the lowest sequence number that is defined on the form.
  • Multiple locale names that are weighted with the quality value syntax, such as fr-FR, en;q=0.8, de;q=0.7, *;q=0.5: To generate the returned report, the system uses one of the requested locales that is defined on the form, is active, and has the highest priority specified. For more information about quality values, see https://developer.mozilla.org/en-US/docs/Glossary/Quality_values.

For details about requesting reports, see Request a Report.