Skip to content

OrdersResource

Defined in: sdks/n11/src/resources/orders.ts:267

n11 order reads (GET https://api.n11.com/rest/delivery/v1/shipmentPackages).

Source: developer.n11.com → “Sipariş Listeleme Servisi” (at most 1000 requests/minute, size at most 100, a 15-day date window, nothing before November 2024). Response shape verified against prod on 2026-10-10.

Rate limit: the documented 1000 requests/minute is applied by default; pass a limiter to share one bucket across clients using the same key.

new OrdersResource(transport, limiter?): OrdersResource

Defined in: sdks/n11/src/resources/orders.ts:270

N11Transport

TokenBucketRateLimiter

OrdersResource

approve(lineIds): Promise<N11LineResult[]>

Defined in: sdks/n11/src/resources/orders.ts:317

Approve order lines (PUT /rest/order/v1/update, status Picking). Only lines in Created can be approved. n11 processes the valid lines and reports the rest per line; a line id it does not know is left out of the result entirely (observed on the test store), so compare the result with what you sent.

readonly (string | number)[]

Promise<N11LineResult[]>


cancelItem(params): Promise<void>

Defined in: sdks/n11/src/resources/orders.ts:438

Cancel part of an approved order line (SOAP ClaimCancelPartial). Lines still Created cannot be cancelled this way (the seller rejects them in Seller Office). A line in the wrong state fails with SELLER_API.claimCancel.invalidRequestForPartial (ValidationError).

CancelN11OrderItemParams

Promise<void>


createCollectionRequest(lines): Promise<{ code?: number; message?: string; }>

Defined in: sdks/n11/src/resources/orders.ts:387

Ask a logistics company (Horoz, Ceva, Borusan) to collect a Picking package (PUT /rest/delivery/v1/collectionRequest). Send every line of the package. Returns n11’s { code, message }.

Only packages shipped by one of those logistics companies qualify. A line shipped with a parcel carrier (Aras, Yurtiçi, …) fails with SELLER_API.orderItemInvalidForCollectionRequest, and a store n11 has not enabled fails with “Satıcı toplama talebi için uygun değil” (both ValidationError). The company is the package’s, not the product’s: on the test store a product on a Horoz-only template, bought in one cart with Aras products, shipped with Aras (2026-10-16).

readonly N11CollectionRequestLine[]

Promise<{ code?: number; message?: string; }>


list(params?): Promise<CursorPage<N11ShipmentPackage>>

Defined in: sdks/n11/src/resources/orders.ts:281

List shipment packages, one page at a time. The 0-based page index is the CursorPage cursor, so paginate() from @lonca/core drives it.

ListN11OrdersParams = {}

Promise<CursorPage<N11ShipmentPackage>>


sendInvoiceLink(params): Promise<{ url?: string; }>

Defined in: sdks/n11/src/resources/orders.ts:460

Attach an invoice link to an order (SOAP SaveLinkSellerInvoice). An unknown order number fails with SELLER_API.order.not.found (NotFoundError).

SendN11InvoiceLinkParams

Promise<{ url?: string; }>

when url is not HTTPS or is longer than 2048 characters (checked before sending).


splitPackage(groups): Promise<N11SplitResult>

Defined in: sdks/n11/src/resources/orders.ts:334

Split a Picking package into new packages (POST /rest/delivery/v1/splitCombinePackage): each group of line ids becomes one package, and lines you leave out form another. The original package becomes Unpacked; the new ones are Picking with their own id and campaign code.

readonly (readonly (string | number)[])[]

Promise<N11SplitResult>


splitPackageByQuantity(params): Promise<N11SplitResult>

Defined in: sdks/n11/src/resources/orders.ts:349

Split a Picking package by quantity, optionally cancelling quantities at the same time (POST /rest/delivery/v1/splitPackageByQuantity). Lines of one order only. n11 authorises this service per store, on request.

SplitN11PackageByQuantityParams

Promise<N11SplitResult>


updateLaborCosts(costs): Promise<N11LineResult[]>

Defined in: sdks/n11/src/resources/orders.ts:416

Add labour costs to order lines (PUT /rest/order/v1/labor-costs), for the jewellery categories n11 lists (gold, silver, diamond, …; the list is on the endpoint’s docs page). Results are per line, like approve; a line in another category comes back FAIL “kategori uyumsuzdur”.

readonly N11LaborCost[]

Promise<N11LineResult[]>

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.