API lấy danh sách Webhooks
API này hỗ trợ Partner, Shop lấy danh sách các Webhook đã được tạo trước đó
A successful response
POST $BASE_URL.Webhook/GetWebhooks HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 2
{}
A successful response
{
"webhooks": [
{
"created_at": "2025-10-15T03:52:26.117Z",
"entities": [
"call_log"
],
"fields": [
"text"
],
"id": "text",
"metadata": "text",
"states": {
"last_error": {
"error": "text",
"resp_body": "text",
"resp_status": 1,
"retried": 1,
"sent_at": "2025-10-15T03:52:26.117Z"
},
"last_sent_at": "2025-10-15T03:52:26.117Z",
"state": "text"
},
"url": "text"
}
]
}
Request:
curl --location '$BASE_URL.Webhook/GetWebhooks' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer $API_KEY' \
--data '{}'
Response:
{
"webhooks": [
{
"id": "1414892734919211862",
"entities": [
"call_log"
],
"fields": [],
"url": "https://example.com/webhook",
"metadata": "",
"created_at": "2025-09-23T18:05:42Z",
"states": {
"state": "ok",
"last_sent_at": null,
"last_error": null
}
},
{
"id": "1415096549774721835",
"entities": [
"call_log"
],
"fields": [],
"url": "https://example.com/webhook",
"metadata": "",
"created_at": "2025-09-25T03:50:25Z",
"states": {
"state": "ok",
"last_sent_at": null,
"last_error": null
}
}
]
}
Cấu trúc thuộc tính dữ liệu trả về:
webhooks
array of object
Danh sách webhook tồn tại trên hệ thống.
id
string
ID định danh webhook.
entities
array of string
Danh sách loại sự kiện đăng ký.
fields
string
Danh sách các trường chi tiết (nếu có).
url
string
Địa chỉ endpoint webhook.
metadata
string
Thông tin metadata tùy chọn.
created_at
string
Thời gian tạo webhook.
state
string
Trạng thái: "ok" : Gửi thành công, webhook hoạt động bình thường "retry": Gửi thất bại và đang trong tiến trình retry theo backoff "stop": Đã vượt quá cấp retry cuối cùng, webhook bị vô hiệu hóa
last_sent_at
string
Thời điểm gửi gần nhất.
last_error
object
Lỗi gần nhất.
Last updated