开放Api-产品-列表
Api描述:获取产品列表信息
URL: /manager/api/apps/openapi/product/list
格式:json
方式:get
数据请求部分
1.Request Header 参数:
参数名称 | 是否必须 | 类型 | 描述 |
---|---|---|---|
open-access-token | 必须 | String | 在开放api插件中,创建权限后即可获取该token |
2.Request JSON Data(Body):
参数名称 | 是否必须 | 类型 | 描述 |
---|---|---|---|
pageNum | 选填 | String | 第x页 |
pageSize | 选填 | String | 每页的个数 |
title | 选填 | String | 产品标题,用户模糊搜索产品标题 |
status | 选填 | int | 1代表上架,2代表下架 |
created_at_begin | 选填 | String | 创建时间-开始 |
created_at_end | 选填 | String | 创建时间-结束 |
数据返回部分
1.Response JSON Data(Body):
格式:json
参数名称 | 是否必须 | 类型 | 描述 |
---|---|---|---|
code | 必须 | Number | 200 代表成功 |
message | 必须 | String | 执行结果的文字描述信息 |
data | 必须 | Array | api获取的数据保存到data中 |
data > total | 必须 | string | 列表总数 |
data > pageSize | 必须 | string | 列表每页个数 |
data > totalPage | 必须 | string | 列表总页数 |
data > list | 必须 | Array | 列表信息 |
data > list > id | 必须 | int | 产品id |
data > list > title | 必须 | string | 产品标题 |
data > list > sub_title | 选填 | string | 产品副标题 |
data > list > body_html | 必须 | string | 产品描述 |
data > list > meta_title | 选填 | string | 【seo标题】 meta title |
data > list > meta_keywords | 选填 | string | 【seo关键字】 meta keywords |
data > list > meta_description | 选填 | string | 【seo描述】 meta description |
data > list > handle | 选填 | string | 【seo链接】 产品url path, 如果不填写,则使用title字符串生成 |
data > list > status | 选填 | string | 产品状态,1代表上架,2代表下架 ,默认为上架 |
data > list > type | 必填 | string | 产品规格类型,1为单规格,2为多规格(规格指的是颜色,尺码等) |
data > list > virtual_sales_count | 选填 | int | 产品虚拟销量 |
data > list > qty | 选填 | int | 库存 |
data > list > vendor | 选填 | string | 产品厂家名称(品牌名称) |
data > list > variant_need_image | 选填 | int | 产品规格是否需要图片, 1代表需要,2代表不需要 默认为1需要 |
data > list > variant_need_note | 选填 | int | 变体是否需要备注,1代表需要备注,2代表不需要备注 |
data > list > inventory_police | 选填 | int | 是否跟踪库存,1为跟踪,2为不跟踪,默认为1跟踪库存 |
data > list > inventory_police_type | 选填 | int | 1为库存为0,允许购买,2为库存为0不允许购买,3为库存为0,则产品直接下架。(默认为1允许购买) |
data > list > created_at | 选填 | string | 创建事件 |
data > list > updated_at | 选填 | string | 更新事件 |
data > list > variants | 必须 | array | 产品变体(规格) ,当为单规格产品,将属性填写到该部分下面即可(数组只有一个子项) |
data > list > variants > id | 必须 | int | 产品变体-id |
data > list > variants > product_id | 必须 | int | 产品-id |
data > list > variants > title | 必须 | string | 规格名称 |
data > list > variants > cost_price | 选填 | float | 产品变体-成本价格 |
data > list > variants > price | 必填 | float | 产品变体-售卖价格 |
data > list > variants > compare_at_price | 选填 | float | 产品变体-划线价格 |
data > list > variants > sku | 必须/选填 | string | 产品变sku,根据配置项,来决定必填唯一,选填唯一,选填非唯一 |
data > list > variants > gram | 必须 | int | 克 |
data > list > variants > barcode | 选填 | string | 产品变体条形码 |
data > list > variants > image_id | 必须 | int | 图片-id |
data > list > variants > image | 选填 | string | 产品变体图片路径(这里填写路径即可,在保存的时候,会到产品图片表里面查找,找到得到image_id,然后赋值。),注意,这里的image,必须在 images参数中存在,否则将无法保存 |
data > list > variants > qty | 必须 | string | 产品变体库存,默认0 |
data > list > variants > option1 | 选填 | string | 产品变体规格1 |
data > list > variants > option2 | 选填 | string | 产品变体规格2 |
data > list > variants > option3 | 选填 | string | 产品变体规格3 |
data > list > variants > weight | 必须 | string | 产品变体重量 |
data > list > variants > weight_unit | 必须 | string | 产品变体重量单位 |
data > list > variants > note | 选填 | string | 产品变体备注 |
data > list > options | 选填 | array | 单规格为空,多规格必填不为空 |
data > list > options > id | 必须 | int | option id |
data > list > options > product_id | 必须 | int | 产品id |
data > list > options > name | 必须 | string | 规格名称 |
data > list > options > position | 必须 | string | 规格排序 |
data > list > options > items | 必须 | array | 规格子项数组 |
data > list > images | 必填 | array | 产品图片 |
data > list > images > id | 必须 | int | image id |
data > list > images > product_id | 必须 | int | 产品id |
data > list > images > src | 必须 | string | 产品图片路径 |
data > list > images > alt | 选填 | string | 图片 alt |
data > list > images > position | 必须 | string | 产品图片位置,按照顺序,从1开始,依次递增(必须从1开始,标识为1的将作为主图) |
data > list > collection_ids | 选填 | array[int] | 产品对应的 专辑ids 数组,一个产品可以对应多个专辑,是多对多关系,因此这里是数组可以,可以传递多个专辑id |
Response JSON Data(示例数据):
{
"code": 200,
"data": {
"list": [
{
"id": 658,
"handle": "cartoon-bear-printing-womens-cardigan-pajamas-short-sleeve-shorts-household-clothing-suit-lfg5fh",
"spu": "xxxxx",
"title": "Cartoon Bear Printing Women's Cardigan Pajamas Short Sleeve Shorts Household Clothing Suit",
"sub_title": "",
"body_html": "The fashionable cardigan pajamas has a cute cartoon bear print which adds more charm to your look.",
"meta_title": "Cartoon Bear Printing Women's Cardigan Pajamas Short Sleeve Shorts Household Clothing Suit",
"meta_keywords": "",
"meta_description": "The fashionable cardigan pajamas has a cute cartoon bear print which adds more charm to your look.",
"status": 1,
"availability": 1,
"type": 2,
"vendor": "",
"qty": 435,
"created_at": "2023-02-08 11:07:24",
"updated_at": "2023-02-08 11:07:24",
"inventory_police": 1,
"inventory_police_type": 1,
"variant_need_image": 1,
"variant_need_note": 1,
"variants": [
{
"id": 4399,
"product_id": 658,
"title": "Green / M",
"price": "13.28",
"compare_at_price": "0.00",
"cost_price": "0.00",
"sku": "697712001652L28037",
"gram": 0,
"position": 0,
"barcode": "",
"image_id": 7416,
"qty": 79,
"option1": "Green",
"option2": "M",
"option3": "",
"weight": "0.00",
"weight_unit": "kg",
"sale_count": 0,
"note": "",
"image": "https://cdn.fecmall.com/product/15/image/2023/01/30/b169d0172b6e8f474aa47190160434f0.jpg"
},
{
"id": 4400,
"product_id": 658,
"title": "Green / L",
"price": "13.28",
"compare_at_price": "0.00",
"cost_price": "0.00",
"sku": "697712001652M28037",
"gram": 0,
"position": 0,
"barcode": "",
"image_id": 7416,
"qty": 66,
"option1": "Green",
"option2": "L",
"option3": "",
"weight": "0.00",
"weight_unit": "kg",
"sale_count": 0,
"note": "",
"image": "https://cdn.fecmall.com/product/15/image/2023/01/30/b169d0172b6e8f474aa47190160434f0.jpg"
},
{
"id": 4401,
"product_id": 658,
"title": "Green / XL",
"price": "13.28",
"compare_at_price": "0.00",
"cost_price": "0.00",
"sku": "697712001652XL28037",
"gram": 0,
"position": 0,
"barcode": "",
"image_id": 7416,
"qty": 97,
"option1": "Green",
"option2": "XL",
"option3": "",
"weight": "0.00",
"weight_unit": "kg",
"sale_count": 0,
"note": "",
"image": "https://cdn.fecmall.com/product/15/image/2023/01/30/b169d0172b6e8f474aa47190160434f0.jpg"
},
{
"id": 4402,
"product_id": 658,
"title": "Green / 2XL",
"price": "13.28",
"compare_at_price": "0.00",
"cost_price": "0.00",
"sku": "697712001652XXL28037",
"gram": 0,
"position": 0,
"barcode": "",
"image_id": 7416,
"qty": 123,
"option1": "Green",
"option2": "2XL",
"option3": "",
"weight": "0.00",
"weight_unit": "kg",
"sale_count": 0,
"note": "",
"image": "https://cdn.fecmall.com/product/15/image/2023/01/30/b169d0172b6e8f474aa47190160434f0.jpg"
},
{
"id": 4403,
"product_id": 658,
"title": "Green / 3XL",
"price": "13.28",
"compare_at_price": "0.00",
"cost_price": "0.00",
"sku": "697712001652XXXL28037",
"gram": 0,
"position": 0,
"barcode": "",
"image_id": 7416,
"qty": 70,
"option1": "Green",
"option2": "3XL",
"option3": "",
"weight": "0.00",
"weight_unit": "kg",
"sale_count": 0,
"note": "",
"image": "https://cdn.fecmall.com/product/15/image/2023/01/30/b169d0172b6e8f474aa47190160434f0.jpg"
}
],
"options": [
{
"id": 835,
"product_id": 658,
"name": "Color",
"position": 1,
"items": [
"Green"
]
},
{
"id": 836,
"product_id": 658,
"name": "Size",
"position": 2,
"items": [
"M",
"L",
"XL",
"2XL",
"3XL"
]
}
],
"images": [
{
"id": 7415,
"product_id": 658,
"position": 1,
"src": "https://cdn.fecmall.com/product/15/image/2023/01/30/5b17ccf2483c46a900f569aac7924c61.jpg",
"alt": ""
},
{
"id": 7416,
"product_id": 658,
"position": 2,
"src": "https://cdn.fecmall.com/product/15/image/2023/01/30/b169d0172b6e8f474aa47190160434f0.jpg",
"alt": ""
},
{
"id": 7417,
"product_id": 658,
"position": 3,
"src": "https://cdn.fecmall.com/product/15/image/2023/01/30/7ffd9f95c0c286688a4227ada013ad46.jpg",
"alt": ""
},
{
"id": 7418,
"product_id": 658,
"position": 4,
"src": "https://cdn.fecmall.com/product/15/image/2023/01/30/c9e676731970bce0df818ad76c8ec6ea.jpg",
"alt": ""
},
{
"id": 7419,
"product_id": 658,
"position": 5,
"src": "https://cdn.fecmall.com/product/15/image/2023/01/30/480d64f2fca90319e4d899d6f63a8735.jpeg",
"alt": ""
},
{
"id": 7420,
"product_id": 658,
"position": 6,
"src": "https://cdn.fecmall.com/product/15/image/2023/01/30/3f0b6db5065e0ac910940f3b0bd8e445.jpg",
"alt": ""
}
],
"collectionIds": [
44
]
},
{
"id": 657,
"handle": "cartoon-bear-printing-womens-cardigan-pajamas-short-sleeve-shorts-household-clothing-suit-i5oc75",
"spu": "xxxxx",
"title": "Cartoon Bear Printing Women's Cardigan Pajamas Short Sleeve Shorts Household Clothing Suit",
"sub_title": "",
"body_html": "The fashionable cardigan pajamas has a cute cartoon bear print which adds more charm to your look.",
"meta_title": "Cartoon Bear Printing Women's Cardigan Pajamas Short Sleeve Shorts Household Clothing Suit",
"meta_keywords": "",
"meta_description": "The fashionable cardigan pajamas has a cute cartoon bear print which adds more charm to your look.",
"status": 1,
"availability": 1,
"type": 2,
"vendor": "",
"qty": 435,
"created_at": "2023-02-08 11:07:21",
"updated_at": "2023-02-08 11:07:21",
"inventory_police": 1,
"inventory_police_type": 1,
"variant_need_image": 1,
"variant_need_note": 1,
"variants": [
{
"id": 4394,
"product_id": 657,
"title": "Green / M",
"price": "13.28",
"compare_at_price": "0.00",
"cost_price": "0.00",
"sku": "697712001652L28037",
"gram": 0,
"position": 0,
"barcode": "",
"image_id": 7410,
"qty": 79,
"option1": "Green",
"option2": "M",
"option3": "",
"weight": "0.00",
"weight_unit": "kg",
"sale_count": 0,
"note": "",
"image": "https://cdn.fecmall.com/product/15/image/2023/01/30/b169d0172b6e8f474aa47190160434f0.jpg"
},
{
"id": 4395,
"product_id": 657,
"title": "Green / L",
"price": "13.28",
"compare_at_price": "0.00",
"cost_price": "0.00",
"sku": "697712001652M28037",
"gram": 0,
"position": 0,
"barcode": "",
"image_id": 7410,
"qty": 66,
"option1": "Green",
"option2": "L",
"option3": "",
"weight": "0.00",
"weight_unit": "kg",
"sale_count": 0,
"note": "",
"image": "https://cdn.fecmall.com/product/15/image/2023/01/30/b169d0172b6e8f474aa47190160434f0.jpg"
},
{
"id": 4396,
"product_id": 657,
"title": "Green / XL",
"price": "13.28",
"compare_at_price": "0.00",
"cost_price": "0.00",
"sku": "697712001652XL28037",
"gram": 0,
"position": 0,
"barcode": "",
"image_id": 7410,
"qty": 97,
"option1": "Green",
"option2": "XL",
"option3": "",
"weight": "0.00",
"weight_unit": "kg",
"sale_count": 0,
"note": "",
"image": "https://cdn.fecmall.com/product/15/image/2023/01/30/b169d0172b6e8f474aa47190160434f0.jpg"
},
{
"id": 4397,
"product_id": 657,
"title": "Green / 2XL",
"price": "13.28",
"compare_at_price": "0.00",
"cost_price": "0.00",
"sku": "697712001652XXL28037",
"gram": 0,
"position": 0,
"barcode": "",
"image_id": 7410,
"qty": 123,
"option1": "Green",
"option2": "2XL",
"option3": "",
"weight": "0.00",
"weight_unit": "kg",
"sale_count": 0,
"note": "",
"image": "https://cdn.fecmall.com/product/15/image/2023/01/30/b169d0172b6e8f474aa47190160434f0.jpg"
},
{
"id": 4398,
"product_id": 657,
"title": "Green / 3XL",
"price": "13.28",
"compare_at_price": "0.00",
"cost_price": "0.00",
"sku": "697712001652XXXL28037",
"gram": 0,
"position": 0,
"barcode": "",
"image_id": 7410,
"qty": 70,
"option1": "Green",
"option2": "3XL",
"option3": "",
"weight": "0.00",
"weight_unit": "kg",
"sale_count": 0,
"note": "",
"image": "https://cdn.fecmall.com/product/15/image/2023/01/30/b169d0172b6e8f474aa47190160434f0.jpg"
}
],
"options": [
{
"id": 833,
"product_id": 657,
"name": "Color",
"position": 1,
"items": [
"Green"
]
},
{
"id": 834,
"product_id": 657,
"name": "Size",
"position": 2,
"items": [
"M",
"L",
"XL",
"2XL",
"3XL"
]
}
],
"images": [
{
"id": 7409,
"product_id": 657,
"position": 1,
"src": "https://cdn.fecmall.com/product/15/image/2023/01/30/5b17ccf2483c46a900f569aac7924c61.jpg",
"alt": ""
},
{
"id": 7410,
"product_id": 657,
"position": 2,
"src": "https://cdn.fecmall.com/product/15/image/2023/01/30/b169d0172b6e8f474aa47190160434f0.jpg",
"alt": ""
},
{
"id": 7411,
"product_id": 657,
"position": 3,
"src": "https://cdn.fecmall.com/product/15/image/2023/01/30/7ffd9f95c0c286688a4227ada013ad46.jpg",
"alt": ""
},
{
"id": 7412,
"product_id": 657,
"position": 4,
"src": "https://cdn.fecmall.com/product/15/image/2023/01/30/c9e676731970bce0df818ad76c8ec6ea.jpg",
"alt": ""
},
{
"id": 7413,
"product_id": 657,
"position": 5,
"src": "https://cdn.fecmall.com/product/15/image/2023/01/30/480d64f2fca90319e4d899d6f63a8735.jpeg",
"alt": ""
},
{
"id": 7414,
"product_id": 657,
"position": 6,
"src": "https://cdn.fecmall.com/product/15/image/2023/01/30/3f0b6db5065e0ac910940f3b0bd8e445.jpg",
"alt": ""
}
],
"collectionIds": [
44
]
},
{
"id": 639,
"handle": "lace-backless-ice-silk-hollow-pajamas-long-sleeve-home-suit",
"spu": "",
"title": "Lace Backless Ice Silk Hollow Pajamas Long Sleeve Home Suit",
"sub_title": "",
"body_html": "<img src=\"https://cbu01.alicdn.com/img/ibank/O1CN01qnJEkn24ea1zh5GqT_!!2215072607416-0-cib.jpg\"/><br><img src=\"https://shion.greenfiremaple.com/media/common/8/image/2023/01/29/2424b565db217fd612769d7fcf5ad56b.jpg\"/><br><img src=\"https://cbu01.alicdn.com/img/ibank/O1CN01odFNx424ea24DsZN4_!!2215072607416-0-cib.jpg\"/><br> <br><br>1. This lace backless ice silk pajamas long sleeve home suit is made of soft and breathable ice silk fabric, featuring hollowed out lace details.<br><br>2. It comes with an adjustable halter neckline, criss-crossing shoulder straps and an adjustable hollow back construction, allowing for a perfect and comfortable fit.<br><br>3. It has long sleeves, a thigh-length hemline, and a slightly curved high-low hemline for reaching an effortlessly stylish look.<br><br>4. This pajamas suit comes with a soft elastic waistband and allows movement while being super comfortable, making it a perfect choice for lounging around at home.",
"meta_title": "",
"meta_keywords": "",
"meta_description": "",
"status": 1,
"availability": 1,
"type": 2,
"vendor": "",
"qty": 362,
"created_at": "2023-01-30 15:32:17",
"updated_at": "2023-01-30 15:32:17",
"inventory_police": 1,
"inventory_police_type": 1,
"variant_need_image": 1,
"variant_need_note": 2,
"variants": [
{
"id": 4300,
"product_id": 639,
"title": "White / M",
"price": "23.84",
"compare_at_price": "0.00",
"cost_price": "0.00",
"sku": "4938634268323",
"gram": 0,
"position": 0,
"barcode": "",
"image_id": 7302,
"qty": 64,
"option1": "White",
"option2": "M",
"option3": "",
"weight": "0.00",
"weight_unit": "kg",
"sale_count": 0,
"note": "",
"image": "https://cdn.fecmall.com/product/15/image/2023/01/30/c41986430428fca497e4d91c3581a37c.jpg"
},
{
"id": 4301,
"product_id": 639,
"title": "White / L",
"price": "23.84",
"compare_at_price": "0.00",
"cost_price": "0.00",
"sku": "4938634268322",
"gram": 0,
"position": 0,
"barcode": "",
"image_id": 7302,
"qty": 135,
"option1": "White",
"option2": "L",
"option3": "",
"weight": "0.00",
"weight_unit": "kg",
"sale_count": 0,
"note": "",
"image": "https://cdn.fecmall.com/product/15/image/2023/01/30/c41986430428fca497e4d91c3581a37c.jpg"
},
{
"id": 4302,
"product_id": 639,
"title": "White / XL",
"price": "23.84",
"compare_at_price": "0.00",
"cost_price": "0.00",
"sku": "4938634268324",
"gram": 0,
"position": 0,
"barcode": "",
"image_id": 7302,
"qty": 118,
"option1": "White",
"option2": "XL",
"option3": "",
"weight": "0.00",
"weight_unit": "kg",
"sale_count": 0,
"note": "",
"image": "https://cdn.fecmall.com/product/15/image/2023/01/30/c41986430428fca497e4d91c3581a37c.jpg"
},
{
"id": 4303,
"product_id": 639,
"title": "White / 2XL",
"price": "23.84",
"compare_at_price": "0.00",
"cost_price": "0.00",
"sku": "4938634268325",
"gram": 0,
"position": 0,
"barcode": "",
"image_id": 7302,
"qty": 23,
"option1": "White",
"option2": "2XL",
"option3": "",
"weight": "0.00",
"weight_unit": "kg",
"sale_count": 0,
"note": "",
"image": "https://cdn.fecmall.com/product/15/image/2023/01/30/c41986430428fca497e4d91c3581a37c.jpg"
},
{
"id": 4304,
"product_id": 639,
"title": "White / 3XL",
"price": "23.84",
"compare_at_price": "0.00",
"cost_price": "0.00",
"sku": "4938634268326",
"gram": 0,
"position": 0,
"barcode": "",
"image_id": 7302,
"qty": 22,
"option1": "White",
"option2": "3XL",
"option3": "",
"weight": "0.00",
"weight_unit": "kg",
"sale_count": 0,
"note": "",
"image": "https://cdn.fecmall.com/product/15/image/2023/01/30/c41986430428fca497e4d91c3581a37c.jpg"
}
],
"options": [
{
"id": 797,
"product_id": 639,
"name": "Color",
"position": 1,
"items": [
"White"
]
},
{
"id": 798,
"product_id": 639,
"name": "Size",
"position": 2,
"items": [
"M",
"L",
"XL",
"2XL",
"3XL"
]
}
],
"images": [
{
"id": 7300,
"product_id": 639,
"position": 1,
"src": "https://cdn.fecmall.com/product/15/image/2023/01/30/d961f5ce3fd0545878bfd640a712e9b1.jpg",
"alt": ""
},
{
"id": 7301,
"product_id": 639,
"position": 2,
"src": "https://cdn.fecmall.com/product/15/image/2023/01/30/7378b1de43554409152b5fb5f0aeebe3.jpg",
"alt": ""
},
{
"id": 7302,
"product_id": 639,
"position": 3,
"src": "https://cdn.fecmall.com/product/15/image/2023/01/30/c41986430428fca497e4d91c3581a37c.jpg",
"alt": ""
},
{
"id": 7303,
"product_id": 639,
"position": 4,
"src": "https://cdn.fecmall.com/product/15/image/2023/01/30/811222b095d0de5da415567d15cb39cb.jpg",
"alt": ""
},
{
"id": 7304,
"product_id": 639,
"position": 5,
"src": "https://cdn.fecmall.com/product/15/image/2023/01/30/9d9a2f364da13fbdfed3c9ab41b62813.jpg",
"alt": ""
}
],
"collectionIds": []
}
],
"total": 397,
"pageSize": 20,
"totalPage": 20
},
"message": "success"
}