Get

[POST] .../v1/printformtype/get

Returns print form to document type links. Use this method to list document type to print form links before preparing a document template through DocPrintForm/Prepare. The response returns PrintFormType records with the translated document type and the linked DocPrintForm metadata; id, type_id, printform_id and version filters narrow the lookup. The version field must be 1 or 2 and the current request user must have print form type select permission. Missing body, denied access, invalid version, translation lookup failures and database failures are returned as HTTP 200 ErrorResult business errors.

Request Parameters

Name Type Required Description
filters Array of Filter Optional Optional filters by fields available for this API method.

Filterable Fields

Field Type Description
id int Optional filter by document type to print form link IDs.
printform_id int Optional filter by document print form IDs.
type_id int Optional filter by document type IDs.
version int Linked print form version filter: 1 returns inline templates, 2 returns common-file templates. Default value is 1.

Request Example

{
  "filters": [
    {
      "Field": "type_id",
      "Operator": "Equal",
      "Value": "26"
    },
    {
      "Field": "version",
      "Operator": "Equal",
      "Value": "2"
    }
  ]
}

Response Parameters

Name Type Description
ok Boolean Indicates whether the request completed successfully.
result Array of PrintFormType Result array.

Response Example

{
  "ok": true,
  "result": [
    {
      "id": 501,
      "type": {
        "id": 26,
        "name": "Purchase document",
        "name_var": "APP_DOC_TYPE_NAME_26",
        "last_update": 1767225600
      },
      "printform": {
        "id": 1001,
        "name": "Purchase invoice",
        "version": 2,
        "last_update": 1767225600
      },
      "version": 2
    }
  ]
}