Integrating 1C-Bitrix with Belpochta (Belarus) Delivery Service

Even a single delivery to a village becomes a problem: courier services don't go there, and Belpochta remains the only operator covering all of Belarus. Without integration, managers manually enter data on the post's website—errors, delays, lost statuses. Customers are unhappy, and you waste time. M

Our competencies:

Frequently Asked Questions

Even a single delivery to a village becomes a problem: courier services don't go there, and Belpochta remains the only operator covering all of Belarus. Without integration, managers manually enter data on the post's website—errors, delays, lost statuses. Customers are unhappy, and you waste time. Manual parcel creation takes 10–15 minutes, and with 50 orders per day that's hours of useless work. Errors in entering the index or weight lead to returns and re-sends—up to 20% of orders require correction. Our engineers with 10+ years of experience integrated Belpochta with dozens of stores on 1C-Bitrix, processing over 100,000 parcels. The solution covers the entire cycle: from cost calculation to label printing and tracking.

How to integrate Belpochta API with a Bitrix catalog?

Belpochta provides SOAP and REST APIs. We recommend the REST version: https://api.belpost.by/api/v1. Authorization via a token in the header Authorization: Token <token>. The token is issued after signing a contract with Belpochta and connecting the "Electronic Delivery" service.

Main API methods:

Method Purpose Frequency of use
POST /parcel/calculate Calculate shipping cost every time the cart changes
POST /parcel/create Create a parcel when placing an order
GET /parcel/{id} Parcel status by agents every 6 hours
GET /parcel/{id}/label Get label in PDF when printing from admin panel

Cost calculation is implemented via a custom transport. We register a handler on the event OnSaleDeliveryHandlersBuildList and add a class BelposhtaHandler. In the order properties, we must add the recipient's index (6 digits) — without it, calculation is impossible.

class BelposhtaHandler extends \Bitrix\Sale\Delivery\Services\Base { protected function calculateConcrete( \Bitrix\Sale\Shipment $shipment ): \Bitrix\Sale\Delivery\CalculationResult { $result = new \Bitrix\Sale\Delivery\CalculationResult(); $response = $this->apiPost('/parcel/calculate', [ 'from_region' => $this->getOption('SENDER_REGION_CODE'), 'to_index' => $this->getRecipientIndex($shipment), 'weight' => max((int)($shipment->getWeight()), 50), // grams, min 50g 'cost' => round($shipment->getOrder()->getPrice()), 'payment' => 'prepaid', // or cod ]); if (!empty($response['amount'])) { $result->setDeliveryPrice((float)$response['amount']); $days = $response['delivery_days'] ?? '3–7'; $result->setPeriodDescription("{$days} days"); } return $result; } private function getRecipientIndex(\Bitrix\Sale\Shipment $shipment): string { $props = $shipment->getOrder()->getPropertyCollection(); return (string)($props->getItemByOrderPropertyCode('ZIP')?->getValue() ?? ''); } } 

The recipient's index is a mandatory order property. We add it via \Bitrix\Sale\Property with code ZIP and bind it to the delivery service. When Belpochta is selected, the property becomes required.

How to create a parcel and print labels?

After placing an order, it is necessary to create a parcel. We send a POST request with full sender and recipient data. In response, we get a parcel_id, which we save in the order (for example, in a UF field).

public function createParcel(\Bitrix\Sale\Shipment $shipment): string { $order = $shipment->getOrder(); $props = $order->getPropertyCollection(); $payload = [ 'sender' => [ 'name' => $this->getOption('SENDER_NAME'), 'address' => $this->getOption('SENDER_ADDRESS'), 'phone' => $this->getOption('SENDER_PHONE'), ], 'recipient' => [ 'name' => $props->getItemByOrderPropertyCode('FIO')?->getValue(), 'phone' => $props->getItemByOrderPropertyCode('PHONE')?->getValue(), 'index' => $props->getItemByOrderPropertyCode('ZIP')?->getValue(), 'address' => $props->getItemByOrderPropertyCode('ADDRESS')?->getValue(), ], 'parcel' => [ 'weight' => max((int)$shipment->getWeight(), 50), 'cost' => round($order->getPrice()), 'contents' => 'Goods', ], 'payment' => $this->getPaymentType($order), // prepaid or cod 'cod_sum' => $this->getCodSum($order), ]; $response = $this->apiPost('/parcel/create', $payload); return (string)($response['parcel_id'] ?? ''); } 

The label is returned in PDF format. We add a "Print label" button in the administrative section of the order. When clicked, an agent is called that receives the PDF via GET /parcel/{id}/label and sends it to print. Tracking is updated by agents every 6 hours—this is sufficient because Belpochta updates statuses once a day. For faster updates, you can set up a webhook from Belpochta, but they do not yet provide push notifications.

When is Belpochta the optimal choice?

Belpochta is 2–3 times cheaper than courier services to regions, especially for deliveries to villages and townships. The API allows automation of the entire cycle: from calculation to label printing. For online stores targeting all of Belarus, this is a mandatory channel.

Features:

  • Minimum weight — 50 g. Items smaller than that are processed as a "small packet" under a different tariff—the module automatically selects the tariff.
  • International delivery: Belpochta is a member of the UPU, shipping to CIS countries and far abroad. Customs declarations CN22/CN23 via a separate API method. The integration supports filling out declarations based on catalog item positions.
  • Timelines: within Belarus 3–7 business days, to remote areas up to 10 days. Actual timelines depend on branch workload.
  • Cash on delivery is supported, transfer once a week. The cash-on-delivery amount (cod_sum) is automatically calculated as the order cost plus the postal fee.

Integration reduces labor costs for order processing by up to 95%. Manual entry errors are eliminated—addresses and weights are taken directly from the order. This is especially important for online stores with a large assortment and high seasonality. Savings on processing one order amount to up to 8 minutes, which for 100 orders per month gives more than 13 hours of saved time.

What is included in the work

  • Analytics: audit current exchange, identify integration points (calculation, creation, printing, tracking).
  • Design: develop handler scheme, agents, HL-blocks (if additional logic is needed).
  • Development: implement transport, synchronization agents, printing interface. Calculation request caching — tagged, tied to the cart.
  • Testing: on Belpochta's test environment (sandbox) — check all scenarios including API errors and timeouts.
  • Launch: install module on production server, configure agents, train staff. Documentation for operation and disaster recovery.

Timeline

Component Duration
Cost calculation + parcel creation 3–5 days
+ Label printing + tracking +2 days
+ International shipments +2 days
Full functionality (all options) 5–9 days

Timelines vary depending on catalog complexity and integration requirements with 1C. For example, if trade offers and infoblocks v2.0 are already configured, integration is faster. For online stores working with 1C via CommerceML, we set up the transfer of delivery statuses back to 1C.

We will assess your project for free — contact us for a consultation. Order integration — it will pay off within the first hundred shipments thanks to time savings and reduced returns. Get a ready solution in 5–9 days.