پرش به محتوا

وب‌هوک | مرجع API

← همهٔ بخش‌های مرجع · آدرس پایه: https://trendism.ir/api/v3

POST /webhook-deliveries/{id}/redeliver

ارسال دوبارهٔ یک رویداد

Send a delivery again

دسترسی لازم: webhooks

پارامترها
نامنوعتوضیح
id (path) *integer (int64)
Idempotency-Key (header) stringA unique string (for example a UUID). Replays the stored response for 24 hours.
پاسخ 202 (Accepted)
نامنوعتوضیح
object *string (accepted)
status *string (queued)

GET /webhook-endpoints

فهرست وب‌هوک‌ها

Your webhook endpoints (for this mode)

دسترسی لازم: webhooks

پاسخ 200 (WebhookEndpointList)
نامنوعتوضیح
object *string (list)
data *WebhookEndpoint[]
next_cursor *string | null

POST /webhook-endpoints

ساخت وب‌هوک (کلید امضا فقط یک بار نمایش داده می‌شود)

Create an endpoint; the signing secret is shown once

دسترسی لازم: webhooks

پارامترها
نامنوعتوضیح
Idempotency-Key (header) stringA unique string (for example a UUID). Replays the stored response for 24 hours.
بدنهٔ درخواست (WebhookEndpointCreate)
نامنوعتوضیح
url *stringhttps only
events string[]Event types, or ["*"] for all (default)
پاسخ 201 (WebhookEndpointCreated)
نامنوعتوضیح
object *string (webhook_endpoint)
id *integer (int64)
url *string
events *string[]
livemode *boolean
active *boolean
failing_since *string (date-time) | null
created_at *string (date-time)
updated_at *string (date-time)
secret *stringThe signing secret (whsec_…). Shown once.

GET /webhook-endpoints/{id}

جزئیات وب‌هوک

An endpoint

دسترسی لازم: webhooks

پارامترها
نامنوعتوضیح
id (path) *integer (int64)
پاسخ 200 (WebhookEndpoint)
نامنوعتوضیح
object *string (webhook_endpoint)
id *integer (int64)
url *string
events *string[]
livemode *boolean
active *boolean
failing_since *string (date-time) | null
created_at *string (date-time)
updated_at *string (date-time)

PATCH /webhook-endpoints/{id}

ویرایش وب‌هوک

Change the URL, the events or turn it on or off

دسترسی لازم: webhooks

پارامترها
نامنوعتوضیح
id (path) *integer (int64)
بدنهٔ درخواست (WebhookEndpointUpdate)
نامنوعتوضیح
active boolean
events string[]
url string
پاسخ 200 (WebhookEndpoint)
نامنوعتوضیح
object *string (webhook_endpoint)
id *integer (int64)
url *string
events *string[]
livemode *boolean
active *boolean
failing_since *string (date-time) | null
created_at *string (date-time)
updated_at *string (date-time)

DELETE /webhook-endpoints/{id}

حذف وب‌هوک

Delete an endpoint

دسترسی لازم: webhooks

پارامترها
نامنوعتوضیح
id (path) *integer (int64)

پاسخ موفق: 204 بدون بدنه

GET /webhook-endpoints/{id}/deliveries

گزارش ارسال‌های وب‌هوک

The endpoint's delivery log

دسترسی لازم: webhooks

پارامترها
نامنوعتوضیح
id (path) *integer (int64)
limit (query) integer1–100, default 25
cursor (query) stringThe next_cursor of the previous page (opaque)
پاسخ 200 (WebhookDeliveryList)
نامنوعتوضیح
object *string (list)
data *WebhookDelivery[]
next_cursor *string | null

POST /webhook-endpoints/{id}/test

ارسال رویداد آزمایشی

Send a test event to the endpoint

دسترسی لازم: webhooks

پارامترها
نامنوعتوضیح
id (path) *integer (int64)
Idempotency-Key (header) stringA unique string (for example a UUID). Replays the stored response for 24 hours.
پاسخ 202 (Accepted)
نامنوعتوضیح
object *string (accepted)
status *string (queued)