{ "ORDER": { "buyer_name": "NAME", "buyer_soname": "SONAME", "buyer_phone": "PHONENUMBER123", "buyer_email": "email@email.com", "buyer_address": "ADDRESS", "delivery_storehouse_title": "Extend PICKUP POINT (Selected)", "buyer_address_eform0": "Extend ADDRESS (Selected)", "buyer_address_eform1": "Extend ADDRESS (Region)", "buyer_address_eform2": "Extend ADDRESS (City)", "buyer_address_eform3": "Extend ADDRESS (Street)", "buyer_address_eform4": "Extend ADDRESS (Home number)", "buyer_address_eform5": "FLAT", "buyer_address_eform6": "Extend ADDRESS (Branch number)", "buyer_sendedtext": "ADD TEXT", "post": "1596538754", "lang": "en", "form_delivery": "", "form_delivery_country_code": "", "order_id": "XXXXX", "customer_id": "XXXX", "order_discount": "", "order_hash": "55d4ed2ed42b2c116d9927c2b2ce7fef", "time": "2025-06-28T12:31:49+00:00", "delivery": "", "delivery_id": 0, "abtesting": 0, "referral_group": "", "group": "", "referral_url": "https://boostore.pro/....", "referral_utm": "", "site_id": "10954", "site_url": "boostore.pro", "transaction_id": "XXXXX", "total": 2264, "currency": "UAH", "shipping": "0", "items": [ { "id": "284430", "name": "Adidas Originals Streetball Trainers FX9701 (42)", "sku": "200976_42", "sku_parent": "200976", "variant": "42", "category": "sport_shoes", "quantity": "1", "price": "686", "currency": "UAH", "variations_id": "409151" }, { "id": "284436", "name": "Shoe bag with pocket Kite Education College", "sku": "200982", "sku_parent": "200982", "variant": "", "category": "bags_for_shoes", "quantity": "1", "price": "736", "currency": "UAH", "variations_id": 0 }, { "id": "284438", "name": "ASICS Gel-Venture 8 Gs Trainers (43)", "sku": "200984_43", "sku_parent": "200984", "variant": "43", "category": "sport_shoes", "quantity": "1", "price": "842", "currency": "UAH", "variations_id": "409154" } ] } }
{ "ORDER": { "crm_order_id": "123", "total": "2264", "currency": "UAH", "discount": "", "discount_before": "", "total_before": "2264", "currency_before": "UAH", "shop_cart_statistic_selldone_datestump_unsted": "0", "status": "0", "status_pay": "0", "allow_online_pay": "0", "status_for_customer": "0", "delivery_status": "0", "products_preview": "", "admin_note": "", "delivery_selected_id_before": "3482", "delivery_selected_id": "3482", "delivery_track_id": "", "delivery_track_id_link": "", "buyer_name": "NAME SONAME", "buyer_phone": "PHONENUMBER123", "buyer_address": "ADDRESS", "buyer_address_eform0": "Extend ADDRESS (Selected)", "buyer_address_eform1": "Extend ADDRESS (Region)", "buyer_address_eform2": "Extend ADDRESS (City)", "buyer_address_eform3": "Extend ADDRESS (Street)", "buyer_address_eform4": "Extend ADDRESS (Home number)", "buyer_address_eform5": "Extend ADDRESS (Flat)", "buyer_address_eform6": "Extend ADDRESS (Branch number)", "buyer_email": "email@email.com", "payment_method": "PaymentMethod (Selected)", "group": "", "referral_group": "", "referral_url": "http://boostore.pro", "referral_utm": "", "site_manager_id_operator": "1", "buyer_id": "16532", "manager_id_operator": "0", "order_products": "284430|284436|284438", "order_products_sku": "200976_42|200982|200984_43", "order_products_num": "1|1|1", "order_products_variations_id": "409151|407678|409154", "order_products_prices": "686|736|842", "order_products_currency": "UAH|UAH|UAH", "order_products_titles": "Adidas Originals Streetball Trainers FX9701|Shoe bag with pocket Kite Education College|ASICS Gel-Venture 8 Gs Trainers", "order_products_variations_titles": "42||43", "order_products_prices_without_discount": "||", "post": "1596578917", "Save": "Save", "order_id": 63738, "order_discount": "", "time": "2025-06-28T12:31:49+00:00", "delivery": null, "delivery_id": "3482", "referral_group": "", "group": "", "referral_url": "http://boostore.pro/ru/pers_shop/sport_shoes/284438.htm", "referral_utm": "", "site_url": "boostore.pro", "transaction_id": 63738, "crm_oder_id": "123", "total": "2264", "currency": "UAH", "items": [ { "id": "284430", "name": "Adidas Originals Streetball Trainers FX9701", "sku": "200976_42", "variant": "42", "quantity": "1", "price": "686", "currency": "UAH", "variations_id": "409151", "price_without_discount": "" }, { "id": "284436", "name": "Shoe bag with pocket Kite Education College", "sku": "200982", "variant": "", "quantity": "1", "price": "736", "currency": "UAH", "variations_id": "407678", "price_without_discount": "" }, { "id": "284438", "name": "ASICS Gel-Venture 8 Gs Trainers", "sku": "200984_43", "variant": "43", "quantity": "1", "price": "842", "currency": "UAH", "variations_id": "409154", "price_without_discount": "" } ] } }
'status'
'status_pay'
'status_for_customer'
'admin_note'
'delivery_status'
'crm_order_id'
Подробнее ознакомиться с полями вы можете в статистике продаж, при редактировании заказа.
{ "ORDER": { "crm_order_id": "123", "order_id": 63738, "total": "2264", "currency": "UAH", "discount": "", "discount_before": "", "total_before": "2264", "currency_before": "UAH", "shop_cart_statistic_selldone_datestump_unsted": "0", "status": "0", "status_pay": "0", "allow_online_pay": "0", "status_for_customer": "0", "delivery_status": "0", "products_preview": "", "admin_note": "", "delivery_selected_id_before": "3482", "delivery_selected_id": "3482", "delivery_track_id": "", "delivery_track_id_link": "", "buyer_name": "NAME SONAME", "buyer_phone": "PHONENUMBER123", "buyer_address": "ADDRESS", "buyer_address_eform0": "Extend ADDRESS (Selected)", "buyer_address_eform1": "Extend ADDRESS (Region)", "buyer_address_eform2": "Extend ADDRESS (City)", "buyer_address_eform3": "Extend ADDRESS (Street)", "buyer_address_eform4": "Extend ADDRESS (Home number)", "buyer_address_eform5": "Extend ADDRESS (Flat)", "buyer_address_eform6": "Extend ADDRESS (Branch number)", "buyer_email": "email@email.com", "payment_method": "PaymentMethod (Selected)", "group": "", "referral_group": "", "referral_url": "http://boostore.pro", "referral_utm": "", "site_manager_id_operator": "1", "buyer_id": "16532", "manager_id_operator": "0", "order_products": "284430|284436|284438", "order_products_sku": "200976_42|200982|200984_43", "order_products_num": "1|1|1", "order_products_variations_id": "409151|407678|409154", "order_products_prices": "686|736|842", "order_products_currency": "UAH|UAH|UAH", "order_products_titles": "Adidas Originals Streetball Trainers FX9701|Shoe bag with pocket Kite Education College|ASICS Gel-Venture 8 Gs Trainers", "order_products_variations_titles": "42||43", "order_products_prices_without_discount": "||", "post": "1596578917", "Save": "Save", "order_discount": "", "time": "2025-06-28T12:31:49+00:00", "delivery": null, "delivery_id": "3482", "referral_group": "", "group": "", "referral_url": "http://boostore.pro/ru/pers_shop/sport_shoes/284438.htm", "referral_utm": "", "site_url": "boostore.pro", "transaction_id": 63738, "items": [ { "id": "284430", "name": "Adidas Originals Streetball Trainers FX9701", "sku": "200976_42", "variant": "42", "quantity": "1", "price": "686", "currency": "UAH", "variations_id": "409151", "price_without_discount": "" }, { "id": "284436", "name": "Shoe bag with pocket Kite Education College", "sku": "200982", "variant": "", "quantity": "1", "price": "736", "currency": "UAH", "variations_id": "407678", "price_without_discount": "" }, { "id": "284438", "name": "ASICS Gel-Venture 8 Gs Trainers", "sku": "200984_43", "variant": "43", "quantity": "1", "price": "842", "currency": "UAH", "variations_id": "409154", "price_without_discount": "" } ] } }
/ajax.php?statistic_sell
202cb962ac59075b964b07152d234b70
/ajax.php?statistic_sell&key=202cb962ac59075b964b07152d234b70
/page.php?p=statistic_sell&mystat
&sort_dateperiod=1week
/csv_export_products.csv?key=202cb962ac59075b964b07152d234b70
&export_product_access=export_product_access
Для работы с API нужен ключ доступа (Consumer Secret), который вы создаете в резделе «Настройка», «Магазин», «Доступ к статистике продаж». Ключ формируется на основе Ключа для доступа к статистике продаж.
В зависимости от типа ключа, API может предоставлять разные уровни доступа:
Ключ формируется на основе вашего Ключа для доступа к статистике продаж с добавлением соответствующего суффикса. Создайте в настройках магазина ключ для доступа к статистике продаж, система автоматически сгенерирует все варианты ключей.
Все запросы идут на базовый URL вашего сайта, например: https://site.com/api/commerce/
https://site.com/api/commerce/
GET
/orders
/orders/{id}
/crm_orders/{id}
DELETE
POST
UPDATE
/products
?lang=ru|ua|en|pl
/products/{id}
/products/sku/{sku}
/products/categories
/products/categories/{id}
/products/categories/name/{name}
category_parent_id
category_parent_name
category_lang
Принцип работы:
Особое правило: Чтобы добавить категорию в корневую (основную) категорию, необходимо указать category_parent_name = "main" и обязательно задать параметр category_lang.
category_parent_name = "main"
Обновление и удаление: update_exists (bool) – если true, обновляет категорию при повторном добавлении. delete (bool) – если true, категория будет удалена.
update_exists
delete
/products/producers
/products/producers/{id}
/products/producers/name/{name}
producer_parent_id
producer_parent_name
producer_lang
Особое правило: Чтобы добавить производителя в корневую (основную) группу производителей, необходимо указать producer_parent_name = "main" и обязательно задать параметр producer_lang.
producer_parent_name = "main"
Обновление и удаление: update_exists (bool) – если true, обновляет производителя при повторном добавлении (по умолчанию false). delete (bool) – если true, производитель будет удалён.
/products/collections
/products/collections/{id}
/products/collections/name/{name}
collection_parent_id
collection_parent_name
collection_lang
Особое правило: Чтобы добавить коллекцию в корневую (основную) коллекцию, необходимо указать collection_parent_name = "main" и обязательно задать параметр collection_lang – язык родительской коллекции.
collection_parent_name = "main"
Обновление и удаление: update_exists (bool) – если true, обновляет коллекцию при повторном добавлении (по умолчанию false). delete (bool) – если true, коллекция будет удалена.
Для методов /orders, /products, /blog/articles и /pages доступны параметры для постраничного вывода и сортировки:
/blog/articles
/pages
page
per_page
orderby
id
title
price
date
views
order
asc
desc
l
ru
ua
en
de
fr
es
it
pl
Можно фильтровать заказы по дате и статусу:
?after=YYYY-MM-DD
?before=YYYY-MM-DD
?status=pending|processing|on-hold|completed|cancelled|0|1|2|3|5|6|7|8
0
1
7
3
8
2
5
6
?show_deleted=1
GET /orders?page=2&per_page=100&after=2024-06-01&before=2024-06-30
GET /products?orderby=price&order=asc&per_page=50
GET /booking?date_from=2024-06-01&date_to=2024-06-30&type=0
GET /booking?group_id=5&slug_search=yoga-morning
Способ 1 — через параметр запроса (простой):
?consumer_secret=ВАШ_СЕКРЕТ
⛔ Не публикуйте ключ в общий доступ!
Способ 2 — через заголовок Authorization (OAuth 1.0a):
Authorization: OAuth oauth_consumer_key="ВАШ_СЕКРЕТ"
🔗 Живой пример — запрос к API:
Чтобы создать новый заказ через API, нужно отправить POST-запрос на /orders с JSON-телом. Обязательно должно быть указано минимум:
email
line_items
При создании заказа можно указывать дополнительные поля, например:
{ "first_name": "Name", "last_name": "Soname", "email": "alex@example.com", "phone": "+380671112233", "address": "Full address of not used address eform", "buyer_address_eform1": "State", "buyer_address_eform2": "City", "buyer_address_eform3": "Street", "buyer_address_eform4": "house number", "buyer_address_eform5": "flat", "postcode": "01001", "total": "999", "status": "processing", "status_for_customer": "processing", "line_items": [ ... ] }
Описание поля total:
total
Параметр line_items — это массив товаров, каждый товар задаётся объектом со следующими полями:
"line_items": [ { "product_id": 478734, "quantity": 1, "price": 100, "currency": "USD" }, { "product_id": 478268, "quantity": 10, "variation": "51" }, { "product_id": 478266, "quantity": 1, "variation_id": 735302 } ]
USD
UAH
currency
variation_id
Важно: Если общая валюта заказа (currency) не указана — будет использоваться валюта по умолчанию для сайта.
Если валюта товара отличается от общей валюты — цена конвертируется автоматически.
Если заказ связан с бронированием, можно указать:
booking
booking_data
"booking_data": { "slot_id": 123, "slot_title": "Название слота", "group_id": 0, "start_time": 1710000000, "end_time": 1710003600, "duration": 3600, "factor": 1.0, "base_price": "100$", "price": "100$", "payment_required": true, "status": 0, "after_payment_status": 3, "userid": 0, "author": 0, "dates_start_year": "2026", "dates_start_date": "2026-07-07", "dates_start_time": "10:00:00", "dates_end_year": "2026", "dates_end_date": "2026-07-07", "dates_end_time": "11:00:00" }
🛡️ Защита от дублей: При создании или обновлении заказа с booking_data система автоматически проверяет, не занят ли указанный временной интервал другим неотменённым заказом (статусы 2, 5, 6 считаются отменёнными — слот свободен). Если слот занят — API вернёт ошибку 409 Conflict.
409 Conflict
Обновление товара осуществляется через HTTP-метод UPDATE (или PATCH/PUT) по URL с указанием ID товара или его SKU (кода товара), либо сразу нескольких товаров одним запросом:
При массовом обновлении путь /products не содержит ID или SKU. В этом случае необходимо передавать массив объектов товаров в параметре products. Каждый элемент массива должен содержать хотя бы id или sku. Если указан id, он имеет приоритет и может использоваться для замены кода товара (sku). Если id не указан, поиск осуществляется по sku - коду товара.
products
sku
При обновлении передается полный набор данных товара в формате JSON. Все переданные данные заменяют существующие значения, включая:
Обновление вариаций происходит с использованием следующего алгоритма для каждой вариации из массива variations:
variations
Обновление по SKU удобно, когда ID вариации неизвестен, но известен уникальный код.
При обновлении все поля, указанные в JSON, заменят текущие значения товара; чтобы оставить какое-то поле без изменений, просто не включайте его в запрос.
images
images[0]
"delete"
images[2] = "delete"
images[3] = "delete"
images[1] = "https://..."
false
images_replace
true
images_skip_index
images_replace_new_index
price_for
Для каждого товара можно указать параметр price_for, который задаёт единицу измерения цены. Допустимо использовать числовой код или текст (например, «За 1 кг» или «Per 1 kg»). Вот полный список значений:
4
9
10
11
12
13
14
15
16
17
18
19
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Можно использовать как числовое значение, так и текст — система автоматически распознает и приведёт к правильному коду.
stock_status
Для каждого товара можно указать параметр stock_status, который определяет статус доступности товара и его поведение на сайте. Можно использовать числовой код или ключевое слово — система распознает оба варианта.
Если для товара выбран вариант 3, он будет скрыт из списков товаров на сайте. Если выбран вариант 4, товар будет виден, но его нельзя будет добавить в корзину. Вариант 5 показывает покупателю, что наличие нужно уточнить.
promotion_expires_job
Для каждого товара можно указать параметр promotion_expires_job, который управляет тем, что делать с акцией после истечения её срока. Можно использовать числовой код или ключевое слово — система распознает оба варианта.
Можно указывать как числовое значение, так и текст — система автоматически распознает и приведёт к нужному коду.
Важно: Для активации таймера акции обязательно укажите promotion равным 1 — это означает, что акция активна.
promotion
Также необходимо указать дату окончания акции в параметре promotion_expires — она может быть задана как UNIX-время (например, time()), так и в формате YYYY-MM-DDTHH:MM:SS+00:00 (например, 2025-06-28T00:00:00+00:00).
promotion_expires
time()
YYYY-MM-DDTHH:MM:SS+00:00
2025-06-28T00:00:00+00:00
Текст (максимум 255 символов) - наименование товара
Текст (максимум 100 символов) - код товара
status
xml
Включить/Выключить выгрузку товара в XML (Goolge Merchant и прочие)
xml_markup
Параметр управляет применением наценок при выгрузке товаров в XML (Google Merchant и другие рекламные каталоги).
noimport
Включить/Выключить обновление товара при импорте (Магазин - Импортировать товары)
show_period
Период размещения товара. Позволяет скрыть товар после истечения указанного срока.
priority
Число от 0 до 100. Чем больше — тем выше товар в списке.
100
custom_label_4
Текст (максимум 95 символов)
meta_title
Текст (максимум 255 символов)
meta_description
Текст (максимум 500 символов)
meta_keywords
Текст (максимум 2000 символов)
multilangid
Текст (максимум 50 символов)
categories
Массив со значениями
name
lang
producer
producer_country
Текст (максимум 100 символов)
collection
short_description
Текст (максимум 2000 символов) - краткое описание товара (если включено в стилистике сайта, то отображается при просмотре списка товаров)
description
Текст длинный - полное описание товара, отображается при отдельном просмотре карточки товара
description_tab_1
Текст длинный - вкладка 1 с описанием (Заголовок вкладки укажите в настройках магазина)
description_tab_2
Текст длинный- вкладка 2
description_tab_3
Текст длинный- вкладка 3
description_tab_4
Текст длинный- вкладка 4
description_tab_5
Текст длинный- вкладка 5
bought_with
Текст (максимум 255 символов) - список значения С товаров покупают, через запятую (ID или SKU товаров)
bought_with_email
Текст (максимум 255 символов) - список значения С товаров покупают, отправляемый покупателю на почту при заказе, через запятую (ID или SKU товаров)
discount
Текст (максимум 20 символов) - размер скидки (информационное поле о скидке, отображается и в списке товаров и при отдельном просмотре)
new
Пометить товар как Новинка
featured
Пометить товар как Хит продаж
Пометить товар как Акция
reducedprice
Пометить товар как Цена снижена
shipping
shipping_settings
shipping_price
Текст (максимум 40 символов)
shipping_note
Текст (длинный)
shipping_days
Текст (максимум 10 символов)
shipping_sum
attributes
Массив с характеристиками - отображаются в карточке товара, учитываются при сравнении товара и в поисковом фильтре
options
value_ints
value_parent_id
[ { "id": 1298, "name": "Product type", "options": ["Кросівки"] }, { "name": "Виробник", "options": ["Adidas"], "value_ints": [10081], "value_parent_id": 1762 }, { "name": "Розмір", "options": ["43", "43,5"], "value_ints": [10107, 10108], "value_parent_id": 1763 } ]
Системное имя (slug) для SEO-ссылки (строка, максимум 255 символов)
type
ID типа товара (число) — для фильтрации и атрибутов
Код валюты (строка, например USD, UAH, EUR)
EUR
tags
Теги, через запятую (максимум 8 тегов)
weight
Вес товара (число)
weight_units
dimensions
Массив габаритов товара
length
width
height
units
sku_show
moq
Минимальное количество товара для заказа (число)
show_stock
show_tree
supplier
price_cost
Себестоимость товара (строка, максимум 20 символов)
bulk_prices
Массив оптовых цен
products_synonyms
Список ID товаров для группировки, через запятую (строка, максимум 255 символов)
video
URL видео (строка)
video_duration
Длительность видео в формате HH:MM:SS (строка)
variations_type
Тип размера для Google Merchant
variations_title
Заголовок над селектором вариаций (строка)
variations_require
variations_cartexplode
variations_only_update
Другие значения вы можете узнать получив методом GET /products или в примерах ниже
Псевдонимы полей (WooCommerce-совместимость): content = description, excerpt = short_description, cat_id / rubric_id = category_id, sale_price = price, original_price = regular_price, menu_order = priority, wholesale_price = price_cost, slug = name (если указаны оба, приоритет у slug).
content
excerpt
cat_id
rubric_id
category_id
sale_price
original_price
regular_price
menu_order
wholesale_price
slug
Для получения актуальных полей вашего товара выполните GET /products/{id} или GET /products/sku/{sku}. Ниже — пример ответа для товара Salomon Quest 4D 3 GTX (ID: 483472):
GET /products/{id}
GET /products/sku/{sku}
{ "id": 483472, "sku": "Q4D3-BLK_ru", "title": "Salomon Quest 4D 3 GTX", "permalink": "https://yourdomain.com/ru/pers_shop/demo_ru/salomonquest4d3gtx.htm", "access": true, "language": "ru", "multilangid": 483641, "price": 220.00, "regular_price": 280, "currency": "USD", "stock_status_value": "В наличии", "stock_status": 0, "stock_quantity": 0, "featured": false, "new": 1, "reducedprice": false, "discount": null, "moq": 0, "promotion": 0, "promotion_text": null, "promotion_expires": null, "bought_with": null, "products_synonyms": null, "categories": [ { "id": 28143, "name": "demo_ru", "title": "Демонстрационная категория" } ], "producer": { "id": 4806, "name": "salomon_ru", "title": "Salomon", "lang": "ru" }, "images": [ { "src": "https://yourdomain.com/upload/shop_catalog/s15992/483472/483472_0.jpg", "name": "483472_0.jpg" }, { "src": "https://yourdomain.com/upload/shop_catalog/s15992/483472/483472_1.webp", "name": "483472_1.webp" } ], "type": 0, "attributes": [ { "id": 0, "name": "Product type", "options": [""] } ], "variations_exists": 8, "variations": [ { "id": 749582, "sku": "Q4D3-BLK_36", "title": "36", "stock_status": 0, "stock_status_value": "В наличии" }, { "id": 749590, "sku": "Q4D3-BLK_37", "title": "37", "stock_status": 4, "stock_status_value": "Наличие уточняйте" }, { "id": 749602, "sku": "Q4D3-BLK_38", "title": "38", "stock_status": 0, "stock_status_value": "В наличии" } ], "weight": 0, "weight_units": 0, "dimensions": { "length": 0, "width": 0, "height": 0, "units": 0 }, "short_description": null, "description": "Флагманская модель для многодневного трекинга...", "description_tab_1": "Salomon Quest 4D 3 GTX: Непревзойденная Поддержка и Защита...", "meta_title": null, "meta_description": null, "meta_keywords": null, "video": null, "priority": 0, "rating": 0, "comments": 0, "views": 569, "orders": 0, "shipping_price": 0, "add_date": "2025-10-25T00:16:09+00:00", "last_edit": "2026-04-10T18:30:57+00:00" }
💡 Полный пример вы можете получить, выполнив GET запрос к API товаров вашего магазина.
Этот метод позволяет добавить один или несколько товаров одним запросом (до 3000 за один запрос). Формат запроса полностью совпадает с методом обновления: можно передавать массив products или одиночный товар.
?page=N&per_page=N
?orderby=id|name|position|datestamp&order=asc|desc
?category_id=N
?category_id=1,2,3
?category=name
?status=0|1
?date_after=YYYY-MM-DD
?date_before=YYYY-MM-DD
/blog/articles/{id}
/blog/articles/slug/{slug}
language
datestamp
schema
planned
settings_comments
settings_rating
slug_search
При получении списка статей (GET /blog/articles) доступны параметры фильтрации:
GET /blog/articles
category
date_after
?date_after=2026-07-01
date_before
?date_before=2026-07-31
Также доступны стандартные параметры сортировки: orderby (id, name, position, datestamp) и order (asc, desc).
Псевдонимы полей (WooCommerce-совместимость): content = description, excerpt = short_description, cat_id / rubric_id / category = category_id, date / date_created / date_created_gmt = datestamp, slug = name (если указаны оба, приоритет у slug).
date_created
date_created_gmt
POST/PUT/PATCH на /blog/articles принимает как один объект статьи, так и массив объектов в поле articles:
articles
{ "articles": [ { "title": "Моя статья", "slug": "moya-statya", "language": "ru", "category_id": 5, "description": "<p>Текст статьи</p>", "short_description": "Анонс", "meta_title": "Моя статья | Сайт", "tags": "кроссовки, найк, адидас, спортивная обувь", "status": 1, "priority": 5, "schema": 6 }, { "title": "Another article", "slug": "another-article", "language": "en", "category_id": 10, "description": "<p>Article text</p>", "status": 1 } ] }
Обновление и удаление: update_exists (bool) – если true, обновляет статью при повторном добавлении (по умолчанию false). delete (bool) – если true, статья будет удалена (soft delete: скрыта из списков). slug_search (string) – поиск статьи по системному имени (slug/name) для обновления через PUT/PATCH/POST. Если id не указан, статья ищется по slug_search. При указании обоих сначала выполняется поиск по ID, при неудаче — по slug_search. Учитывает язык статьи (параметр language или язык категории). При удалении автоматически пересчитывается счётчик статей в родительской категории.
📥 Импорт/экспорт статей через API: Доступен удобный веб-интерфейс для массового импорта и экспорта статей блога через Commerce API. Скачать с GitHub →
/pages/{id}
/pages/slug/{slug}
meta_html
show
1/true/show/visible
0/false/hide/hidden
settings_tags
password
При получении списка страниц (GET /pages) поддерживаются следующие параметры фильтрации:
GET /pages
Псевдонимы полей (совместимость с WooCommerce): content = description, excerpt = short_description, slug = name (если указаны оба, slug имеет приоритет).
{ "pages": [ { "title": "О компании", "slug": "about-us", "language": "ru", "description": "<p>Текст страницы о компании</p>", "meta_title": "О компании | Сайт", "status": 1, "priority": 10 }, { "title": "Контакты", "slug": "contacts", "language": "ru", "description": "<p>Контактная информация</p>", "status": 1 } ] }
Обновление и удаление: update_exists (bool) – если true, обновляет страницу при повторном добавлении (по умолчанию false). delete (bool) – если true, страница будет удалена (soft delete: скрыта из списков). slug_search (string) – поиск страницы по системному имени (slug/name) для обновления через PUT/PATCH/POST. Если id не указан, страница ищется по slug_search. При указании обоих сначала выполняется поиск по ID, при неудаче — по slug_search. Учитывает язык страницы (параметр language).
📥 Импорт/экспорт страниц через API: Доступен массовый импорт и экспорт страниц через Commerce API. Используйте ключ Pages management, read/write в настройках магазина.
/blocks
?orderby=id|name|title|position|menu_order&order=asc|desc
?position=header|footer|...
?slug=name
/blocks/{id}
/blocks/slug/{slug}
my-block
position
left
right
top
buttom
header
header_meta
header_meta_data
header_before_meta_data
footer
all
show_on_page
show_on_device
access
querystring_show
querystring_hide
querystrpos_show
querystrpos_hide
script
script_async
div
При получении списка блоков (GET /blocks) поддерживаются следующие параметры:
GET /blocks
Также доступны стандартные параметры сортировки: orderby (id, name, title, position, menu_order) и order (asc, desc).
Псевдонимы полей (совместимость с WooCommerce): content = description, priority = menu_order, slug = name (если указаны оба, slug имеет приоритет).
{ "blocks": [ { "name": "about-sidebar", "title": "О компании", "language": "ru", "description": "<p>Текст блока</p>", "position": "left", "menu_order": 10, "show": 1 }, { "name": "footer-contacts", "title": "Контакты", "language": "ru", "description": "<p>Контактная информация</p>", "position": "footer", "show": 1 } ] }
Обновление и удаление: update_exists (bool) – если true, обновляет блок при повторном добавлении (по умолчанию false). delete (bool) – если true, блок будет удалён. slug_search (string) – поиск блока по системному имени (slug/name) для обновления через PUT/PATCH/POST. Если id не указан, блок ищется по slug_search.
Защищённые системные имена: google — полностью исключён из API (не импортируется и не экспортируется). mobile_menu_widget, footer_widget, main_menu_widget — доступны только для чтения (GET). smart_search_menu, smart_search_menu_select, slide_menu_widget, slider, slider2, slider3, slider_noscript — служебные блоки с особыми правилами обработки.
google
mobile_menu_widget
footer_widget
main_menu_widget
smart_search_menu
smart_search_menu_select
slide_menu_widget
slider
slider2
slider3
slider_noscript
📥 Импорт/экспорт блоков через API: Доступен массовый импорт и экспорт блоков/меню через Commerce API. Используйте ключ Blocks management, read/write в настройках магазина.
API для управления слотами бронирования. Endpoint: /api/commerce/booking.
/api/commerce/booking
Важно: Endpoint /booking работает с таблицей booking_slots — шаблонами/определениями слотов (расписание, типы повторения, цены). Реальную доступность (свободен ли слот в данный момент) возвращает внутренний /api_booking.jsonp?action=get_booking_slot_time, используемый виджетом на сайте.
/booking
/api_booking.jsonp?action=get_booking_slot_time
Доступные методы:
GET /booking
GET /booking/{id}
GET /booking/slug/{slug}
POST /booking
PUT /booking[/{id}]
PATCH /booking[/{id}]
DELETE /booking/{id}
DELETE /booking/slug/{slug}
Поля слота бронирования (booking_slots):
time_start
time_end
group_id
group_title
group_price
recurrence_day
"1,3,5"
recurrence_month
"3,6,9,12"
author
Полный список полей: api/api_commerce/booking/api_meta_booking_fields.php.
api/api_commerce/booking/api_meta_booking_fields.php
Фильтрация GET /booking: параметры ?date_from=, ?date_to=, ?group_id=, ?type=, ?access=, ?slug_search=.
?date_from=
?date_to=
?group_id=
?type=
?access=
?slug_search=
🔗 Примеры запросов:
Приоритет поиска слота для обновления/удаления (PUT/PATCH/DELETE):
Если слот не найден по slug_search — создаётся новый (upsert).
upsert
Пример создания разового слота (POST, type=0):
{ "date": "2026-07-15", "time_start": "10:00:00", "time_end": "11:00:00", "group_title": "yoga-morning", "group_price": 25.00, "type": 0, "access": 0 }
Пример создания еженедельного слота (POST, type=2):
{ "time_start": "09:00:00", "time_end": "18:00:00", "group_title": "work-hours", "group_price": 50.00, "type": 2, "recurrence_day": "1,2,3,4,5", "access": 0 }
Пример обновления по group_id (PUT):
{ "group_id": 5, "group_price": 30.00, "description": "<p>Обновлённое описание</p>" }
Пример обновления по slug_search (PUT):
{ "slug_search": "yoga-morning", "group_price": 35.00 }
Это базовое описание основных методов для работы с Commerce API / WooCommerce API v3 по заказам, товарам и категориям. Ниже расположены скрипты с примерами, которые помогут правильно использовать методы API на практике.
Script: Api: ORDER DETAILS
ORDER DETAILS $url = "https://boostore.pro/api/commerce/orders/ORDERID"; // Set the endpoint URL (replace with your actual API endpoint) $authKey = "your_authorization_token_here"; // Authorization token (use your real key) $ch = curl_init($url); // Initialize cURL session // Set cURL options curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // Return response as string curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer " . $authKey, // Set Authorization header "Content-Type: application/json" // Optional: declare expected response type ]); // Execute request $response = curl_exec($ch); // Check for cURL error if (curl_errno($ch)) { echo "Request error: " . curl_error($ch); } else { // Parse and print the JSON response $data = json_decode($response, true); print_r($data); // Output server response } // Close cURL session curl_close($ch);
Script: Api: UPDATE ORDER
UPDATE ORDER $url = "https://boostore.pro/api/commerce/orders/ORDERID"; // Order API endpoint $authKey = "your_authorization_token_here"; // Authorization token // Data to update (use API keys, not raw DB field names) $updateData = [ "first_name" => "Alex", "last_name" => "Las", "email" => "alex@example.com", "phone" => "+380671112233", // Full address in plain text (if needed) "address" => "Full address not tied to structured eform fields", // Structured address fields (eform system) "buyer_address_eform1" => "Region / State", "buyer_address_eform2" => "City", "buyer_address_eform3" => "Street", "buyer_address_eform4" => "House number", "buyer_address_eform5" => "Apartment", "buyer_address_eform6" => "01001", // Zip/Postal code/Department // Order details "total" => "999", // Total price "status" => "processing", // Internal status or number "status_for_customer" => "completed", // Customer-facing status or number ]; $ch = curl_init($url); // cURL options curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PATCH"); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($updateData, JSON_UNESCAPED_UNICODE)); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer " . $authKey, "Content-Type: application/json" ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo "Request error: " . curl_error($ch); } else { $data = json_decode($response, true); print_r($data); } curl_close($ch);
Script: Api: CREATE ORDER
CREATE ORDER $url = "https://boostore.pro/api/commerce/orders"; // Order API endpoint $authKey = "your_authorization_token_here"; // Authorization token (use your real key) // Order data + products $orderData = [ // Buyer info "first_name" => "Name", // Buyer's first name "last_name" => "Soname", // Buyer's last name "email" => "alex@example.com", // Buyer's email (required) "phone" => "+380671112233", // Buyer's phone number "address" => "Full address of not used address eform", // General address "buyer_address_eform1" => "State", // State / Region "buyer_address_eform2" => "City", // City "buyer_address_eform3" => "Street", // Street "buyer_address_eform4" => "house number", // House number "buyer_address_eform5" => "flat", // Apartment / Flat "postcode" => "01001", // Postcode / ZIP // Total order amount (optional) // If you set "total", it will be used as the final order total. // If you skip "total", the system will calculate the total automatically // based on the products in "line_items". //"total" => "999", "status" => "processing", // Internal status "status_for_customer" => "processing", // Status shown to the customer "currency" => "USD", // Order currency // Products in the order "line_items" => [ [ "product_id" => 478734, // Product ID (required) "quantity" => 0, // Quantity (required) / default - 1 "price" => 100, // Custom price (optional, overrides site price) ], [ "product_id" => 478268, "quantity" => 10, "variation" => "51" // Variation name or code ], [ "product_id" => 478266, "quantity" => 1, "variation_id" => 735302 // Variation ID (priority over "variation") ] ] ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($orderData, JSON_UNESCAPED_UNICODE)); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer " . $authKey, "Content-Type: application/json" ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo "Request error: " . curl_error($ch); } else { $data = json_decode($response, true); print_r($data); } curl_close($ch);
Script: Api: CREATE ORDER WITH BOOKING
CREATE ORDER WITH BOOKING $url = "https://boostore.pro/api/commerce/orders"; // Order API endpoint $authKey = "your_authorization_token_here"; // Authorization token (use your real key) // Order data with booking $orderData = [ "first_name" => "Name", "last_name" => "Soname", "email" => "alex@example.com", "phone" => "+380671112233", "status" => "processing", "status_for_customer" => "processing", "currency" => "USD", // Booking flag "booking" => 1, // Booking details "booking_data" => [ "slot_id" => 123, // Booking slot ID (required) "slot_title" => "Conference Hall", "group_id" => 0, "start_time" => 1710000000, // Unix timestamp "end_time" => 1710003600, // Unix timestamp "duration" => 3600, // Duration in seconds "factor" => 1.0, // Coefficient "base_price" => "100$", "price" => "100$", "payment_required" => true, "status" => 0, // Booking status: 0=new, 1=processing, 2=cancelled, 3=completed, 4-8=extra "after_payment_status" => 3, // Status set after payment (0-8, same range) "userid" => 0, "author" => 0, "dates_start_year" => "2026", "dates_start_date" => "2026-07-07", "dates_start_time" => "10:00:00", "dates_end_year" => "2026", "dates_end_date" => "2026-07-07", "dates_end_time" => "11:00:00" ], // Products (optional for booking orders) "line_items" => [ [ "product_id" => 478734, "quantity" => 1, ] ] ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($orderData, JSON_UNESCAPED_UNICODE)); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer " . $authKey, "Content-Type: application/json" ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo "Request error: " . curl_error($ch); } else { $data = json_decode($response, true); print_r($data); } curl_close($ch);
Script: Api: UPDATE ORDER BOOKING
UPDATE ORDER BOOKING $orderId = 12345; // Existing order ID $url = "https://boostore.pro/api/commerce/orders/" . $orderId; // Order API endpoint with ID $authKey = "your_authorization_token_here"; // Authorization token $updateData = [ "booking" => 1, // Set booking flag (0 to remove) "booking_data" => [ "slot_id" => 456, // New slot ID (if changed) "slot_title" => "VIP Room", "group_id" => 1, "start_time" => 1710086400, "end_time" => 1710090000, "duration" => 3600, "factor" => 1.5, "base_price" => "150$", "price" => "225$", "payment_required" => true, "status" => 1, // Booking status: 0=new, 1=processing, 2=cancelled, 3=completed, 4-8=extra "after_payment_status" => 3, // Status set after payment (0-8) "userid" => 42, "author" => 1 ] ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PATCH"); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($updateData, JSON_UNESCAPED_UNICODE)); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer " . $authKey, "Content-Type: application/json" ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo "Request error: " . curl_error($ch); } else { $data = json_decode($response, true); print_r($data); } curl_close($ch);
Script: Api: UPDATE PRODUCT
UPDATE PRODUCT $url = "https://boostore.pro/api/commerce/products/PRODUCT_ID"; // Product API update endpoint $authKey = "your_authorization_token_here"; // Authorization token (use your real key) // Product data $productData = [ "id" => 479077, // Product ID is ignored here because it's specified in the URL "name" => "Basketballshoes_Demo", // SEO URL link "title" => "Basketball shoes Converse All Star BB Prototype CX", // Product title (required for new) "type" => 1298, // Product type for filtering and attributes "access" => true, // Product availability (true = active) "description" => "<p>Sneakers Converse All Star BB Prototype CX — Basketball shoes...</p>", // Full product description (HTML allowed) "short_description" => "", // Short description of product "sku" => "AO2515C", // Product SKU code "sku_show" => 0, // Whether to show SKU publicly (0 = no) "price" => "3000", // Current price "currency" => "UAH", // Currency code "regular_price" => "5760", // Old (regular) price "price_for" => "0", // Unit for pricing (see documentation for accepted values https://boostore.pro/en/docs/import-products/#faq_import_products) "stock_quantity" => 0, // Quantity in stock (0 - unlimited) "stock_status" => 0, // Stock status (0 = in stock, 1 = out of stock, others see docs) "weight" => 0, // Weight value "weight_units" => 0, // Weight units: 0 = grams, 1 = kilograms "dimensions" => [ "length" => 0, // Length "width" => 0, // Width "height" => 0, // Height "units" => "0", // Dimension units: 0 = centimeters, 1 = meters ], "categories" => [ ["id" => 30519, "name" => null], // Product category (by ID, name, or both) ], "tags" => "tag1, tag2", // Tags, comma separated, max 8 tags "images" => [ "0" => "-uploadshopcat-s16572/479077/479077_1.webp", // Local image path (won`t be uploaded) "1" => "https://boostore.pro/upload/shop_catalog/s16572/479077/479077_2.webp", // Remote image URL (will be downloaded and attached) ], "images_replace" => false, // By default: do NOT replace images with the same index. If true, replace existing images by index. "images_skip_index" => false, // If true, find next free index if the given index is occupied and save image there. "images_replace_new_index" => false, // If true, even if replace and skip are false, save under new free index if original index is occupied. "variations_only_update" => false, // If true, new variations will be added without deleting old ones; otherwise all old variations are removed before adding new "variations" => [ [ "priority" => 0, // Display priority of the variation "id" => 736413, // Variation ID for updating existing variation; if not provided, search by SKU or title "sku" => "SKU1234", // Variation SKU (recommended) "title" => "42", // Variation name (required) "status" => "true", // access ( true / false / forbidden) "description" => "", "stock_status" => 0, // Stock status, same logic as main product "show_stock" => 0, // Whether to show stock count "instock" => 10, // Quantity in stock for this variation "image_num" => 0, // Image index linked to this variation "price" => "+100", // Price adjustment: absolute, or relative (+/-) "price_old" => "120", // Old price "price_cost" => "80", // Cost price "bulk_prices" => [ // Bulk pricing rules [ "moq" => 10, "price" => 5000 ], // Price if order >= 10 units [ "moq" => 15, "price" => 4500 ], // Price if order >= 15 units ], "dimensions" => [ // Variation dimensions, same units as product "length" => 0, // Length "width" => 0, // Width "height" => 0, // Height "units" => 0, // Dimension units: 0 = centimeters, 1 = meters ], ], [ "priority" => 0, "title" => "43", "description" => "", "stock_status" => 0, "show_stock" => 1, "instock" => 1, "image_num" => 2, "price" => "+100", "price_old" => "120", "price_cost" => "80", "bulk_prices" => [ ["moq" => 10, "price" => 5000], ["moq" => 15, "price" => 4500], ], "dimensions" => [ "length" => 0, "width" => 0, "height" => 0, "units" => 0, ], ], ], "products_synonyms" => "", // Comma-separated list of grouped or similar product IDs or SKUs "priority" => 12, // Sorting priority (higher number = higher position, max 99) "producer" => ["id" => 4713, "name" => null], // Producer category by ID and/or name "producer_show" => 0, // Show producer on product page "producer_country" => "", // Producer country (text) "collection" => ["id" => null, "name" => null], // Collection category (ID and/or name) "collection_show" => 0, // Show collection flag "supplier" => ["id" => null, "name" => null], // Supplier info "bulk_prices" => [ // Bulk prices for main product ["moq" => 10, "price" => 5000], ["moq" => 15, "price" => 4500], ], "price_cost" => "", // Cost price for the main product "settings_comments" => "e_shop_page_hoteng_com|e_shop_page_hoteng_rating_com|e_shop_page_hoteng_show_rating_com|e_shop_page_hoteng_com_captcha|e_shop_page_hoteng_vis_com|e_shop_page_hoteng_num30", "password" => "", // Password protection (if any) "show_tree" => 0, // Category tree display setting (0/1/2) "show_stock" => 0, // Show stock on product page "moq" => 0, // Minimum order quantity "shipping" => 0, // Shipping enabled flag "shipping_settings" => 0, // Shipping configuration "shipping_price" => 0, // Shipping cost "shipping_note" => "", // Notes about shipping "shipping_days" => 0, // Delivery time in days "shipping_sum" => 0, // Combine shipping for same products flag "show_period" => 0, // Product display period "bought_with" => "", // Comma-separated list of products often bought together "bought_with_email" => "", // Email to send bought-together product lists "new" => 1, // Is product new (1 = yes, 0 = no) "reduced_price" => 0, // Price reduced flag "discount" => "-20%", // Discount text (informational) "featured" => 1, // Featured product flag "promotion" => 1, // Has promotion flag "promotion_text" => "", // Promotion text "promotion_expires" => 1751113909, // Promotion end timestamp "promotion_expires_job" => 0, // Job to execute after promotion ends "variations_title" => "", // Title above variation selectors "variations_type" => 0, // Variation type (Google Merchant Size Type): 0=default from category settings, 1=color, 2=pattern, 3=material, 4=age_group, 5=gender, 6=size "variations_require" => 0, // Require variation selection before purchase "variations_cartexplode" => 0, // Variation display method settings "yml" => 0, // Export to YML/XML flag "noimport" => "0", // Disable import via admin panel flag "custom_label_4" => "", // Custom label for Google Merchant "description_tab_1" => "", // Description tab 1 content "description_tab_2" => "", // Description tab 2 content "description_tab_3" => "", // Description tab 3 content "description_tab_4" => "", // Description tab 4 content "description_tab_5" => "", // Description tab 5 content "video" => "", // Video URL "video_duration" => "", // Video duration in HH:MM:SS format "delete" => "delete", // delete product ( true or delete ) // Product attributes for filtering and characteristics "attributes" => [ [ // "id" => 1298, // Attribute name You can use or NAME or ID "name" => "Product type", // Attribute name "options" => ["Sneakers"] // Attribute values (multiple allowed) ], [ "name" => "Producer", // Attribute name "options" => ["Converse"] //Attribute values (multiple allowed) ], [ "name" => "Size", //Attribute name "options" => ["37,5", "40"] //Attribute values (multiple allowed) // "value_ints" => [10096, 10101], //You can use or NAME or ID // "value_parent_id" => 1763 You can use or NAME or ID ], ] ]; curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "UPDATE"); // Use UPDATE method for update operation (UPDATE / PUT / PATCH) curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($productData, JSON_UNESCAPED_UNICODE)); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer " . $authKey, "Content-Type: application/json" ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo "Request error: " . curl_error($ch); } else { $data = json_decode($response, true); print_r($data); } curl_close($ch);
Script: Api: UPDATE MULTIPLE PRODUCT
UPDATE MULTIPLE PRODUCT (up to 5000 same time) $url = "https://boostore.pro/api/commerce/products"; // Product API update endpoint $authKey = "your_authorization_token_here"; // Authorization token (use your real key) // Product data $productsData = [ "products" => [ [ "id" => 479077, "title" => "New Product Title 1" ... ], [ "sku" => "SKU123456", "title" => "New Product Title 2" ... ], [ "id" => 479078, "title" => "New Product Title 3" ... ] ] ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "UPDATE"); // UPDATE / PUT / PATCH curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($productsData, JSON_UNESCAPED_UNICODE)); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer " . $authKey, "Content-Type: application/json" ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo "Request error: " . curl_error($ch); } else { $data = json_decode($response, true); print_r($data); } curl_close($ch);
Script: Api: UPDATE PRODUCT CATEGORIES
UPDATE MULTIPLE CATEGORIES (up to 3000 same time) $url = "https://boostore.pro/api/commerce/products/categories"; // Categories API update endpoint $authKey = "your_authorization_token_here"; // Authorization token (use your real key) // Categories data $categoriesData = [ "categories" => [ [ "category_id" => 30518, // Category ID "category_name" => "sneakers", // System category name (slug) REQUIRED "category_title" => "Sneakers", // Category title "category_parent_id" => 1, // Parent category ID "category_parent_name" => "ParentCategory", // Parent category Name "category_position" => 0, // Position in the list "category_visible" => 0, // Visibility (0 = hidden, 1 = visible) "category_lang" => "ru", // Category language "category_show_tree" => 0, // Show tree (0/1/2) "category_multilangid" => 0, // Multilanguage binding ID "category_image" => [ "0" => "https://boostore.pro/upload/catalog/16572/files/style/categories/30518.webp", // Image URL ], "images_replace" => 1, // Image replace if exists "category_image_settings" => 7, // Image display settings "category_button" => "", // Custom button (without href) "category_access" => 0, // Access level "category_title_seo_append" => "", // SEO: title suffix "category_description_seo_append" => "", // SEO: description suffix "category_meta_d" => "", // Meta description "category_meta_k" => "", // Meta keywords "category_title_inpage" => "Sneakers", // Title shown inside the category page "category_text" => "", // Category description text "category_text_position" => 0, // Description position "category_settings_comments" => "", // Comment settings "category_settings_rating" => 0, // Enable rating (0/1) "category_datestamp" => "2025-09-16T12:41:07+00:00", // Datetime of creation/update "category_googlegoods_catid" => 0, // Google Goods category ID "category_promua_catid" => 0, // Prom.ua category ID "category_rozetkaua_title" => "", // Rozetka.ua category title "category_merchant_product_category" => "", // Merchant product category "category_gm_product_type" => 0, // Google Merchant product type "category_gm_sizetype" => 0, // Google Merchant size type "category_priceappend_rozetka" => "", // Extra price settings for Rozetka "category_priceappend_promua" => "", // Extra price settings for Prom.ua "category_settings_childproductshow" => 0, // Show products from subcategories (0/1) "category_settings_style" => 0, // Style settings "category_settings_sibling" => 0, // Show sibling categories (0/1) "update_exists" => 1, // Update exists category (0/1) "delete" => 0, // For delete category (0/1) ] ] ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "UPDATE"); // UPDATE / PUT / PATCH curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($categoriesData, JSON_UNESCAPED_UNICODE)); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer " . $authKey, "Content-Type: application/json" ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo "Request error: " . curl_error($ch); } else { $data = json_decode($response, true); print_r($data); } curl_close($ch);
Script: Api: UPDATE PRODUCT PRODUCERS
UPDATE MULTIPLE PRODUCERS (up to 3000 same time) $url = "https://boostore.pro/api/commerce/products/producers"; // Producers API update endpoint $authKey = "your_authorization_token_here"; // Authorization token (use your real key) // Producers data $producersData = [ "producers" => [ [ "producer_id" => 30518, // Producer ID "producer_name" => "sneakers", // System producer name (slug) REQUIRED "producer_title" => "Sneakers", // Producer title "producer_parent_id" => 1, // Parent producer ID "producer_parent_name" => "ParentCategory", // Parent producer Name "producer_position" => 0, // Position in the list "producer_visible" => 0, // Visibility (0 = hidden, 1 = visible) "producer_lang" => "ru", // Producer language "producer_show_tree" => 0, // Show tree (0/1/2) "producer_multilangid" => 0, // Multilanguage binding ID "producer_image" => [ "0" => "https://boostore.pro/upload/catalog/16572/files/style/categories/30518.webp", // Image URL ], "images_replace" => 1, // Image replace if exists "producer_image_settings" => 7, // Image display settings "producer_button" => "", // Custom button (without href) "producer_access" => 0, // Access level "producer_meta_d" => "", // Meta description "producer_meta_k" => "", // Meta keywords "producer_title_inpage" => "Sneakers", // Title shown inside the producer page "producer_text" => "", // Producer description text "producer_text_position" => 0, // Description position "producer_settings_comments" => "", // Comment settings "producer_settings_rating" => 0, // Enable rating (0/1) "producer_datestamp" => "2025-09-16T12:41:07+00:00", // Datetime of creation/update "update_exists" => 1, // Update exists producer (0/1) "delete" => 0, // For delete producer (0/1) ] ] ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "UPDATE"); // UPDATE / PUT / PATCH curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($producersData, JSON_UNESCAPED_UNICODE)); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer " . $authKey, "Content-Type: application/json" ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo "Request error: " . curl_error($ch); } else { $data = json_decode($response, true); print_r($data); } curl_close($ch);
Script: Api: UPDATE PRODUCT COLLECTIONS
UPDATE MULTIPLE COLLECTIONS (up to 3000 same time) $url = "https://boostore.pro/api/commerce/products/collections"; // Collections API update endpoint $authKey = "your_authorization_token_here"; // Authorization token (use your real key) // Collections data $collectionsData = [ "collections" => [ [ "collection_id" => 30518, // Collection ID "collection_name" => "sneakers", // System collection name (slug) REQUIRED "collection_title" => "Sneakers", // Collection title "collection_parent_id" => 1, // Parent collection ID "collection_parent_name" => "ParentCategory", // Parent collection Name "collection_position" => 0, // Position in the list "collection_visible" => 0, // Visibility (0 = hidden, 1 = visible) "collection_lang" => "ru", // Collection language "collection_show_tree" => 0, // Show tree (0/1/2) "collection_multilangid" => 0, // Multilanguage binding ID "collection_image" => [ "0" => "https://boostore.pro/upload/catalog/16572/files/style/categories/30518.webp", // Image URL ], "images_replace" => 1, // Image replace if exists "collection_image_settings" => 7, // Image display settings "collection_button" => "", // Custom button (without href) "collection_access" => 0, // Access level "collection_meta_d" => "", // Meta description "collection_meta_k" => "", // Meta keywords "collection_title_inpage" => "Sneakers", // Title shown inside the collection page "collection_text" => "", // Collection description text "collection_text_position" => 0, // Description position "collection_settings_comments" => "", // Comment settings "collection_settings_rating" => 0, // Enable rating (0/1) "collection_datestamp" => "2025-09-16T12:41:07+00:00", // Datetime of creation/update "update_exists" => 1, // Update exists collection (0/1) "delete" => 0, // For delete collection (0/1) ] ] ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "UPDATE"); // UPDATE / PUT / PATCH curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($collectionsData, JSON_UNESCAPED_UNICODE)); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer " . $authKey, "Content-Type: application/json" ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo "Request error: " . curl_error($ch); } else { $data = json_decode($response, true); print_r($data); } curl_close($ch);
Script: Api: GET PRODUCTS list
GET PRODUCTS (list with pagination and search) $url = "https://boostore.pro/api/commerce/products"; // Products API endpoint $authKey = "your_authorization_token_here"; // Authorization token // Optional query parameters for pagination, search, and filtering $params = [ "page" => 1, // Page number (default: 1) "per_page" => 100, // Items per page (default: 100, max: 1000) "search" => "", // Search term (searches title and SKU) "order" => "desc", // Sort direction: "asc" or "desc" "orderby" => "id", // Sort field: "id", "title", or "price" "status" => "", // Filter by status: "publish" or "hidden" ]; $url .= "?" . http_build_query($params); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer " . $authKey, "Content-Type: application/json" ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo "Request error: " . curl_error($ch); } else { $data = json_decode($response, true); print_r($data); // Output: { "code": "success", "page": 1, "per_page": 100, "total": "...", "products": [...] } } curl_close($ch);
Script: Api: GET PRODUCT by ID / SKU
GET PRODUCT BY ID / SKU // By ID: $productId = 479077; $url = "https://boostore.pro/api/commerce/products/" . $productId; // OR by SKU: // $sku = "AO2515C"; // $url = "https://boostore.pro/api/commerce/products/sku/" . $sku; $authKey = "your_authorization_token_here"; // Authorization token $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer " . $authKey, "Content-Type: application/json" ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo "Request error: " . curl_error($ch); } else { $data = json_decode($response, true); print_r($data); // Output: { "id": ..., "sku": "...", "title": "...", "price": "...", ... } } curl_close($ch);
Script: Api: GET ORDERS list
GET ORDERS (list with pagination and filters) $url = "https://boostore.pro/api/commerce/orders"; // Orders API endpoint $authKey = "your_authorization_token_here"; // Authorization token // Query parameters for filtering $params = [ "page" => 1, "sort_by_type" => "date", // Sort type: "date" or other fields "sort_by" => "DESC", // Sort direction "date" => "", // Predefined period: 1=today, 2=yesterday, 3=week, 4=month, 5=quarter, 6=year "show_hidden_orders" => 0, // Include deleted orders (0=no, 1=yes) ]; $url .= "?" . http_build_query($params); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer " . $authKey, "Content-Type: application/json" ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo "Request error: " . curl_error($ch); } else { $data = json_decode($response, true); print_r($data); } curl_close($ch);
Script: Api: DELETE PRODUCT
DELETE PRODUCT (soft delete) $productId = 479077; $url = "https://boostore.pro/api/commerce/products/" . $productId; // Product API endpoint with ID $authKey = "your_authorization_token_here"; // Authorization token $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE"); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer " . $authKey, "Content-Type: application/json" ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo "Request error: " . curl_error($ch); } else { $data = json_decode($response, true); print_r($data); // Output: { "status": "success", "message": "Producy marked as deleted" } } curl_close($ch);
Script: Api: DELETE ORDER
DELETE ORDER (soft delete) $orderId = 12345; $url = "https://boostore.pro/api/commerce/orders/" . $orderId; // Order API endpoint with ID $authKey = "your_authorization_token_here"; // Authorization token $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE"); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer " . $authKey, "Content-Type: application/json" ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo "Request error: " . curl_error($ch); } else { $data = json_decode($response, true); print_r($data); // Output: { "status": "success", "message": "Order marked as deleted" } } curl_close($ch);
Script: Api: GET / POST categories, producers, collections
GET / POST categories, producers, collections // ----- GET list (by resource type) ----- // Categories: /api/commerce/products/categories // Producers: /api/commerce/products/producers // Collections:/api/commerce/products/collections $resource = "categories"; // "categories", "producers", or "collections" $url = "https://boostore.pro/api/commerce/products/" . $resource; $authKey = "your_authorization_token_here"; // Optional: get by ID - append /{id} or by name: /name/{name} // $url .= "/123"; // by ID // $url .= "/name/my-category"; // by name $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer " . $authKey, "Content-Type: application/json" ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo "Request error: " . curl_error($ch); } else { $data = json_decode($response, true); print_r($data); } curl_close($ch); // ----- POST create (single or batch up to 3000) ----- // Change $resource to "categories" / "producers" / "collections" $url = "https://boostore.pro/api/commerce/products/categories"; $authKey = "your_authorization_token_here"; $data = [ "category_name" => "new-category", // _name = system slug, REQUIRED (for producers: producer_name, for collections: collection_name) "category_title" => "New Category", // _title = display title "category_parent_id" => 1, // Parent ID (0 = root) "category_visible" => 1, // 1 = visible, 0 = hidden "category_lang" => "en", // Language code "category_image" => [ // Image URL or local path "0" => "https://example.com/image.jpg" ], "category_meta_d" => "", // Meta description "category_meta_k" => "", // Meta keywords ]; // For batch: wrap in array: [ "categories" => [ $cat1, $cat2, ... ] ] $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data, JSON_UNESCAPED_UNICODE)); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer " . $authKey, "Content-Type: application/json" ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo "Request error: " . curl_error($ch); } else { $data = json_decode($response, true); print_r($data); } curl_close($ch);
Script: Api: BLOG ARTICLES (GET / POST / UPDATE / DELETE)
GET BLOG ARTICLES (list / by ID) // ----- Get list of articles ----- $url = "https://boostore.pro/api/commerce/blog/articles"; // ----- By ID: $url .= "/123"; ----- $authKey = "your_authorization_token_here"; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer " . $authKey, "Content-Type: application/json" ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo "Request error: " . curl_error($ch); } else { $data = json_decode($response, true); print_r($data); } curl_close($ch); // ----- POST create article ----- $url = "https://boostore.pro/api/commerce/blog/articles"; $data = [ "title" => "My Article", "slug" => "my-article", "language" => "en", "category_id" => 5, "description" => "<p>Full article text</p>", "short_description" => "Article preview", "meta_title" => "My Article | Site", "tags" => "sneakers, nike, adidas, sport shoes", "status" => 1, "priority" => 5, "schema" => 6 ]; // For batch: wrap in array: [ "articles" => [ $article1, $article2, ... ] ] $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data, JSON_UNESCAPED_UNICODE)); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer " . $authKey, "Content-Type: application/json" ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo "Request error: " . curl_error($ch); } else { $data = json_decode($response, true); print_r($data); } curl_close($ch); // ----- UPDATE article by ID (PATCH / PUT / UPDATE) ----- $articleId = 123; $url = "https://boostore.pro/api/commerce/blog/articles/" . $articleId; $updateData = [ "title" => "Updated Title", "status" => 1, "priority" => 10, ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PATCH"); // also works with PUT / UPDATE curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($updateData, JSON_UNESCAPED_UNICODE)); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer " . $authKey, "Content-Type: application/json" ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo "Request error: " . curl_error($ch); } else { $data = json_decode($response, true); print_r($data); } curl_close($ch); // ----- UPDATE article by slug_search (without ID) ----- // PUT/PATCH on /blog/articles without ID uses slug_search to find the article $url = "https://boostore.pro/api/commerce/blog/articles"; $updateData = [ "slug_search" => "my-article", "title" => "Updated Title via slug_search", "tags" => "sneakers, shoes, sport", "status" => 1, "language" => "en", ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PATCH"); // also works with PUT / UPDATE curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($updateData, JSON_UNESCAPED_UNICODE)); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer " . $authKey, "Content-Type: application/json" ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo "Request error: " . curl_error($ch); } else { $data = json_decode($response, true); print_r($data); } curl_close($ch); // ----- DELETE article by ID ----- $articleId = 123; $url = "https://boostore.pro/api/commerce/blog/articles/" . $articleId; // OR send { "delete": true } in UPDATE body instead $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE"); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer " . $authKey, "Content-Type: application/json" ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo "Request error: " . curl_error($ch); } else { $data = json_decode($response, true); print_r($data); } curl_close($ch);
Script: Api: GET BOOKING SLOTS
GET BOOKING SLOTS $url = "https://boostore.pro/api/commerce/booking"; // Booking API endpoint $authKey = "your_authorization_token_here"; // Authorization token // Optional filters $params = [ "date_from" => "2026-07-01", "date_to" => "2026-07-31", "group_id" => "", "type" => "", "access" => "", ]; $url .= "?" . http_build_query($params); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer " . $authKey, "Content-Type: application/json" ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo "Request error: " . curl_error($ch); } else { $data = json_decode($response, true); print_r($data); } curl_close($ch);
Script: Api: CREATE BOOKING SLOT
CREATE BOOKING SLOT $url = "https://boostore.pro/api/commerce/booking"; // Booking API endpoint $authKey = "your_authorization_token_here"; // Authorization token $slotData = [ "date" => "2026-07-15", "time_start" => "10:00:00", "time_end" => "11:00:00", "group_title" => "yoga-morning", "group_price" => 25.00, "type" => 0, "access" => 0, "description" => "<p>Morning yoga session</p>" ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($slotData, JSON_UNESCAPED_UNICODE)); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer " . $authKey, "Content-Type: application/json" ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo "Request error: " . curl_error($ch); } else { $data = json_decode($response, true); print_r($data); } curl_close($ch);
Script: Api: UPDATE BOOKING SLOT (by ID / group_id / slug_search)
UPDATE BOOKING SLOT // Priority: ID → group_id → slug_search // By ID (highest priority): $slotId = 123; $url = "https://boostore.pro/api/commerce/booking/" . $slotId; // OR by group_id (second priority, exactly 1 slot in group): // $url = "https://boostore.pro/api/commerce/booking"; // $updateData["group_id"] = 5; // OR by slug_search (third priority, upsert if not found): // $url = "https://boostore.pro/api/commerce/booking"; // $updateData["slug_search"] = "yoga-morning"; $authKey = "your_authorization_token_here"; // Authorization token $updateData = [ "group_price" => 35.00, "access" => 1, "description" => "<p>Updated session description</p>" ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT"); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($updateData, JSON_UNESCAPED_UNICODE)); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer " . $authKey, "Content-Type: application/json" ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo "Request error: " . curl_error($ch); } else { $data = json_decode($response, true); print_r($data); } curl_close($ch);
Script: Api: DELETE BOOKING SLOT (by ID / group_id / slug_search)
DELETE BOOKING SLOT // Priority: ID → group_id → slug_search // By ID (highest priority): $slotId = 123; $url = "https://boostore.pro/api/commerce/booking/" . $slotId; // OR by name: // $slug = "yoga-morning"; // $url = "https://boostore.pro/api/commerce/booking/slug/" . $slug; // OR send body: { "group_id": 5 } or { "slug_search": "yoga-morning" } // $url = "https://boostore.pro/api/commerce/booking"; $authKey = "your_authorization_token_here"; // Authorization token $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE"); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer " . $authKey, "Content-Type: application/json" ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo "Request error: " . curl_error($ch); } else { $data = json_decode($response, true); print_r($data); } curl_close($ch);
Script: Api: PAGES (GET / POST / UPDATE / DELETE)
PAGES $baseUrl = "https://boostore.pro/api/commerce/pages"; $authKey = "your_authorization_token_here"; // Authorization token // ============== GET list of pages ============== $ch = curl_init($baseUrl . "?page=1&per_page=10"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer " . $authKey]); $response = curl_exec($ch); $pages = json_decode($response, true); curl_close($ch); // ============== CREATE a new page ============== $newPage = [ "title" => "About Us", "title_inpage" => "About Our Company", "description" => "<h2>About Us</h2><p>Full page content here</p>", "short_description" => "Short description for listing", "name" => "about-us", "language" => "en", "status" => 1, "priority" => 5, "schema" => 0, ]; $ch = curl_init($baseUrl); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(["pages" => [$newPage]], JSON_UNESCAPED_UNICODE)); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer " . $authKey, "Content-Type: application/json" ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo "Create error: " . curl_error($ch); } else { $result = json_decode($response, true); print_r($result); } curl_close($ch); // ============== UPDATE page (by ID) ============== $pageId = $result["id"] ?? 0; // Use ID from create response if ($pageId) { $updateData = [ "title" => "About Us — Updated", "title_inpage" => "About Our Company (updated)", "priority" => 10, ]; $ch = curl_init($baseUrl); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "UPDATE"); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(["pages" => [array_merge(["id" => $pageId], $updateData)]], JSON_UNESCAPED_UNICODE)); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer " . $authKey, "Content-Type: application/json" ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo "Update error: " . curl_error($ch); } else { $result = json_decode($response, true); print_r($result); } curl_close($ch); } // ============== DELETE page (by ID) ============== if ($pageId) { $ch = curl_init($baseUrl . "/" . $pageId); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE"); curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer " . $authKey]); $response = curl_exec($ch); if (curl_errno($ch)) { echo "Delete error: " . curl_error($ch); } else { $result = json_decode($response, true); print_r($result); } curl_close($ch); }
Script: Api: BLOCKS / MENU (GET / POST / UPDATE / DELETE)
BLOCKS / MENU $baseUrl = "https://boostore.pro/api/commerce/blocks"; $authKey = "your_authorization_token_here"; // Authorization token // ============== GET list of blocks ============== $ch = curl_init($baseUrl . "?page=1&per_page=50"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer " . $authKey]); $response = curl_exec($ch); $data = json_decode($response, true); curl_close($ch); print_r($data["blocks"] ?? []); // ============== CREATE a new block ============== $newBlock = [ "title" => "Promo Banner", "description" => "<div class=\"promo\">Special offer!</div>", "name" => "promo-banner", "language" => "en", "position" => "top", "menu_order" => 1, "show" => 1, "show_on_page" => 0, "show_on_device"=> 0, "script" => 0, "script_async" => 0, "div" => 0, ]; $ch = curl_init($baseUrl); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(["blocks" => [$newBlock]], JSON_UNESCAPED_UNICODE)); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer " . $authKey, "Content-Type: application/json" ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo "Create error: " . curl_error($ch); } else { $result = json_decode($response, true); print_r($result); } curl_close($ch); // ============== UPDATE block (by slug_search) ============== $updateData = [ "title" => "Promo Banner — Updated", "show" => 1, "menu_order" => 2, "update_exists" => true, ]; $ch = curl_init($baseUrl); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(["blocks" => [array_merge(["slug_search" => "promo-banner", "language" => "en"], $updateData)]], JSON_UNESCAPED_UNICODE)); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer " . $authKey, "Content-Type: application/json" ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo "Update error: " . curl_error($ch); } else { $result = json_decode($response, true); print_r($result); } curl_close($ch); // ============== DELETE block (by ID) ============== $blockId = $result["id"] ?? 0; if ($blockId) { $ch = curl_init($baseUrl); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(["blocks" => [["id" => $blockId, "delete" => true]]], JSON_UNESCAPED_UNICODE)); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer " . $authKey, "Content-Type: application/json" ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo "Delete error: " . curl_error($ch); } else { $result = json_decode($response, true); print_r($result); } curl_close($ch); }