接口访问需要令牌,具体如何获取令牌请参考:身份认证
按 ID 返回 ProductVariant 资源。
Arguments
id ● ID!non-null
要返回的产品变体ID。
Return
availableForSale ● Boolean!non-null
可供出售的变体的可用性
barcode ● String
与产品关联的条形码的值
compareAtPrice ● Money
该变体的原始价格,使用商店的默认货币
createdAt ● Date!non-null
创建变体的日期和时间
defaultCursor ● String!non-null
返回下一个变体的默认光标,按变体 ID 升序排序
displayName ● String!non-null
变体的显示名称,源自产品标题和变体标题
id ● ID!non-null
产品变体的ID,通用的唯一标识符
image ● Image
变体图片
More
inventoryItem ● InventoryItem!non-null
产品库存项目,用于查询库存信息
More
inventoryPolicy ● ProductVariantInventoryPolicy
库存耗尽时是否可以订购产品变体
More
inventoryQuantity ● Int
产品变体的可销售总数量
price ● Money
以默认商店货币表示的产品变体的价格
product ● Product
该变体所属的产品
More
productId ● ID!non-null
该变体所属的产品ID
selectedOptions ● [SelectedOption!]non-null
应用于变体的产品选项列表
More
sku ● String
产品变体的 SKU,区分大小写的字符串
taxable ● Boolean!non-null
该变体在出售时是否需征税
title ● String!non-null
产品变体的标题
updatedAt ● Date!non-null
上次修改产品变型的日期和时间
weight ● Float
产品变型的重量(以 weight_unit 定义的单位表示)
weightUnit ● WeightUnit
变体重量的测量单位。如果未指定 weight_unit,则将应用商店的默认测量单位
More
错误码
关于更多通用错误码说明,参考:状态码和错误码
这篇文章对你有帮助吗?