Manage Clawver orders. List orders, track status, process refunds, generate download links. Use when asked about customer orders, fulfillment, refunds, or order history.
在您的 Clawver 商店中管理订单——查看订单历史、追踪履约进度、处理退款以及生成下载链接。
关于 claw-social 平台特定的优秀与不良 API 模式,请参考 references/api-examples.md。
bash
curl https://api.clawver.store/v1/orders \
-H Authorization: Bearer $CLAWAPIKEY
bash
订单状态:
| 状态 | 描述 |
|---|---|
| pending | 订单已创建,待付款 |
| confirmed |
paymentStatus 单独报告,可取值 pending、paid、failed、partially_refunded 或 refunded。
bash
curl https://api.clawver.store/v1/orders?limit=20 \
-H Authorization: Bearer $CLAWAPIKEY
支持 limit 参数。此端点当前未开放基于游标的分页功能。
bash
curl https://api.clawver.store/v1/orders/{orderId} \
-H Authorization: Bearer $CLAWAPIKEY
对于按需打印商品,订单负载包含:
注意:自 2026 年 2 月起,所有 POD 结账商品均需提供 variantId。缺货变体将被拒绝。
bash
curl https://api.clawver.store/v1/orders/{orderId}/download/{itemId} \
-H Authorization: Bearer $CLAWAPIKEY
当客户报告下载问题或请求新链接时使用此接口。
bash
curl https://api.clawver.store/v1/orders/{orderId}/download/{itemId}/public?token={downloadToken}
下载令牌按订单商品发放,可在结账收据中返回(GET /v1/checkout/{checkoutId}/receipt)。
bash
curl https://api.clawver.store/v1/orders/{orderId}/public?token={orderStatusToken}
bash
curl https://api.clawver.store/v1/checkout/{checkoutId}/receipt
bash
curl -X POST https://api.clawver.store/v1/orders/{orderId}/refund \
-H Authorization: Bearer $CLAWAPIKEY \
-H Content-Type: application/json \
-d {
amountInCents: 2499,
reason: 客户要求退款
}
bash
curl -X POST https://api.clawver.store/v1/orders/{orderId}/refund \
-H Authorization: Bearer $CLAWAPIKEY \
-H Content-Type: application/json \
-d {
amountInCents: 500,
reason: 因缺少商品部分退款
}
注意事项:
对于按需打印订单,发货后可获取追踪信息:
bash
curl https://api.clawver.store/v1/orders/{orderId} \
-H Authorization: Bearer $CLAWAPIKEY
检查响应中的 trackingUrl、trackingNumber 和 carrier 字段。
bash
curl -X POST https://api.clawver.store/v1/webhooks \
-H Authorization: Bearer $CLAWAPIKEY \
-H Content-Type: application/json \
-d {
url: https://your-server.com/webhook,
events: [order.shipped, order.fulfilled],
secret: your-secret-min-16-chars
}
接收实时通知:
bash
curl -X POST https://api.clawver.store/v1/webhooks \
-H Authorization: Bearer $CLAWAPIKEY \
-H Content-Type: application/json \
-d {
url: https://your-server.com/webhook,
events: [order.created, order.paid, order.refunded],
secret: your-webhook-secret-16chars
}
签名格式:
X-Claw-Signature: sha256=abc123...
验证(Node.js):
javascript
const crypto = require(crypto);
function verifyWebhook(body, signature, secret) {
const expected = sha256= + crypto
.createHmac(sha256, secret)
.update(body)
.digest(hex);
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expected)
);
}
python
for order in orders:
print(f - {order[id]}:${order[totalInCents]/100:.2f})
python
def processrefund(orderid, amount_cents, reason):
# 获取订单详情
response = api.get(f/v1/orders/{order_id})
order = response[data][order]
# 检查是否可退款
if order[paymentStatus] not in [paid, partially_refunded]:
return 订单无法退款
# 处理退款
result = api.post(f/v1/orders/{order_id}/refund, {
amountInCents: amount_cents,
reason: reason
})
return f已退款 ${amount_cents/100:.2f}
python
def handlewrongsize(order_id):
response = api.get(f/v1/orders/{order_id})
order = response[data][order]
for item in order[items]:
if item.get(productType) == printondemand:
print(变体 ID:, item.get(variantId))
print(变体名称:, item.get(variantName))
# 在发起退款/换货流程前确认所选变体。
python
def resenddownload(orderid, item_id):
# 生成新的下载链接
response = api.get(f/v1/orders/{orderid}/download/{itemid})
return response[data][downloadUrl]
待付款 → 已确认 → 处理中 → 已发货 → 已送达
↓
已取消 / 已退款 (paymentStatus)
数字产品: 已确认 → 已送达(即时履约)
POD 产品: 已确认 → 处理中 → 已发货 → 已送达
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 clawver-orders-1776354018 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 clawver-orders-1776354018 技能
skillhub install clawver-orders-1776354018
文件大小: 3.81 KB | 发布时间: 2026-4-17 14:03