添加商品到销售渠道
PUT https://{handle}.myshopline.com/admin/openapi/v20260301/product_listings/:product_listing_id.json
handle :店铺的唯一标识符,值为店铺域名的前缀。例如,域名为 open001.myshopline.com 的店铺,其 handle 是 open001 。将商品添加到销售渠道
路径参数
- product_listing_id string required商品IDExample:
16057039432335097907370282
请求头
- Content-Type string required字段值固定为
application/json; charset=utf-8。 - Authorization string required资源的访问令牌。参考 应用授权 获取访问令牌,然后将获取到的访问令牌以 Bearer 格式传入。Example:
Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
请求体
product_listingobject
商品信息product_id string商品IDExample:16057039432335097907370282
状态码
- 200
- 401
- 429
更多状态码信息,参考 HTTP 状态码。
响应头
traceId
请求的全局唯一标识符。用于追踪请求在系统中的流转,以便于问题发生时进行定位和调试。
响应体
product_listingobject
商品列表created_at string商品的创建时间Example:2022-12-06T15:13:50+08:00status string商品状态:active - 上架,draft - 下架,archived - 归档Example:activepublished_scope string设置发布范围,值为「web」时表示在线商店Example:webspu stringSPU码Example:S0000000001subtitle string商品摘要Example:This is a subtitletemplate_path string模板路径Example:templates/products/detail.jsonvendor string商品厂商Example:Shoplinetitle string商品标题Example:This is a titlepublished_at string发布到在线商店的时间Example:2022-12-06T15:13:50+08:00imagesobject[]
商品主图列表alt string图片ALTExample:This is a image altsrc string图片地址Example:https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.pnghandle string全局唯一的商品handleExample:product-handlevariantsobject[]
款式列表inventory_policy string是否允许超卖,continue:允许 ,deny:不允许Example:denyinventory_tracker boolean是否追踪库存Example:trueinventory_item_id string库存对象IDExample:5703943240925324252option1 string该款式对应的第一个选项的值Example:Redoption3 string该款式对应的第三个选项的值price string售价Example:90weight string重量Example:0.5barcode string条形码Example:B000000001inventory_quantity integer