Document Generator
We are still updating this page
Some data may be missing — we will complete it soon.
Permissions
Scope: crm | Who can execute the method: any user
Quick navigation: all methods
The CRM REST methods for documents are implemented through AJAX controllers. The controllers and their actions are implemented in the Document Generator module, while the CRM module only provides the wrapper for them. This wrapper transforms the input and output parameters according to the new REST standard, taking into account the specifics of the CRM module.
When working with document methods through the CRM scope, you can only work with templates/documents linked to the CRM module.
Features of Passed Values
Providers
The Document Generator module uses the full class name as the data provider identifier. Since the CRM module uses named/numeric identifiers to identify entities, a similar syntax was used in REST for documents. If the input parameter is called entityTypeId, it accepts the numeric index of CRM entities. Currently, the following identifiers are available:
- 1 - lead
- 2 - deal
- 3 - contact
- 4 - company
- 5 - invoice
- 7 - estimate
- 14 - order
- 31 - new invoices
It is also possible to use SPAs: their entityTypeId is also supported in the Document Generator.
Filtering by Deal Directions
REST methods do not consider the template binding to providers. That is, if a request is sent to generate a document based on a template with a provider to which this template is not linked, there will be no error. It follows that the binding of the template to a specific deal direction is not taken into account. If you want to specify a deal as a provider, only the numeric identifier (2) is indicated.
List of Regions
Each template is linked to a specific country. The list of countries is fixed and currently consists of:
- de - Germany
- by - Belarus
- kz - Kazakhstan
- ua - Ukraine
- br - Brazil
- mx - Mexico
- uk - United Kingdom
- pl - Poland
Region management is carried out in the documentgenerator section.
Overview of Methods
Documents
|
Method |
Description |
|
Document fields. |
|
|
Create a new document. |
|
|
Modify a document. |
|
|
Retrieve information about a document by Id. |
|
|
Get a list of documents. |
|
|
Enable and disable public link to the document. |
|
|
Upload the generated document and attach it to the specified entity. |
|
|
Delete a document. |
Numerator
|
Method |
Description |
|
Add a new numerator. |
|
|
Modify an existing numerator. |
|
|
Retrieve information about a numerator by Id. |
|
|
Get a list of numerators. |
|
|
Delete a numerator. |
Document Templates
|
Method |
Description |
|
Document template fields. |
|
|
Add a new template. |
|
|
Modify an existing document template. |
|
|
Retrieve information about a document template by Id. |
|
|
Get a list of document templates. |
|
|
Delete a document template. |