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 |







