Skip to content

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)

new ProductsResource(transport, options?): ProductsResource

Defined in: sdks/trendyol/src/resources/products.ts:508

TrendyolTransport

TokenBucketRateLimiter

TokenBucketRateLimiter

TokenBucketRateLimiter

TokenBucketRateLimiter

TokenBucketRateLimiter

ProductsResource

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 }.

string[]

Promise<BatchAcceptedResponse>

when barcodes is empty or longer than 1000.


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.

CreateProductV2Input[]

Promise<BatchAcceptedResponse>

when items is empty or longer than 1000.


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).

string[]

1–1000 barcodes.

Promise<BatchAcceptedResponse>

when barcodes is empty or longer than 1000.


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).

string

The product barcode to look up.

Promise<ProductBase>


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.

string

The opaque ID returned by the originating call.

Promise<BatchRequestResult>


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.

string[]

1–10 product barcodes.

Promise<BuyboxInfo[]>

when barcodes is empty or longer than 10.


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.

ListProductsParams = {}

Promise<CursorPage<Product>>

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(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).

ListInventoryAndPriceParams = {}

Promise<CursorPage<ProductStockPrice>>

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(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.

ListUnapprovedProductsParams = {}

Promise<CursorPage<UnapprovedProduct>>

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(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.

string[]

Promise<BatchAcceptedResponse>

when barcodes is empty or longer than 1000.


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 }.

string[]

Promise<BatchAcceptedResponse>

when barcodes is empty or longer than 1000.


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.

UpdateContentInput[]

Promise<BatchAcceptedResponse>

when items is empty or longer than 1000.


updateDeliveryInfo(items): Promise<BatchAcceptedResponse>

Defined in: sdks/trendyol/src/resources/products.ts:860

Update product delivery information (deliveryDuration, fastDeliveryType). Identified by barcode.

UpdateDeliveryInfoInput[]

Promise<BatchAcceptedResponse>

when items is empty or longer than 1000.


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.

UpdateUnapprovedInput[]

Promise<BatchAcceptedResponse>

when items is empty or longer than 1000.


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.

UpdateVariantInput[]

Promise<BatchAcceptedResponse>

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.