SelSup Developers

End-to-end workflow · Guides

Inventory and warehouses

The SKU model, warehouse stock reads, updates by SelSup or external identifiers, and safe reconciliation.

5 sectionsDeveloper guide

Inventory lives at the SKU and warehouse level. A SKU can connect multiple products, so productId and skuId are not interchangeable.

WMS, ERP, and warehouse integrations

01

Understand inventory entities

SKU is the inventory unit. A final product or size links to a SKU, while SKU stock is placed in a warehouse or cell.

quantity is the stored quantity, calculatedQuantity may include internal calculations, and availableQuantity is the resulting available stock. Select the field matching your use case.

SelSup supports quantity-based and individually tracked inventory. Do not combine both accounting models in one update flow.

02

Read warehouse stock

For full reconciliation, load stock by warehouseId. Persist skuId, warehouse, cell, modification time, and every quantity field used by your calculation.

A full export can be large. Use it for initial loading and scheduled reconciliation rather than polling it after every change.

One warehouse · cURL
curl 'https://api.selsup.ru/api/wms/stock/all?warehouseId=10129' \
  --header 'Authorization: YOUR_API_TOKEN'

03

Update using SelSup entities

Use skuId from product search and the warehouse mapping identifier required by the current contract. Validate one test item before sending a batch.

updateInService=false separates the SelSup stock write from synchronous marketplace propagation. When marketplace updates are required, handle duration and partial failures independently.

withReservedStock controls reserve handling. Apply one consistent rule across the integration so different flows do not overwrite stock with different semantics.

Update batch · JSON
[
  {
    "stock": 5,
    "serviceWarehouseId": "1234",
    "updateInService": false,
    "withReservedStock": true,
    "skuId": 1044318
  }
]

04

Update by article or barcode

With the service route, SelSup resolves a mapped product by the selected service identifier or barcode. serviceWarehouseId must belong to the same service.

Do not send a barcode and several external identifiers together without a defined priority. Route ambiguous matches into a report instead of updating every match.

Barcode update · JSON
[
  {
    "stock": 5,
    "barcode": "4601234567890",
    "serviceWarehouseId": "OZON-WH-01",
    "updateInService": false,
    "withReservedStock": true
  }
]

05

Reconciliation and race prevention

  1. 1

    Assign stock ownership

    Decide which system is the source of truth and which events are allowed to change SelSup inventory.

  2. 2

    Serialize SKU updates

    Do not send concurrent values for the same skuId and warehouse; queue by SKU+warehouse.

  3. 3

    Verify after a batch

    Read changed SKUs again and compare the expected value to availableQuantity using your reserve formula.

  4. 4

    Isolate mapping errors

    An unknown skuId, warehouse, or ambiguous barcode needs dictionary correction rather than an infinite retry.