新增商品到销售渠道
| 事件分组 | 事件标识 |
|---|---|
| product_listings | product_listings/add |
将商品添加到销售渠道中
请求头
- X-Shopline-Topic string required事件的唯一标识。例子:
orders/edited - X-Shopline-Hmac-Sha256 string required该请求的签名。收到请求后,你需要对该签名进行 验签 以验证数据的真实性和完整性。例子:
XWmrwMey6OsLMeiZKwP4FppHH3cmAiiJJAweH5Jo4bM= - X-Shopline-Shop-Domain string required店铺的域名。例子:
example.myshopline.com - X-Shopline-Shop-Id string required店铺 ID。例子:
1610418123456 - X-Shopline-Merchant-Id string required商家 ID。例子:
2000001234 - X-Shopline-API-Version string requiredAPI 版本号。例子:
v20250601 - X-Shopline-Webhook-Id string required该 Webhook 事件的 ID。例子:
b54557e48a5fbf7d70bcd043
请求体
product_listingobject
商品信息body_html string商品描述例子:This is a descriptioncreated_at string商品创建时间例子:2023-03-02T18:18:42.883+0800handle string全局唯一的商品handle例子:proudct-handleid string商品id例子:16058287356753559620272670imagesobject[]
商品主图列表alt string图片ALT例子:This is a image altsrc string图片地址例子:https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.pngoptionsobject[]
选项列表id string选项ID例子:16158288104774469113452670name string选项名称例子:Coloroption_valuesobject[]
选项值列表。id string选项值 ID。例子:16247051995358890915900034value string选项值。例子:Redproduct_id string对应的商品ID例子:16058287356753569620272670values array选项值列表。与 option_values 返回数据一致,不包含选项值 ID。例子:["[\"Red\", \"Green\", \"White\"]"]values_images map选项值图例子:{}product_behavior string商品行为例子:RISK,HIDDENproduct_category string商品聚合类型例子:Electronicproduct_type string商品类型例子:Electronicpublished_at string发布到在线商店的时间例子:2023-03-02T18:18:42.883+0800published_scope string发布范围,「web」表示在线商店例子:webspu stringSPU码例子:S000000001status string商品状态:active - 上架,draft - 下架,archived - 归档例子:activesubtitle string商品摘要例子:This is a subtitletags string标签,多个用逗号分隔例子:tag1,tag2template_path string主题模板例子:templates/products/detail.jsontitle string商品标题例子:This is a titleupdated_at string商品更新时间例子:2023-03-02T18:18:42.883+0800variantsobject[]
款式列表barcode string条形码例子:B0000000001compare_at_price string原价例子:1id string款式ID例子:18058288104774469113432670imageobject
款式图alt string图片alt例子:This is a image altsrc string图片src例子:https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.pnginventory_policy string是否允许超卖,continue:允许,deny:不允许例子:continueinventory_quantity integer所有地点的库存数汇总例子:1inventory_tracker boolean是否追踪库存例子:trueoption1 string该款式对应的第一个选项的值例子:Redoption2 string该款式对应的第二个选项的值例子:Loption3 string该款式对应的第三个选项的值option4 string该款式对应的第四个选项的值option5 string该款式对应的第五个选项的值price string售价例子:1product_id string对应的商品ID例子:16058287356753569620272670required_shipping boolean是否发货sku stringSKU码例子:B0000001taxable boolean是否收税title string款式标题例子:Red/Lweight string重量例子:1weight_unit string重量单位, g:克,kg:千克,lb:磅,oz:盎司例子:gvendor string商品厂商例子:Shopline
状态码
收到 SHOPLINE 发送的 Webhook 通知后,你需要按照如下 SHOPLINE 要求的格式进行响应。
HTTP/1.1 200 OK关于如何订阅 Webhooks 及更多 Webhook 响应规则说明,请参考 Webhook 概述。
这篇文章对你有帮助吗?