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.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new BrandsResource(
transport,limiter?):BrandsResource
Defined in: sdks/trendyol/src/resources/brands.ts:54
Parameters
Section titled “Parameters”transport
Section titled “transport”TrendyolTransport
limiter?
Section titled “limiter?”TokenBucketRateLimiter
Returns
Section titled “Returns”BrandsResource
Methods
Section titled “Methods”list()
Section titled “list()”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.
Parameters
Section titled “Parameters”params?
Section titled “params?”Returns
Section titled “Returns”Promise<CursorPage<Brand>>
Example
Section titled “Example”import { paginate } from '@lonca/core';for await (const brand of paginate((p) => client.brands.list(p))) { console.log(brand.id, brand.name);}search()
Section titled “search()”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).
Parameters
Section titled “Parameters”string
The brand name to search for.
Returns
Section titled “Returns”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.