For developers
Page blocks
Blocks of a given page: list, add a block of a type with settings, update and delete.
The block type is a catalog key (hero, link, socials, contacts, catalog, booking, faq …). The settings field takes the same keys as the block form in the editor; unknown fields are dropped, images cannot be uploaded through the API.
GET https://b-link.cc/api/biolinks-blocks?link_id={link_id}
Blocks of a given page: list, add a block of a type with settings, update and delete.
| link_id | required | ID страницы (из «Страницы») |
curl "https://b-link.cc/api/biolinks-blocks?link_id={link_id}" \
-H "Authorization: Bearer {api_key}"
GET https://b-link.cc/api/biolinks-blocks/{id}
POST https://b-link.cc/api/biolinks-blocks
| link_id | required | ID страницы |
| type | required | тип блока: hero, heading, paragraph, link, socials, contacts, catalog, tmprice, faq, review, booking, mail, phone_collector … |
| settings | optional | объект с полями формы блока; неизвестные поля отбрасываются |
| location_url | optional | адрес для блоков-ссылок |
| order | optional | позиция (0 — первый); по умолчанию в конец |
curl -X POST "https://b-link.cc/api/biolinks-blocks" \
-H "Authorization: Bearer {api_key}" \
-H "Content-Type: application/json" \
-d '{"link_id": {link_id}, "type": "heading", "settings": {"text": "Наши услуги", "heading_type": "h2"}}'
POST https://b-link.cc/api/biolinks-blocks/{id}
| settings | optional | только те поля, которые нужно изменить |
| location_url | optional | |
| order | optional | |
| is_enabled | optional | 1 — показывать, 0 — скрыть |
DELETE https://b-link.cc/api/biolinks-blocks/{id}
curl -X DELETE "https://b-link.cc/api/biolinks-blocks/{id}" \
-H "Authorization: Bearer {api_key}"