[POST] .../v1/printformtype/set
Links a print form to a document type Use this method to create a link between an existing document print form and a document type so that the form can be selected and prepared later. The request requires positive type_id and printform_id values; version must be 1 or 2 and must match the storage version of the referenced print form. The current request user must have print form type set permission and the method inserts a new link row and returns new_id. Missing body, invalid identifiers, denied access, missing print form, version mismatch, foreign-key errors, database failures and transaction failures are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| printform_id | Int64 | Required | Print form ID. |
| type_id | Int64 | Required | Document type ID. |
| version | Int32 | Optional | Print form storage version: 1 links a inline template, 2 links a common-file template. Default value is 1. |
Request Example
{
"type_id": 26,
"printform_id": 1001,
"version": 2
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Insert | Created record result. |
Response Example
{
"ok": true,
"result": {
"new_id": 501
}
}