PromotionsResource
Defined in: sdks/hepsiburada/src/resources/promotions.ts:36
Hepsiburada Seller Promotions (satici-promosyonu-entegrasyonu).
Service base URL: diskonto-external[-sit].hepsiburada.com (per the
portal spec — routing through oms-external returns 401 because the routes
don’t exist there; verified on SIT 2026-08-30, where listCategories
answers 200). 9-endpoint self-service basket-discount lifecycle:
- list seller’s eligible product categories
- query budgets / limits
- list discounts / get single discount
- create three discount types (TL, %, X-buy-Y-pay)
- cancel a discount
NOTE: On SIT the /self-campaign/* read endpoints answer a server-side
500 ("Beklenmedik bir hata oluştu.") for the sandbox merchant
regardless of parameters (verified 2026-08-30) — likely no self-campaign
enrollment. listCategories works (200).
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new PromotionsResource(
transport,limiter?):PromotionsResource
Defined in: sdks/hepsiburada/src/resources/promotions.ts:39
Parameters
Section titled “Parameters”transport
Section titled “transport”HepsiburadaTransport
limiter?
Section titled “limiter?”TokenBucketRateLimiter
Returns
Section titled “Returns”PromotionsResource
Methods
Section titled “Methods”cancelDiscount()
Section titled “cancelDiscount()”cancelDiscount(
input):Promise<MutationResult>
Defined in: sdks/hepsiburada/src/resources/promotions.ts:174
Cancel an existing discount. The API only answers { success }, so this
resolves to a MutationResult — the body is on raw.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<MutationResult>
createPercentDiscount()
Section titled “createPercentDiscount()”createPercentDiscount(
input):Promise<DiscountReceipt>
Defined in: sdks/hepsiburada/src/resources/promotions.ts:145
Create a percentage basket discount. Resolves to a DiscountReceipt (campaignId of the new campaign).
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<DiscountReceipt>
createTlDiscount()
Section titled “createTlDiscount()”createTlDiscount(
input):Promise<DiscountReceipt>
Defined in: sdks/hepsiburada/src/resources/promotions.ts:132
Create a fixed-TL basket discount. Resolves to a DiscountReceipt (campaignId of the new campaign).
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<DiscountReceipt>
createXyDiscount()
Section titled “createXyDiscount()”createXyDiscount(
input):Promise<DiscountReceipt>
Defined in: sdks/hepsiburada/src/resources/promotions.ts:158
Create an X-buy-Y-pay basket discount. Resolves to a DiscountReceipt (campaignId of the new campaign).
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<DiscountReceipt>
getBudgets()
Section titled “getBudgets()”getBudgets():
Promise<DiscountBudgets>
Defined in: sdks/hepsiburada/src/resources/promotions.ts:72
Get the seller’s current discount budgets.
Returns
Section titled “Returns”Promise<DiscountBudgets>
getDiscount()
Section titled “getDiscount()”getDiscount(
campaignId):Promise<Discount>
Defined in: sdks/hepsiburada/src/resources/promotions.ts:116
Get a single discount by campaign id.
Parameters
Section titled “Parameters”campaignId
Section titled “campaignId”string
Returns
Section titled “Returns”Promise<Discount>
getLimits()
Section titled “getLimits()”getLimits():
Promise<DiscountLimits>
Defined in: sdks/hepsiburada/src/resources/promotions.ts:83
Get the seller’s discount limits.
Returns
Section titled “Returns”Promise<DiscountLimits>
listCategories()
Section titled “listCategories()”listCategories():
Promise<PromotionCategory[]>
Defined in: sdks/hepsiburada/src/resources/promotions.ts:49
List the seller’s product categories eligible for self-campaigns.
Returns
Section titled “Returns”Promise<PromotionCategory[]>
listDiscounts()
Section titled “listDiscounts()”listDiscounts(
params?):Promise<Discount[]>
Defined in: sdks/hepsiburada/src/resources/promotions.ts:100
List the seller’s existing discounts.
The API requires page/pagesize (both mandatory per
specs/hepsiburada/diskonto-external.json); the SDK defaults them to
page=1, pagesize=100.
Parameters
Section titled “Parameters”params?
Section titled “params?”ListDiscountsParams = {}
Returns
Section titled “Returns”Promise<Discount[]>
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.