Skip to content

BrandsResource

Defined in: sdks/trendyol/src/resources/brands.ts:51

Trendyol brand-list endpoint group.

Rate limit: 50 req/min (per Trendyol service limits).

Trendyol uses page-based pagination internally; we expose the cursor-based CursorPage shape from @lonca/core so callers can drive everything with paginate() and stay consistent across Lonca SDKs.

new BrandsResource(transport, limiter?): BrandsResource

Defined in: sdks/trendyol/src/resources/brands.ts:54

TrendyolTransport

TokenBucketRateLimiter

BrandsResource

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

Defined in: sdks/trendyol/src/resources/brands.ts:80

List Trendyol brands, one page at a time.

Next-page heuristic. Trendyol’s brand list carries no page count (neither the docs nor the prod wire have totalPages / totalElements — the response is just { brands: [...] }). So when totalPages is absent, a full page (at least limit brands — Trendyol may send ~1000 even for a smaller limit) means “there may be more” and sets nextCursor; a short page is the last one. When the total is an exact multiple of the page size, paginate() makes one extra request that comes back empty and stops there. If Trendyol ever sends totalPages, it wins.

CursorPaginationParams = {}

Promise<CursorPage<Brand>>

import { paginate } from '@lonca/core';
for await (const brand of paginate((p) => client.brands.list(p))) {
console.log(brand.id, brand.name);
}

search(name): Promise<Brand[]>

Defined in: sdks/trendyol/src/resources/brands.ts:116

Search brands by name. Useful when you need a brand’s numeric ID for createProducts and don’t want to page through the full list() (1000 brands per page).

Wire fact (verified STAGE 2026-05-25): Trendyol’s doc claims this is a case-sensitive exact match, but live behaviour is substring + case-insensitive — search('Trendyol') returns 17 hits including TRENDYOLMILLA, trendyol vavist, Trendyol Üyelik. Plan for ranking your results client-side if you need an exact match. The endpoint returns an empty array when nothing matches (no 404).

string

The brand name to search for.

Promise<Brand[]>

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.