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 đó

Lưu ý:

  • Đối với các API sử dụng cho Shop thì API_KEY: <api_key>. Thông tin base_url của Shop

  • Đối với các API sử dụng cho Partner thì API_KEY: <api_key> - Đây là api_key của chính Partner. Thông tin base_url của Partner

GetWebhooks

post
Body
objectOptional
Responses
200

A successful response

application/json
post
POST $BASE_URL.Webhook/GetWebhooks HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 2

{}
200

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ề:

Trường
Kiểu dữ liệu
Mô tả

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