事件分组事件标识
product_listingsproduct_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 required
    API 版本号。
    例子: v20250601
  • X-Shopline-Webhook-Id string required
    该 Webhook 事件的 ID。
    例子: b54557e48a5fbf7d70bcd043
请求体
  • product_listingobject
    商品信息
  • body_html string
    商品描述
    例子: This is a description
  • created_at string
    商品创建时间
    例子: 2023-03-02T18:18:42.883+0800
  • handle string
    全局唯一的商品handle
    例子: proudct-handle
  • id string
    商品id
    例子: 16058287356753559620272670
  • imagesobject[]
    商品主图列表
  • alt string
    图片ALT
    例子: This is a image alt
  • src string
    图片地址
    例子: https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png
  • optionsobject[]
    选项列表
  • id string
    选项ID
    例子: 16158288104774469113452670
  • name string
    选项名称
    例子: Color
  • option_valuesobject[]
    选项值列表。
  • id string
    选项值 ID。
    例子: 16247051995358890915900034
  • value string
    选项值。
    例子: Red
  • product_id string
    对应的商品ID
    例子: 16058287356753569620272670
  • values array
    选项值列表。与 option_values 返回数据一致,不包含选项值 ID。
    例子: ["[\"Red\", \"Green\", \"White\"]"]
  • values_images map
    选项值图
    例子: {}
  • product_behavior string
    商品行为
    例子: RISK,HIDDEN
  • product_category string
    商品聚合类型
    例子: Electronic
  • product_type string
    商品类型
    例子: Electronic
  • published_at string
    发布到在线商店的时间
    例子: 2023-03-02T18:18:42.883+0800
  • published_scope string
    发布范围,「web」表示在线商店
    例子: web
  • spu string
    SPU码
    例子: S000000001
  • status string
    商品状态:active - 上架,draft - 下架,archived - 归档
    例子: active
  • subtitle string
    商品摘要
    例子: This is a subtitle
  • tags string
    标签,多个用逗号分隔
    例子: tag1,tag2
  • template_path string
    主题模板
    例子: templates/products/detail.json
  • title string
    商品标题
    例子: This is a title
  • updated_at string
    商品更新时间
    例子: 2023-03-02T18:18:42.883+0800
  • variantsobject[]
    款式列表
  • barcode string
    条形码
    例子: B0000000001
  • compare_at_price string
    原价
    例子: 1
  • id string
    款式ID
    例子: 18058288104774469113432670
  • imageobject
    款式图
  • alt string
    图片alt
    例子: This is a image alt
  • src string
    图片src
    例子: https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png
  • inventory_policy string
    是否允许超卖,continue:允许,deny:不允许
    例子: continue
  • inventory_quantity integer
    所有地点的库存数汇总
    例子: 1
  • inventory_tracker boolean
    是否追踪库存
    例子: true
  • option1 string
    该款式对应的第一个选项的值
    例子: Red
  • option2 string
    该款式对应的第二个选项的值
    例子: L
  • option3 string
    该款式对应的第三个选项的值
  • option4 string
    该款式对应的第四个选项的值
  • option5 string
    该款式对应的第五个选项的值
  • price string
    售价
    例子: 1
  • product_id string
    对应的商品ID
    例子: 16058287356753569620272670
  • required_shipping boolean
    是否发货
  • sku string
    SKU码
    例子: B0000001
  • taxable boolean
    是否收税
  • title string
    款式标题
    例子: Red/L
  • weight string
    重量
    例子: 1
  • weight_unit string
    重量单位, g:克,kg:千克,lb:磅,oz:盎司
    例子: g
  • vendor string
    商品厂商
    例子: Shopline
状态码
收到 SHOPLINE 发送的 Webhook 通知后,你需要按照如下 SHOPLINE 要求的格式进行响应。
HTTP/1.1 200 OK
关于如何订阅 Webhooks 及更多 Webhook 响应规则说明,请参考 Webhook 概述
这篇文章对你有帮助吗?