Bỏ qua để đến nội dung

Tích hợp

~41 phút đọc

Tích hợp kênh ngoài (Lark, Telegram, Slack, Discord, Google Sheets, Lark Base, WooCommerce, Haravan, Shopify) và quy tắc định tuyến sự kiện.

MethodPathTóm tắtQuyềnNhóm tốc độTương tác
GET/v1/event-typesDanh mục các loại sự kiện webhook công khaiwebhook.readreadScalar
GET/v1/eventsDanh sách sự kiện hệ thống (90 ngày)webhook.readreadScalar
GET/v1/events/{id}Chi tiết sự kiệnwebhook.readreadScalar
GET/v1/integration-deliveries/{idl}Chi tiết một lần gửi tinintegration.readreadScalar
POST/v1/integration-deliveries/{idl}:replayGửi lại một lượt tin thất bạiintegration.replayreplayScalar
GET/v1/integration-templatesDanh sách mẫu tin tiếng Việtintegration.readreadScalar
POST/v1/integration-templatesTạo mẫu tin nhắn tuỳ chỉnhintegration.managewriteScalar
PATCH/v1/integration-templates/{id}Cập nhật mẫu tin tuỳ chỉnhintegration.managewriteScalar
GET/v1/integrationsDanh sách kết nối tích hợpintegration.readreadScalar
POST/v1/integrationsTạo kết nối tích hợp mớiintegration.managewriteScalar
GET/v1/integrations/catalogDanh mục 10 kênh tích hợp sẵnintegration.readreadScalar
GET/v1/integrations/oauth/{kind}/callbackCallback hoàn tất OAuth từ nền tảng ngoàiCông khai, không cần khoáwriteScalar
GET/v1/integrations/oauth/{kind}/startKhởi tạo kết nối OAuth cho kênh ngoàiintegration.managewriteScalar
POST/v1/integrations/telegram:link-codeTạo mã kết nối Telegram 1 bướcintegration.managewriteScalar
GET/v1/integrations/telegram:resolve-chatTìm chat_id cho bot riêng Telegramintegration.managereadScalar
POST/v1/integrations/woocommerce:connect-codeTạo mã kết nối một lần cho plugin WooCommerceintegration.managewriteScalar
POST/v1/integrations/woocommerce:exchangeĐổi mã kết nối 1 bước từ WooCommerceCông khai, không cần khoáwriteScalar
GET/v1/integrations/{id}Chi tiết một kết nối tích hợpintegration.readreadScalar
PATCH/v1/integrations/{id}Cập nhật thông tin kết nối tích hợpintegration.managewriteScalar
DELETE/v1/integrations/{id}Thu hồi / xoá kết nối tích hợpintegration.managewriteScalar
GET/v1/integrations/{id}/deliveriesNhật ký gửi tin tích hợp (30 ngày)integration.readreadScalar
POST/v1/integrations/{id}/deliveries:replay-failedGửi lại hàng loạt tin thất bạiintegration.replayreplayScalar
GET/v1/integrations/{id}/ordersDanh sách đơn hàng thương mạiintegration.readreadScalar
POST/v1/integrations/{id}/orders/{oid}:retry-writebackThử lại ghi ngược trạng thái đơn hàngintegration.managewriteScalar
GET/v1/integrations/{id}/rulesDanh sách quy tắc lọc sự kiệnintegration.readreadScalar
POST/v1/integrations/{id}/rulesTạo quy tắc gửi thông báointegration.managewriteScalar
PATCH/v1/integrations/{id}/rules/{rid}Cập nhật quy tắc gửiintegration.managewriteScalar
DELETE/v1/integrations/{id}/rules/{rid}Xoá quy tắc gửiintegration.managewriteScalar
POST/v1/integrations/{id}/rules/{rid}:previewXem trước kết quả khớp và nội dung tinintegration.readreadScalar
POST/v1/integrations/{id}:pauseTạm dừng gửi thông báointegration.managewriteScalar
POST/v1/integrations/{id}:resumeTiếp tục gửi thông báointegration.managewriteScalar
POST/v1/integrations/{id}:rotate-credentialXoay / đổi credential kết nốiintegration.credential.rotatewriteScalar
POST/v1/integrations/{id}:testGửi tin thử nghiệm [TEST]integration.testreplayScalar
POST/v1/sandbox/events:triggerKích hoạt sự kiện sandbox thử nghiệmwebhook.testwriteScalar
GET/v1/webhook-deliveriesDanh sách lần giao webhookwebhook.readreadScalar
GET/v1/webhook-deliveries/{id}Chi tiết lần giao webhook kèm lịch sử các lần thửwebhook.readreadScalar
POST/v1/webhook-deliveries/{id}:replayPhát lại một lần giao webhook (giữ nguyên webhook-id)webhook.replayreplayScalar
POST/v1/webhook-deliveries:replay-failedPhát lại hàng loạt các lần giao lỗi (giới hạn 30 lần/phút/tổ chức)webhook.replayreplayScalar
GET/v1/webhook-endpointsDanh sách webhook endpointswebhook.readreadScalar
POST/v1/webhook-endpointsTạo webhook endpoint mớiwebhook.managewriteScalar
GET/v1/webhook-endpoints/{id}Chi tiết webhook endpointwebhook.readreadScalar
PATCH/v1/webhook-endpoints/{id}Cập nhật webhook endpointwebhook.managewriteScalar
DELETE/v1/webhook-endpoints/{id}Xoá webhook endpointwebhook.managewriteScalar
POST/v1/webhook-endpoints/{id}:resumeBật lại endpoint đang bị tạm ngưng và xả hàng đợiwebhook.managewriteScalar
POST/v1/webhook-endpoints/{id}:rotate-secretXoay khoá ký webhook (hỗ trợ 2 khoá song song 24 giờ)webhook.managewriteScalar
POST/v1/webhook-endpoints/{id}:testGửi sự kiện thử nghiệm ping tới endpointwebhook.testwriteScalar

Danh mục các loại sự kiện webhook công khai

Quyền: webhook.read Scope: webhooks:write
  • Nhóm tốc độ: read
  • Phản hồi thành công 200: Danh mục sự kiện. — EventTypeListResponse, application/json
  • Mã lỗi: chỉ các mã lỗi chung ở Tổng quan
curl -sS -X GET "https://api.dongtien.pro/v1/event-types" \
-H "Authorization: Bearer $DT_API_KEY"

Mở trong tài liệu tương tác

Danh sách sự kiện hệ thống (90 ngày)

Quyền: webhook.read Scope: webhooks:write
  • Nhóm tốc độ: read
  • Phản hồi thành công 200: Danh sách sự kiện. — EventListResponse, application/json
  • Mã lỗi: chỉ các mã lỗi chung ở Tổng quan
TênVị tríBắt buộcKiểuMô tả
company_idqueryKhôngOrgIdMã công ty / tổ chức (org_…).
typequeryKhôngstring—
limitqueryKhônginteger—
curl -sS -X GET "https://api.dongtien.pro/v1/events" \
-H "Authorization: Bearer $DT_API_KEY"

Mở trong tài liệu tương tác

Chi tiết sự kiện

Quyền: webhook.read Scope: webhooks:write
  • Nhóm tốc độ: read
  • Phản hồi thành công 200: Chi tiết sự kiện. — EventListItem, application/json
  • Mã lỗi riêng của endpoint: resource_not_found
TênVị tríBắt buộcKiểuMô tả
idpathCóEventIdMã sự kiện (evt_…), ổn định qua retry.
curl -sS -X GET "https://api.dongtien.pro/v1/events/$ID" \
-H "Authorization: Bearer $DT_API_KEY"

Mở trong tài liệu tương tác

Chi tiết một lần gửi tin

Xem chi tiết lỗi, phản hồi và thời gian thử lại.

Quyền: integration.read Scope: integrations:read
  • Nhóm tốc độ: read
  • Phản hồi thành công 200: Chi tiết lượt gửi tin — IntegrationDelivery, application/json
  • Mã lỗi riêng của endpoint: resource_not_found
TênVị tríBắt buộcKiểuMô tả
idlpathCóIntegrationDeliveryIdMã lượt gửi tin tích hợp (idl_…).
curl -sS -X GET "https://api.dongtien.pro/v1/integration-deliveries/$IDL" \
-H "Authorization: Bearer $DT_API_KEY"

Mở trong tài liệu tương tác

Gửi lại một lượt tin thất bại

Đưa bản tin thất bại vào hàng đợi gửi lại.

Quyền: integration.replay Scope: integrations:write
  • Nhóm tốc độ: replay
  • Phản hồi thành công 200: Bản tin đã được đưa vào hàng đợi gửi lại — object, application/json
  • Mã lỗi riêng của endpoint: resource_not_found, conflict
TênVị tríBắt buộcKiểuMô tả
idlpathCóIntegrationDeliveryIdMã lượt gửi tin tích hợp (idl_…).
curl -sS -X POST "https://api.dongtien.pro/v1/integration-deliveries/$IDL:replay" \
-H "Authorization: Bearer $DT_API_KEY"

Mở trong tài liệu tương tác

Danh sách mẫu tin tiếng Việt

Lấy các mẫu tin mặc định của hệ thống và mẫu ghi đè theo công ty.

Quyền: integration.read Scope: integrations:read
  • Nhóm tốc độ: read
  • Phản hồi thành công 200: Danh sách mẫu tin — object, application/json
  • Mã lỗi: chỉ các mã lỗi chung ở Tổng quan
TênVị tríBắt buộcKiểuMô tả
kindqueryKhôngIntegrationKindLoại kênh / nền tảng tích hợp.
eventqueryKhôngstring—
curl -sS -X GET "https://api.dongtien.pro/v1/integration-templates" \
-H "Authorization: Bearer $DT_API_KEY"

Mở trong tài liệu tương tác

Tạo mẫu tin nhắn tuỳ chỉnh

Tạo bản mẫu tin ghi đè cho tổ chức.

Quyền: integration.manage Scope: integrations:write
  • Nhóm tốc độ: write
  • Nội dung yêu cầu: object (application/json)
  • Phản hồi thành công 201: Mẫu tin được tạo — IntegrationTemplate, application/json
  • Mã lỗi riêng của endpoint: conflict
curl -sS -X POST "https://api.dongtien.pro/v1/integration-templates" \
-H "Authorization: Bearer $DT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"kind": "telegram",
"event": "transaction.confirmed",
"body": "Đã nhận {amount} từ {counterparty_name}. Nội dung: {memo}",
"locale": "vi"
}'

Mở trong tài liệu tương tác

Cập nhật mẫu tin tuỳ chỉnh

Sửa đổi nội dung mẫu tin của tổ chức.

Quyền: integration.manage Scope: integrations:write
  • Nhóm tốc độ: write
  • Nội dung yêu cầu: object (application/json)
  • Phản hồi thành công 200: Mẫu tin sau khi cập nhật — IntegrationTemplate, application/json
  • Mã lỗi riêng của endpoint: resource_not_found, conflict
TênVị tríBắt buộcKiểuMô tả
idpathCóstring (uuid)—
curl -sS -X PATCH "https://api.dongtien.pro/v1/integration-templates/$ID" \
-H "Authorization: Bearer $DT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"body": "Đã nhận {amount} từ {counterparty_name}. Nội dung: {memo}"
}'

Mở trong tài liệu tương tác

Danh sách kết nối tích hợp

Liệt kê các kênh tích hợp đã thiết lập trong công ty/tổ chức.

Quyền: integration.read Scope: integrations:read
  • Nhóm tốc độ: read
  • Phản hồi thành công 200: Danh sách tích hợp phân trang — IntegrationList, application/json
  • Mã lỗi riêng của endpoint: invalid_cursor
TênVị tríBắt buộcKiểuMô tả
limitqueryKhôngintegerSố phần tử mỗi trang (1–100, mặc định 20).
cursorqueryKhôngCursorCon trỏ phân trang mờ (cur_…) lấy từ next_cursor; không tự tạo hay sửa.
kindqueryKhôngIntegrationKindLoại kênh / nền tảng tích hợp.
statequeryKhôngIntegrationStateTrạng thái tích hợp theo máy trạng thái state-machines.md §11.
curl -sS -X GET "https://api.dongtien.pro/v1/integrations" \
-H "Authorization: Bearer $DT_API_KEY"

Mở trong tài liệu tương tác

Tạo kết nối tích hợp mới

Kết nối 1-2 bước: dán token/URL (draft -> connected), hoặc khởi tạo luồng OAuth (oauth: true, 202). Credential do adapter xác thực rồi được mã hoá niêm phong ngay; WooCommerce kết nối bằng mã từ plugin (woocommerce:connect-code), không dán credential.

Quyền: integration.manage Scope: integrations:write Idempotency-Key: tuỳ chọn
  • Nhóm tốc độ: write
  • Nội dung yêu cầu: object (application/json)
  • Phản hồi thành công 201: Kết nối đã tạo thành công — Integration, application/json
  • Phản hồi thành công 202: Yêu cầu uỷ quyền OAuth — object, application/json
  • Mã lỗi riêng của endpoint: conflict, idempotency_in_flight, idempotency_key_reused
TênVị tríBắt buộcKiểuMô tả
idempotency-keyheaderKhôngstringKhoá chống gửi trùng (≤ 255 ký tự, nên là UUID). Giữ 24 giờ; gửi lại cùng khoá + cùng nội dung trả lại kết quả cũ.
curl -sS -X POST "https://api.dongtien.pro/v1/integrations" \
-H "Authorization: Bearer $DT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"kind": "telegram",
"name": "Telegram nhóm kế toán",
"credential": "7312456890:AAH_secret-token-from-BotFather"
}'

Mở trong tài liệu tương tác

Danh mục 10 kênh tích hợp sẵn

10 kind: Lark, Telegram, Slack, Discord, Custom Webhook, WooCommerce, Haravan, Shopify, Lark Base, Google Sheets kèm trạng thái cấu hình nền tảng.

Quyền: integration.read Scope: integrations:read
  • Nhóm tốc độ: read
  • Phản hồi thành công 200: Danh mục các kênh tích hợp được hỗ trợ — object, application/json
  • Mã lỗi: chỉ các mã lỗi chung ở Tổng quan
curl -sS -X GET "https://api.dongtien.pro/v1/integrations/catalog" \
-H "Authorization: Bearer $DT_API_KEY"

Mở trong tài liệu tương tác

Callback hoàn tất OAuth từ nền tảng ngoài

Nền tảng chuyển trình duyệt về đây. Quyền duy nhất là state 256 bit dùng một lần (không cần phiên): route xác thực HMAC/PKCE, đổi mã lấy token, niêm phong và kích hoạt tích hợp. Khi lúc bắt đầu có redirect_url thì trả 302 về địa chỉ đó kèm result=ok&integration=int_…, ngược lại trả JSON. Mọi lỗi là problem+json.

Quyền: Công khai, không cần khoá
  • Nhóm tốc độ: write
  • Phản hồi thành công 200: Uỷ quyền thành công — object, application/json
  • Mã lỗi riêng của endpoint: resource_not_found
TênVị tríBắt buộcKiểuMô tả
kindpathCóstring—
codequeryKhôngstring—
statequeryCóstring—
shopqueryKhôngstring—
hmacqueryKhôngstring—
errorqueryKhôngstring—
curl -sS -X GET "https://api.dongtien.pro/v1/integrations/oauth/$KIND/callback?state=$STATE"

Mở trong tài liệu tương tác

Khởi tạo kết nối OAuth cho kênh ngoài

Hỗ trợ Slack, Shopify, Haravan, Google Sheets (D49). Người dùng đã đăng nhập sinh state dùng một lần (10 phút; Google Sheets và Haravan kèm PKCE S256) và nhận URL cấp quyền của nền tảng.

Quyền: integration.manage Scope: integrations:write
  • Nhóm tốc độ: write
  • Phản hồi thành công 200: URL chuyển hướng cấp quyền — object, application/json
  • Mã lỗi riêng của endpoint: resource_not_found
TênVị tríBắt buộcKiểuMô tả
kindpathCóstring—
company_idqueryKhôngOrgIdMã công ty / tổ chức (org_…).
shopqueryKhôngstringTên miền shop Shopify/Haravan
namequeryKhôngstringTên hiển thị của kết nối sẽ tạo
redirect_urlqueryKhôngstring (uri)Địa chỉ cùng origin với ứng dụng web để chuyển trình duyệt về sau khi uỷ quyền xong
curl -sS -X GET "https://api.dongtien.pro/v1/integrations/oauth/$KIND/start" \
-H "Authorization: Bearer $DT_API_KEY"

Mở trong tài liệu tương tác

Tạo mã kết nối Telegram 1 bước

Sinh mã kết nối 10 phút. Khách chỉ cần mở bot @DongTienProBot và bấm Start để tự động điền chat_id.

Quyền: integration.manage Scope: integrations:write
  • Nhóm tốc độ: write
  • Nội dung yêu cầu: object (application/json)
  • Phản hồi thành công 200: Mã kết nối và đường dẫn bot — object, application/json
  • Mã lỗi riêng của endpoint: conflict
curl -sS -X POST "https://api.dongtien.pro/v1/integrations/telegram:link-code" \
-H "Authorization: Bearer $DT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Nhóm kế toán Công ty ABC"
}'

Mở trong tài liệu tương tác

Tìm chat_id cho bot riêng Telegram

Gọi getUpdates để tự động tìm chat_id cho khách dùng bot riêng (không lưu token khi chưa tạo).

Quyền: integration.manage Scope: integrations:write
  • Nhóm tốc độ: read
  • Phản hồi thành công 200: Thông tin chat tìm được — object, application/json
  • Mã lỗi: chỉ các mã lỗi chung ở Tổng quan
TênVị tríBắt buộcKiểuMô tả
tokenqueryCóstring—
curl -sS -X GET "https://api.dongtien.pro/v1/integrations/telegram:resolve-chat?token=$TOKEN" \
-H "Authorization: Bearer $DT_API_KEY"

Mở trong tài liệu tương tác

Tạo mã kết nối một lần cho plugin WooCommerce

Người dùng đã đăng nhập khai báo địa chỉ website (https). Mã dùng một lần, hiệu lực 10 phút, gắn với công ty và website đó; plugin đổi mã ở woocommerce:exchange.

Quyền: integration.manage Scope: integrations:write
  • Nhóm tốc độ: write
  • Nội dung yêu cầu: object (application/json)
  • Phản hồi thành công 200: Mã kết nối và hạn dùng — object, application/json
  • Mã lỗi riêng của endpoint: conflict
curl -sS -X POST "https://api.dongtien.pro/v1/integrations/woocommerce:connect-code" \
-H "Authorization: Bearer $DT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"site_url": "https://cuahang.example.vn"
}'

Mở trong tài liệu tương tác

Đổi mã kết nối 1 bước từ WooCommerce

Plugin WooCommerce (không có phiên đăng nhập) đổi mã kết nối lấy API key dt_live_… và signing secret. Quyền duy nhất là mã: dùng một lần, 10 phút, chỉ hợp lệ cho website đã khai báo. Hai giá trị bí mật chỉ xuất hiện trong phản hồi này (Cache-Control: no-store).

Quyền: Công khai, không cần khoá
  • Nhóm tốc độ: write
  • Nội dung yêu cầu: object (application/json)
  • Phản hồi thành công 200: Thông tin kết nối cho plugin — object, application/json
  • Mã lỗi riêng của endpoint: conflict
curl -sS -X POST "https://api.dongtien.pro/v1/integrations/woocommerce:exchange" \
-H "Content-Type: application/json" \
-d '{
"code": "WC-4F7K9Q2M",
"site_url": "https://cuahang.example.vn",
"store_name": "Cửa hàng Hoa Sen"
}'

Mở trong tài liệu tương tác

Chi tiết một kết nối tích hợp

Xem cấu hình, trạng thái hoạt động và gợi nhớ credential (đã che).

Quyền: integration.read Scope: integrations:read
  • Nhóm tốc độ: read
  • Phản hồi thành công 200: Thông tin chi tiết kết nối tích hợp — Integration, application/json
  • Mã lỗi riêng của endpoint: resource_not_found
TênVị tríBắt buộcKiểuMô tả
idpathCóIntegrationIdMã tích hợp (int_…).
curl -sS -X GET "https://api.dongtien.pro/v1/integrations/$ID" \
-H "Authorization: Bearer $DT_API_KEY"

Mở trong tài liệu tương tác

Cập nhật thông tin kết nối tích hợp

Cập nhật tên hoặc cấu hình settings (hợp nhất theo khoá, giá trị null xoá khoá). external_ref chỉ đặt được khi kết nối còn draft.

Quyền: integration.manage Scope: integrations:write
  • Nhóm tốc độ: write
  • Nội dung yêu cầu: object (application/json)
  • Phản hồi thành công 200: Kết nối tích hợp sau cập nhật — Integration, application/json
  • Mã lỗi riêng của endpoint: resource_not_found, conflict
TênVị tríBắt buộcKiểuMô tả
idpathCóIntegrationIdMã tích hợp (int_…).
curl -sS -X PATCH "https://api.dongtien.pro/v1/integrations/$ID" \
-H "Authorization: Bearer $DT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Telegram nhóm kế toán",
"settings": {
"language": "vi"
}
}'

Mở trong tài liệu tương tác

Thu hồi / xoá kết nối tích hợp

Chuyển trạng thái sang revoked, xoá vĩnh viễn credential niêm phong và huỷ webhook nền tảng.

Quyền: integration.manage Scope: integrations:write
  • Nhóm tốc độ: write
  • Phản hồi thành công 200: Kết nối đã được thu hồi — object, application/json
  • Mã lỗi riêng của endpoint: resource_not_found, conflict
TênVị tríBắt buộcKiểuMô tả
idpathCóIntegrationIdMã tích hợp (int_…).
curl -sS -X DELETE "https://api.dongtien.pro/v1/integrations/$ID" \
-H "Authorization: Bearer $DT_API_KEY"

Mở trong tài liệu tương tác

Nhật ký gửi tin tích hợp (30 ngày)

Xem lịch sử phân phối sự kiện, mã trạng thái HTTP, độ trễ và bản xem trước đã che.

Quyền: integration.read Scope: integrations:read
  • Nhóm tốc độ: read
  • Phản hồi thành công 200: Danh sách lịch sử gửi tin — IntegrationDeliveryList, application/json
  • Mã lỗi riêng của endpoint: invalid_cursor, resource_not_found
TênVị tríBắt buộcKiểuMô tả
idpathCóIntegrationIdMã tích hợp (int_…).
limitqueryKhôngintegerSố phần tử mỗi trang (1–100, mặc định 20).
cursorqueryKhôngCursorCon trỏ phân trang mờ (cur_…) lấy từ next_cursor; không tự tạo hay sửa.
is_testqueryKhôngstringtrue: chỉ lượt gửi thử; false: chỉ lượt gửi thật.
curl -sS -X GET "https://api.dongtien.pro/v1/integrations/$ID/deliveries" \
-H "Authorization: Bearer $DT_API_KEY"

Mở trong tài liệu tương tác

POST /v1/integrations/{id}/deliveries:replay-failed

Phần tiêu đề “POST /v1/integrations/{id}/deliveries:replay-failed”

Gửi lại hàng loạt tin thất bại

Gửi lại theo 3 nhóm (Chặn | Chờ | Sẵn sàng). Hỗ trợ dry_run kiểm tra số lượng trước.

Quyền: integration.replay Scope: integrations:write
  • Nhóm tốc độ: replay
  • Nội dung yêu cầu: object (application/json)
  • Phản hồi thành công 200: Kết quả gửi lại hàng loạt — object, application/json
  • Mã lỗi riêng của endpoint: resource_not_found, conflict
TênVị tríBắt buộcKiểuMô tả
idpathCóIntegrationIdMã tích hợp (int_…).
curl -sS -X POST "https://api.dongtien.pro/v1/integrations/$ID/deliveries:replay-failed" \
-H "Authorization: Bearer $DT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"group": "blocked",
"dry_run": false
}'

Mở trong tài liệu tương tác

Danh sách đơn hàng thương mại

Xem các đơn hàng đã đồng bộ và trạng thái ghi nhận thanh toán ngược lại shop.

Quyền: integration.read Scope: integrations:read
  • Nhóm tốc độ: read
  • Phản hồi thành công 200: Danh sách đơn hàng — CommerceOrderList, application/json
  • Mã lỗi riêng của endpoint: invalid_cursor, resource_not_found
TênVị tríBắt buộcKiểuMô tả
idpathCóIntegrationIdMã tích hợp (int_…).
limitqueryKhôngintegerSố phần tử mỗi trang (1–100, mặc định 20).
cursorqueryKhôngCursorCon trỏ phân trang mờ (cur_…) lấy từ next_cursor; không tự tạo hay sửa.
writeback_statequeryKhôngCommerceOrderWritebackStateTrạng thái ghi nhận ngược lại đơn hàng ở cửa hàng (Woo/Shopify/Haravan).
curl -sS -X GET "https://api.dongtien.pro/v1/integrations/$ID/orders" \
-H "Authorization: Bearer $DT_API_KEY"

Mở trong tài liệu tương tác

POST /v1/integrations/{id}/orders/{oid}:retry-writeback

Phần tiêu đề “POST /v1/integrations/{id}/orders/{oid}:retry-writeback”

Thử lại ghi ngược trạng thái đơn hàng

Thử ghi nhận thanh toán lại cho đơn hàng bị lỗi writeback_state='failed'. Chỉ áp dụng cho giao dịch có trạng thái confirmed.

Quyền: integration.manage Scope: integrations:write
  • Nhóm tốc độ: write
  • Phản hồi thành công 200: Kết quả thử ghi lại — object, application/json
  • Mã lỗi riêng của endpoint: resource_not_found, conflict
TênVị tríBắt buộcKiểuMô tả
idpathCóIntegrationIdMã tích hợp (int_…).
oidpathCóstringMã đơn hàng nội bộ hoặc external_order_id
curl -sS -X POST "https://api.dongtien.pro/v1/integrations/$ID/orders/$OID:retry-writeback" \
-H "Authorization: Bearer $DT_API_KEY"

Mở trong tài liệu tương tác

Danh sách quy tắc lọc sự kiện

Lấy các quy tắc định tuyến, lọc tiền, MST, mã đơn riêng (D51) và số dư (D49).

Quyền: integration.read Scope: integrations:read
  • Nhóm tốc độ: read
  • Phản hồi thành công 200: Danh sách quy tắc của kết nối — object, application/json
  • Mã lỗi riêng của endpoint: resource_not_found
TênVị tríBắt buộcKiểuMô tả
idpathCóIntegrationIdMã tích hợp (int_…).
curl -sS -X GET "https://api.dongtien.pro/v1/integrations/$ID/rules" \
-H "Authorization: Bearer $DT_API_KEY"

Mở trong tài liệu tương tác

Tạo quy tắc gửi thông báo

Cấu hình sự kiện, bộ lọc (tài khoản, chiều, số tiền, memo_pattern_id D51, show_balance D49) và mẫu tin.

Quyền: integration.manage Scope: integrations:write
  • Nhóm tốc độ: write
  • Nội dung yêu cầu: object (application/json)
  • Phản hồi thành công 201: Quy tắc được tạo thành công — IntegrationRule, application/json
  • Mã lỗi riêng của endpoint: resource_not_found, conflict
TênVị tríBắt buộcKiểuMô tả
idpathCóIntegrationIdMã tích hợp (int_…).
curl -sS -X POST "https://api.dongtien.pro/v1/integrations/$ID/rules" \
-H "Authorization: Bearer $DT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Báo tiền về trên 5 triệu",
"events": [
"transaction.confirmed"
],
"filters": {
"direction": "in",
"min_amount": 5000000
},
"show_balance": false,
"enabled": true
}'

Mở trong tài liệu tương tác

Cập nhật quy tắc gửi

Chỉnh sửa bộ lọc hoặc bật/tắt quy tắc.

Quyền: integration.manage Scope: integrations:write
  • Nhóm tốc độ: write
  • Nội dung yêu cầu: object (application/json)
  • Phản hồi thành công 200: Quy tắc sau cập nhật — IntegrationRule, application/json
  • Mã lỗi riêng của endpoint: resource_not_found, conflict
TênVị tríBắt buộcKiểuMô tả
idpathCóIntegrationIdMã tích hợp (int_…).
ridpathCóstring (uuid)Mã quy tắc (rule_id)
curl -sS -X PATCH "https://api.dongtien.pro/v1/integrations/$ID/rules/$RID" \
-H "Authorization: Bearer $DT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"events": [
"transaction.created"
],
"filters": {
"direction": "in",
"min_amount": 4500000,
"max_amount": 4500000,
"include_provisional": false,
"memo_pattern_id": "omp_0f5k2m9q4h7t3n8r6v1w0x5yz0"
},
"quiet_hours": {
"timezone": "Asia/Ho_Chi_Minh"
}
}'

Mở trong tài liệu tương tác

Xoá quy tắc gửi

Xoá một quy tắc lọc sự kiện.

Quyền: integration.manage Scope: integrations:write
  • Nhóm tốc độ: write
  • Phản hồi thành công 200: Xoá quy tắc thành công — object, application/json
  • Mã lỗi riêng của endpoint: resource_not_found, conflict
TênVị tríBắt buộcKiểuMô tả
idpathCóIntegrationIdMã tích hợp (int_…).
ridpathCóstring (uuid)Mã quy tắc (rule_id)
curl -sS -X DELETE "https://api.dongtien.pro/v1/integrations/$ID/rules/$RID" \
-H "Authorization: Bearer $DT_API_KEY"

Mở trong tài liệu tương tác

Xem trước kết quả khớp và nội dung tin

Thử nghiệm quy tắc với giao dịch thực tế gần nhất (đã che) hoặc giao dịch mẫu để kiểm tra bộ lọc.

Quyền: integration.read Scope: integrations:read
  • Nhóm tốc độ: read
  • Nội dung yêu cầu: object (application/json)
  • Phản hồi thành công 200: Kết quả xem trước bộ lọc và bản tin — object, application/json
  • Mã lỗi riêng của endpoint: resource_not_found, conflict
TênVị tríBắt buộcKiểuMô tả
idpathCóIntegrationIdMã tích hợp (int_…).
ridpathCóstring (uuid)Mã quy tắc (rule_id)
curl -sS -X POST "https://api.dongtien.pro/v1/integrations/$ID/rules/$RID:preview" \
-H "Authorization: Bearer $DT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sample_tx_id": "tx_0f5k2m9q4h7t3n8r6v1w0x5yz0"
}'

Mở trong tài liệu tương tác

Tạm dừng gửi thông báo

Tạm ngưng phân phối sự kiện ra kênh ngoài.

Quyền: integration.manage Scope: integrations:write
  • Nhóm tốc độ: write
  • Phản hồi thành công 200: Kết nối đã tạm dừng — Integration, application/json
  • Mã lỗi riêng của endpoint: resource_not_found, conflict
TênVị tríBắt buộcKiểuMô tả
idpathCóIntegrationIdMã tích hợp (int_…).
curl -sS -X POST "https://api.dongtien.pro/v1/integrations/$ID:pause" \
-H "Authorization: Bearer $DT_API_KEY"

Mở trong tài liệu tương tác

Tiếp tục gửi thông báo

Kích hoạt lại kết nối đang tạm dừng.

Quyền: integration.manage Scope: integrations:write
  • Nhóm tốc độ: write
  • Phản hồi thành công 200: Kết nối đã tiếp tục hoạt động — Integration, application/json
  • Mã lỗi riêng của endpoint: resource_not_found, conflict
TênVị tríBắt buộcKiểuMô tả
idpathCóIntegrationIdMã tích hợp (int_…).
curl -sS -X POST "https://api.dongtien.pro/v1/integrations/$ID:resume" \
-H "Authorization: Bearer $DT_API_KEY"

Mở trong tài liệu tương tác

Xoay / đổi credential kết nối

Đổi token / webhook URL mới. Yêu cầu xác thực bảo mật nâng cao (step-up ≤15′).

Quyền: integration.credential.rotate Cần xác thực lại gần đây
  • Nhóm tốc độ: write
  • Nội dung yêu cầu: object (application/json)
  • Phản hồi thành công 200: Credential đã được xoay thành công — Integration, application/json
  • Mã lỗi riêng của endpoint: step_up_required, resource_not_found, conflict
TênVị tríBắt buộcKiểuMô tả
idpathCóIntegrationIdMã tích hợp (int_…).
curl -sS -X POST "https://api.dongtien.pro/v1/integrations/$ID:rotate-credential" \
-H "Authorization: Bearer $DT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"credential": "7312456890:AAH_new-token-from-BotFather"
}'

Mở trong tài liệu tương tác

Gửi tin thử nghiệm [TEST]

Gửi 1 tin mẫu đánh dấu [TEST] ra kênh để kiểm tra kết nối. Không kích hoạt nghiệp vụ, trả kết quả ngay kèm idl_….

Quyền: integration.test Scope: integrations:write
  • Nhóm tốc độ: replay
  • Phản hồi thành công 200: Kết quả gửi thử — SendResult, application/json
  • Mã lỗi riêng của endpoint: resource_not_found, conflict
TênVị tríBắt buộcKiểuMô tả
idpathCóIntegrationIdMã tích hợp (int_…).
curl -sS -X POST "https://api.dongtien.pro/v1/integrations/$ID:test" \
-H "Authorization: Bearer $DT_API_KEY"

Mở trong tài liệu tương tác

Kích hoạt sự kiện sandbox thử nghiệm

Quyền: webhook.test Scope: webhooks:write
  • Nhóm tốc độ: write
  • Nội dung yêu cầu: TriggerSandboxEventBody (application/json)
  • Phản hồi thành công 201: Sự kiện sandbox đã được đưa vào hàng đợi. — TriggerSandboxEventResponse, application/json
  • Mã lỗi riêng của endpoint: conflict
curl -sS -X POST "https://api.dongtien.pro/v1/sandbox/events:trigger" \
-H "Authorization: Bearer $DT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "period.locked",
"payload": {
"period": "2026-09",
"by": "kt.truong@congtyabc.vn",
"approved_by": null
},
"company_id": "org_0f5k2m9q4h7t3n8r6v1w0x5yz0"
}'

Mở trong tài liệu tương tác

Danh sách lần giao webhook

Quyền: webhook.read Scope: webhooks:write
  • Nhóm tốc độ: read
  • Phản hồi thành công 200: Danh sách lần giao. — WebhookDeliveryList, application/json
  • Mã lỗi: chỉ các mã lỗi chung ở Tổng quan
TênVị tríBắt buộcKiểuMô tả
endpoint_idqueryKhôngWebhookEndpointIdMã webhook endpoint (whe_…).
company_idqueryKhôngOrgIdMã công ty / tổ chức (org_…).
statequeryKhôngWebhookDeliveryState—
limitqueryKhônginteger—
curl -sS -X GET "https://api.dongtien.pro/v1/webhook-deliveries" \
-H "Authorization: Bearer $DT_API_KEY"

Mở trong tài liệu tương tác

Chi tiết lần giao webhook kèm lịch sử các lần thử

Quyền: webhook.read Scope: webhooks:write
  • Nhóm tốc độ: read
  • Phản hồi thành công 200: Chi tiết lần giao. — WebhookDeliveryDetail, application/json
  • Mã lỗi riêng của endpoint: resource_not_found
TênVị tríBắt buộcKiểuMô tả
idpathCóWebhookDeliveryIdMã lần giao webhook (whd_…).
curl -sS -X GET "https://api.dongtien.pro/v1/webhook-deliveries/$ID" \
-H "Authorization: Bearer $DT_API_KEY"

Mở trong tài liệu tương tác

Phát lại một lần giao webhook (giữ nguyên webhook-id)

Quyền: webhook.replay
  • Nhóm tốc độ: replay
  • Phản hồi thành công 200: Kết quả phát lại. — ReplayDeliveryResponse, application/json
  • Mã lỗi riêng của endpoint: resource_not_found, conflict
TênVị tríBắt buộcKiểuMô tả
idpathCóWebhookDeliveryIdMã lần giao webhook (whd_…).
curl -sS -X POST "https://api.dongtien.pro/v1/webhook-deliveries/$ID:replay" \
-H "Authorization: Bearer $DT_API_KEY"

Mở trong tài liệu tương tác

Phát lại hàng loạt các lần giao lỗi (giới hạn 30 lần/phút/tổ chức)

Quyền: webhook.replay
  • Nhóm tốc độ: replay
  • Nội dung yêu cầu: ReplayFailedDeliveriesBody (application/json)
  • Phản hồi thành công 200: Kết quả phát lại hàng loạt. — ReplayFailedDeliveriesResponse, application/json
  • Mã lỗi riêng của endpoint: conflict
curl -sS -X POST "https://api.dongtien.pro/v1/webhook-deliveries:replay-failed" \
-H "Authorization: Bearer $DT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"group": "blocked",
"endpoint_id": "whe_0f5k2m9q4h7t3n8r6v1w0x5yz0",
"dry_run": false
}'

Mở trong tài liệu tương tác

Danh sách webhook endpoints

Quyền: webhook.read Scope: webhooks:write
  • Nhóm tốc độ: read
  • Phản hồi thành công 200: Danh sách webhook endpoints. — WebhookEndpointList, application/json
  • Mã lỗi: chỉ các mã lỗi chung ở Tổng quan
TênVị tríBắt buộcKiểuMô tả
company_idqueryKhôngOrgIdMã công ty / tổ chức (org_…).
statequeryKhôngWebhookEndpointState—
curl -sS -X GET "https://api.dongtien.pro/v1/webhook-endpoints" \
-H "Authorization: Bearer $DT_API_KEY"

Mở trong tài liệu tương tác

Tạo webhook endpoint mới

Quyền: webhook.manage Scope: webhooks:write
  • Nhóm tốc độ: write
  • Nội dung yêu cầu: CreateWebhookEndpointBody (application/json)
  • Phản hồi thành công 201: Endpoint đã tạo kèm khoá bí mật. — CreateWebhookEndpointResponse, application/json
  • Mã lỗi riêng của endpoint: conflict
curl -sS -X POST "https://api.dongtien.pro/v1/webhook-endpoints" \
-H "Authorization: Bearer $DT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"company_id": "org_0f5k2m9q4h7t3n8r6v1w0x5yz0",
"company_scope": "all",
"url": "https://api.congtyabc.vn/webhooks/dongtien",
"events": [
"transaction.confirmed",
"payment.received"
],
"api_version": "2026-10-19",
"egress": "edge",
"send_full_account": false,
"memo_pattern_id": "omp_0f5k2m9q4h7t3n8r6v1w0x5yz0"
}'

Mở trong tài liệu tương tác

Chi tiết webhook endpoint

Quyền: webhook.read Scope: webhooks:write
  • Nhóm tốc độ: read
  • Phản hồi thành công 200: Chi tiết webhook endpoint. — WebhookEndpoint, application/json
  • Mã lỗi riêng của endpoint: resource_not_found
TênVị tríBắt buộcKiểuMô tả
idpathCóWebhookEndpointIdMã webhook endpoint (whe_…).
curl -sS -X GET "https://api.dongtien.pro/v1/webhook-endpoints/$ID" \
-H "Authorization: Bearer $DT_API_KEY"

Mở trong tài liệu tương tác

Cập nhật webhook endpoint

Quyền: webhook.manage Scope: webhooks:write
  • Nhóm tốc độ: write
  • Nội dung yêu cầu: PatchWebhookEndpointBody (application/json)
  • Phản hồi thành công 200: Endpoint đã cập nhật. — WebhookEndpoint, application/json
  • Mã lỗi riêng của endpoint: resource_not_found, conflict
TênVị tríBắt buộcKiểuMô tả
idpathCóWebhookEndpointIdMã webhook endpoint (whe_…).
curl -sS -X PATCH "https://api.dongtien.pro/v1/webhook-endpoints/$ID" \
-H "Authorization: Bearer $DT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"egress": "edge",
"memo_pattern_id": "omp_0f5k2m9q4h7t3n8r6v1w0x5yz0"
}'

Mở trong tài liệu tương tác

Xoá webhook endpoint

Quyền: webhook.manage Scope: webhooks:write
  • Nhóm tốc độ: write
  • Phản hồi thành công 200: Đã xoá endpoint. — object, application/json
  • Mã lỗi riêng của endpoint: resource_not_found, conflict
TênVị tríBắt buộcKiểuMô tả
idpathCóWebhookEndpointIdMã webhook endpoint (whe_…).
curl -sS -X DELETE "https://api.dongtien.pro/v1/webhook-endpoints/$ID" \
-H "Authorization: Bearer $DT_API_KEY"

Mở trong tài liệu tương tác

Bật lại endpoint đang bị tạm ngưng và xả hàng đợi

Quyền: webhook.manage Scope: webhooks:write
  • Nhóm tốc độ: write
  • Phản hồi thành công 200: Endpoint đã được bật lại. — WebhookEndpointResumeResponse, application/json
  • Mã lỗi riêng của endpoint: resource_not_found, conflict
TênVị tríBắt buộcKiểuMô tả
idpathCóWebhookEndpointIdMã webhook endpoint (whe_…).
curl -sS -X POST "https://api.dongtien.pro/v1/webhook-endpoints/$ID:resume" \
-H "Authorization: Bearer $DT_API_KEY"

Mở trong tài liệu tương tác

Xoay khoá ký webhook (hỗ trợ 2 khoá song song 24 giờ)

Quyền: webhook.manage Scope: webhooks:write
  • Nhóm tốc độ: write
  • Phản hồi thành công 200: Khoá ký mới. — WebhookEndpointRotateSecretResponse, application/json
  • Mã lỗi riêng của endpoint: resource_not_found, conflict
TênVị tríBắt buộcKiểuMô tả
idpathCóWebhookEndpointIdMã webhook endpoint (whe_…).
curl -sS -X POST "https://api.dongtien.pro/v1/webhook-endpoints/$ID:rotate-secret" \
-H "Authorization: Bearer $DT_API_KEY"

Mở trong tài liệu tương tác

Gửi sự kiện thử nghiệm ping tới endpoint

Quyền: webhook.test Scope: webhooks:write
  • Nhóm tốc độ: write
  • Phản hồi thành công 200: Kết quả gửi thử nghiệm. — WebhookEndpointTestResponse, application/json
  • Mã lỗi riêng của endpoint: resource_not_found, conflict
TênVị tríBắt buộcKiểuMô tả
idpathCóWebhookEndpointIdMã webhook endpoint (whe_…).
curl -sS -X POST "https://api.dongtien.pro/v1/webhook-endpoints/$ID:test" \
-H "Authorization: Bearer $DT_API_KEY"

Mở trong tài liệu tương tác

TrườngKiểuBắt buộcMô tả
dataEventTypeItem[]Có—
data[].domainstringCó—
data[].typestringCó—
data[].visibilitystringCóGiá trị: public, internal.
data[].whenstringCó—
objectstringCóGiá trị: list.
TrườngKiểuBắt buộcMô tả
dataEventListItem[]Có—
data[].api_versionstringCó—
data[].created_atTimestampCó—
data[].idEventIdCó—
data[].payloadanyKhông—
data[].typestringCó—
objectstringCóGiá trị: list.
TrườngKiểuBắt buộcMô tả
api_versionstringCó—
created_atTimestampCó—
idEventIdCó—
payloadanyKhông—
typestringCó—
TrườngKiểuBắt buộcMô tả
attemptintegerCó—
created_atTimestampCó—
errorstring | nullKhông—
event_created_atTimestampCó—
event_idstringCó—
http_statusinteger | nullKhông—
idIntegrationDeliveryIdCó—
integration_idIntegrationIdCó—
is_testbooleanCó—
latency_msinteger | nullKhông—
next_retry_atTimestamp | nullKhông—
payload_previewstringCóBản xem trước nội dung đã che số tài khoản và thông tin nhạy cảm
rule_idstring (uuid) | nullKhông—
stateIntegrationDeliveryStateCóGiá trị: queued, sending, delivered, retry_wait, failed, dead, skipped_filter, skipped_quiet, throttled.
TrườngKiểuBắt buộcMô tả
bodystringCó—
created_atTimestampCó—
eventstringCó—
idstring (uuid)Có—
kindIntegrationKindCóGiá trị: lark, telegram, slack, discord, custom_webhook, woocommerce, haravan, shopify, lark_base, google_sheets.
localestringCóGiá trị: vi.
org_idstring (uuid) | nullCónull nếu là mẫu mặc định toàn hệ thống
updated_atTimestampCó—
versionintegerCó—
TrườngKiểuBắt buộcMô tả
dataIntegration[]Có—
data[].created_atTimestampCó—
data[].credential_hintstringCóPhần gợi nhớ đã che của credential, vd: •••a3f9 hoặc @DongTienProBot
data[].directionIntegrationDirectionCóGiá trị: out, in, both.
data[].external_refstring | nullKhông—
data[].idIntegrationIdCó—
data[].kindIntegrationKindCóGiá trị: lark, telegram, slack, discord, custom_webhook, woocommerce, haravan, shopify, lark_base, google_sheets.
data[].last_delivery_atTimestamp | nullKhông—
data[].last_errorstring | nullKhông—
data[].namestringCó—
data[].org_idstring (uuid)Có—
data[].root_idstring (uuid)Có—
data[].settingsmap<string, any>Có—
data[].stateIntegrationStateCóGiá trị: draft, connected, test_ok, active, degraded, error, paused, revoked.
data[].updated_atTimestampCó—
has_morebooleanCó—
next_cursorstring | nullCóCon trỏ trang kế; null khi hết dữ liệu.
objectstringCóGiá trị: list.
TrườngKiểuBắt buộcMô tả
created_atTimestampCó—
credential_hintstringCóPhần gợi nhớ đã che của credential, vd: •••a3f9 hoặc @DongTienProBot
directionIntegrationDirectionCóGiá trị: out, in, both.
external_refstring | nullKhông—
idIntegrationIdCó—
kindIntegrationKindCóGiá trị: lark, telegram, slack, discord, custom_webhook, woocommerce, haravan, shopify, lark_base, google_sheets.
last_delivery_atTimestamp | nullKhông—
last_errorstring | nullKhông—
namestringCó—
org_idstring (uuid)Có—
root_idstring (uuid)Có—
settingsmap<string, any>Có—
stateIntegrationStateCóGiá trị: draft, connected, test_ok, active, degraded, error, paused, revoked.
updated_atTimestampCó—
TrườngKiểuBắt buộcMô tả
dataIntegrationDelivery[]Có—
data[].attemptintegerCó—
data[].created_atTimestampCó—
data[].errorstring | nullKhông—
data[].event_created_atTimestampCó—
data[].event_idstringCó—
data[].http_statusinteger | nullKhông—
data[].idIntegrationDeliveryIdCó—
data[].integration_idIntegrationIdCó—
data[].is_testbooleanCó—
data[].latency_msinteger | nullKhông—
data[].next_retry_atTimestamp | nullKhông—
data[].payload_previewstringCóBản xem trước nội dung đã che số tài khoản và thông tin nhạy cảm
data[].rule_idstring (uuid) | nullKhông—
data[].stateIntegrationDeliveryStateCóGiá trị: queued, sending, delivered, retry_wait, failed, dead, skipped_filter, skipped_quiet, throttled.
has_morebooleanCó—
next_cursorstring | nullCóCon trỏ trang kế; null khi hết dữ liệu.
objectstringCóGiá trị: list.
TrườngKiểuBắt buộcMô tả
dataCommerceOrder[]Có—
data[].amountVndCó—
data[].created_atTimestampCó—
data[].currencystringCóGiá trị: VND.
data[].customer_refstringCóThông tin khách hàng đã băm SHA-256 (tuân thủ PDPL/GDPR)
data[].eventstringCó—
data[].expected_payment_idstring (uuid) | nullKhông—
data[].external_order_idstringCó—
data[].idstring (uuid)Có—
data[].integration_idIntegrationIdCó—
data[].payment_request_idPaymentRequestId | nullKhông—
data[].updated_atTimestampCó—
data[].writeback_attemptsintegerCó—
data[].writeback_errorstring | nullKhông—
data[].writeback_stateCommerceOrderWritebackStateCóGiá trị: pending, done, failed.
has_morebooleanCó—
next_cursorstring | nullCóCon trỏ trang kế; null khi hết dữ liệu.
objectstringCóGiá trị: list.
TrườngKiểuBắt buộcMô tả
created_atTimestampCó—
enabledbooleanCó—
eventsstring[]Có—
filtersIntegrationRuleFiltersCó—
filters.account_idsstring[]Không—
filters.directionstringKhôngGiá trị: in, out, both.
filters.include_provisionalbooleanKhông—
filters.max_amountVndKhông—
filters.memo_code_onlybooleanKhông—
filters.memo_pattern_idMemoPatternIdKhông—
filters.memo_regexstringKhông—
filters.min_amountVndKhông—
filters.mststring[]Không—
idstring (uuid)Có—
integration_idIntegrationIdCó—
namestringCó—
org_idstring (uuid)Có—
quiet_hoursobjectKhông—
quiet_hours.enabledbooleanCó—
quiet_hours.endstringCó—
quiet_hours.startstringCó—
quiet_hours.timezonestringKhông—
show_balancebooleanCóD49: Gửi kèm số dư sau giao dịch (mặc định tắt vì bảng tính và chat nằm ngoài hệ thống)
targetmap<string, any>Không—
template_idstring (uuid) | nullKhông—
updated_atTimestampCó—
TrườngKiểuBắt buộcMô tả
classSendResultClassCóGiá trị: delivered, retry, rate_limited, fatal.
delivery_idIntegrationDeliveryIdKhông—
errorstringKhông—
http_statusintegerKhông—
latency_msintegerKhông—
retry_after_msintegerKhông—
TrườngKiểuBắt buộcMô tả
company_idOrgIdKhông—
payloadmap<string, any>Có—
typestringCóLoại sự kiện gửi tới webhook (Standard Webhooks). Giá trị: transaction.created, transaction.confirmed, transaction.merged, transaction.quarantined, transaction.released, channel.degraded, device.offline, device.online, reconcile.proposed, reconcile.approved, reconcile.rejected, reconcile.reversed, invoice.payment_posted, invoice.payment_writeback_failed, payment.received, payment.partial, payment.overpaid, payment.expired, collect.bill.paid, connection.expiring, connection.failed, apikey.expiring, export.completed, export.failed, export.misa_failed, period.locked, period.unlocked, quota.threshold, cashflow.alert, settlement.payout_variance, obligation.overdue, import.completed, integration.delivery_failed, ping.

Đối tượng khác của nhóm này (xem tài liệu tương tác): TriggerSandboxEventResponse, WebhookDeliveryList, WebhookDeliveryDetail, ReplayDeliveryResponse, ReplayFailedDeliveriesBody, ReplayFailedDeliveriesResponse, WebhookEndpointList, CreateWebhookEndpointBody, CreateWebhookEndpointResponse, WebhookEndpoint, PatchWebhookEndpointBody, WebhookEndpointResumeResponse, WebhookEndpointRotateSecretResponse, WebhookEndpointTestResponse