Description
- Add or Update Upstream SPU Base Info
Request URL
/rest/sc_api/upstream_spu/update_spu_info
Request Method
Request Parameter (Request Body)
| Name |
Data Type |
Mandatory |
Description |
| spu_id |
String |
Y |
upstream spu id |
| spu_name |
String |
Y |
Upstream spu name |
| category_id |
String |
N |
Upstream category id |
| category_name |
String |
N |
Upstream category path name |
| image |
String |
N |
Upstream spu image url |
| upstream_created_time |
Long |
Y |
Upstream spu created time |
| upstream_updated_time |
Long |
Y |
Upstream spu updated time |
| upstream_status |
String |
Y |
Upstream spu status.ACTIVE/INACTIVE/DELETED |
| skus |
Object[] |
Y |
skus info, one spu must has sku info, if upstream spu hasn't sku item, that will set the spu info(price/stock) in the sku[0], sku_id could set "0" |
| ├──sku_id |
String |
Y |
upstream sku id |
| ├──seller_sku_code |
String |
Y |
upstream sku code |
| ├──original_price |
Double |
Y |
original price |
| ├──current_price |
Double |
Y |
current price |
| ├──stock |
Int |
Y |
sku stock |
| ├──model_infos |
Object |
N |
variation infos |
| ├──sku_payload |
Object |
N |
upstream could transfer all sku info from this field |
| ├──upstream_status |
String |
N |
If upstream hasn't sku status, needn't fill it.ACTIVE/INACTIVE/DELETED |
Request Example
{
"spu_id": "100001",
"spu_name": "string",
"category_id": "12111",
"category_name": "Sports & Outdoors -> Shoes",
"image": "https://xxxxx",
"upstream_created_time": 1643264249000,
"upstream_updated_time": 1643264249000,
"upstream_status":"ACTIVE",
"skus": [{
"sku_id": "5399aba6e4b0ae375bfdca88",
"seller_sku_code" : "Seller SKU Code",
"original_price": 12.00,
"current_price": 11.61,
"stock": 200,
"model_infos": {
"color" : "red",
"size" : "M"
},
"sku_payload":{},
"upstream_status": "ACTIVE",
}],
}
Success Response Example
{
"code": "200",
"message": "string",
"data":null,
"request_id": "string"
}