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
- Retrieve the list of available regions using the documentgenerator.region.list method.
- If a predefined region suits your needs, use its code when creating a template or updating a template for documents.
- If you need your own local settings, create a custom region using the documentgenerator.region.add method.
- Obtain the settings for the desired region using the documentgenerator.region.get method.
- Modify the parameters of the custom region using the documentgenerator.region.update method.
- Delete any unnecessary custom region using the documentgenerator.region.delete method.
Available Regions
The documentgenerator.region.list method returns two types of regions:
-
Predefined regions with a symbolic code, such as
froren. In the method's response, the code is specified in thecodefield."fr": { "code": "fr", "title": "France", "languageId": "fr" }, -
Custom regions with a numeric identifier, such as
5. In the method's response, the identifier is specified in theidfield."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:
documentgeneratorWho can execute the methods: a user with permission to modify document generator templates
|
Method |
Description |
|
Adds a custom region |
|
|
Updates a custom region |
|
|
Returns region data by identifier or code |
|
|
Returns a list of predefined and custom regions |
|
|
Deletes a custom region |