需要 read_product_listings 权限点。
更多权限点使用信息,请参考:
GET https://{handle}.myshopline.com/admin/openapi/v20250601/product_listings/:product_listing_id.json
handle :店铺的唯一标识符,值为店铺域名的前缀。例如,域名为 open001.myshopline.com 的店铺,其 handleopen001
从销售渠道中,查询指定的商品
路径参数
  • product_listing_id string required
    商品ID
    Example: 16057039432335097907370282
请求头
  • Content-Type required
    字段值固定为application/json; charset=utf-8
  • Authorization string required
    资源的访问令牌。请参考 应用授权 获取访问令牌,然后将获取到的访问令牌以 Bearer 格式传入
    Example:
    Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
响应
更多状态码信息请参考 HTTP 状态码

响应头
  • traceId
    traceId
响应体
  • product_listingobject
    商品列表
  • body_html string
    商品描述
    Example: This is a description
  • created_at string
    创建时间
    Example: 2022-12-06T15:13:50+08:00
  • handle string
    全局唯一的商品handle
    Example: product-handle
  • imagesobject[]
    商品主图列表
  • alt string
    图片ALT
    Example: This is a image alt
  • src string
    图片地址
    Example: https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png
  • optionsobject[]
    商品选项
  • id string
    选项ID
    Example: 16157850264851626133440282
  • name string
    选项名称
    Example: Color
  • product_id string
    商品ID
    Example: 16057039432335097907370282
  • values array
    选项值列表
    Example: ["Red", "Green", "White”]
  • values_images map
    选项值图
    Example: [object Object]
  • product_id string
    商品ID
    Example: 16057039432335097907370282
  • published_at string
    发布到在线商店的时间
    Example: 2022-12-06T15:13:50+08:00
  • published_scope string
    设置发布范围,值为「web」时表示在线商店
    Example: web
  • spu string
    SPU码
    Example: S00000001
  • 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: 2022-12-06T15:13:50+08:00
  • variantsobject[]
    款式列表
  • barcode string
    条形码
    Example: B00000001
  • compare_at_price string
    原价
    Example: 100
  • id string
    款式ID,即skuId
    Example: 18057039432358082693350282
  • imageobject
    款式图片
  • alt string
    图片ALT
    Example: This is a image alt
  • src string
    图片地址
    Example: https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png
  • inventory_item_id string
    库存对象ID
    Example: 5703943240925324252
  • inventory_policy string
    是否允许超卖:continue,deny
    Example: deny
  • 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: 90
  • product_id string
    商品ID
    Example: 16057039432335097907370282
  • required_shipping boolean
    是否需要发货
    Example: true
  • sku string
    SKU码
    Example: T00000001
  • taxable boolean
    是否需要收税
    Example: true
  • title string
    规格标题
    Example: Red/L
  • weight string
    重量
    Example: 0.5
  • weight_unit string
    重量单位, g:克,kg:千克,lb:磅,oz:盎司
    Example: g
  • vendor string
    商品厂商
    Example: Shopline
API Explorer
https://openapiceshidianpu.myshopline.com/admin/openapi/v20250601

ParamOptions

path required
header required

Language

curl --request GET \
--url https://openapiceshidianpu.myshopline.com/admin/openapi/v20250601/product_listings/product_listing_id.json \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw' \
--header 'Content-Type: application/json; charset=utf-8' \
--header 'accept: application/json'
Examples
查询指定商品
Response
{
"product_listing": {
"body_html": "<p>This is a desription</p>",
"created_at": "2023-08-28T11:45:53+08:00",
"handle": "my-product-15",
"images": [
{
"alt": "This is a alt",
"src": "https://img-va.myshopline.com/image/store/2001026666/1653474941510/c4845f8f7cd84ff18f082eaf9c05b820.webp?w=1024&h=1024"
}
],
"options": [
{
"id": "16160878853605069127763144",
"name": "Size",
"product_id": "16060878853599197112313144",
"values": [
"L",
"XL",
"XXL"
],
"values_images": {}
},
{
"id": "16160878853605069127793144",
"name": "Color",
"product_id": "16060878853599197112313144",
"values": [
"White"
],
"values_images": {}
}
],
"product_id": "16060878853599197112313144",
"published_at": "2023-08-28T11:45:53+08:00",
"published_scope": "web",
"spu": "S000000001",
"status": "active",
"subtitle": "This is a subtitle",
"tags": "Spring,T shirt",
"template_path": "templates/products/detail.html",
"title": "My Product 15",
"updated_at": "2023-08-28T19:19:05+08:00",
"variants": [
{
"barcode": "T00000001",
"compare_at_price": "120.00",
"id": "18060878853605069127743144",
"image": {
"alt": "This is a alt",
"src": "https://img-va.myshopline.com/image/store/2001026666/1653474941510/c4845f8f7cd84ff18f082eaf9c05b820.webp?w=1024&h=1024"
},
"inventory_item_id": "6087885361949712083",
"inventory_policy": "continue",
"inventory_quantity": 580,
"inventory_tracker": true,
"option1": "L",
"option2": "White",
"price": "100.00",
"product_id": "16060878853599197112313144",
"required_shipping": true,
"sku": "S00000000101",
"taxable": true,
"title": "L · White",
"weight": "10.00",
"weight_unit": "g"
},
{
"barcode": "B0000000001",
"compare_at_price": "120.00",
"id": "18060878853605069127833144",
"image": {
"alt": "My Product-10",
"src": "https://img-va.myshopline.com/image/store/2001026666/1653474941510/c4845f8f7cd84ff18f082eaf9c05b820.webp?w=1024&h=1024"
},
"inventory_item_id": "6087885361949712081",
"inventory_policy": "deny",
"inventory_quantity": 100,
"inventory_tracker": true,
"option1": "XL",
"option2": "White",
"price": "100.00",
"product_id": "16060878853599197112313144",
"required_shipping": true,
"sku": "S00000000102",
"taxable": true,
"title": "XL · White",
"weight": "50.00",
"weight_unit": "g"
},
{
"barcode": "B0000000001",
"compare_at_price": "120.00",
"id": "18060878853605069127893144",
"image": {
"alt": "My Product-10",
"src": "https://img-va.myshopline.com/image/store/2001026666/1653474941510/c4845f8f7cd84ff18f082eaf9c05b820.webp?w=1024&h=1024"
},
"inventory_item_id": "6087885361949712082",
"inventory_policy": "deny",
"inventory_quantity": 170,
"inventory_tracker": true,
"option1": "XXL",
"option2": "White",
"price": "100.00",
"product_id": "16060878853599197112313144",
"required_shipping": true,
"sku": "S00000000103",
"taxable": true,
"title": "XXL · White",
"weight": "50.00",
"weight_unit": "g"
}
],
"vendor": "Shopline"
}
}
这篇文章对你有帮助吗?