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.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new InventoryResource(
transport,limiter?):InventoryResource
Defined in: sdks/n11/src/resources/inventory.ts:35
Parameters
Section titled “Parameters”transport
Section titled “transport”limiter?
Section titled “limiter?”TokenBucketRateLimiter
Returns
Section titled “Returns”InventoryResource
Methods
Section titled “Methods”update()
Section titled “update()”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).
Parameters
Section titled “Parameters”readonly N11PriceStockUpdate[]
Returns
Section titled “Returns”Promise<N11ProductTask>
Throws
Section titled “Throws”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()
Section titled “updateAndWait()”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.
Parameters
Section titled “Parameters”readonly N11PriceStockUpdate[]
N11TaskPollOptions = {}
Returns
Section titled “Returns”Promise<N11TaskDetails[]>
Throws
Section titled “Throws”when items is empty or an item is invalid (the
whole list is checked before the first task is sent).
Throws
Section titled “Throws”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.