商品创建
事件分组 | 事件标识 |
---|---|
products | products/create |
商品创建
请求头
- X-Shopline-Topic string required事件操作标识Example:
orders/edited
- X-Shopline-Hmac-Sha256 string required签名Example:
XWmrwMey6OsLMeiZKwP4FppHH3cmAiiJJAweH5Jo4bM=
- X-Shopline-Shop-Domain string required店铺域名Example:
shophub.myshopline.com
- X-Shopline-Shop-Id string required店铺idExample:
1610418123456
- X-Shopline-Merchant-Id string required商户IDExample:
2000001234
- X-Shopline-API-Version string required版本号Example:
v20210901
- X-Shopline-Webhook-Id string required消息IDExample:
b54557e48a5fbf7d70bcd043
请求体
- body_html string描述Example:
This is a description
- created_at string创建时间Example:
2023-03-02T18:18:42.883+0800
- handle string商品handleExample:
product-handle
- id string商品idExample:
16058287356753569620272670
imageobject
商品主图alt string图片altExample:This is a image alt
src string图片srcExample:https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png
imagesobject[]
图片alt string图片altExample:This is a image alt
src string图片srcExample:https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png
optionsobject[]
选项列表id string选项IDExample:16158288104774469113452670
name string选项名称Example:Color
product_id string对应的商品IDExample:16058287356753569620272670
values array选项值列表Example:["Red", "Green", "White"]
values_images map选项值图Example:[object Object]
- product_behavior string商品行为Example:
RISK,HIDDEN
- product_category string商品聚合类型Example:
Electronic
- product_type string商品类型Example:
Electronic
- published_at string发布到在线商店的时间Example:
2023-03-02T18:18:42.883+0800
- published_scope string发布范围,「web」表示在线商店Example:
web
- spu stringSPU码Example:
S000001
- status string商品状态:active - 上架,draft - 下架,archived - 归档Example:
active
- subtitle string摘要Example:
This is a subtitle
- tags string标签Example:
tag1,tag2
- template_path string主题模板Example:
templates/products/detail.json
- title string标题Example:
This is a title
- updated_at string更新时间Example:
2023-03-02T18:18:42.883+0800
variantsobject[]
款式列表barcode string条形码Example:B000000001
compare_at_price string原价Example:10
id string款式IDExample:18054026339558906501791422
imageobject
图片alt string图片altExample:This is a image alt
src string图片srcExample:https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png
inventory_item_id string库存对象IDExample:5482608456602009969
inventory_policy string是否允许超卖,continue:允许,deny:不允许Example:continue
inventory_quantity integer所有地点的库存数汇总Example:100
inventory_tracker boolean是否追踪库存Example:true
option1 string该款式对应的第一个选项的值Example:Red
option2 string该款式对应的第二个选项的值Example:L
option3 string该款式对应的第三个选项的值option4 string该款式对应的第四个选项的值option5 string该款式对应的第五个选项的值price string销售价Example:20
product_id string对应的商品IDExample:16058287356753569620272670
required_shipping boolean是否需要发货sku stringSKU码Example:T000001
taxable boolean是否需要收税title string款式标题Example:Red/L
weight string重量Example:10
weight_unit string重量单位, g:克 kg:千克 lb:磅 oz:盎司 zh_kg:公斤Example:g
- vendor string商品厂商Example:
Shopline
响应
收到 SHOPLINE 发送的 Webhook 通知后,你需要按照如下 SHOPLINE 要求的格式进行响应。
HTTP/1.1 200 OK
关于如何订阅 Webhooks 及更多 Webhook 响应规则说明,请参考 Webhook 概述。
这篇文章对你有帮助吗?