Product Info API 文档
商品-详情
接口信息
- 接口地址:
{your-site-url}/api/skill/product/info
- 基础 URL:
{your-site-url} 需替换为你自己的 fecify 独立站 URL 地址,如 https://your-domain.com/apimanager666
- 请求方式:
GET
- Content-Type:
application/json
- 说明: 此接口为查询接口,用于获取单个商品的详细信息
认证
请求头中需要携带 skill-access-token:
| Header |
值 |
skill-access-token |
{your-skill-access-token} (请替换为你自己的 token) |
请求参数 (Query String)
| 字段 |
类型 |
必填 |
说明 |
id |
int |
✅ 必填 |
商品 ID |
请求示例
cURL
curl --location --request GET '{your-site-url}/api/skill/product/info?id=4625' \
--header 'skill-access-token: {your-skill-access-token}'
返回结果
成功响应
{
"code": 200,
"data": {
"id": 4625,
"shop_id": 15,
"handle": "morden-lighting-nordic-white-black-lamp-shade-floor-lamp-wooden-support-standing-light",
"spu": "7218747113643",
"title": "Nordic White Black Lamp Floor Lamp Wooden Standing",
"sub_title": "",
"body_html": "...",
"feed_title": "",
"feed_description": null,
"meta_is_edit": 1,
"meta_title": "Nordic White Black Lamp Floor Lamp Wooden Standing",
"meta_keywords": "",
"meta_description": "...",
"status": 1,
"availability": 1,
"virtual_sales_count": 0,
"type": 2,
"is_tax": 2,
"vendor": "Lighting Made",
"qty": 198,
"price": "470.00",
"compare_at_price": "500.00",
"sale_count": 0,
"final_sale_count": 0,
"created_at": "2026-02-08 10:35:42",
"updated_at": "2026-05-05 11:10:19",
"is_deleted": 2,
"deleted_at": 0,
"inventory_police": 1,
"inventory_police_type": 1,
"variant_need_image": 1,
"variant_show_image": 3,
"variant_need_note": 1,
"note": "",
"translate_type": 3,
"remote_id": "7218747113643",
"google_product_category": 0,
"google_product_type_id": 0,
"description_json_status": 2,
"description_json": [],
"params_json_status": 2,
"params_json": [],
"short_description_json": [],
"source_id": "",
"source_url": "",
"source_type": 0,
"template_type": "",
"variants": [
{
"id": 42432,
"shop_id": 15,
"product_id": 4625,
"title": "White",
"price": "470.00",
"compare_at_price": "500.00",
"cost_price": "0.00",
"wholesale_price": [
{ "qty": 2, "price": "38.99" },
{ "qty": 5, "price": "18.99" }
],
"sku": "LM4540066",
"gram": 2267,
"position": 0,
"barcode": "",
"image_id": 30233,
"qty": 98,
"option1": "White",
"option2": "",
"option3": "",
"weight": "5.00",
"weight_unit": "lb",
"sale_count": 0,
"note": "",
"created_at": "2026-02-08 10:35:42",
"updated_at": "2026-05-05 11:10:20",
"remote_id": 0,
"source_id": "",
"image": "/product/15/image/2026/02/08/1e0c57ae313ecb06f730ee2e27f31c42.jpg",
"customervip": [
{ "id": 80, "product_id": 4625, "variant_id": 42432, "customervip_id": 11, "price": "15.00", "compare_at_price": "0.00" }
],
"images": [],
"buy_min_count": 0
}
],
"options": [
{
"id": 5135,
"shop_id": 15,
"product_id": 4625,
"name": "Lampshade Color",
"position": 1,
"items": ["White", "Black"],
"created_at": "2026-02-08 10:35:42",
"updated_at": "2026-02-08 10:35:42"
}
],
"images": [
{
"id": 30232,
"product_id": 4625,
"position": 1,
"src": "/product/15/image/2026/02/08/90667114713397b934d471526f73bfd4.jpg",
"alt": "",
"width": 800,
"height": 800,
"ratio": "1.00"
}
],
"videos": [],
"collectionIds": [343, 327, 322, 344, 345],
"tagIds": [
{
"product_id": 4625,
"tag_id": 10,
"tag": { "title": "red", "id": 10, "first_letter": "r" }
}
],
"mergeimages": [
{
"id": 151,
"product_id": 4625,
"position": 1,
"src": "/product/15/image/2026/05/05/9407d10ebdb8a96ad9b77501dad22b8c.png",
"width": 533,
"height": 800,
"ratio": "0.67",
"alt": ""
},
{
"id": 152,
"product_id": 4625,
"position": 2,
"src": "/product/15/image/2026/05/05/2993e6d5a772aa0d057234dbbfecf639.png",
"width": 800,
"height": 760,
"ratio": "1.05",
"alt": ""
}
],
"payafteruse": { "id": 9, "product_id": 4625, "type": 2 },
"glasses_attr": { "id": 446, "shop_id": 15, "product_id": 4625, "...": "..." },
"addition_group_id": "",
"productattr_info": []
},
"message": "success"
}
返回字段说明
| 字段 |
类型 |
说明 |
code |
Number |
状态码,200 表示成功 |
message |
String |
执行结果的文字描述 |
data |
Object |
返回数据 |
data 顶层字段
| 字段 |
类型 |
说明 |
id |
int |
产品 ID |
shop_id |
int |
店铺 ID |
spu |
string |
产品 SPU 编码 |
title |
string |
产品标题 |
sub_title |
string |
产品副标题 |
body_html |
string |
产品描述(HTML) |
handle |
string |
商品 URL handle,用于前台商城访问商品页面的 URL path |
status |
int |
产品状态。1 激活,2 关闭 |
type |
int |
产品规格类型。1 单规格,2 多规格(如颜色、尺码) |
availability |
int |
产品可用性。1 可用,2 不可用。不可用的情况:跟踪库存 && 库存为0不允许购买 && 不存在库存大于0的变体 |
qty |
int |
产品总库存 |
vendor |
string |
产品供应商的名称 |
price |
string |
产品价格。如果是多变体,取最低变体价格的值 |
compare_at_price |
string |
产品划线价。和 price 取自同一个变体的划线价格 |
sale_count |
int |
实际销售个数 |
final_sale_count |
int |
最终销售个数 = 虚拟销量 + 实际销量(virtual_sales_count + sale_count) |
virtual_sales_count |
int |
产品虚拟销量 |
is_tax |
int |
是否收税。1 收税,2 不收税 |
variant_need_image |
int |
规格是否需要图片。1 需要,2 不需要。默认 2 |
variant_show_image |
int |
前台商城规格显示方式。1 显示文字,2 显示图片,3 使用插件默认配置 |
variant_need_note |
int |
变体是否需要备注。1 需要,2 不需要。默认 2 |
inventory_police |
int |
是否跟踪库存。1 跟踪,2 不跟踪。默认 1 |
inventory_police_type |
int |
库存策略。1 库存为0允许购买,2 库存为0不允许购买,3 库存为0自动下架。默认 1 |
is_deleted |
int |
是否已删除(软删除字段,用于回收站恢复商品数据)。1 已删除,2 未删除 |
deleted_at |
int |
软删除的日期时间(时间戳格式),0 表示未删除 |
created_at |
string |
创建时间 |
updated_at |
string |
更新时间 |
data 顶层字段 - SEO 相关
| 字段 |
类型 |
说明 |
meta_title |
string |
SEO 标题(meta title) |
meta_keywords |
string |
SEO 关键字(meta keywords) |
meta_description |
string |
SEO 描述(meta description) |
meta_is_edit |
int |
SEO 信息是否独立编辑。1 非独立编辑,2 独立编辑 |
data 顶层字段 - Feed 相关
| 字段 |
类型 |
说明 |
feed_title |
string |
Feed 标题 |
feed_description |
string |
Feed 描述 |
data 顶层字段 - 同步与来源
| 字段 |
类型 |
说明 |
remote_id |
string |
远程 ID,用于与三方系统同步商品数据 |
source_id |
string |
来源 ID |
source_url |
string |
来源 URL |
source_type |
int |
source 类型。1 代表 1688 |
translate_type |
int |
翻译类型。1 强制翻译,2 只翻译多语言为空的部分,3 不翻译 |
template_type |
string |
模版装修的 template key |
data 顶层字段 - 描述/参数 JSON
| 字段 |
类型 |
说明 |
description_json_status |
int |
描述是否使用 JSON 字段。1 开启,2 关闭 |
description_json |
Array |
描述 JSON 数据 |
params_json_status |
int |
参数是否开启使用 JSON。1 开启,2 关闭 |
params_json |
Array |
参数 JSON 数据 |
short_description_json |
Array |
商品的简短描述(JSON 格式的数组,支持多语言,以 li 标签格式显示) |
data 顶层字段 - 其他
| 字段 |
类型 |
说明 |
note |
string |
商品备注 |
google_product_category |
int |
Google 商品分类 ID |
google_product_type_id |
int |
Google 商品类型 ID |
addition_group_id |
string |
附加分组 ID |
productattr_info |
Array |
产品属性信息 |
data.variants(产品变体/规格)
当为单规格产品时,该数组只有一个子项。
| 字段 |
类型 |
说明 |
id |
int |
变体 ID |
shop_id |
int |
店铺 ID |
product_id |
int |
产品 ID |
title |
string |
规格名称 |
price |
float |
售卖价格 |
compare_at_price |
float |
划线价格 |
cost_price |
float |
成本价格 |
wholesale_price |
Array[Object] |
批发价格(见下方子字段) |
sku |
string |
产品 SKU |
gram |
int |
重量(克) |
weight |
float |
重量 |
weight_unit |
string |
重量单位。可选值:g(克)、kg(千克)、lb(磅)、oz(盎司) |
barcode |
string |
条形码 |
qty |
int |
变体库存,默认 0 |
image_id |
int |
图片 ID |
image |
string |
变体图片路径 |
option1 |
string |
规格值 1 |
option2 |
string |
规格值 2 |
option3 |
string |
规格值 3 |
position |
int |
排序位置 |
note |
string |
变体备注 |
sale_count |
int |
实际销售个数 |
remote_id |
int |
远程 ID,用于与三方系统同步商品数据 |
source_id |
string |
来源 ID |
created_at |
string |
创建时间 |
updated_at |
string |
更新时间 |
buy_min_count |
int |
最小起购数量 |
images |
Array |
变体图片列表 |
customervip |
Array[Object] |
VIP 会员价格(见下方子字段) |
wholesale_price 子字段
wholesale_price 是一个数组,每个元素包含:
| 字段 |
类型 |
说明 |
qty |
int |
批发个数 |
price |
string |
批发价格 |
示例:
"wholesale_price": [
{ "qty": 2, "price": "38.99" },
{ "qty": 5, "price": "18.99" }
]
customervip 子字段
customervip 是一个数组,每个元素包含:
| 字段 |
类型 |
说明 |
id |
int |
记录 ID |
product_id |
int |
产品 ID |
variant_id |
int |
变体 ID |
customervip_id |
int |
VIP 等级 ID |
price |
string |
VIP 价格 |
compare_at_price |
string |
VIP 划线价格 |
data.options(产品规格定义)
单规格产品为空,多规格产品不为空。
| 字段 |
类型 |
说明 |
id |
int |
Option ID |
shop_id |
int |
店铺 ID |
product_id |
int |
产品 ID |
name |
string |
规格名称(如 "Lampshade Color"、"Size") |
position |
int |
规格排序 |
items |
Array[string] |
规格子项数组(如 ["White", "Black"]) |
created_at |
string |
创建时间 |
updated_at |
string |
更新时间 |
data.images(产品图片)
| 字段 |
类型 |
说明 |
id |
int |
图片 ID |
product_id |
int |
产品 ID |
src |
string |
产品图片路径 |
alt |
string |
图片 alt 文本 |
position |
int |
图片排序位置,从 1 开始依次递增。标识为 1 的为主图 |
width |
int |
图片宽度(像素) |
height |
int |
图片高度(像素) |
ratio |
string |
图片宽高比 |
data.videos(产品视频)
| 字段 |
类型 |
说明 |
videos |
Array |
产品视频列表 |
data.collectionIds
| 字段 |
类型 |
说明 |
collectionIds |
Array[int] |
产品所属的专辑 ID 数组。一个产品可以对应多个专辑(多对多关系) |
data.tagIds
| 字段 |
类型 |
说明 |
tagIds |
Array[Object] |
产品关联的 tag 数组 |
tagIds[].product_id |
int |
产品 ID |
tagIds[].tag_id |
int |
Tag ID |
tagIds[].tag.id |
int |
Tag 的 ID |
tagIds[].tag.title |
string |
Tag 标题 |
tagIds[].tag.first_letter |
string |
Tag 首字母 |
data.payafteruse(先用后付)
| 字段 |
类型 |
说明 |
id |
int |
记录 ID |
product_id |
int |
产品 ID |
type |
int |
类型。1 先用后付商品,2 普通商品 |
data.glasses_attr(眼镜属性)
| 字段 |
类型 |
说明 |
id |
int |
记录 ID |
shop_id |
int |
店铺 ID |
product_id |
int |
产品 ID |
size_lens |
int |
镜片尺寸 |
size_inside |
int |
内框尺寸 |
size_length |
int |
镜腿长度 |
button_type |
int |
按钮类型 |
distance_min |
string |
最小距离 |
distance_max |
string |
最大距离 |
sex |
Object |
适用性别(含 value 和 language 字段) |
lens_type |
Object |
镜片类型(含 value 和 language 字段) |
material |
Object |
材质(含 value 和 language 字段) |
created_at |
string |
创建时间 |
updated_at |
string |
更新时间 |
data.mergeimages(合并图片)
| 字段 |
类型 |
说明 |
id |
int |
记录 ID |
product_id |
int |
产品 ID |
position |
int |
图片位置排序 |
src |
string |
图片路径 |
alt |
string |
图片 alt 文字 |
width |
int |
图片高度(像素) |
height |
int |
图片宽度(像素) |
ratio |
string |
宽高比 |
注意事项
id 为必填参数,不传或传无效 ID 将返回错误
- 该接口返回商品的完整信息,包含变体、规格、图片、专辑、标签、VIP价格等所有关联数据
variants[].customervip 仅在站点启用了 VIP 会员功能时返回有效数据
wholesale_price 为变体的批发价格数组,每个元素包含 qty(起批数量)和 price(批发单价)
weight_unit 支持 g、kg、lb、oz 四种单位
remote_id 用于与三方系统(如 ERP)同步商品数据时,记录三方系统的商品 ID
glasses_attr 为眼镜类商品的专有属性,普通商品返回空数据