Integrating 1C-Bitrix with the Ozon Rocket 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.
Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1175
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    811
  • 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
    564
  • image_bitrix-bitrix-24-1c_mirsanbel_458_0.webp
    Development based on 1C Enterprise for MIRSANBEL
    747
  • image_crm_dolbimby_434_0.webp
    Website development on CRM Bitrix24 for DOLBIMBY
    655
  • image_crm_technotorgcomplex_453_0.webp
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    976

1C-Bitrix Integration with Ozon Rocket Delivery Service

Ozon Rocket is Ozon's logistics service, open to external merchants. Uses Ozon infrastructure: warehouses, sorting centers, courier network, and pickup points (including lockers). For Bitrix shops, this provides access to developed delivery network with predictable rates.

Available Ozon Rocket Services

  • Courier delivery — to door, timeframes depend on direction
  • Delivery to Ozon PVZ/lockers — over 7,000 points across Russia
  • Next Day delivery — for Moscow, Saint Petersburg and several cities
  • Partial acceptance — customer can accept part of items, return rest to courier

Ozon Rocket API

Ozon provides REST API for integration partners. Base URL: https://rocket.ozon.ru/api/logistics. Authorization: Bearer token, obtained via API key from partner account.

Main endpoints:

  • POST /v1/calculate — calculate delivery cost
  • POST /v1/orders — create shipment
  • GET /v1/orders/{id} — shipment status
  • GET /v1/pickup-points — list of pickup points
  • POST /v1/orders/{id}/cancel — cancel

Delivery Module in Bitrix

Delivery class — inheritor of \Bitrix\Sale\Delivery\Services\Base. Additionally implement interface for pickup point support: either via custom component or via existing pickup point aggregator if present.

Parameters in b_sale_delivery_service_params:

  • OZON_API_KEY — key from Ozon Rocket account
  • SELLER_ID — seller identifier
  • DEFAULT_WAREHOUSE_ID — warehouse to ship from
  • PARTIAL_ACCEPT — allow partial acceptance (bool)

Cost Calculation

$calcRequest = [
    'from' => ['warehouse_id' => $warehouseId],
    'to'   => [
        'delivery_type' => 'to_address', // or 'to_pickup_point'
        'address' => [
            'city'    => $city,
            'street'  => $street,
            'house'   => $house,
        ],
    ],
    'packages' => [[
        'weight' => $weightGram,
        'length' => $lengthMm,
        'width'  => $widthMm,
        'height' => $heightMm,
    ]],
    'declared_value' => $assessedValue,
];

Ozon Rocket returns several delivery options with prices and timeframes. In calculateConcrete() select needed option per module settings or offer customer choice via JavaScript on checkout page.

Feature: Partial Acceptance

One of Ozon Rocket's key features — support for partial acceptance. When creating shipment, each order item transmitted separately:

'items' => [
    [
        'sku'            => $sku,
        'name'           => $name,
        'quantity'       => $qty,
        'price'          => $price,
        'declared_price' => $price,
    ],
    // ...
]

Courier records which items customer accepted. Ozon Rocket response includes accepted/returned items info — update order in Bitrix: remove unaccepted items, recalculate sum, create return.

Partial acceptance processing logic requires setup in b_sale_order and integration with payment module for correct refunding (if prepaid).

Creating Shipment

$response = $httpClient->post('/v1/orders', [
    'seller_order_number' => 'SHOP-' . $bitrixOrderId,
    'warehouse_id'        => $warehouseId,
    'delivery_type'       => 'courier',
    'recipient' => [
        'name'  => $recipientName,
        'phone' => $phone,
    ],
    'delivery_address' => $address,
    'packages'         => $packages,
    'items'            => $items,
    'payment_method'   => $isPrepaid ? 'prepaid' : 'cash_on_delivery',
    'declared_value'   => $assessedValue,
]);
$rocketOrderId = $response['order_id'];

Statuses and Webhooks

Ozon Rocket sends webhooks to registered URL on status change. Check signature in X-Ozon-Signature header. Status mapping:

Ozon Rocket Status Bitrix
created Sent for delivery
in_transit In transit
arrived Waiting at PVZ / courier at door
delivered Delivered
partial_delivered Partial acceptance — requires manual handling
returned Return

Timeline

Scope Components Duration
Basic: calculation + requests + statuses Without partial acceptance 4–5 days
+ Partial acceptance Order recalculation logic + returns +3–4 days
+ Pickup point map HL-block + widget +2–3 days