WebhooksResource
Defined in: sdks/trendyol/src/resources/webhooks.ts:53
Trendyol webhook subscription management.
Max 15 active webhooks per seller (Trendyol-enforced). Webhooks fire on shipment-package status events only — there is no webhook support for product / stock changes.
Trendyol’s gateway authenticates against your endpoint with the
authenticationType you configure. Pick API_KEY over
BASIC_AUTHENTICATION so you can rotate the secret without redeploying.
No HMAC signature — security relies entirely on the auth method you pick + the secret you store with Trendyol.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new WebhooksResource(
transport,limiter?):WebhooksResource
Defined in: sdks/trendyol/src/resources/webhooks.ts:56
Parameters
Section titled “Parameters”transport
Section titled “transport”TrendyolTransport
limiter?
Section titled “limiter?”TokenBucketRateLimiter
Returns
Section titled “Returns”WebhooksResource
Methods
Section titled “Methods”activate()
Section titled “activate()”activate(
webhookId):Promise<MutationResult>
Defined in: sdks/trendyol/src/resources/webhooks.ts:139
Re-activate a previously-deactivated webhook subscription. Documented
response is a bare 200 OK (no body), hence MutationResult.
Parameters
Section titled “Parameters”webhookId
Section titled “webhookId”string | number
Returns
Section titled “Returns”Promise<MutationResult>
create()
Section titled “create()”create(
input):Promise<CreateWebhookResult>
Defined in: sdks/trendyol/src/resources/webhooks.ts:74
Create a new webhook subscription. Trendyol caps subscriptions at 15
per seller — the SDK does NOT pre-check (you’d need to call list()
first), but Trendyol returns 400 when the cap is exceeded.
Trendyol documents the response as { id: string } — the webhook ID
you need for update / delete / activate / deactivate. The SDK
surfaces it as id and keeps the untouched body on raw.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<CreateWebhookResult>
Throws
Section titled “Throws”when url or authenticationType is missing.
deactivate()
Section titled “deactivate()”deactivate(
webhookId):Promise<MutationResult>
Defined in: sdks/trendyol/src/resources/webhooks.ts:155
Deactivate a webhook subscription. Trendyol automatically deactivates
a subscription after persistent delivery failures (and sends 2 emails);
use activate() to bring it back online once your endpoint is healthy.
Documented response is a bare 200 OK (no body), hence MutationResult.
Parameters
Section titled “Parameters”webhookId
Section titled “webhookId”string | number
Returns
Section titled “Returns”Promise<MutationResult>
delete()
Section titled “delete()”delete(
webhookId):Promise<MutationResult>
Defined in: sdks/trendyol/src/resources/webhooks.ts:126
Permanently delete a webhook subscription. Documented response is a
bare 200 OK (no body), hence MutationResult.
Parameters
Section titled “Parameters”webhookId
Section titled “webhookId”string | number
Returns
Section titled “Returns”Promise<MutationResult>
list()
Section titled “list()”list():
Promise<Webhook[]>
Defined in: sdks/trendyol/src/resources/webhooks.ts:89
List all registered webhook subscriptions.
Returns
Section titled “Returns”Promise<Webhook[]>
update()
Section titled “update()”update(
webhookId,input):Promise<MutationResult>
Defined in: sdks/trendyol/src/resources/webhooks.ts:111
Update a webhook subscription. Same input shape as create; replaces
the whole subscription (Trendyol does NOT partially update).
Documented response is a bare 200 OK (no body), hence MutationResult.
Parameters
Section titled “Parameters”webhookId
Section titled “webhookId”string | number
Returns
Section titled “Returns”Promise<MutationResult>
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.