Regions in the Document Generator: Overview of Methods

If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation.

Regions define local settings for document generator templates. They allow you to configure:

  • the region's language
  • date and datetime formats
  • the full name template
  • a set of localized phrases for the document

There are two types of regions in the system: predefined and custom. A predefined region contains a ready-made set of settings, while a custom region allows you to specify your own settings.

Quick Navigation: All Methods

Getting Started

  1. Retrieve the list of available regions using the documentgenerator.region.list method.
  2. If a predefined region suits your needs, use its code when creating a template or updating a template for documents.
  3. If you need your own local settings, create a custom region using the documentgenerator.region.add method.
  4. Obtain the settings for the desired region using the documentgenerator.region.get method.
  5. Modify the parameters of the custom region using the documentgenerator.region.update method.
  6. Delete any unnecessary custom region using the documentgenerator.region.delete method.

Available Regions

The documentgenerator.region.list method returns two types of regions:

  1. Predefined regions with a symbolic code, such as fr or en. In the method's response, the code is specified in the code field.

    "fr": {
                "code": "fr",
                "title": "France",
                "languageId": "fr"
            },
            
  2. Custom regions with a numeric identifier, such as 5. In the method's response, the identifier is specified in the id field.

    "1": {
                "id": "1",
                "title": "United States (Custom)",
                "languageId": "en",
                "formatDate": "MM/DD/YYYY",
                "formatDatetime": "MM/DD/YYYY HH:MI:SS",
                "formatName": "#LAST_NAME# #FIRST_NAME# #MIDDLE_NAME#",
                "code": "1"
            }
            

Relationship of Regions with Other Objects

Document Templates. The region value is stored in the template data and defines the local settings that will be used when working with that template. To associate a region with a template, you need to pass the value in the region field when creating the template using the documentgenerator.template.add method. For a predefined region, use code, and for a custom region, use id. You can change the template's region using the documentgenerator.template.update method.

Considerations When Modifying and Deleting a Region

The documentgenerator.region.update and documentgenerator.region.delete methods only work with custom regions.

Deleting a region using the documentgenerator.region.delete method may result in an error if templates are associated with it. Reassign the templates to another region or delete any unnecessary templates.

Overview of Methods

Scope: documentgenerator

Who can execute the methods: a user with permission to modify document generator templates

Method

Description

documentgenerator.region.add

Adds a custom region

documentgenerator.region.update

Updates a custom region

documentgenerator.region.get

Returns region data by identifier or code

documentgenerator.region.list

Returns a list of predefined and custom regions

documentgenerator.region.delete

Deletes a custom region