Document Generator

Architecturally REST API mostly corresponds to the module PHP API. The set of REST methods covers all module functionality. The following types of fields and their modifiers are supported:

  • IMAGE - images
  • STAMP - stamps and signatures
  • DATE - dates
  • NAME - names

Money and Address field types are implemented inside the CRM module. That is why they cannot be used in the REST of this module. If the required data is still must be printed - it must be passed as already generated.

The option to use arrays to be inserted into table and recurrent blocks is available.


All templates and documents, created via this API are associated to the REST module. The scope documentgenerator cannot be used to request templates and documents of other modules. That is why, moduleId rest will always be available in template data. Even if another module is indicated in add or update, it will not be modified.

Only two providers are available for REST:

  • Bitrix\DocumentGenerator\DataProvider\Rest - must be always be specified as the provider for template
  • Bitrix\DocumentGenerator\DataProvider\HashDataProvider - used for data transfer to tables / recurrent blocks

Binding templates to user by the REST methods themselves is not considered. But it can be used on the side of the app.


For numerators to operate, the documentgenerator.numerator.* methods are available, described here. Access to all numerators for documents can be gained via this scope. Numerators, working in CRM can be accessed as well. However, there is no option to delete or update the numerator via REST.

List of regions

Each template is associated with a specific country. List of countries is available and presently consists of the following countries:

ru - Russia

by - Belarus

kz - Kazakhstan

ua - Ukraine

br - Brazil

mx - Mexico

de - Germany

uk - United Kingdom

pl - Poland

User-defined regions can be added starting from documentgenerator version 18.6.1. See a separate section for details.

User Comments

User comments are not part of official documentation. Use information provided by other users in the comments at your own risk.

The User Comments section is not to be used as a feature discussion board. Only registered users can post comments. Your comment will be visible once it has been approved by the moderator.
© «Bitrix Inc.», 2001-2019, «Bitrix Inc.», 2019