需要 read_products 权限点。
更多权限点使用信息,请参考:
GET https://{handle}.myshopline.com/admin/openapi/v20250601/products/variants/:variant_id.json
handle :店铺的唯一标识符,值为店铺域名的前缀。例如,域名为 open001.myshopline.com 的店铺,其 handleopen001
根据id查询sku信息
路径参数
  • variant_id string required
    款式ID
    Example: 18057039439794751459380282
查询参数
  • fields string
    字段列表,逗号分隔
    Example: id,title,barcode
请求头
  • Content-Type required
    字段值固定为application/json; charset=utf-8
  • Authorization string required
    资源的访问令牌。请参考 应用授权 获取访问令牌,然后将获取到的访问令牌以 Bearer 格式传入
    Example:
    Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
响应
更多状态码信息请参考 HTTP 状态码

响应头
  • traceId
    traceId
响应体
  • variantobject
    款式信息
  • barcode string
    条形码
    Example: T000000001
  • compare_at_price string
    原价
    Example: 99
  • id string
    款式ID
    Example: 18057039439794751459380282
  • imageobject
    图片
  • alt string
    图片alt
    Example: This is a image alt
  • id string
    图片ID
    Example: 5785060242207917075
  • src string
    图片src
    Example: https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png
  • inventory_item_id string
    库存对象ID
    Example: 5985060242375689228
  • inventory_policy string
    超卖策略,continue:允许,deny:不允许
    Example: deny
  • inventory_quantity integer
    所有地点的库存数汇总
    Example: 99
  • 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: S0000000001
  • taxable boolean
    是否需要收税
    Example: true
  • title string
    款式标题
    Example: Red/L
  • weight string
    重量
    Example: 0.2
  • weight_unit string
    重量单位, g:克,kg:千克,lb:磅,oz:盎司,zh_kg:公斤
    Example: kg
API Explorer
https://openapiceshidianpu.myshopline.com/admin/openapi/v20250601

ParamOptions

path required
header required
query

Language

curl --request GET \
--url https://openapiceshidianpu.myshopline.com/admin/openapi/v20250601/products/variants/variant_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
{
"variant": {
"barcode": "T0000001",
"id": "18060895302863070249743144",
"title": "L · White"
}
}
这篇文章对你有帮助吗?

Error loading component.

Error loading component.