Skip to content

InventoryResource

Defined in: sdks/n11/src/resources/inventory.ts:34

n11 price and stock updates (POST /ms/product/tasks/price-stock-update).

Source: developer.n11.com → “Ürün Fiyat-Stok Güncelleme”; behaviour checked on n11’s test store on 2026-10-13: a stock-only update works, a price change needs salePrice and listPrice together, more than 2 decimals or a listPrice below salePrice fails the SKU, an unknown stock code fails the SKU, and a stock code sent twice in one task is applied twice in order.

Rate limit: n11 publishes no figure for this service (it “varies with the number of products”) and suspends IPs that send requests milliseconds apart. updateAndWait submits chunks one after another and waits for each, which keeps a large sync well spaced; inject a limiter to share a budget.

new InventoryResource(transport, limiter?): InventoryResource

Defined in: sdks/n11/src/resources/inventory.ts:35

N11Transport

TokenBucketRateLimiter

InventoryResource

update(items): Promise<N11ProductTask>

Defined in: sdks/n11/src/resources/inventory.ts:49

Queue one price/stock task of at most 1000 SKUs. Returns the task; read per-SKU outcomes with products.getTask(taskId).

readonly N11PriceStockUpdate[]

Promise<N11ProductTask>

for an empty or oversized batch, an item with neither stock nor prices, a lone salePrice or listPrice, a price with more than 2 decimals, or listPrice below salePrice (all checked before sending).


updateAndWait(items, opts?): Promise<N11TaskDetails[]>

Defined in: sdks/n11/src/resources/inventory.ts:68

Split items into tasks of at most 1000 SKUs, submit them one by one and wait for each to finish. Returns one N11TaskDetails per task; read failCount / items[] for per-SKU outcomes.

readonly N11PriceStockUpdate[]

N11TaskPollOptions = {}

Promise<N11TaskDetails[]>

when items is empty or an item is invalid (the whole list is checked before the first task is sent).

when a task does not finish within opts.timeoutMs.

Unofficial. Lonca is an independent, community-maintained project — not affiliated with, endorsed by, or supported by Trendyol, Hepsiburada, or any other marketplace. All marketplace names and trademarks belong to their respective owners.