Блоки

Get Page Blocks

get

Получение списка блоков на странице.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
page_idintegerRequired
Query parameters
skipintegerOptional

Количество пропускаемых записей

Default: 0
limitinteger · min: 1 · max: 100Optional

Максимальное количество записей

Default: 100
Responses
200

Successful Response

application/json
get
/api/pages/{page_id}/blocks
GET /api/pages/{page_id}/blocks HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "id": 1,
    "page_id": 1,
    "block_template_id": 1,
    "type": "text",
    "position": 1,
    "settings": {},
    "created_at": "2025-12-08T00:08:05.993Z",
    "updated_at": "2025-12-08T00:08:05.993Z"
  }
]

Create Block

post

Создание нового блока на странице.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
page_idintegerRequired
Body

Схема для создания блока

block_template_idany ofOptional

ID шаблона блока (обязателен для обычных блоков, null для zero-блоков)

integerOptional
or
nullOptional
typestringOptional

Тип блока (template или zeroblock)

Default: template
positionintegerOptional

Позиция блока на странице

Default: 0
settingsany ofOptional

Настройки блока

objectOptional
or
nullOptional
Responses
post
/api/pages/{page_id}/blocks
POST /api/pages/{page_id}/blocks HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 68

{
  "block_template_id": 1,
  "type": "template",
  "position": 0,
  "settings": {}
}
{
  "id": 1,
  "page_id": 1,
  "block_template_id": 1,
  "type": "text",
  "position": 1,
  "settings": {},
  "created_at": "2025-12-08T00:08:05.993Z",
  "updated_at": "2025-12-08T00:08:05.993Z"
}

Get Block

get

Получение блока по ID.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
block_idintegerRequired
Responses
200

Successful Response

application/json
get
/api/blocks/{block_id}
GET /api/blocks/{block_id} HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": 1,
  "page_id": 1,
  "block_template_id": 1,
  "type": "text",
  "position": 1,
  "settings": {},
  "created_at": "2025-12-08T00:08:05.993Z",
  "updated_at": "2025-12-08T00:08:05.993Z"
}

Delete Block

delete

Удаление блока.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
block_idintegerRequired
Responses
delete
/api/blocks/{block_id}
DELETE /api/blocks/{block_id} HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Update Block

patch

Обновление настроек блока.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
block_idintegerRequired
Body

Схема для обновления настроек блока

settingsobject · SettingsRequired

Обновленные настройки блока

Responses
200

Successful Response

application/json
patch
/api/blocks/{block_id}
PATCH /api/blocks/{block_id} HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 15

{
  "settings": {}
}
{
  "id": 1,
  "page_id": 1,
  "block_template_id": 1,
  "type": "text",
  "position": 1,
  "settings": {},
  "created_at": "2025-12-08T00:08:05.993Z",
  "updated_at": "2025-12-08T00:08:05.993Z"
}

Update Block Position

patch

Обновление позиции блока на странице.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
block_idintegerRequired
Body

Схема для обновления позиции блока

positionintegerRequired

Новая позиция блока

Responses
200

Successful Response

application/json
patch
/api/blocks/{block_id}/position
PATCH /api/blocks/{block_id}/position HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 14

{
  "position": 1
}
{
  "id": 1,
  "page_id": 1,
  "block_template_id": 1,
  "type": "text",
  "position": 1,
  "settings": {},
  "created_at": "2025-12-08T00:08:05.993Z",
  "updated_at": "2025-12-08T00:08:05.993Z"
}

Последнее обновление