设置B2B的Webhook
- 您的端点URL:
http://webhook.endpoint.url
- 请求方法: POST
- CURL示例:
curl -X POST "http://webhook.endpoint.url" \
-H "X-QuoteSnap: $signature" \
-d '{
"product_list": YOUR_PRODUCT_LIST_JSON,
"customer_info": YOUR_CUSTOMER_INFO_JSON
}'
请求头说明:
- 包含
X-QuoteSnap
字段,这是由QuoteSnap服务器发送到客户端的SHA256加密HMAC哈希签名。 - 签名使用SHA256加密,密钥为设置页面生成的
apiKey
,加密数据为商店名称(例如mystore.myshopify.com
)。 - 客户端服务器需验证此HMAC以确保请求来自QuoteSnap服务器。
- 请求头示例:
- 包含
"X-QuoteSnap: $signature"
- 请求体说明:
- 数据类型: 对象
- 请求数据示例:
{
"product_list": [
{
"id": 7975041237150,
"title": "Appointment",
"vendor": "kietdt-store",
"handle": "appointment",
"quantity": 1,
"variant": {
"id": 44057763938462,
"title": null,
"price": 10,
"basePrice": 10,
"sku": null,
"priceText": "10₫"
},
"message": null,
"total": 10,
"totalPrice": "10₫",
"trackingSource": null,
"properties": [],
"pageChoosen": "product",
"priceCountDiscount": 1000,
"currencyShop": "{{amount_no_decimals_with_comma_separator}}₫",
"variants": [
{
"id": 44057763938462,
"title": null,
"price": 10,
"basePrice": 10,
"sku": null,
"priceText": "10₫"
}
],
"product_info": [
{
"id": 139218,
"max": 20,
"min": 0,
"req": 1,
"send": 1,
"type": "text",
"input": "text",
"label": "Detail inquiry",
"width": 100,
"placeholder": "Enter your inquiry",
"value": "aaa"
}
],
"offer_price": null
}
],
"customer_info": [
{
"label": "Name",
"value": "My name"
},
{
"label": "Email",
"value": "[email protected]"
},
{
"label": "Message",
"value": "Quote Snapp"
},
{
"label": "Select",
"value": "Option 1"
}
]
}
```
更新于: 11/08/2025
谢谢!