事件分组事件标识
productsproducts/create
执行商品创建后,你会接到此通知。你可以获得返回的商品创建信息。
关于如何订阅 Webhooks 及收到 Webhook 后该如何进行响应,请参考 Webhook 概述。
请求头
  • 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
请求体
  • body_html string
    商品描述。最大限制:512 k
    例子: This is a description
  • created_at string
    创建商品的日期和时间,该字段值遵循 ISO 8601 标准时间格式。
    例子: 2023-03-02T18:18:42.883+0800
  • handle string
    商品的 handle,基于商品标题自动生成的唯一标识。
    例子: spring-women's-clothing
  • id string
    商品的唯一标识 ID。
    最大长度限制:64
    例子: 16058287356753569620272670
  • imageobject
    商品的主图
  • alt string
    用于分享图像的性质或内容的单词或短语。
    例子: This is a image alt
  • src string
    以 URL 形式表示的图像位置。
    例子: https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png
  • imagesobject[]
    商品的图片列表。
  • alt string
    用于分享图像的性质或内容的单词或短语。
    例子: This is a image alt
  • src string
    以 URL 形式表示的图像位置。
    例子: 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。
    最大长度限制:64
    例子: 16058287356753569620272670
  • values array
    选项值列表。与 option_values 返回数据一致,不包含选项值 ID。
    例子: ["[\"Red\", \"Green\", \"White\"]"]
  • values_images map
    选项值对应的图片。
    例子: {}
  • product_behavior string
    商品行为
    例子: RISK,HIDDEN
  • product_category string
    商品类别。
    例子: Electronic
  • product_type string
    商品类型,有效枚举值包括:
    • NORMAL:正常商品
    • POD_TEMPORARY:POD临时商品
    • TEMPORARY:临时商品
    例子: Electronic
  • published_at string
    商品发布到在线商店的时间,该字段值遵循 ISO 8601 标准时间格式。
    例子: 2023-03-02T18:18:42.883+0800
  • published_scope string
    设置发布范围,值为web时表示在线商店。
    例子: web
  • spu string
    商品的SPU码。
    例子: S000001
  • status string
    商品状态,有效枚举值包括:
    • activated:上架
    • deactivated:下架
    • archived:归档
    例子: active
  • subtitle string
    商品的副标题。
    例子: This is a subtitle
  • tags string
    商品的标签。
    最大数量限制:250
    单字符串最大长度限制:255
    例子: tag1,tag2
  • template_path string
    商品的主题模板。
    例子: templates/products/detail.json
  • title string
    商品的标题。
    最大长度限制:255
    例子: spring women's clothing
  • updated_at string
    更新时间,该字段值遵循 ISO 8601 标准时间格式。
    例子: 2023-03-02T18:18:42.883+0800
  • variantsobject[]
    商品款式列表
  • barcode string
    条形码
    例子: B000000001
  • compare_at_price string
    商品变体的原价,价格数值保留到小数点后两位。
    例子: 10
  • id string
    商品款式ID。
    例子: 18054026339558906501791422
  • imageobject
    商品变体的图片
  • alt string
    用于分享图像的性质或内容的单词或短语。
    例子: This is a image alt
  • src string
    以 URL 形式表示的图像位置。
    例子: https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png
  • inventory_item_id string
    库存的唯一标识 ID。
    最大长度限制:64
    例子: 5482608456602009969
  • inventory_policy string
    超卖策略。
    • continue:在商品变体库存完全售空的情况下,客户无法继续订购
    • deny:在商品变体库存完全售空的情况下,客户无法继续订购
    默认值:deny
    例子: continue
  • inventory_quantity integer
    库存数量。
    例子: 100
  • inventory_tracker boolean
    是否追踪库存。
    • true:启用追踪
    • false:不启用追踪
    默认值: false
    例子: true
  • option1 string
    该款式对应的第一个选项的值。
    例子: Red
  • option2 string
    该款式对应的第二个选项的值
    例子: L
  • option3 string
    该款式对应的第三个选项的值
  • option4 string
    该款式对应的第四个选项的值
  • option5 string
    该款式对应的第五个选项的值
  • price string
    商品变体的价格,价格数值保留到小数点后两位。
    例子: 20
  • product_id string
    商品的唯一标识 ID。
    最大长度限制:64
    例子: 16058287356753569620272670
  • required_shipping boolean
    商品是否需要运输。
    • true:需要运输
    • false:不需要运输
    默认值: true
  • sku string
    商品变体的SKU码
    例子: T000001
  • taxable boolean
    是否需要收税。
    • true:需要收税
    • false:不需要收税
    默认值: true
  • title string
    商品变体的标题。
    例子: Red/L
  • weight string
    商品变体的重量(以 weight_unit 定义的单位表示)
    例子: 10
  • weight_unit string
    重变体重量的测量单位。
    参数值描述
    g表示单位克
    kg表示单位千克
    lb表示单位磅
    oz表示单位盎司
    zh_kg表示单位公斤
    例子: g
  • vendor string
    商品厂商
    例子: Shopline
状态码
收到 SHOPLINE 发送的 Webhook 通知后,你需要按照如下 SHOPLINE 要求的格式进行响应。
HTTP/1.1 200 OK
关于如何订阅 Webhooks 及更多 Webhook 响应规则说明,请参考 Webhook 概述
这篇文章对你有帮助吗?