ProductsResource
Defined in: sdks/trendyol/src/resources/products.ts:501
Trendyol product read + write + lifecycle + batch-result endpoints.
Rate limits (per Trendyol service limits):
- filterProducts (approved + unapproved + getProductBase): 2000 req/min
- getBatchRequestResult: 1000 req/min
- getBuyboxInformation: 1000 req/min
- create/update/archive/unlock product writes: 1000 req/min (shared bucket)
- delete: 100 req/min (separate bucket)
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ProductsResource(
transport,options?):ProductsResource
Defined in: sdks/trendyol/src/resources/products.ts:508
Parameters
Section titled “Parameters”transport
Section titled “transport”TrendyolTransport
options?
Section titled “options?”batchLimiter?
Section titled “batchLimiter?”TokenBucketRateLimiter
buyboxLimiter?
Section titled “buyboxLimiter?”TokenBucketRateLimiter
deleteLimiter?
Section titled “deleteLimiter?”TokenBucketRateLimiter
filterLimiter?
Section titled “filterLimiter?”TokenBucketRateLimiter
writeLimiter?
Section titled “writeLimiter?”TokenBucketRateLimiter
Returns
Section titled “Returns”ProductsResource
Methods
Section titled “Methods”archive()
Section titled “archive()”archive(
barcodes):Promise<BatchAcceptedResponse>
Defined in: sdks/trendyol/src/resources/products.ts:895
Archive products by barcode (Trendyol’s archived=true state).
Archived products are not visible to customers; pair with delete
after the 24-hour archive cool-down to remove them entirely.
Async batch — returns { batchRequestId }.
Parameters
Section titled “Parameters”barcodes
Section titled “barcodes”string[]
Returns
Section titled “Returns”Promise<BatchAcceptedResponse>
Throws
Section titled “Throws”when barcodes is empty or longer than 1000.
create()
Section titled “create()”create(
items):Promise<BatchAcceptedResponse>
Defined in: sdks/trendyol/src/resources/products.ts:807
Create products (V2). Async batch — returns a batchRequestId you can
poll with getBatchStatus. Max 1000 items per call.
Trendyol requires the full V2 attribute payload — fetch via
categories.getAttributes (and categories.getAttributeValues for
values when allowCustom === false). Shipment / returning warehouse
IDs come from suppliers.getAddresses.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<BatchAcceptedResponse>
Throws
Section titled “Throws”when items is empty or longer than 1000.
delete()
Section titled “delete()”delete(
barcodes):Promise<BatchAcceptedResponse>
Defined in: sdks/trendyol/src/resources/products.ts:875
Delete products by barcode. Trendyol allows deletion of unapproved products and approved products that have been archived for more than a day (and have not been sales-stopped by Trendyol).
Async batch — returns { batchRequestId } to poll via getBatchStatus.
Separately rate-limited at 100 req/min (much tighter than create/update).
Parameters
Section titled “Parameters”barcodes
Section titled “barcodes”string[]
1–1000 barcodes.
Returns
Section titled “Returns”Promise<BatchAcceptedResponse>
Throws
Section titled “Throws”when barcodes is empty or longer than 1000.
getBase()
Section titled “getBase()”getBase(
barcode):Promise<ProductBase>
Defined in: sdks/trendyol/src/resources/products.ts:753
Fetch the basic lifecycle status of a single product by barcode.
Cheap and useful as a polling primitive after createProducts: poll
this endpoint until approved flips to true (or use
client.products.getBatchStatus() to track the originating batch).
Parameters
Section titled “Parameters”barcode
Section titled “barcode”string
The product barcode to look up.
Returns
Section titled “Returns”Promise<ProductBase>
getBatchStatus()
Section titled “getBatchStatus()”getBatchStatus(
batchRequestId):Promise<BatchRequestResult>
Defined in: sdks/trendyol/src/resources/products.ts:682
Poll a batch request returned by an async write (e.g. createProducts,
updatePriceAndInventory).
Trendyol retains batch results for 4 hours after the originating request — poll within that window.
Parameters
Section titled “Parameters”batchRequestId
Section titled “batchRequestId”string
The opaque ID returned by the originating call.
Returns
Section titled “Returns”Promise<BatchRequestResult>
getBuyboxInfo()
Section titled “getBuyboxInfo()”getBuyboxInfo(
barcodes):Promise<BuyboxInfo[]>
Defined in: sdks/trendyol/src/resources/products.ts:773
Fetch buybox information for up to 10 barcodes in one call.
Returns rank (buyboxOrder === 1 means you hold the buybox), the
current buybox price, and — beyond the spec — the second and third
competing prices when other sellers are present.
Parameters
Section titled “Parameters”barcodes
Section titled “barcodes”string[]
1–10 product barcodes.
Returns
Section titled “Returns”Promise<BuyboxInfo[]>
Throws
Section titled “Throws”when barcodes is empty or longer than 10.
list()
Section titled “list()”list(
params?):Promise<CursorPage<Product>>
Defined in: sdks/trendyol/src/resources/products.ts:583
List approved products. Use paginate() from @lonca/core to iterate
lazily across pages.
Trendyol exposes both page-based and nextPageToken-based pagination
(the latter required when the dataset exceeds 10,000 items). The SDK
picks the right strategy automatically — pass our opaque cursor from
the previous response and we forward it as nextPageToken.
Parameters
Section titled “Parameters”params?
Section titled “params?”ListProductsParams = {}
Returns
Section titled “Returns”Promise<CursorPage<Product>>
Example
Section titled “Example”import { paginate } from '@lonca/core';for await (const product of paginate((p) => client.products.list(p))) { for (const variant of product.variants) { console.log(variant.barcode, product.title); }}listInventoryAndPrice()
Section titled “listInventoryAndPrice()”listInventoryAndPrice(
params?):Promise<CursorPage<ProductStockPrice>>
Defined in: sdks/trendyol/src/resources/products.ts:638
List stock and price for approved products — Trendyol’s lightweight
inventory-and-price filter. A slim alternative to list when you
only need pricing + stock: the response carries contentId,
productMainId, and a variants[] array with barcode, salePrice,
listPrice, quantity, stockCode, and stockLastModifiedAt — nothing
else.
Filter by barcode, contentId, stockCode, productMainId, or listing
status. Sort with orderByDirection (SellerCreatedDate). size caps
at 100 here (tighter than list’s 1000).
Pagination follows the same convention as list: pass our opaque
cursor from the previous response and we forward it as nextPageToken
(required once the dataset exceeds 10,000 items).
Parameters
Section titled “Parameters”params?
Section titled “params?”ListInventoryAndPriceParams = {}
Returns
Section titled “Returns”Promise<CursorPage<ProductStockPrice>>
Example
Section titled “Example”import { paginate } from '@lonca/core';for await (const p of paginate((q) => client.products.listInventoryAndPrice({ ...q, status: 'onSale' }),)) { for (const v of p.variants) { console.log(v.barcode, v.quantity, v.salePrice); }}listUnapproved()
Section titled “listUnapproved()”listUnapproved(
params?):Promise<CursorPage<UnapprovedProduct>>
Defined in: sdks/trendyol/src/resources/products.ts:713
List unapproved (draft / rejected / pending-review) products.
Wire shape is intentionally flatter than the approved-product shape:
each barcode is one top-level item with barcode, quantity, salePrice
etc. at the root. Rejected drafts carry rejectReasonDetails so you can
surface why Trendyol’s content team turned them down.
Pagination follows the same convention as list(): cursor from the
previous response forwards as nextPageToken.
Parameters
Section titled “Parameters”params?
Section titled “params?”ListUnapprovedProductsParams = {}
Returns
Section titled “Returns”Promise<CursorPage<UnapprovedProduct>>
Example
Section titled “Example”const page = await client.products.listUnapproved({ limit: 50 });for (const draft of page.items) { if (draft.status === 'rejected') { console.warn(draft.barcode, draft.rejectReasonDetails); }}unarchive()
Section titled “unarchive()”unarchive(
barcodes):Promise<BatchAcceptedResponse>
Defined in: sdks/trendyol/src/resources/products.ts:905
Unarchive products by barcode (Trendyol’s archived=false state).
Restores visibility for previously-archived products.
Parameters
Section titled “Parameters”barcodes
Section titled “barcodes”string[]
Returns
Section titled “Returns”Promise<BatchAcceptedResponse>
Throws
Section titled “Throws”when barcodes is empty or longer than 1000.
unlock()
Section titled “unlock()”unlock(
barcodes):Promise<BatchAcceptedResponse>
Defined in: sdks/trendyol/src/resources/products.ts:933
Unlock products whose sale was paused by Trendyol due to pricing issues (under/over-pricing, critical price error, supplier issues). Restores selling status for the listed barcodes.
Async batch — returns { batchRequestId }.
Parameters
Section titled “Parameters”barcodes
Section titled “barcodes”string[]
Returns
Section titled “Returns”Promise<BatchAcceptedResponse>
Throws
Section titled “Throws”when barcodes is empty or longer than 1000.
updateContent()
Section titled “updateContent()”updateContent(
items):Promise<BatchAcceptedResponse>
Defined in: sdks/trendyol/src/resources/products.ts:818
Update content of approved products (title, description, images,
attributes). Identified by contentId. Partial update is supported
except for attributes — if you update ANY attribute, send ALL of them.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<BatchAcceptedResponse>
Throws
Section titled “Throws”when items is empty or longer than 1000.
updateDeliveryInfo()
Section titled “updateDeliveryInfo()”updateDeliveryInfo(
items):Promise<BatchAcceptedResponse>
Defined in: sdks/trendyol/src/resources/products.ts:860
Update product delivery information (deliveryDuration,
fastDeliveryType). Identified by barcode.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<BatchAcceptedResponse>
Throws
Section titled “Throws”when items is empty or longer than 1000.
updateUnapproved()
Section titled “updateUnapproved()”updateUnapproved(
items):Promise<BatchAcceptedResponse>
Defined in: sdks/trendyol/src/resources/products.ts:850
Update unapproved (draft) products. Identified by barcode. All
other fields are optional partial updates. Use this to fix drafts that
Trendyol rejected — client.products.listUnapproved surfaces the
rejectReasonDetails you need to act on.
Gotcha (verified live STAGE 2026-05-25): Trendyol’s V2 spec claims
only barcode is required, but the endpoint returns HTTP 500
(TrendyolSystemException / TypeError) when too many optional fields
are omitted. In practice, send at least title, description,
productMainId, brandId, categoryId, stockCode,
dimensionalWeight, vatRate, images[], and attributes[] (an
empty array is OK for the latter). The SDK forwards your payload
as-is; trim fields only if you have verified the server accepts it.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<BatchAcceptedResponse>
Throws
Section titled “Throws”when items is empty or longer than 1000.
updateVariants()
Section titled “updateVariants()”updateVariants(
items):Promise<BatchAcceptedResponse>
Defined in: sdks/trendyol/src/resources/products.ts:829
Update variant fields of approved products (stockCode, vatRate,
dimensionalWeight, warehouse IDs, location-based delivery, lot). Identified
by barcode. The barcode itself cannot be changed via this endpoint.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<BatchAcceptedResponse>
Throws
Section titled “Throws”when items is empty or longer than 1000.
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.