Trendyol
Trendyol Coupons API
The collectable coupons for one Trendyol product's listing, the buy box's or another seller's (seller_id): each coupon's discount (amount or percent), maximum discount, minimum basket, currency, expiry, who issued it, the seller id, the coupon link, whether it is a mega coupon or Plus-only, and the site's messages; plus the product's name, seller and price. Turkish storefront only. Costs 1 credit per request.
Authorizations
AuthorizationstringheaderrequiredBearer authentication header of the form Bearer <token>, where <token> is your Scavio API key (e.g. Bearer sk_live_your_key).
Body
application/jsoncontent_idstringA product's content id: items[].content_id, the number after -p- in a product link. Send content_id or url.
Example: 1164743007
urlstringA product link of any Trendyol storefront, alternative to content_id (a language-only path such as /en/... needs country).
Example: https://www.trendyol.com/samsung/galaxy-a17-4-128-gb-siyah-cep-telefonu-p-975557855
seller_idstringWhich seller's listing to read coupons for: the buy box by default, or another seller from product other_sellers[].seller.id.
Example: 1246625
countrystringdefault:trThe Trendyol storefront, as a lowercase country code. This endpoint serves the Turkish storefront only (tr). International storefronts run no flash or super-discount pages and showed no collectable coupons, so another country answers 400. Names come back in the storefront's language and prices in its currency, never converted; the answer echoes country, language and currency. ge, kz, kg and iq are served by Trendyol as the Turkish storefront, and ie, mt, gb, ru, us, ca, jo and lb are not sold to: they answer 400, not charged.
Example: tr
tr— Turkey, TRY, tr (Turkish) or en (English) or ar (Arabic); default tr. The default.
languagestringThe answer's language, from the storefront's own list (the first is the default): tr tr, en or ar; de and at de; the 15 English-language EU storefronts en; bg bg or en; gr el or en; cz cs or en; hu hu or en; pl pl or en; ro and md ro or en; sk sk or en; rs sr or en; ua uk or en; ae en or ar; sa, qa, kw, om and bh ar or en; az tr. Titles, categories and reviews come back in it. A language the storefront does not serve answers 400.
Example: en
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key", timeout=120)
# Coupons belong to each seller: check the buy box, then another seller.
c = client.trendyol.coupons(content_id="1164743007")["data"]
print(c["product"]["seller"]["name"], c["product"]["price"], c["count"], "coupons")
for x in c["coupons"]:
print(x["discount"], x["discount_type"], "min basket", x["min_basket"], "until", x["valid_until"], x["issued_by"])Response