跳转到主要内容

Documentation Index

Fetch the complete documentation index at: https://docs.waffo.ai/llms.txt

Use this file to discover all available pages before exploring further.

从门店中移除 Webhook。该操作为硬删除 —— 记录会立即从 store.store_webhooks 中删除,无软删除标记。历史 webhook_deliveries 记录保留以供审计(storeWebhookId 外键被置为 null)。
POST /v1/actions/store/remove-webhook
认证方式: API Key(需要 owner 或 admin 角色)

请求体

字段类型必需说明
idstringWebhook UUID

请求示例

import { WaffoPancake } from "@waffo/pancake-ts";

const client = new WaffoPancake({
  merchantId: process.env.WAFFO_MERCHANT_ID!,
  privateKey: process.env.WAFFO_PRIVATE_KEY!,
});

const { webhook } = await client.webhooks.remove({
  id: "11111111-2222-3333-4444-555555555555",
});
// webhook 包含删除前的记录快照

成功响应 (200)

返回删除前一刻的 Webhook 实体(便于调用方确认所删除的内容)。结构与 add-webhook 相同。

响应字段

字段类型说明
idstringWebhook UUID
storeIdstring所属门店的 UUID
channelstringWebhook 通道
urlstring目标 Webhook URL
eventsstring[]订阅的事件类型
testModebooleantrue 对测试交易触发,false 对生产交易触发
secretstring | null通道特定凭据,未设置时为 null
createdAtstring创建时间戳(ISO 8601)
updatedAtstring最后更新时间戳(ISO 8601)

错误响应

状态码说明
400id 不是合法 UUID
403调用方不是该门店的 owner 或 admin
404Webhook 不存在