#Doc templates

Entity: docTemplate | Scope: documentgenerator | Base path: /v1/doc-templates

SPA entity (camelCase field names) — field names pass through without transformation.

#Operations

Method Path Description Bitrix24 Method
GET /v1/doc-templates List all (with filter, sort, pagination) documentgenerator.template.list
GET /v1/doc-templates/:id Get by ID documentgenerator.template.get
POST /v1/doc-templates Create new documentgenerator.template.add
PATCH /v1/doc-templates/:id Update by ID documentgenerator.template.update
DELETE /v1/doc-templates/:id Delete by ID documentgenerator.template.delete
GET /v1/doc-templates/fields Get available fields documentgenerator.template.getfields

#Fields

API Name Bitrix24 Name Type Readonly Description
id id number yes Идентификатор записи
name name string
numeratorId numeratorId number
region region string
code code string
provider provider string
moduleId moduleId string
active active boolean
bodyType bodyType string
stamps stamps boolean
sort sort number
isDeleted isDeleted boolean yes
createTime createTime datetime yes
updateTime updateTime datetime yes

#Examples

#List

Terminal
curl -X GET '/v1/doc-templates?limit=10' \
  -H 'X-Api-Key: YOUR_KEY'

#Get by ID

Terminal
curl -X GET '/v1/doc-templates/123' \
  -H 'X-Api-Key: YOUR_KEY'

#Create

Terminal
curl -X POST '/v1/doc-templates' \
  -H 'X-Api-Key: YOUR_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"name":"value","numeratorId":1,"region":"value"}'

#Update

Terminal
curl -X PATCH '/v1/doc-templates/123' \
  -H 'X-Api-Key: YOUR_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"title":"updated"}'

#Delete

Terminal
curl -X DELETE '/v1/doc-templates/123' \
  -H 'X-Api-Key: YOUR_KEY'

#Batch

Terminal
curl -X POST '/v1/batch' \
  -H 'X-Api-Key: YOUR_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"calls":[{"entity":"doc-templates","action":"list","params":{"limit":5}}]}'