UpdateMasterProduct¶
Use this api to update the specified product information.
POST /openapi/product/master/v1/update
Request Parameters¶
Parameter | Type | Required | Description |
---|---|---|---|
id |
string |
true |
product ID |
name |
string |
true |
product name,less than 300 |
fullCategoryId |
array(string) |
false |
The full Category Id is required when status is REVIEW APPROVED |
saleStatus |
string |
false |
Product sale status,please refer to Product Status for details |
condition |
string |
true |
NEW or USED |
shortDescription |
string |
false |
When the status is REVIEW APPROVED, the short Description is required and the length is less than 3000 |
description |
string |
false |
Product description,less than 60000 |
variantOptions |
array(object) |
true |
Variant option, less than 3,See VariantOption Info |
variations |
array(object) |
true |
variation, less than 400,See MasterVariation Info |
images |
array(string) |
false |
images |
delivery |
Delivery |
false |
delivery info |
costInfo |
CostInfo |
false |
Cost Info |
status |
string |
true |
Master product status (PENDING_REVIEW,PAY_NO_ATTENTION) |
extraInfo |
object |
false |
Extra Info, See Extra Info |
minPurchase |
integer |
false |
Min purchase,between 1 and 1000 |
brand |
string |
false |
brand |
Variant Option¶
Parameter | Type | Required | Description |
---|---|---|---|
name |
string |
true |
Specification type name, such as color, size |
values |
array(string) |
true |
The value of the specification type, such as red and yellow and size |
Master Variation¶
Parameter | Type | Required | Description |
---|---|---|---|
id |
string |
true |
variation ID |
optionValues |
array(string) |
false |
Specifications type value, such as red code and L code |
sellingPrice |
Price |
true |
The sellingPrice is required and less than 1000000000 |
averageCostPrice |
Price |
false |
|
sku |
string |
true |
Sku is required and less than 200 |
images |
array(string) |
false |
Picture of the SKU |
stock |
object |
true |
See StockDetail Info |
purchasePrice |
Price |
false |
The purchase Price is required when type is not a BUNDLE and is less than 1000000000 |
bundleVariations |
object |
false |
See BundleVariation Info,If it is a combination of goods, information about the SKUS bundled with the combination SKUS is displayed |
barcode |
string |
false |
Barcode only supports letters, numbers and -_ |
Delivery¶
Parameter | Type | Required | Description |
---|---|---|---|
length |
integer |
false |
Length between 1 and 999999 |
width |
integer |
false |
Width between 1 and 999999 |
height |
integer |
false |
Height between 1 and 999999 |
lengthUnit |
string |
false |
Length Unit,cm |
weight |
integer |
false |
The weight is required when status is REVIEW_APPROVED and is less than 5000000 |
weightUnit |
string |
false |
Weight Unit,g |
CostInfo¶
Parameter | Type | Required | Description |
---|---|---|---|
sourceUrl |
string |
false |
Source url,less than 500 |
purchasingTime |
integer |
false |
Purchasing time, less than 365 |
purchasingTimeUnit |
string |
false |
Purchasing time unit(HOUR,DAY,WORK_DAY,WEEK,MONTH) |
salesTax |
Price |
false |
Sales tax amount |
Product Extra¶
Parameter | Type | Required | Description |
---|---|---|---|
preOrder |
PreOrder |
false |
Pre Order |
hasShelfLife |
boolean |
false |
Has Shelf Life |
shelfLifePeriod |
integer |
false |
Shelf Life Period |
additionInfo |
object |
false |
Additional information See Additional Info |
Additional¶
Parameter | Type | Required | Description |
---|---|---|---|
remark1 |
string |
false |
1-50 digits English, Chinese, numbers, spaces and - _ & % |
remark2 |
string |
false |
1-50 digits English, Chinese, numbers, spaces and - _ & % |
remark3 |
string |
false |
1-50 digits English, Chinese, numbers, spaces and - _ & % |
Price¶
Parameter | Type | Required | Description |
---|---|---|---|
amount |
bigDecimal |
true |
Amount,less than 1000000000 |
currencyCode |
string |
true |
Currency code,For example: ID,please refer to Country Abbreviation for details |
Stock Detail¶
Parameter | Type | Required | Description |
---|---|---|---|
availableStock |
integer |
true |
Available stock,between 1 and 999999 |
safetyStock |
integer |
false |
Safety Stock |
safetyAlert |
boolean |
false |
Safety Alert |
Bundle Variation¶
Parameter | Type | Required | Description |
---|---|---|---|
quantity |
integer |
true |
Variation quantity |
bundleVariationId |
string |
true |
Bundle Variation Id |
PreOrder¶
Parameter | Type | Required | Description |
---|---|---|---|
settingType |
string |
false |
Pre order setting type (PRODUCT_ON,INHERIT_SHOP,PRODUCT_OFF) |
timeToShip |
integer |
false |
|
timeUnit |
string |
false |
Purchasing time unit (HOUR,DAY,WORK_DAY,WEEK,MONTH) |
Response Parameters¶
Name | Type | Description |
---|---|---|
success |
boolean |
Create state,true or false |
productId |
string |
The product id in Ginee |
variationId |
array(string) |
The variation id in Ginee |
invalidFields |
object |
See InvalidField Info |
Invalid Field¶
Name | Type | Description |
---|---|---|
fieldPath |
array(object) |
Create state,true or false,See FieldPathNode Info |
fieldValue |
string |
field Value |
message |
string |
message |
Field Path Node¶
Name | Type | Description |
---|---|---|
nodeName |
string |
Node name |
errorType |
string |
Save product error type(EMPTY,FORMAT,REPEAT) |
message |
string |
Message |
Request Example¶
Example
curl --location --request POST '{Ginee Host}/openapi/product/master/v1/update' \
--header 'Content-Type: application/json' \
--header 'X-Advai-Country: ID' \
--header 'Authorization: 2aedf7919e5e6cb4:n0IECNXloTKCTSSxeBEYhzmeVClHmgvw4ruI3W2f9eY=' \
--data-raw '{
"id": "MP61ED3452E21B840001BBDE33",
"name": "测试0123001",
"type": "BUNDLE",
"fullCategoryId": ["100534", "100577"],
"images": [],
"delivery": {
"lengthUnit": "cm",
"weightUnit": "g"
},
"costInfo": {
"purchasingTimeUnit": "HOUR",
"salesTax": {
"amount": 0,
"currencyCode": "CNY"
}
},
"shortDescription": "这是短描述",
"description": "<p>这是长描述-update003</p>",
"brand": "",
"saleStatus": "FOR_SALE",
"status": "PENDING_REVIEW",
"condition": "NEW",
"variantOptions": [],
"variations": [{
"id": "MV61ED3452E21B840001BBDE34",
"productName": "测试0123001",
"optionValues": ["-"],
"sellingPrice": {
"amount": 10,
"currencyCode": "CNY"
},
"averageCostPrice": {
"amount": 0,
"currencyCode": "CNY"
},
"sku": "0123001-002",
"images": [],
"status": "ACTIVE",
"variationSkusToBind": [],
"stock": {
"warehouseStock": 0,
"spareStock": 0,
"availableStock": 10,
"safetyStock": 0,
"safetyAlert": false
},
"type": "BUNDLE",
"bundleVariations": [{
"quantity": 1,
"bundleVariationId": "MV617F907C69D50015D11C4C40"
}],
"inventoryStatus": "UN_INBOUND",
"stockTagStatus": {
"warehouseStatus": false,
"stockSyncStatus": true
},
"boundChannelVariationCount": 0
}],
"minPurchase": 10,
"skusDeletable": true,
"extraInfo": {
"preOrder": {
"settingType": "PRODUCT_OFF",
"timeUnit": "DAY"
}
}
}'
Success
{
"code": "SUCCESS",
"message": "成功",
"data": {
"success": true,
"productId": "MP61F006ABE21B840001BBDE36",
"variationIds": null,
"invalidFields": null
},
"extra": null,
"pricingStrategy": "PAY"
}
Update Failed
{
"code": "SUCCESS",
"message": "成功",
"data": {
"success": false,
"productId": null,
"variationIds": null,
"invalidFields": null
},
"extra": null,
"pricingStrategy": "PAY"
}
Note
You need to check the code
to see if the operation was successful. If failed, see message
for detail reason.