根据id查询sku
GET https://{handle}.myshopline.com/admin/openapi/v20250601/products/variants/:variant_id.json
handle
:店铺的唯一标识符,值为店铺域名的前缀。例如,域名为 open001.myshopline.com
的店铺,其 handle
是 open001
。根据id查询sku信息
路径参数
- variant_id string required款式IDExample:
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
响应
- 200
- 401
- 429
更多状态码信息请参考 HTTP 状态码
响应头
traceId
traceId
响应体
variantobject
款式信息barcode string条形码Example:T000000001
compare_at_price string原价Example:99
id string款式IDExample:18057039439794751459380282
imageobject
图片alt string图片altExample:This is a image alt
id string图片IDExample:5785060242207917075
src string图片srcExample:https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png
inventory_item_id string库存对象IDExample: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对应的商品IDExample:16057039432335097907370282
required_shipping boolean是否需要发货Example:true
sku stringSKU码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
调试台
示例代码
这篇文章对你有帮助吗?
Error loading component.