a1-yandex-kit-webhooks
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseA1 Yandex KIT — Webhooks
A1 Yandex KIT — Webhooks
Communication
沟通规范
Before producing any user-facing message, read and apply
completely.
../a1-yandex-kit/references/merchant-communication.mdCovers the Вебхуки tag of the Yandex KIT e-commerce API: subscribing HTTPS endpoints to
order lifecycle notifications and managing those subscriptions.
Key facts:
- Callback URLs must be HTTPS — plain URLs are rejected.
http:// - Exactly three event types exist: ,
ORDER_STATUS_CHANGEDandORDER_PAYMENT_STATUS_CHANGED.ORDER_DELIVERY_STATUS_CHANGED - is being narrowed (Yandex announced it; no cutoff date given): it will stop firing for the two receipt-technical statuses
ORDER_STATUS_CHANGEDandCREATING_INITIAL_RECEIPT. An integration triggered by those two events must move toCREATING_FINAL_RECEIPTSandORDER_PLACEDrespectively. An integration that merely stores the order's current status needs no change — both statuses stay in theCOMPLETEDenum and inOrderStatus; only the callback disappears.GET /v1/orders/{order_id} - Creating a webhook () returns a signing
CreateWebhookthat is shown only once — persist it immediately; it cannot be retrieved later (delete and recreate the webhook if lost).secret - The signature algorithm is not documented by Yandex. Use the secret to verify that incoming calls are authentic, but check the KIT community chat (https://t.me/+f9qV8snaY1pmM2Ji) or Yandex support for the current signing scheme before relying on any particular construction.
- asks the API to POST a
ValidateWebhookevent to your URL — use it to test reachability after deploying the receiver.WEBHOOK_VALIDATE
For authentication (), the base URL (, all paths under ), the 3 rps rate limit and the error contract, see the skill.
Authorization: Bearer <token>https://api.kit.yandex.net/v1/{code, message, trace_id}a1-yandex-kit在生成任何面向用户的消息之前,请完整阅读并应用文档。
../a1-yandex-kit/references/merchant-communication.md本文档涵盖Yandex KIT电商API的Вебхуки(Webhooks)标签内容:将HTTPS端点订阅至订单生命周期通知,并管理这些订阅。
关键要点:
- 回调URL必须为HTTPS——普通URL会被拒绝。
http:// - 仅存在三种事件类型:、
ORDER_STATUS_CHANGED和ORDER_PAYMENT_STATUS_CHANGED。ORDER_DELIVERY_STATUS_CHANGED - 的触发范围正在缩小(Yandex已宣布,但未给出截止日期):该事件将不再针对
ORDER_STATUS_CHANGED和CREATING_INITIAL_RECEIPT这两个收据技术状态触发。依赖这两个事件的集成需分别迁移至CREATING_FINAL_RECEIPTS和ORDER_PLACED事件。仅需存储订单当前状态的集成无需修改——这两个状态仍会保留在COMPLETED枚举和OrderStatus接口中,仅回调通知会取消。GET /v1/orders/{order_id} - 创建webhook()会返回一个签名
CreateWebhook,该密钥仅显示一次——请立即持久化存储;丢失后无法找回(若丢失需删除并重新创建webhook)。secret - Yandex未公开签名算法。可使用该密钥验证传入请求的真实性,但在依赖特定实现逻辑前,请查看KIT社区聊天群(https://t.me/+f9qV8snaY1pmM2Ji)或联系Yandex支持获取当前签名方案。
- 会请求API向你的URL发送
ValidateWebhook事件——可在部署接收端后用它测试可达性。WEBHOOK_VALIDATE
关于认证方式()、基础URL(,所有路径均在下)、3次/秒的速率限制以及错误约定,请查看技能文档。
Authorization: Bearer <token>https://api.kit.yandex.net/v1/{code, message, trace_id}a1-yandex-kitWorkflow
操作流程
Run the bundled scripts from this skill's directory — they are self-contained
(Node.js >= 20, builtins + a vendored validator, no , no network).
npm install-
Search for the operation you need:bash
node scripts/search_docs.mjs "<query>" [--tag "<Тег>"] [--limit N]Matches operation ids, paths, tags and the Russian summaries/descriptions, e.g..node scripts/search_docs.mjs "создать вебхук" -
Inspect the full contract of one operation — path/query parameters plus the fully dereferenced request/response schemas:bash
node scripts/search_docs.mjs --operation CreateWebhook -
Validate a drafted request body offline before sending anything:bash
node scripts/validate.mjs --operation CreateWebhook --body '<json>' # or: node scripts/validate.mjs --operation CreateWebhook --body-file body.jsonPrints(exit 0) or the list of schema violations (exit 1).VALID -
Execute the operation:
- prefer the matching MCP tool from «Related MCP tools» below (e.g.
mcp-yandex-kit,create_webhook);validate_webhook - any operation without a dedicated tool: the MCP tool — it validates the body against the same schema before sending;
kit_request - or plain HTTP:
(mind the 3 rps limit).
curl -H "Authorization: Bearer $YANDEX_KIT_TOKEN" https://api.kit.yandex.net/v1/...
- prefer the matching
从本技能目录运行内置脚本——脚本为独立运行模式(需Node.js >= 20,仅依赖内置模块和本地验证器,无需,无需网络)。
npm install-
搜索所需操作:bash
node scripts/search_docs.mjs "<查询关键词>" [--tag "<Тег>"] [--limit N]匹配操作ID、路径、标签以及俄文摘要/描述,例如:。node scripts/search_docs.mjs "создать вебхук" -
查看单个操作的完整契约——包含路径/查询参数以及完全解引用的请求/响应 schema:bash
node scripts/search_docs.mjs --operation CreateWebhook -
离线验证拟发送的请求体,再执行发送:bash
node scripts/validate.mjs --operation CreateWebhook --body '<json内容>' # 或:node scripts/validate.mjs --operation CreateWebhook --body-file body.json验证通过会输出(退出码0),否则输出schema违规列表(退出码1)。VALID -
执行操作:
- 优先使用下方「相关MCP工具」中对应的工具(例如
mcp-yandex-kit、create_webhook);validate_webhook - 无专用工具的操作:使用MCP工具——它会在发送前用相同schema验证请求体;
kit_request - 或使用普通HTTP请求:
(注意3次/秒的速率限制)。
curl -H "Authorization: Bearer $YANDEX_KIT_TOKEN" https://api.kit.yandex.net/v1/...
- 优先使用下方「相关MCP工具」中对应的
Endpoints (6 operations)
端点(6个操作)
Вебхуки
Вебхуки(Webhooks)
| Method | Path | OperationId | Summary (RU) |
|---|---|---|---|
| GET | | | Получение списка вебхуков |
| POST | | | Создание вебхука |
| POST | | | Валидация вебхука |
| GET | | | Получение вебхука по уникальному идентификатору |
| PATCH | | | Обновление вебхука |
| DELETE | | | Удаление вебхука |
| Method | Path | OperationId | 摘要(中文) |
|---|---|---|---|
| GET | | | 获取webhook列表 |
| POST | | | 创建webhook |
| POST | | | 验证webhook |
| GET | | | 根据唯一ID获取webhook |
| PATCH | | | 更新webhook |
| DELETE | | | 删除webhook |
Related MCP tools
相关MCP工具
Curated tools for these tags (the server also exposes the meta trio —
, , — reaching all
161 operations):
mcp-yandex-kitsearch_operationsget_operation_schemakit_request- — List all webhooks of the store (not paginated).
list_webhooks - — Get a single webhook by its ID (URL, subscribed events, status).
get_webhook - — Create a new webhook.
create_webhook - — Update an existing webhook: change url (HTTPS only), the subscribed events, or set deactivate=true to switch the webhook to INACTIVE.
update_webhook - — Permanently delete a webhook by its ID.
delete_webhook - — Trigger webhook validation: the API sends a POST with event WEBHOOK_VALIDATE to the webhook URL.
validate_webhook
针对这些标签整理的工具(服务器还暴露了元组工具——、、——可覆盖全部161个操作):
mcp-yandex-kitsearch_operationsget_operation_schemakit_request- — 列出店铺的所有webhook(无分页)。
list_webhooks - — 根据ID获取单个webhook的信息(URL、订阅事件、状态)。
get_webhook - — 创建新的webhook。
create_webhook - — 更新现有webhook:修改URL(仅支持HTTPS)、订阅事件,或设置deactivate=true将webhook切换为INACTIVE状态。
update_webhook - — 根据ID永久删除webhook。
delete_webhook - — 触发webhook验证:API会向webhook URL发送包含WEBHOOK_VALIDATE事件的POST请求。
validate_webhook