ดึงประวัติการส่ง Event (Delivery History) ของ Webhook Subscription หนึ่ง
ทุกครั้งที่ MeeD พยายามส่ง Event ไปยัง Endpoint ของคุณ ระบบจะบันทึก Delivery record ไว้ — รวมถึงผลลัพธ์ที่ได้รับและจำนวนครั้งที่ Retry
Endpoint นี้เหมาะสำหรับ:
response_status และ response_bodyRETRYING)DEAD เพื่อ Handle ด้วยตนเองread:webhooks
GET /api/partner/v1/webhooks/:id/deliveries
Authorization: Bearer <access_token>
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string (UUID) | Yes | Webhook Subscription ID |
| Parameter | Type | Required | Description |
|---|---|---|---|
| status | string | No | กรองตามสถานะ: PENDING, DELIVERED, RETRYING, DEAD |
| event_type | string | No | กรองตาม Event Type — ดูรายการได้ที่ Create Webhook |
| limit | integer | No | จำนวนรายการต่อหน้า (1–200) ค่าเริ่มต้น 50 |
| cursor | string | No | Cursor สำหรับดึงหน้าถัดไป |
| Status | Description |
|---|---|
| PENDING | รอส่ง (ยังไม่ได้ attempt ครั้งแรก) |
| DELIVERED | ส่งสำเร็จ — Endpoint ตอบกลับ 2xx |
| RETRYING | ส่งล้มเหลว กำลัง Retry — ดูเวลา attempt ถัดไปที่ next_retry_at |
| DEAD | Retry ครบ 5 ครั้งแล้วยังไม่สำเร็จ — ต้อง Handle Event ด้วยตนเอง |
ดู Retry schedule ที่ Payload & Signatures
Endpoint นี้ใช้ Cursor-based Pagination
หาก has_more เป็น true ให้ส่ง next_cursor กลับมาใน parameter cursor
GET /api/partner/v1/webhooks/:id/deliveries?cursor=<next_cursor>
curl -X GET \
"https://<host>/api/partner/v1/webhooks/a1b2c3d4-0000-0000-0000-000000000001/deliveries?status=DEAD&limit=50" \
-H "Authorization: Bearer <access_token>"
{
"data": [
{
"id": "d1e2f3a4-0000-0000-0000-000000000001",
"event_type": "sales.order.completed",
"status": "DELIVERED",
"attempt_count": 1,
"response_status": 200,
"response_body": "ok",
"delivered_at": "2026-06-16T10:30:05.123Z",
"next_retry_at": null,
"created_at": "2026-06-16T10:30:00.000Z",
"updated_at": "2026-06-16T10:30:05.123Z"
}
],
"pagination": {
"next_cursor": null,
"has_more": false,
"limit": 50
}
}
| Field | Type | Description |
|---|---|---|
| id | string (UUID) | Delivery ID |
| event_type | string | ประเภท Event เช่น sales.order.completed |
| status | string | สถานะการส่ง ดู Delivery Status ด้านบน |
| attempt_count | number | จำนวนครั้งที่พยายามส่งแล้ว (รวม attempt ปัจจุบัน) |
| response_status | number | null | HTTP Status ที่ได้รับจาก Endpoint — null หากเกิด Network Error หรือ Timeout |
| response_body | string | null | ส่วนแรก 1,000 ตัวอักษรของ Response Body ที่ได้รับ |
| delivered_at | string (ISO 8601) | null | เวลาที่ส่งสำเร็จ — null หากยังไม่ถึงสถานะ DELIVERED |
| next_retry_at | string (ISO 8601) | null | เวลา Retry ถัดไป — null หากไม่อยู่ในสถานะ RETRYING |
| created_at | string (ISO 8601) | เวลาที่ Event ถูก Dispatch |
| updated_at | string (ISO 8601) | เวลาที่อัปเดตล่าสุด |
404 Not Found
{
"error": "not_found",
"message": "Webhook subscription not found"
}
สาเหตุ:
id ไม่ถูกต้อง