Configuring 1C and 1C-Bitrix Exchange via REST API
CommerceML is a synchronous, file-based batch exchange running every N minutes. REST API is an event-driven exchange triggered at the moment data changes. The latter approach delivers near-real-time data updates and enables the exchange of entities that CommerceML does not support: custom reference books, documents, tasks.
When REST API Outperforms CommerceML
REST integration is justified when:
- Data needs to update faster than every 15 minutes (promotional prices, critical stock levels)
- Non-standard data not covered by CommerceML must be exchanged
- Integration targets a custom 1C configuration without a standard exchange handler
- Multiple websites or services are connected to the same 1C database
1C-Bitrix REST API for 1C Integration
1C-Bitrix provides a REST API through the rest module. For external systems, create an inbound webhook:
Settings → Product Settings → REST API → Inbound Webhooks → Add
Grant only the necessary webhook permissions: catalog for the catalog, sale for orders. Do not assign administrator rights to the webhook.
Updating Stock via REST
From 1C (via an HTTP connection in the configurator), send a request to the 1C-Bitrix API:
POST https://myshop.ru/rest/1/WEBHOOK_KEY/catalog.storeproduct.update
Content-Type: application/json
{
"productId": 12345,
"storeId": 3,
"amount": 47
}
This is a targeted update — only the specific product at the specific warehouse is changed. Unlike a batch export that processes all 50,000 items, a REST call takes milliseconds.
Retrieving Orders from 1C-Bitrix into 1C via REST
An alternative to file-based order exchange — 1C polls the REST API on a schedule:
GET https://myshop.ru/rest/1/WEBHOOK_KEY/sale.order.list
?filter[STATUS_ID]=N
&filter[>=DATE_INSERT]=2024-03-15T00:00:00
&select[]=ID
&select[]=ACCOUNT_NUMBER
&select[]=PRICE
&select[]=CURRENCY
The response is a JSON list of new orders. 1C processes each one, creates the necessary documents, then updates the status via sale.order.update.
1C-Bitrix Webhooks for Push Notifications to 1C
For immediate event delivery (new order, status change) — configure an outbound 1C-Bitrix webhook that sends data to a 1C HTTP service:
Settings → REST API → Outbound Webhooks → Add:
- URL: address of the HTTP service in 1C
-
Event type:
ONSALEORDERNEW(new order)
When a new order is placed, 1C-Bitrix immediately notifies 1C via a POST request — without waiting for the next exchange session.
HTTP Service in 1C
To receive REST requests from 1C-Bitrix, 1C requires an HTTP service (Configurator → General → HTTP Services). It is published as part of the configuration:
Service address: https://1c.myshop.ru/CompanyName/hs/exchange/
Handler methods accept JSON, process the request, and return a response with an HTTP status code.
Configuration Timelines
Setting up REST integration for stock and order exchange — 1–2 days. With webhooks and bidirectional push notifications — 3–5 days. Full replacement of CommerceML with REST API for a large catalog — 1–3 weeks.







