Retrieve Localized Values of a Multilingual Field

For some text boxes on MYOB Acumatica forms, users can type values in multiple languages if multiple locales are configured in MYOB Acumatica. For example, if your MYOB Acumatica instance has the English and French locales activated and multilingual user input configured, you can specify the value of the Description box on the Stock Items (IN202500) form in English or French.

In this topic, you can learn how to retrieve localized values of a multilinqual field.

HTTP Method and URL

If you need to retrieve the list of records that satisfies the specified conditions, you use the GET HTTP method and the following URL.

GET http://<Base endpoint URL>/<Top-level entity>
The URL has the following components:
  • <Base endpoint URL> is the URL of the contract-based endpoint through which you are going to work with MYOB Acumatica. This URL has the following format: http://<MYOB Acumatica instance URL>/entity/<Endpoint name>/<Endpoint version>/.
  • <Top-level entity> is the name of the entity for which you are going to retrieve the list of records.

For example, suppose that you want to retrieve the list of stock item records from a local MYOB Acumatica instance with the name AcumaticaDB by using the system endpoint with the name Default and Version 23.200.001. You should use the following URL to retrieve the list of records.

http://localhost/AcumaticaDB/entity/Default/23.200.001/StockItem

Parameters

You retrieve localized values by using the $custom parameter, in which you specify the name of a custom field.

To find out the field name and the view name of the needed custom field with localized values, you find out the field name and the view name of the multilingual text box and append Translations to the field name. (For details on how to find out the field name and the view name of an element on the form, see Custom Fields.) For example, the multilingual Description box on the Stock Items form has the Descr field name and the Item view name; therefore, the custom field that contains the localized descriptions of a stock item has the DescrTranslations field name and the Item view name. So you should use the following parameter string in the request URL: $custom=Item.DescrTranslations.

Request Headers

You can specify the following header in the request.

HeaderDescription
Accept

Specifies the format of the response body, which should be application/json.

Response Status Codes

The following table lists the HTTP status codes that the system returns for a request that retrieves records by conditions.

CodeDescription
200The request has been completed successfully. The response body contains the list of records that satisfy the specified conditions.
401

The user is not signed in to the system.

403

The user has insufficient rights to access the MYOB Acumatica form that corresponds to the entity.

429

The number of requests has exceeded the limit imposed by the license (see License Restrictions for API Users).

500

An internal server error has occurred.

Example

For example, suppose that you want to retrieve the localized values of the Description box on the Stock Items form. Following is an example of a request.

Tip: In the request examples below, <MYOB Acumatica instance URL> is the URL of the MYOB Acumatica instance (such as https://my.acumatica.com/MyInstance). You can omit the instance name in the URL (such as https://my.acumatica.com) if the instance is installed in the root of the website.
GET ?$custom=Item.DescrTranslations HTTP/1.1
Host: [<Acumatica ERP instance URL>]/entity/Default/23.200.001/StockItem
Accept: application/json
Content-Type: application/json

The returned value of a Translations custom field is a string with the available localized values of the field. The language to which the value belongs is identified by the two-letter ISO code of the language. For example, suppose that for a particular record, the Description element of the Stock Items form has the value Item in English and Pièce in French. In this case, the value of the DescrTranslations custom field, which corresponds to the Description element, is the following string: [{en:Item},{fr:Pièce}].