Integration of Online Store with Ozon (Seller API)
Ozon Seller API is one of the most mature APIs among Russian marketplaces. It allows managing products, prices, stock levels, receiving orders, and managing statuses without logging into the personal cabinet. Store integration with Ozon allows conducting marketplace sales while synchronizing data with the main catalog.
Authentication
$headers = [
'Client-Id' => config('services.ozon.client_id'),
'Api-Key' => config('services.ozon.api_key'),
'Content-Type' => 'application/json',
];
$base = 'https://api-seller.ozon.ru';
Creating/Updating Products
class OzonProductService
{
public function upsertProduct(Product $product): void
{
$payload = [
'items' => [[
'attributes' => [
['id' => 9048, 'complex_id' => 0, 'values' => [['value' => $product->name]]],
['id' => 4191, 'complex_id' => 0, 'values' => [['value' => $product->brand]]],
['id' => 85, 'complex_id' => 0, 'values' => [['value' => $product->description]]],
],
'barcode' => $product->barcode ?? '',
'description_category_id' => $this->getCategoryId($product),
'name' => $product->name,
'offer_id' => $product->sku,
'price' => (string) $product->price,
'images' => $product->images->pluck('url')->all(),
'vat' => '0.2',
]]
];
$resp = Http::withHeaders($this->headers)
->post("{$this->base}/v3/product/import", $payload);
$taskId = $resp->json('result.task_id');
// Product creation is asynchronous — check by task_id
$this->waitForTask($taskId);
}
private function waitForTask(string $taskId): void
{
for ($i = 0; $i < 30; $i++) {
sleep(2);
$status = Http::withHeaders($this->headers)
->post("{$this->base}/v1/product/import/info", ['task_id' => $taskId])
->json('result.items.0.status');
if ($status === 'imported') return;
if ($status === 'failed') throw new OzonImportException("Task {$taskId} failed");
}
throw new OzonImportException("Task {$taskId} timeout");
}
}
Updating Prices and Stock
public function updatePrices(array $items): void
{
// items: [['offer_id' => 'SKU-123', 'price' => '1990', 'old_price' => '2490']]
Http::withHeaders($this->headers)
->post("{$this->base}/v1/product/import/prices", ['prices' => $items]);
}
public function updateStocks(array $items): void
{
// items: [['offer_id' => 'SKU-123', 'stock' => 15, 'warehouse_id' => 12345]]
Http::withHeaders($this->headers)
->post("{$this->base}/v2/products/stocks", ['stocks' => $items]);
}
Getting Orders
public function getNewOrders(): array
{
$resp = Http::withHeaders($this->headers)
->post("{$this->base}/v3/posting/fbs/list", [
'filter' => [
'since' => now()->subHours(24)->toIso8601String(),
'to' => now()->toIso8601String(),
'status' => 'awaiting_packaging',
],
'limit' => 50,
]);
return $resp->json('result.postings');
}
FBS Order Statuses
| Status | Description |
|---|---|
awaiting_packaging |
Awaiting assembly |
awaiting_deliver |
Awaiting courier handover |
delivering |
In delivery |
delivered |
Delivered |
cancelled |
Cancelled |
API Asynchronicity
Ozon actively uses asynchronous tasks: product creation, bulk stock updates. It's important to properly handle task_id and statuses.
API Limitations
- Rate limits: 1,000 requests per minute for most methods
- Batching: stock updates — up to 500 SKUs per request; prices — up to 1,000
Timeline
Integration with Ozon Seller API (products + prices + stock + orders): 12–18 business days.







