关于 产品 ​
访问范围
需要多个访问范围—请参阅每个端点以了解访问范围要求。
需要访问受保护的客户数据。
Genstore 产品业务域是核心业务模块,通过提供一系列的 RESTful 接口,全面管理产品信息,支持产品的创建、检索、更新和删除,涵盖产品基础信息、产品变体、库存管理、礼品卡、产品系列,以及类目搜索等子域。
其中,产品 是店铺中销售的基本单位,包括商品的所有基础信息如名称、描述等。Genstore 提供了一系列 RESTful 接口,开发者和电商平台管理者可通过相关接口对产品信息进行详细的操作,包括创建、读取、更新和删除(CRUD)。每个产品条目包含了所有必要的详情,使其在商店中展示并提供给消费者购买。
核心功能
- 创建产品:添加新产品到系统中。
- 获取产品列表:检索所有产品的详细信息。
- 获取单个产品:根据产品 ID 检索特定产品的详细信息。
- 更新产品:修改现有产品的信息。
- 删除产品:从系统中删除特定产品。
应用场景
- 在线商店运营:店铺运营者可高效管理商品目录、实时更新商品详情、控制商品展示并协调库存变更,确保全渠道商品信息的准确性和及时性。
- 库存管理继承:运营团队可跨系统同步库存水平、配置自动库存更新规则、管理库存分配策略,在防止超卖的同时优化库存效率。
- 多渠道商品展示:电商团队可在移动应用和网站间分发统一的商品信息、管理富媒体内容、同步更新销售渠道,提供一致的商品体验。
- 商品表现分析:业务分析师可追踪商品指标、生成销售趋势报告、分析市场表现,支持数据驱动的库存和定价决策。
接口
POST
/api/202412/products: 创建产品
PUT
/api/202412/products/{productId}: 更新产品
DELETE
/api/202412/products/{productId}: 删除商品
GET
/api/202412/products: 获取产品列表
GET
/api/202412/products/{productId}: 获取单个产品
GET
/api/202412/products/count: 获取产品数量
产品 对象 ​
产品业务域对象。
属性 ​
{
"product": {
"isMultiVariant": "false",
"salesChannels": [
{
"salesChannelCode": "onlineStore"
}
],
"images": [
{
"productId": "102745140756584",
"src": "https://blaze.com/s/files/[email protected]?v=1716260620",
"position": "1"
}
],
"productId": "102745140756584",
"variants": [
{
"inventoryManagement": "true",
"productId": "102744460756584",
"costPrice": "3",
"weight": "1",
"compareOfPrice": "22",
"inventoryQuantities": [
{
"locationId": "50002",
"available": "666"
}
],
"price": "10",
"options": [
{
"name": "size",
"id": "10034623756584",
"position": "1",
"value": {
"name": "L",
"id": "10167791756584",
"position": "1"
}
}
],
"variantId": "107362030756584",
"isDisabled": "false",
"sku": "P001",
"barcode": "AXOYX49XOPEX6",
"weightUnit": "kg"
}
],
"marketAssigns": [
{
"isAssigned": "true",
"marketId": "6016662702584"
}
],
"title": "shirt",
"tags": "[102984300756584,102984300756585]",
"productCategory": {
"categoryName": "pet",
"categoryId": "209148956145"
},
"subTitle": "wool shirt",
"collections": "[107363170756584,107363170756585]",
"vendor": "nike",
"options": [
{
"name": "size",
"id": "10034623756584",
"position": "1",
"value": [
{
"name": "L",
"id": "10167791756584",
"position": "1"
}
]
}
],
"bodyHtml": "<p>wool shirt</p>",
"productType": "normal",
"status": "active"
}
}
POST
创建产品 ​
创建商品。
访问范围
需要以下任意访问权限: write_products
接口
POST
/api/202412/products
请求参数
响应数据
curl -X POST \
https://{shop}.genmystore.com/api/202412/products" \
-H "X-Genstore-Access-Token: {access_token}" \
-H "Content-Type: application/json" \
-d '{
"product":{
"isMultiVariant":"false",
"images":[
{
"productId":"102745140756584",
"src":"https://blaze.com/s/files/[email protected]?v=1716260620",
"position":"1"
}
],
"variants":[
{
"inventoryManagement":"true",
"price":"10",
"costPrice":"3",
"options":[
{
"name":"size",
"id":"10034623756584",
"position":"1",
"value":{
"name":"L",
"id":"10167791756584",
"position":"1"
}
}
],
"weight":"1",
"isDisabled":"false",
"sku":"P001",
"compareOfPrice":"22",
"barcode":"AXOYX49XOPEX6",
"inventoryQuantities":[
{
"locationId":"50002",
"available":"666"
}
],
"weightUnit":"kg"
}
],
"marketAssigns":[
{
"isAssigned":"true",
"marketId":"6016662702584"
}
],
"title":"shirt",
"tags":"[102984300756584,102984300756585]",
"subTitle":"wool shirt",
"collections":"[107363170756584,107363170756585]",
"vendor":"nike",
"options":[
{
"name":"size",
"id":"10034623756584",
"position":"1",
"value":[
{
"name":"L",
"id":"10167791756584",
"position":"1"
}
]
}
],
"bodyHtml":"<p>wool shirt</p>",
"productType":"normal",
"status":"active"
}
}'
HTTP/1.1 200 OK
{
"product": {
"isMultiVariant": "false",
"images": [
{
"productId": "102745140756584",
"src": "https://blaze.com/s/files/[email protected]?v=1716260620",
"position": "1"
}
],
"productId": "102745140756584",
"variants": [
{
"inventoryManagement": "true",
"productId": "102744460756584",
"costPrice": "3",
"weight": "1",
"compareOfPrice": "22",
"inventoryQuantities": [
{
"locationId": "50002",
"available": "666"
}
],
"price": "10",
"options": [
{
"name": "size",
"id": "10034623756584",
"position": "1",
"value": {
"name": "L",
"id": "10167791756584",
"position": "1"
}
}
],
"variantId": "107362030756584",
"isDisabled": "false",
"sku": "P001",
"barcode": "AXOYX49XOPEX6",
"weightUnit": "kg"
}
],
"marketAssigns": [
{
"isAssigned": "true",
"marketId": "6016662702584"
}
],
"title": "shirt",
"tags": "[102984300756584,102984300756585]",
"subTitle": "wool shirt",
"collections": "[107363170756584,107363170756585]",
"vendor": "nike",
"options": [
{
"name": "size",
"id": "10034623756584",
"position": "1",
"value": [
{
"name": "L",
"id": "10167791756584",
"position": "1"
}
]
}
],
"bodyHtml": "<p>wool shirt</p>",
"productType": "normal",
"status": "active"
}
}
PUT
更新产品 ​
更新产品。
访问范围
需要以下任意访问权限: write_products
接口
PUT
/api/202412/products/{productId}
请求参数
响应数据
curl -X PUT \
https://{shop}.genmystore.com/api/202412/products/{productId}" \
-H "X-Genstore-Access-Token: {access_token}" \
-H "Content-Type: application/json" \
-d '{
"product":{
"isMultiVariant":"false",
"images":[
{
"productId":"102745140756584",
"src":"https://blaze.com/s/files/[email protected]?v=1716260620",
"position":"1"
}
],
"productId":"102745140756584",
"variants":[
{
"inventoryManagement":"true",
"productId":"102744460756584",
"costPrice":"3",
"weight":"1",
"compareOfPrice":"22",
"inventoryQuantities":[
{
"locationId":"50002",
"available":"666"
}
],
"price":"10",
"options":[
{
"name":"size",
"id":"10034623756584",
"position":"1",
"value":{
"name":"L",
"id":"10167791756584",
"position":"1"
}
}
],
"variantId":"107362030756584",
"isDisabled":"false",
"sku":"P001",
"barcode":"AXOYX49XOPEX6",
"weightUnit":"kg"
}
],
"marketAssigns":[
{
"isAssigned":"true",
"marketId":"6016662702584"
}
],
"title":"shirt",
"tags":"[102984300756584,102984300756585]",
"subTitle":"wool shirt",
"collections":"[107363170756584,107363170756585]",
"vendor":"nike",
"options":[
{
"name":"size",
"id":"10034623756584",
"position":"1",
"value":[
{
"name":"L",
"id":"10167791756584",
"position":"1"
}
]
}
],
"bodyHtml":"<p>wool shirt</p>",
"productType":"normal",
"status":"active"
}
}'
HTTP/1.1 200 OK
{
"product": {
"isMultiVariant": "false",
"images": [
{
"productId": "102745140756584",
"src": "https://blaze.com/s/files/[email protected]?v=1716260620",
"position": "1"
}
],
"productId": "102745140756584",
"variants": [
{
"inventoryManagement": "true",
"productId": "102744460756584",
"costPrice": "3",
"weight": "1",
"compareOfPrice": "22",
"inventoryQuantities": [
{
"locationId": "50002",
"available": "666"
}
],
"price": "10",
"options": [
{
"name": "size",
"id": "10034623756584",
"position": "1",
"value": {
"name": "L",
"id": "10167791756584",
"position": "1"
}
}
],
"variantId": "107362030756584",
"isDisabled": "false",
"sku": "P001",
"barcode": "AXOYX49XOPEX6",
"weightUnit": "kg"
}
],
"marketAssigns": [
{
"isAssigned": "true",
"marketId": "6016662702584"
}
],
"title": "shirt",
"tags": "[102984300756584,102984300756585]",
"subTitle": "wool shirt",
"collections": "[107363170756584,107363170756585]",
"vendor": "nike",
"options": [
{
"name": "size",
"id": "10034623756584",
"position": "1",
"value": [
{
"name": "L",
"id": "10167791756584",
"position": "1"
}
]
}
],
"bodyHtml": "<p>wool shirt</p>",
"productType": "normal",
"status": "active"
}
}
DELETE
删除商品 ​
删除商品。
访问范围
需要以下任意访问权限: write_products
接口
DELETE
/api/202412/products/{productId}
请求参数
响应数据
curl -X DELETE \
https://{shop}.genmystore.com/api/202412/products/{productId}" \
-H "X-Genstore-Access-Token: {access_token}" \
HTTP/1.1 200 OK
{}
GET
获取产品列表 ​
获取产品列表。
访问范围
需要以下任意访问权限: write_products
read_products
接口
GET
/api/202412/products
请求参数
响应数据
curl -X GET \
https://{shop}.genmystore.com/api/202412/products" \
-H "X-Genstore-Access-Token: {access_token}" \
HTTP/1.1 200 OK
{
"products": [
{
"isMultiVariant": "false",
"salesChannels": [
{
"salesChannelCode": "onlineStore"
}
],
"images": [
{
"productId": "102745140756584",
"src": "https://blaze.com/s/files/[email protected]?v=1716260620",
"position": "1"
}
],
"productId": "102745140756584",
"variants": [
{
"inventoryManagement": "true",
"productId": "102744460756584",
"costPrice": "3",
"weight": "1",
"compareOfPrice": "22",
"inventoryQuantities": [
{
"locationId": "50002",
"available": "666"
}
],
"price": "10",
"options": [
{
"name": "size",
"id": "10034623756584",
"position": "1",
"value": {
"name": "L",
"id": "10167791756584",
"position": "1"
}
}
],
"variantId": "107362030756584",
"isDisabled": "false",
"sku": "P001",
"barcode": "AXOYX49XOPEX6",
"weightUnit": "kg"
}
],
"marketAssigns": [
{
"isAssigned": "true",
"marketId": "6016662702584"
}
],
"title": "shirt",
"tags": [
102984300756584,
102984300756585
],
"productCategory": {
"categoryName": "pet",
"categoryId": "209148956145"
},
"subTitle": "wool shirt",
"collections": [
107363170756584,
107363170756585
],
"vendor": "nike",
"options": [
{
"name": "size",
"id": "10034623756584",
"position": "1",
"value": [
{
"name": "L",
"id": "10167791756584",
"position": "1"
}
]
}
],
"bodyHtml": "<p>wool shirt</p>",
"productType": "normal",
"status": "active"
}
]
}
GET
获取单个产品 ​
获取单个产品。
访问范围
需要以下任意访问权限: write_products
read_products
接口
GET
/api/202412/products/{productId}
请求参数
响应数据
curl -X GET \
https://{shop}.genmystore.com/api/202412/products/{productId}" \
-H "X-Genstore-Access-Token: {access_token}" \
HTTP/1.1 200 OK
{
"product": {
"isMultiVariant": "false",
"salesChannels": [
{
"salesChannelCode": "onlineStore"
}
],
"images": [
{
"productId": "102745140756584",
"src": "https://blaze.com/s/files/[email protected]?v=1716260620",
"position": "1"
}
],
"productId": "102745140756584",
"variants": [
{
"inventoryManagement": "true",
"productId": "102744460756584",
"costPrice": "3",
"weight": "1",
"compareOfPrice": "22",
"inventoryQuantities": [
{
"locationId": "50002",
"available": "666"
}
],
"price": "10",
"options": [
{
"name": "size",
"id": "10034623756584",
"position": "1",
"value": {
"name": "L",
"id": "10167791756584",
"position": "1"
}
}
],
"variantId": "107362030756584",
"isDisabled": "false",
"sku": "P001",
"barcode": "AXOYX49XOPEX6",
"weightUnit": "kg"
}
],
"marketAssigns": [
{
"isAssigned": "true",
"marketId": "6016662702584"
}
],
"title": "shirt",
"tags": "[102984300756584,102984300756585]",
"productCategory": {
"categoryName": "pet",
"categoryId": "209148956145"
},
"subTitle": "wool shirt",
"collections": "[107363170756584,107363170756585]",
"vendor": "nike",
"options": [
{
"name": "size",
"id": "10034623756584",
"position": "1",
"value": [
{
"name": "L",
"id": "10167791756584",
"position": "1"
}
]
}
],
"bodyHtml": "<p>wool shirt</p>",
"productType": "normal",
"status": "active"
}
}
GET
获取产品数量 ​
获取产品数量。
访问范围
需要以下任意访问权限: write_products
read_products
接口
GET
/api/202412/products/count
请求参数
响应数据
curl -X GET \
https://{shop}.genmystore.com/api/202412/products/count" \
-H "X-Genstore-Access-Token: {access_token}" \
HTTP/1.1 200 OK
{
"count": "10"
}
关于 产品
访问范围
需要多个访问范围—请参阅每个端点以了解访问范围要求。
需要访问受保护的客户数据。
Genstore 产品业务域是核心业务模块,通过提供一系列的 RESTful 接口,全面管理产品信息,支持产品的创建、检索、更新和删除,涵盖产品基础信息、产品变体、库存管理、礼品卡、产品系列,以及类目搜索等子域。
其中,产品 是店铺中销售的基本单位,包括商品的所有基础信息如名称、描述等。Genstore 提供了一系列 RESTful 接口,开发者和电商平台管理者可通过相关接口对产品信息进行详细的操作,包括创建、读取、更新和删除(CRUD)。每个产品条目包含了所有必要的详情,使其在商店中展示并提供给消费者购买。
核心功能
- 创建产品:添加新产品到系统中。
- 获取产品列表:检索所有产品的详细信息。
- 获取单个产品:根据产品 ID 检索特定产品的详细信息。
- 更新产品:修改现有产品的信息。
- 删除产品:从系统中删除特定产品。
应用场景
- 在线商店运营:店铺运营者可高效管理商品目录、实时更新商品详情、控制商品展示并协调库存变更,确保全渠道商品信息的准确性和及时性。
- 库存管理继承:运营团队可跨系统同步库存水平、配置自动库存更新规则、管理库存分配策略,在防止超卖的同时优化库存效率。
- 多渠道商品展示:电商团队可在移动应用和网站间分发统一的商品信息、管理富媒体内容、同步更新销售渠道,提供一致的商品体验。
- 商品表现分析:业务分析师可追踪商品指标、生成销售趋势报告、分析市场表现,支持数据驱动的库存和定价决策。
产品 对象
产品业务域对象。
属性
POST
创建产品
创建商品。
访问范围
需要以下任意访问权限: write_products
接口
POST
/api/202412/products
PUT
更新产品
更新产品。
访问范围
需要以下任意访问权限: write_products
接口
PUT
/api/202412/products/{productId}
DELETE
删除商品
删除商品。
访问范围
需要以下任意访问权限: write_products
接口
DELETE
/api/202412/products/{productId}
GET
获取产品列表
获取产品列表。
访问范围
需要以下任意访问权限: write_products
read_products
接口
GET
/api/202412/products
GET
获取单个产品
获取单个产品。
访问范围
需要以下任意访问权限: write_products
read_products
接口
GET
/api/202412/products/{productId}
GET
获取产品数量
获取产品数量。
访问范围
需要以下任意访问权限: write_products
read_products
接口
GET
/api/202412/products/count