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