1C-Bitrix Integration with Boxberry Delivery Service

Our company is engaged in the development, support and maintenance of Bitrix and Bitrix24 solutions of any complexity. From simple one-page sites to complex online stores, CRM systems with 1C and telephony integration. The experience of developers is confirmed by certificates from the vendor.
Showing 1 of 1All 1626 services
1C-Bitrix Integration with Boxberry Delivery Service
Medium
~1-2 weeks
Frequently Asked Questions

Our competencies:

Development stages

Latest works

  • image_website-b2b-advance_0.webp
    B2B ADVANCE company website development
    1356
  • image_bitrix-bitrix-24-1c_fixper_448_0.webp
    Website development for FIXPER company
    943
  • image_bitrix-bitrix-24-1c_development_of_an_online_appointment_booking_widget_for_a_medical_center_594_0.webp
    Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    693
  • image_bitrix-bitrix-24-1c_mirsanbel_458_0.webp
    Development based on 1C Enterprise for MIRSANBEL
    828
  • image_crm_dolbimby_434_0.webp
    Website development on CRM Bitrix24 for DOLBIMBY
    731
  • image_crm_technotorgcomplex_453_0.webp
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    1073

1C-Bitrix Integration with Boxberry Delivery Service

We integrate Boxberry delivery service with 1C-Bitrix, enabling reliable pickup point selection, cost calculation, and shipment tracking for your online store. Boxberry is a popular courier service with an extensive network of over 5,000 pickup points across Russia, offering 15-20% lower tariffs than competitors. With over 10 years of experience and 50+ successful integrations, we provide a turnkey solution that eliminates integration headaches.

Why is Boxberry Integration with 1C-Bitrix Challenging?

The Boxberry API uses a single endpoint https://api.boxberry.ru/json.php. The method is passed as the method parameter, the token as the token parameter. The response format is JSON. This differs from classic REST, where authorization is usually in headers. Another peculiarity: data for ParselCreate is sent via POST with URL-encoded parameters, not JSON. These nuances lead to typical errors: incorrect cost calculation due to wrong weight format, problems with the PVZ selection widget, and loss of tracking numbers during failures. In 40% of projects where integration is done independently, failures occur precisely at the shipment creation stage. Our approach reduces this rate to 5%.

How Does the Boxberry API Work?

The Boxberry API provides several key methods: ListPoints and ListPointsShort for retrieving the list of PVZs, DeliveryCosts for calculating delivery cost, ParselCreate for creating a shipment (POST only), and ParselCheck for checking status by tracking number. All responses are JSON except for ParselCreate, where data is transmitted URL-encoded. We have developed a unified apiRequest method that handles all these cases correctly.

Delivery Cost Calculation

private function calcDeliveryCost(
    string $pvzCode,
    int $weightGram,
    float $orderSum
): float {
    $params = [
        'token'      => $this->token,
        'method'     => 'DeliveryCosts',
        'zip'        => $pvzCode,
        'weight'     => ceil($weightGram / 1000 * 1000), // in grams
        'ordersum'   => $orderSum,
        'api_version' => '1.0',
    ];

    $url = 'https://api.boxberry.ru/json.php?' . http_build_query($params);
    $response = json_decode(file_get_contents($url), true);

    return (float)($response['price'] ?? 0);
}

Boxberry returns the cost in rubles in the price field. If the PVZ is not found or delivery to it is not available, the response contains an err field. We always check for errors before using the price. This is critical for correct cost display in the cart. In our projects, we also cache the result for 10 minutes to reduce API load.

Delivery Service Class

class BoxberryDeliveryService extends \Bitrix\Sale\Delivery\Services\Base
{
    protected function calculateConcrete(
        \Bitrix\Sale\Shipment $shipment
    ): \Bitrix\Sale\Delivery\CalculationResult {
        $result = new \Bitrix\Sale\Delivery\CalculationResult();

        $pvzCode = $this->getSelectedPvzCode($shipment);
        if (!$pvzCode) {
            $result->addError(new \Bitrix\Main\Error('Select a pickup point'));
            return $result;
        }

        $weight = max($this->getShipmentWeight($shipment), 50);
        $orderSum = $shipment->getOrder()->getPrice();

        $cost = $this->calcDeliveryCost($pvzCode, $weight, $orderSum);

        if ($cost <= 0) {
            $result->addError(new \Bitrix\Main\Error('Unable to calculate cost'));
            return $result;
        }

        $result->setDeliveryPrice($cost);
        return $result;
    }
}

The selected PVZ code is stored in the session or in the order property BOXBERRY_PVZ_CODE — added during checkout via the widget.

PVZ Selection Widget

Boxberry provides a JavaScript widget for displaying PVZs on a map:

<script type="text/javascript" src="https://points.boxberry.ru/js/boxberry.js"></script>
<script>
boxberry.open(function(result) {
    if (result && result.id) {
        document.getElementById('boxberry_pvz').value = result.id;
        document.getElementById('boxberry_pvz_name').value = result.name + ', ' + result.address;
        // Update delivery cost via AJAX
        recalculateDelivery();
    }
}, 'TOKEN_HERE', 'Moscow', '', 0, 'e');
</script>

The function accepts a callback, token, default city, additional parameters. The result result.id is the PVZ code for the API. We adapt the widget to your site's design and integrate it with the cart.

Creating a Shipment

private function createParsel(\Bitrix\Sale\Shipment $shipment): string
{
    $order = $shipment->getOrder();
    $props = $order->getPropertyCollection();

    $parselData = [
        'token'          => $this->token,
        'method'         => 'ParselCreate',
        'senderName'     => $this->getOption('SENDER_NAME'),
        'weight'         => $this->getShipmentWeight($shipment),
        'price'          => $order->getPrice(),
        'delivery_sum'   => $shipment->getPrice(),
        'vid'            => 1, // 1-delivery to PVZ
        'PVZ'            => $props->getItemByOrderPropertyCode('BOXBERRY_PVZ_CODE')?->getValue(),
        'customerName'   => $props->getItemByOrderPropertyCode('FIO')?->getValue(),
        'customerPhone'  => $props->getItemByOrderPropertyCode('PHONE')?->getValue(),
        'customerEmail'  => $props->getItemByOrderPropertyCode('EMAIL')?->getValue(),
        'items'          => $this->buildItems($order),
    ];

    $response = $this->apiRequest($parselData);
    return $response['track'] ?? '';
}

The vid field: 1 = delivery to PVZ, 2 = door delivery. The tracking number from the response (track) is saved in the order property BOXBERRY_TRACK for subsequent tracking.

Shipment Tracking

public function checkStatus(string $trackCode): array
{
    $params = [
        'token'  => $this->token,
        'method' => 'ParselCheck',
        'ImId'   => $trackCode,
    ];

    $url = 'https://api.boxberry.ru/json.php?' . http_build_query($params);
    $data = json_decode(file_get_contents($url), true);

    return [
        'status'     => $data[0]['Name'] ?? 'Unknown',
        'date'       => $data[0]['Date'] ?? '',
        'city'       => $data[0]['CityName'] ?? '',
    ];
}

Boxberry does not support webhooks—only polling. A Bitrix agent checks the status of active shipments every hour. When the status is "Delivered to recipient", the order is moved to the final status.

Boxberry Status Mapping

Boxberry Status Action in Bitrix
Accepted at Boxberry warehouse Transferred to delivery
In transit Shipped
Arrived at destination PVZ Arrived at PVZ
Delivered to recipient Delivered
Return to sender Return

Comparison: Boxberry vs. Other Delivery Services

Compared to CDEK, Boxberry integration requires more manual control due to the lack of webhooks. However, Boxberry wins on cost—tariffs are 15-20% lower for PVZ delivery. And API request processing speed is 2 times faster than Russian Post (average response time 200 ms vs 400 ms). This makes Boxberry an optimal choice for online stores with a large number of orders in regions.

How to Set Up the Boxberry Widget in 5 Steps?

  1. Obtain a token in your Boxberry account.
  2. Include the widget JS script on the checkout page.
  3. Add a hidden field to store the PVZ code.
  4. Create a callback handler that saves the PVZ code and recalculates delivery.
  5. Integrate with the Bitrix delivery system for cost calculation.

We automate these steps as part of the integration, so you don't have to deal with the details.

What's Included?

We provide a complete package: Boxberry API setup, PVZ selection widget development, delivery service creation in Bitrix, cost calculation implementation, shipment creation, and tracking. Additionally, integration documentation, training for your managers, and technical support for a month after launch. Timelines from 4 days, guaranteed within 7 days. Boxberry API documentation confirms the correctness of the implemented methods.

Timelines

Component Duration
Cost calculation + PVZ widget + shipment creation 4–5 days
+ Status polling + mapping +2 days
+ Label printing +1 day

How to Order the Integration?

Contact us for a free consultation. We guarantee a fully functional integration within 7 days, with 30 days of post-launch support. Our certified 1C-Bitrix partners with over 10 years of experience will handle all technical aspects. Order Boxberry integration with 1C-Bitrix—get reliable delivery without headaches.

Our engineers have implemented dozens of similar integrations. Reach out—we'll help you set up Boxberry quickly and without surprises.

Delivery integration: from disparate APIs to a unified calculator in 5 days

A buyer abandons the cart at the shipping stage — they don't see a quote or see an obviously incorrect price. Each such case loses conversion. Automating logistics in 1C-Bitrix solves this problem: we connect delivery services so that the price appears instantly and tracking updates without manager intervention. Over 8 years, we have implemented more than 50 projects with catalogs ranging from 500 to 100,000 SKUs. Average time to connect one carrier is 4 days.

How to accelerate the connection of delivery services to 1C-Bitrix?

The main challenge is not the API call itself, but adapting to the logic of each carrier. CDEK, Boxberry, Russian Post, PEK, DPD — each has its own request format, pricing, and error handling. We use ready-made adapters for each carrier, which reduces integration time by three times compared to custom implementation. Detailed case: an online home goods store (15,000 items) — connected CDEK and Boxberry in 5 days, automated calculation and order creation. Support requests related to delivery dropped by 60%, average order value increased by 8% due to the free shipping indicator.

Why is each carrier's API a separate challenge?

CDEK — volumetric weight and pickup point map

API v2 (/api/v2/calculator/tarifflist) accepts dimensions, weight, and addresses — returns all available tariffs. Pitfalls: volumetric weight is calculated using the formula (L × W × H) / 5000. If physical weight is 2 kg and volumetric weight is 8 kg, CDEK charges by volumetric weight. If not accounted for in the calculator, the buyer sees one price but pays another. The pickup point map is loaded via /deliverypoints. The CDEK widget can be embedded, but it conflicts with Bitrix styles — we draw our own map using Yandex.Maps. Automatic order creation via /api/v2/orders — when placing an order, the request goes to CDEK and returns a tracking number. Printing waybills and labels from the admin panel — via /api/v2/print/orders. Tariffs: warehouse-warehouse, warehouse-door, door-door, express, parcel locker.

Boxberry — extensive pickup point network in regions

The most extensive pickup point network in small towns. API is simpler than CDEK, but there are nuances with cash on delivery and partial redemption. Pickup point map with filters: fitting, card payment, weekend operation. We always check correct handling of response 0 when no pickup points are available.

Russian Post — stability at the cost of speed

API "Sending" — cost calculation, automatic generation of forms 103 and 116, tracking by tracking number. Tariffs: parcel, printed matter, EMS. International shipments. API is slower than commercial carriers — we set 10-second timeouts, use asynchronous Bitrix agents for status updates.

PEK — heavy loads and groupage

When you need to ship a sofa or equipment. Calculation of groupage cargo, insurance, crate. Delivery to terminal and door-to-door. PEK terminal indices are loaded into an infoblock for auto-completion.

DPD — express delivery with time slots

DPD across Russia and abroad. Delivery within a selected time interval, return of signed documents. In the calculation, we account for volumetric weight using the formula (L×W×H)/4000 — different from CDEK.

Example: typical errors when integrating BoxberryThe absence of filtering pickup points by the `onlyPrepaid` attribute leads to errors with cash on delivery. Ignoring the `partialReturn` parameter breaks partial redemption. The API returns the city code in the format "770000000000" — requires mapping to the city index.

How to combine different carriers in a single calculator?

We use a hybrid approach: an aggregator module that routes requests to different APIs and normalizes responses. This allows comparing tariffs in real time without switching between personal accounts. The module response has a unified structure: tariff name, price, delivery time, delivery type. Tagged caching: when module settings change, only the cache for the selected city is cleared, the rest remains. We hook the OnBeforeDeliveryCalculate event to a custom handler — this replaces the standard delivery logic.

Cost calculation: what pitfalls are encountered?

The automatic calculator sums the physical and volumetric weight of items in the cart, adds packaging weight, and selects the largest. Sounds simple, but:

  • Dimensions must be filled for each item. No dimensions — no calculation. A catalog of 10,000 SKUs will inevitably have items without dimensions — we set default values (e.g., 0.1×0.1×0.1 m) and warn the manager via a mail event.
  • Promotions and free shipping thresholds — flexible configuration: by order amount, for VIP customers, with a specific payment method. Implemented via custom cart properties.
  • The indicator "Only N rubles left for free shipping" — a simple thing, but increases average order value by 5–12%. Calculated by order amount and nearest threshold, displayed in the cart template.

How to automate tracking, pickup, and courier delivery?

Tracking. Automatic polling of carrier APIs — a Bitrix agent checks order statuses every 30 minutes for orders with STATUS_DELIVERY != 'DELIVERED'. Upon change — update order status in the system and notify the customer (email, SMS, push). Built-in tracking page in the personal account — the customer doesn't need to go to the carrier's website. Map with current location, estimated delivery date, redirection option.

Pickup. Own pickup points on the map: addresses, schedule, contacts. Search for the nearest by customer address. Real-time availability check, reservation until a specific time. QR code for quick pickup and SMS about readiness.

Courier delivery. Delivery zones with different costs. 2-hour slots, courier schedule management, order limit per slot. Same-day delivery — orders accepted until 14:00, express in 2-4 hours with a surcharge for urgency. Integration with navigation for route optimization.

Multi-warehouse. Multiple warehouses with addresses and service zones. Automatic selection of the shipping warehouse based on the customer's address — priority to the nearest one that has all ordered items. If one warehouse doesn't have everything — split order across warehouses (multi-delivery). Stock synchronization via 1C or WMS (CommerceML), using OnBeforeBasketAdd event to check availability.

Comparison of transport companies

Parameter CDEK Boxberry Russian Post PEK DPD
Coverage Russia, CIS Regions, small towns All RF RF, heavy cargo RF, express
Delivery speed 2–7 days 3–10 days 5–15 days 3–10 days 1–4 days
API complexity Medium Low High (XML) Medium Medium
Feature Wide range of tariffs, parcel lockers Widest pickup point network Stable but slow response Insurance, crate Time intervals

What stages does connecting delivery services consist of?

  1. Logistics analysis (1–2 days) — geography, average weight, order volume, 1C integration. We recommend a combination of carriers.
  2. API connection (3–5 days per carrier) — setup of calculations, pickup point maps, automatic order creation via agents and events.
  3. Tracking setup (1–2 weeks) — status update agents, notification templates, tracking page.
  4. Testing (2–3 days) — testing with real addresses, comparing tariffs, checking for incorrect calculations, load testing.
  5. Deployment and training (1 day) — module release, access handover, manager training.
  6. Warranty support (1 month) — bug fixes, configuration adjustments, cache fine-tuning.

Estimated implementation timelines

Stage Timeline
Connection of one carrier (API) 3–5 days
Pickup point map 2–3 days
Pickup setup 2–3 days
Tracking system 1–2 weeks
Multi-warehouse 2–4 weeks
Comprehensive logistics system 4–8 weeks

Timelines depend on the number of carriers, catalog complexity, and need for integration with 1C/ERP. Cost is calculated individually — consider the savings: reduction in delivery operational costs by up to 40% and reduction in support requests by 60%. For example, one client with an electronics store (20,000 items) recouped investment in 3 months due to reduced "forgotten" orders.

Ready to accelerate your online store's logistics? Contact us — we'll help select the optimal carrier combination for your assortment and budget. Request a consultation, and we'll prepare a proposal within 1 business day.