[POST] .../v1/docprintform/prepare
Prepares a document print form from an RTF template. Use this method to render a document print form for preview, export or download after selecting a print form type linked to a document type. The request requires print_form_type_id and data, runs under a method-level lock with a 60 second timeout and returns either result as a prepared file object for version 2 or result as prepared data for version 1. The caller must have print form select permission and document select permission for the linked document type; missing body, invalid fields, unsupported document types, invalid template data, timeout 1018, denied access and storage errors are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| data | Object | Required | Object with data for preparing the print form. The object structure depends on the document type specified in print_form_type_id. |
| print_form_type_id | Int64 | Required | ID of the print form to document type link. |
| version | Int32 | Optional | Response format version: 1 or 2. Default value is 1. |
Request Example
{
"print_form_type_id": 41,
"version": 2,
"data": {
"document_id": 6201
}
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | DocPrintFormPreparedFile | Result object. |
Response Example
{
"ok": true,
"result": {
"file_name": "Purchase invoice DP-000145 20260720_123000.rtf",
"data": "https://cdn.example.test/prepared/Purchase-invoice-DP-000145.rtf",
"version": 2
}
}