1. SKU
API URL
post {HTTP(S)host} /api/{version}/sku
Category master data (tree / create / update / delete) is documented in Sku category. Request URL: /api/{version}/sku_category. Create/update SKU still attach categories by categoryName1 / categoryName2 / categoryName3. SKU property and SPU attribute APIs are in SKU property and SPU attribute.
1.1. Query sku List
1.1.1. SERVICE_TYPE
QUERY_SIMPLE_LIST_SKU
1.1.2. Request
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| page | Y | Number | 1 | Page number, default 1 |
| pageSize | Y | Number | 50 | Number of records per page. no more than 200; Default is 100 |
| categoryName1 | N | String | Level 1 product classification | |
| categoryName2 | N | String | Secondary product categories | |
| categoryName3 | N | String | Three levels of product classification | |
| updateTimeFrom | N | String | 2022-09-26 | Update start time |
| updateTimeTo | N | String | 2022-09-26 | Update end time |
| skus | N | List <String> |
["123","456"] | sku code |
| titles | N | List <String> |
["The title of the product "] | The title of the product |
| skuCustomFieldValueSOList | N | List<SkuCustomFieldValueSO> | Custom Field Search criteria | |
| developerUserNameList | N | List<String> |
["username"] | developer username |
SkuCustomFieldValueSO(Custom Field Search)
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| customFieldId | Y | Long | 3 | SERVICE_TYPE=CUSTOMER_FIELD_QUERY return id |
| value | N | String | “张三” | Custom Field value: STRING,SELECT。 |
| from | N | String | "1970/01/01" | Range query left interval :NUMBER,DATE。 |
| to | N | String | "1971/01/01" | The range query is the right interval : NUMBER,DATE。 |
1.1.3. Reponse
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| errorCode | Y | String | “DATA_INPUT_ERROR” | Error Code |
| errorMsg | Y | String | “The input of Params is incorrect” | Business Error Messages |
| state | Y | String | success | Response State |
| total | Y | Number | 100 | Total num |
| result | Y | List<Sku> | For product list information, please check the table below for details |
Sku
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| sku | Y | String | “sku1” | sku , up to 255 characters |
| title | Y | String | “abc” | The title of the product, up to 255 characters |
| barcode | N | String | Product barcode, up to 255 characters | |
| type | Y | String | “SINGLE” | Sku Type |
| isAssembly | N | Int | 0 or 1 | is assembly 1:yes 0:no |
| picUrl | N | String | Image address, up to 255 characters | |
| saleStatus | N | String | Sales status, up to 50 characters | |
| weight | Y | Decimal | gross weight | |
| netWeight | Y | Decimal | net weight | |
| weightUnit | Y | String | Units of weight | |
| abbrTitle | N | String | Abbreviation, up to 255 characters | |
| brand | N | String | Product brand, up to 50 characters | |
| unit | N | String | Commodity unit, maximum 128 characters | |
| color | N | String | Color, up to 255 characters | |
| size | N | String | Size, up to 255 characters | |
| length | Y | Decimal | length | |
| width | Y | Decimal | width | |
| height | Y | Decimal | height | |
| dimensionUnit | Y | String | Units of length | |
| itemPackage | N | Number | Package quantity | |
| description | N | String | Product description, maximum 2048 characters | |
| descriptionEn | N | String | Product descriptions are in English, with a maximum of 2048 characters | |
| functionDescription | N | String | Performance description, up to 2048 characters | |
| enable | Y | Number | Item status (0: disabled; 1: Valid) | |
| categoryName1 | N | String | Level 1 commodity classification | |
| categoryName2 | N | String | Secondary product categories | |
| categoryName3 | N | String | Three levels of product classification | |
| singleBoxCode | N | String | Single-box barcode | |
| singleItemVolume | N | Decimal | The volume of the single item | |
| cartonVolumeUnit | N | String | Volume units | |
| customProp1 | N | String | Custom field 1 | |
| customProp2 | N | String | Custom field 2 | |
| customProp3 | N | String | Custom field 3 | |
| price | N | Decimal | Default selling price | |
| remarkName | N | String | Description | |
| singleSkuList | N | List <SubSkuDTO> |
In the case of a combination, the sub-product information is returned | |
| parts | N | List <SubSkuDTO> |
Assembled product component information: 1. sku: component SKU code 2. quantity: component quantity |
|
| skuCustomFieldValueVOList | N | SkuCustomFieldValueVO | Custom Field info | |
| packingRate | N | Number | Number of single boxes | |
| purchaseCost | N | Decimal | Purchase cost | |
| purchaseCostUnit | N | String | Purchase cost currency | |
| skuSupplierList | N | List <SkuSupplierDTO> |
Supplier | |
| isRelatedSingleCost | N | Boolean | Whether to associate the purchase cost of single items | |
| developerUserNameList | N | List <String> |
Developer names | |
| isIssueInvoice | N | Int | Invoice Required | |
| ncm | N | String | NCM | |
| taxGoodsName | N | String | tax goods name | |
| cest | N | String | CEST | |
| placeOrigin | N | String | Country of Origin |
SubSkuDTO(Sub-product information)
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| sku | Y | String | “sku1” | sku , up to 255 characters |
| quantity | Y | Integer | 1 | quantity |
SkuCustomFieldValueVO(Custom Field inf)
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| tableName | Y | String | SYS_ITEM | SYS_ITEM: System sku Custom Field ; SYS_ORDER: Order Custom Field ; SYS_ODO: Outbound order Custom Field ; SYS_ASN: Inbound order Custom Field 。 |
| columType | Y | String | NUMBER | Filter for different fill types Custom Field: NUMBER,DATE,STRING,SELECT。 |
| columName | Y | String | Date of manufacture | The name of the field defined by the user |
| defaultValue | N | String | 1970/01/01 | Custom Field Default value |
| candidateValue | N | String | ["1970/01/01","1970/01/02"] | Candidate value for the drop-down box |
| remark | N | String | The shelf date is distinguished from the date of manufacture | Description |
| required | N | Integer | 1 | Whether to query only the required fields 1:true;0:false |
| isQuery | N | Integer | 1 | Whether to query only the columns that support the query 1:true;0:false |
| isShow | N | Integer | 1 | Specifies whether to query only the columns that support column configurations 1:true;0:false |
SkuSupplierDTO(Supplier information)
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| name | Y | String | Supplier name | |
| isDefault | Y | Boolean | Whether default supplier | |
| purchaserList | Y | List <String> |
Purchaser, is username not name | |
| deliveryCycle | Y | Number | Delivery Date, day | |
| purchasePrice | N | Decimal | Purchase price, two digits after the decimal point are significant, and round up or down | |
| purchasePriceUnit | N | String | Purchase price currency(CNY,USD,CAD,GBP, EUR,JRY,etc) | |
| minimumPurchaseQuantity | N | Number | Minimum purchase quantity, which should be a positive integer | |
| purchaseTaxRate | N | Decimal | Purchase tax rate, unit: % | |
| drawbackRate | N | Decimal | Tax rebate rate, unit: % | |
| purchaseUrl | N | String | Purchase url |
Request example:
curl --location --request POST 'https://gerp-test1.800best.com/api/v1/sku' \
--form 'appId="TEST"' \
--form 'serviceType="QUERY_SIMPLE_LIST_SKU"' \
--form 'bizParam="{
\"page\":1,
\"pageSize\":1
}"' \
--form 'timestamp="1731742317"' \
--form 'sign="a9837b4485a8e427f584933267dc4ea4"'
Response example:
{
"state": "success",
"errorCode": "",
"errorMsg": "",
"bizContent": "{\"notSuccess\":false,\"result\":[{\"cartonVolumeUnit\":\"cm3\",\"ccPriceUnit\":\"USD\",\"customsDeclarationPriceUnit\":\"USD\",\"dangerousTransportGoodsType\":\"NONE\",\"dimensionUnit\":\"cm\",\"enable\":1,\"exportTax\":0.0,\"height\":33.3,\"isDeleted\":0,\"length\":33.3,\"needQualityInspection\":false,\"netWeight\":33.0,\"picUrl\":\"https://test-logo.pomogo.co/STORE/1902244893482377216/default/ced190dda0e74aa0ba25879dffb8b9bc.png\",\"price\":0.0000,\"priceUnit\":\"USD\",\"sku\":\"3WkC2QzAnXPTsGO4vCNUgm\",\"skuCustomFieldValueVOList\":[{\"candidateValue\":[],\"columCode\":1,\"columName\":\"商品有效期\",\"columType\":\"DATE\",\"customFieldId\":17,\"customFieldValueVOList\":[],\"customerId\":3,\"customerIdForUser\":3,\"defaultValue\":\"\",\"id\":17,\"isQuery\":0,\"isShow\":0,\"required\":0},{\"candidateValue\":[],\"columCode\":2,\"columName\":\"商品产地\",\"columType\":\"STRING\",\"customFieldId\":16,\"customFieldValueVOList\":[],\"customerId\":3,\"customerIdForUser\":3,\"defaultValue\":\"\",\"id\":16,\"isQuery\":1,\"isShow\":1,\"required\":0},{\"candidateValue\":[\"1\",\"2\",\"3\",\"123\"],\"columCode\":3,\"columName\":\"测试单选栏位\",\"columType\":\"SELECT\",\"customFieldId\":47,\"customFieldValueVOList\":[],\"customerId\":3,\"customerIdForUser\":3,\"defaultValue\":\"\",\"id\":47,\"isQuery\":0,\"isShow\":0,\"required\":0},{\"candidateValue\":[],\"columCode\":5,\"columName\":\"货值\",\"columType\":\"DATE\",\"customFieldId\":26,\"customFieldValueVOList\":[],\"customerId\":3,\"customerIdForUser\":3,\"id\":26,\"isQuery\":0,\"isShow\":1,\"required\":0},{\"candidateValue\":[],\"columCode\":6,\"columName\":\"产品编码\",\"columType\":\"STRING\",\"customFieldId\":33,\"customFieldValueVOList\":[],\"customerId\":3,\"customerIdForUser\":3,\"defaultValue\":\"\",\"id\":33,\"isQuery\":1,\"isShow\":0,\"required\":0},{\"candidateValue\":[],\"columCode\":7,\"columName\":\"123\",\"columType\":\"STRING\",\"customFieldId\":40,\"customFieldValueVOList\":[],\"customerId\":3,\"customerIdForUser\":3,\"defaultValue\":\"\",\"id\":40,\"isQuery\":1,\"isShow\":0,\"required\":0},{\"candidateValue\":[],\"columCode\":10,\"columName\":\"地区账套\",\"columType\":\"STRING\",\"customFieldId\":27,\"customFieldValueVOList\":[],\"customerId\":3,\"customerIdForUser\":3,\"defaultValue\":\"\",\"id\":27,\"isQuery\":0,\"isShow\":0,\"required\":0},{\"candidateValue\":[],\"columCode\":11,\"columName\":\"单箱条码\",\"columType\":\"STRING\",\"customFieldId\":28,\"customFieldValueVOList\":[],\"customerId\":3,\"customerIdForUser\":3,\"defaultValue\":\"\",\"id\":28,\"isQuery\":0,\"isShow\":0,\"required\":0},{\"candidateValue\":[],\"columCode\":12,\"columName\":\"规格型号\",\"columType\":\"STRING\",\"customFieldId\":29,\"customFieldValueVOList\":[],\"customerId\":3,\"customerIdForUser\":3,\"defaultValue\":\"\",\"id\":29,\"isQuery\":0,\"isShow\":0,\"required\":0}],\"title\":\"yhx母婴商品测试001自营 33\",\"type\":\"SINGLE\",\"weight\":33.0,\"weightUnit\":\"KG\",\"width\":33.3}],\"state\":\"success\",\"total\":3960}",
"requestId": "afac1414-8397-4657-bd57-ed2c90bdc9b7"
}
1.2. Create sku
1.2.1. SERVICE_TYPE
INSERT_SKU_INFO
1.2.2. Request
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| sku | Y | String | “sku1” | sku , up to 255 characters |
| title | Y | String | “abc” | The title of the product , up to 255 characters |
| barcode | N | String | Product barcode, up to 255 characters | |
| type | Y | String | “SINGLE” | Sku Type |
| isAssembly | N | Int | 0 or 1 | is assembly 1:yes,Need to fill in the "parts" field 0:no |
| picUrl | N | String | Image address, up to 255 characters,It is recommended to use picUrlList | |
| picUrlList | N | List<String> |
Multiple image addresses | |
| saleStatus | N | String | Sales status, up to 50 characters | |
| weight | Y | Decimal | gross weight | |
| netWeight | Y | Decimal | net weight | |
| weightUnit | Y | String | Units of weight | |
| abbrTitle | N | String | Abbreviation, up to 255 characters | |
| brand | N | String | Product brand, up to 50 characters | |
| unit | N | String | Commodity unit, maximum 128 characters | |
| color | N | String | Color, up to 255 characters | |
| size | N | String | Size, up to 255 characters | |
| length | Y | Decimal | length | |
| width | Y | Decimal | width | |
| height | Y | Decimal | height | |
| dimensionUnit | Y | String | Units of length | |
| itemPackage | N | Number | Package quantity | |
| description | N | String | Product description, maximum 2048 characters | |
| descriptionEn | N | String | Product descriptions are in English, with a maximum of 2048 characters | |
| functionDescription | N | String | Performance description, up to 2048 characters | |
| enable | Y | Number | Item status (0: disabled; 1: Valid) | |
| serialEnable | N | Number | 0 | Whether to enable serial number management (0: No; 1: Yes) |
| packingRate | N | Number | Packing rate ,If it is not filled, the size of the outer box and the outer box will not be saved gross weight 、Outer box net weight | |
| cartonLength | N | Decimal | The outer box length, This field is mandatory when entering the packing rate. | |
| cartonWidth | N | Decimal | The outer box width, This field is mandatory when entering the packing rate. | |
| cartonHeight | N | Decimal | The outer box height, This field is mandatory when entering the packing rate. | |
| cartonWeight | N | Decimal | The outer box gross weight, This field is mandatory when entering the packing rate. | |
| cartonNetWeight | N | Decimal | The outer box net weight, This field is mandatory when entering the packing rate. | |
| cartonDimensionUnit | N | String | The outer box Dimension units(cm; m), This field is mandatory when entering the packing rate. | |
| cartonWeightUnit | N | String | The outer box Units of weight(KG; G), This field is mandatory when entering the packing rate. | |
| chineseCustomsDeclarationName | N | String | Chinese customs declaration name | |
| englishCustomsDeclarationName | N | String | English customs declaration name | |
| cdPriceMethod | N | String | How the customs declaration price is calculated(RATE:proportion; CONSTANT:fixed) | |
| cdPriceRate | N | Decimal | Proportion of customs declaration price | |
| cdPriceMaximum | N | Decimal | The maximum value of the customs declaration price | |
| customsDeclarationPrice | N | Decimal | Customs price | |
| customsDeclarationPriceUnit | N | String | Unit of customs declaration price(CNY; USD; CAD; GBP; EUR; JRY) | |
| customsCode | N | String | Officers code | |
| exportTax | N | Decimal | Export tax rates | |
| declaration | N | String | Instructions for declaration | |
| dangerousTransportGoodsType | N | String | Type of dangerous goods(NONE, LIQUID, POWDER, CONTAIN_ELECTRIC, ELECTRIC) | |
| batteryType | N | Integer | Battery type (0: uncharged; 1: Supporting lithium-ion battery; 2: Built-in lithium-ion battery; 3: Supporting lithium metal battery; 4: Built-in lithium metal battery; 5: Dry battery) | |
| ccPriceMethod | N | String | How the customs clearance price is calculated(RATE:proportion; CONSTANT:fixed) | |
| ccPriceRate | N | Decimal | Percentage of customs clearance price | |
| ccPriceMaximum | N | Decimal | The maximum value of the customs clearance price | |
| ccPrice | N | Decimal | Customs clearance price | |
| ccPriceUnit | N | String | The currency of the customs clearance price(CNY; USD; CAD; GBP; EUR; JRY) | |
| needQualityInspection | N | Boolean | Whether quality inspection is required | |
| price | N | Decimal | Default selling price | |
| priceUnit | N | String | Default selling price unit (uppercase 3 digit code) | |
| asin | N | String | ASIN | |
| customProp1 | N | String | Custom attribute 1 | |
| customProp2 | N | String | Custom Attribute 2 | |
| customProp3 | N | String | Custom attribute 3 | |
| categoryName1 | N | String | Level 1 commodity classification | |
| categoryName2 | N | String | Secondary product categories | |
| categoryName3 | N | String | Three levels of product classification | |
| remarkName | N | String | Description | |
| singleSkuList | N | List <SubSkuDTO> |
Sub-product information | |
| parts | N | List <SubSkuDTO> |
Assembled product component information requires the following fields to be filled: 1. sku: component SKU code 2. quantity: component quantity |
|
| singleBoxCode | N | String | Single-box barcode | |
| singleItemVolume | N | Decimal | The volume of the single item | |
| skuCustomFieldValueVOList | N | List <SkuCustomFieldValueVO> |
Custom Field info | |
| purchaseCost | N | Decimal | Purchase cost | |
| purchaseCostUnit | N | String | Purchase cost currency | |
| skuSupplierList | N | List <SkuSupplierDTO> |
Supplier | |
| isRelatedSingleCost | N | Boolean | Whether to associate the purchase cost of single items. This only takes effect for combined items | |
| warehouseNameList | N | List |
["warehouseName1"] | When filling in this field and type=SINGLE, automatically create warehouse products and asynchronously distribute them to the warehouse |
| createAllWarehouseItems | N | Boolean | false | The default is false. When type=SINGLE, all three-party warehouse goods are automatically created and distributed to the warehouse asynchronously; Choose from warehouseNameList |
| developerUserNameList | N | List |
Developer account | |
| isIssueInvoice | N | Int | Invoice Required 1: Yes 2: No |
|
| ncm | N | String | NCM, required when isIssueInvoice=1 | |
| taxGoodsName | N | String | tax goods name, required when isIssueInvoice=1 | |
| cest | N | String | CEST,Optional, fill in when isIssueInvoice=1 | |
| placeOrigin | N | String | Country of Origin,Optional, fill in when isIssueInvoice=1 |
SubSkuDTO(Sub sku)
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| sku | Y | String | “sku1” | Sub-product SKUs |
| quantity | Y | Number | 3 | The number of sub-products in the combination |
SkuCustomFieldValueVO(Custom Field )
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| customFieldId | Y | Long | 3 | SERVICE_TYPE=CUSTOMER_FIELD_QUERY return id |
| value | Y | String | “michael” | Custom Field value |
SkuSupplierDTO(Supplier information)
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| name | Y | String | Supplier name | |
| isDefault | Y | Boolean | Whether default supplier | |
| purchaserList | Y | List <String> |
Purchaser, is username not name | |
| deliveryCycle | Y | Number | Delivery Date, day | |
| purchasePrice | N | Decimal | Purchase price, two digits after the decimal point are significant, and round up or down | |
| purchasePriceUnit | N | String | Purchase price currency(CNY,USD,CAD,GBP, EUR,JRY,etc) | |
| minimumPurchaseQuantity | N | Number | Minimum purchase quantity, which should be a positive integer | |
| purchaseTaxRate | N | Decimal | Purchase tax rate, unit: % | |
| drawbackRate | N | Decimal | Tax rebate rate, unit: % | |
| purchaseUrl | N | String | Purchase url |
1.2.3. Reponse
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| errorCode | Y | String | “DATA_INPUT_ERROR” | Error Code |
| errorMsg | Y | String | “The input of Params is incorrect” | Business Error Messages |
| state | Y | String | success | Response State |
Request example:
curl --location --request POST 'https://gerp-test1.800best.com/api/v1/sku' \
--form 'appId="TEST"' \
--form 'serviceType="INSERT_SKU_INFO"' \
--form 'bizParam="{
\"sku\":\"ckfsku\",
\"title\":\"ckfsku\",
\"type\":\"SINGLE\",
\"weight\":1,
\"netWeight\":1,
\"weightUnit\":\"KG\",
\"length\":1,
\"width\":1,
\"height\":1,
\"dimensionUnit\":\"cm\",
\"enable\":1,
\"serialEnable\":1,
\"shelfLife\":90,
}"' \
--form 'timestamp="1731742317"' \
--form 'sign="bb8a4a78ebd8b43d6bc71f81e83ae900"'
Response example:
{
"state": "success",
"errorCode": "",
"errorMsg": "",
"bizContent": "{\"notSuccess\":false,\"state\":\"success\"}",
"requestId": "223f998d-b0d6-43e4-95cb-5c691572417d"
}
1.3. Update sku
1.3.1. SERVICE_TYPE
UPDATE_SKU_INFO
1.3.2. Request
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| sku | Y | String | “sku1” | sku , up to 255 characters |
| title | Y | String | “abc” | The title of the product , up to 255 characters |
| barcode | N | String | Product barcode, up to 255 characters | |
| type | Y | String | “SINGLE” | Sku Type |
| isAssembly | N | Int | 0 or 1 | is assembly 1:yes,Need to fill in the "parts" field 0:no |
| picUrl | N | String | Image address, up to 255 characters,It is recommended to use picUrlList | |
| picUrlList | N | List<String> |
Multiple image addresses | |
| saleStatus | N | String | Sales status, up to 50 characters | |
| weight | Y | Decimal | gross weight | |
| netWeight | Y | Decimal | net weight | |
| weightUnit | Y | String | Units of weight | |
| abbrTitle | N | String | Abbreviation, up to 255 characters | |
| brand | N | String | Product brand, up to 50 characters | |
| unit | N | String | Commodity unit, maximum 128 characters | |
| color | N | String | Color, up to 255 characters | |
| size | N | String | Size, up to 255 characters | |
| length | Y | Decimal | length | |
| width | Y | Decimal | width | |
| height | Y | Decimal | height | |
| dimensionUnit | Y | String | Units of length | |
| itemPackage | N | Number | Package quantity | |
| description | N | String | Product description, maximum 2048 characters | |
| descriptionEn | N | String | Product descriptions are in English, with a maximum of 2048 characters | |
| functionDescription | N | String | Performance description, up to 2048 characters | |
| enable | Y | Number | Item status (0: disabled; 1: Valid) | |
| serialEnable | N | Number | 0 | Whether to enable serial number management (0: No; 1: Yes) |
| packingRate | N | Number | Packing rate ,If it is not filled, the size of the outer box and the outer box will not be saved gross weight 、Outer box net weight | |
| cartonLength | N | Decimal | The outer box length, This field is mandatory when entering the packing rate. | |
| cartonWidth | N | Decimal | The outer box width, This field is mandatory when entering the packing rate. | |
| cartonHeight | N | Decimal | The outer box height, This field is mandatory when entering the packing rate. | |
| cartonWeight | N | Decimal | The outer box gross weight, This field is mandatory when entering the packing rate. | |
| cartonNetWeight | N | Decimal | The outer box net weight, This field is mandatory when entering the packing rate. | |
| cartonDimensionUnit | N | String | The outer box Dimension units(cm; m), This field is mandatory when entering the packing rate. | |
| cartonWeightUnit | N | String | The outer box Units of weight(KG; G), This field is mandatory when entering the packing rate. | |
| chineseCustomsDeclarationName | N | String | Chinese customs declaration name | |
| englishCustomsDeclarationName | N | String | English customs declaration name | |
| cdPriceMethod | N | String | How the customs declaration price is calculated(RATE:proportion; CONSTANT:fixed) | |
| cdPriceRate | N | Decimal | Proportion of customs declaration price | |
| cdPriceMaximum | N | Decimal | The maximum value of the customs declaration price | |
| customsDeclarationPrice | N | Decimal | Customs price | |
| customsDeclarationPriceUnit | N | String | Unit of customs declaration price(CNY; USD; CAD; GBP; EUR; JRY) | |
| customsCode | N | String | Officers code | |
| exportTax | N | Decimal | Export tax rates | |
| declaration | N | String | Instructions for declaration | |
| dangerousTransportGoodsType | N | String | Type of dangerous goods(NONE, LIQUID, POWDER, CONTAIN_ELECTRIC, ELECTRIC) | |
| batteryType | N | Integer | Battery type (0: uncharged; 1: Supporting lithium-ion battery; 2: Built-in lithium-ion battery; 3: Supporting lithium metal battery; 4: Built-in lithium metal battery; 5: Dry battery) | |
| ccPriceMethod | N | String | How the customs clearance price is calculated(RATE:proportion; CONSTANT:fixed) | |
| ccPriceRate | N | Decimal | Percentage of customs clearance price | |
| ccPriceMaximum | N | Decimal | The maximum value of the customs clearance price | |
| ccPrice | N | Decimal | Customs clearance price | |
| ccPriceUnit | N | String | The currency of the customs clearance price(CNY; USD; CAD; GBP; EUR; JRY) | |
| needQualityInspection | N | Boolean | Whether quality inspection is required | |
| price | N | Decimal | Default selling price | |
| priceUnit | N | String | Default selling price unit (uppercase 3 digit code) | |
| asin | N | String | ASIN | |
| customProp1 | N | String | Custom attribute 1 | |
| customProp2 | N | String | Custom Attribute 2 | |
| customProp3 | N | String | Custom attribute 3 | |
| categoryName1 | N | String | Level 1 commodity classification | |
| categoryName2 | N | String | Secondary product categories | |
| categoryName3 | N | String | Three levels of product classification | |
| remarkName | N | String | Description | |
| singleSkuList | N | List <SubSkuDTO> |
Sub-product information | |
| parts | N | List <SubSkuDTO> |
Assembled product component information requires the following fields to be filled: 1. sku: component SKU code 2. quantity: component quantity |
|
| singleBoxCode | N | String | Single-box barcode | |
| singleItemVolume | N | Decimal | The volume of the single item | |
| skuCustomFieldValueVOList | N | List <SkuCustomFieldValueVO> |
Custom Field info | |
| purchaseCost | N | Decimal | Purchase cost | |
| purchaseCostUnit | N | String | Purchase cost currency | |
| skuSupplierList | N | List <SkuSupplierDTO> |
Supplier | |
| isRelatedSingleCost | N | Boolean | Whether to associate the purchase cost of single items. This only takes effect for combined items | |
| developerUserNameList | N | List |
Developer account | |
| isIssueInvoice | N | Int | Invoice Required 1: Yes 2: No |
|
| ncm | N | String | NCM, required when isIssueInvoice=1 | |
| taxGoodsName | N | String | tax goods name, required when isIssueInvoice=1 | |
| cest | N | String | CEST,Optional, fill in when isIssueInvoice=1 | |
| placeOrigin | N | String | Country of Origin,Optional, fill in when isIssueInvoice=1 |
SubSkuDTO(Sub-product information)
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| sku | Y | String | “sku1” | Sub-product SKUs |
| quantity | Y | Number | 3 | The number of sub-products in the combination |
SkuCustomFieldValueVO(Custom Field )
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| customFieldId | Y | Long | 3 | SERVICE_TYPE=CUSTOMER_FIELD_QUERY return id |
| value | Y | String | “michael” | Custom Field value |
SkuSupplierDTO(Supplier information)
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| name | Y | String | Supplier name | |
| isDefault | Y | Boolean | Whether default supplier | |
| purchaserList | Y | List <String> |
Purchaser, is username not name | |
| deliveryCycle | Y | Number | Delivery Date, day | |
| purchasePrice | N | Decimal | Purchase price, two digits after the decimal point are significant, and round up or down | |
| purchasePriceUnit | N | String | Purchase price currency(CNY,USD,CAD,GBP, EUR,JRY,etc) | |
| minimumPurchaseQuantity | N | Number | Minimum purchase quantity, which should be a positive integer | |
| purchaseTaxRate | N | Decimal | Purchase tax rate, unit: % | |
| drawbackRate | N | Decimal | Tax rebate rate, unit: % | |
| purchaseUrl | N | String | Purchase url |
1.3.3. Reponse
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| errorCode | Y | String | “DATA_INPUT_ERROR” | Error Code |
| errorMsg | Y | String | “The input of Params is incorrect” | Business Error Messages |
| state | Y | String | success | Response State |
Request example:
curl --location --request POST 'https://gerp-test1.800best.com/api/v1/sku' \
--header 'User-Agent: Apifox/1.0.0 (https://apifox.com)' \
--form 'appId="TEST"' \
--form 'serviceType="UPDATE_SKU_INFO"' \
--form 'bizParam="{
\"sku\":\"ckfsku\",
\"title\":\"ckfsku\",
\"type\":\"SINGLE\",
\"weight\":1,
\"netWeight\":1,
\"weightUnit\":\"KG\",
\"length\":1,
\"width\":1,
\"height\":1,
\"dimensionUnit\":\"cm\",
\"enable\":1,
\"serialEnable\":1,
\"shelfLife\":90,
}"' \
--form 'timestamp="1731742317"' \
--form 'sign="f843a75cdb3cf14f403fa423108bc410"'
Response example:
{
"state": "success",
"errorCode": "",
"errorMsg": "",
"bizContent": "{\"notSuccess\":false,\"state\":\"success\"}",
"requestId": "223f998d-b0d6-43e4-95cb-5c691572417d"
}
1.4. Enables/deactivates the sku
1.4.1. SERVICE_TYPE
UPDATE_SKU_STATUS
1.4.2. Request
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| sku | Y | String | “sku1” | The SKU that was entered when adding a product |
| enable | Y | Number | Item status (0: disabled; 1: Valid) |
1.4.3. Reponse
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| errorCode | Y | String | “DATA_INPUT_ERROR” | Error Code |
| errorMsg | Y | String | “The input of Params is incorrect” | Business Error Messages |
| state | Y | String | success | Response State |
1.5. QUERY_SYS_SKU
1.5.1. SERVICE_TYPE
QUERY_SYS_SKU_LIST_SKU
1.5.2. Request
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| platform | Y | String | “sku1” | AMAZON,ALIEXPRESS,EBAY,WALMART,WISH, LAZADA,SHOPEE_CNSC,SHOPEE,TIKTOK,TIKTOK_GLOBAL, TEMU, ... |
| shopName | Y | Number | shop-name | |
| skuExtDTOList | Y | List<SkuExtDTO> | Up to 5 at a time |
SkuExtDTO(SKU query criteria)
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| onlineSkuId | N | String | "online-sku-id" | Online SKU ID, Other(LAZADA,SHOPEE_CNSC,SHOPEE,TIKTOK,TIKTOK_GLOBAL...)user sku id |
| onlineSku | N | String | “online-sku-code” | Online skuCode,(AMAZON,ALIEXPRESS,EBAY,WALMART,WISH) use sku code |
1.5.3. Reponse
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| platform | Y | String | “sku1” | AMAZON,ALIEXPRESS,EBAY,WALMART,WISH, LAZADA,SHOPEE_CNSC,SHOPEE,TIKTOK,TIKTOK_GLOBAL, TEMU, ... |
| shopName | Y | Number | shop-name | |
| skuExtDTOList | Y | List<ReturnSkuExtDTO> |
ReturnSkuExtDTO
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| onlineSkuId | N | String | "online-sku-id" | OnlineSkuId,Other(LAZADA,SHOPEE_CNSC,SHOPEE,TIKTOK,TIKTOK_GLOBAL等) |
| onlineSku | N | String | “online-sku-code” | OnlineSkuCode,AMAZON,ALIEXPRESS,EBAY,WALMART,WISH |
| onlineSpuId | N | String | OnlinespuId, if there is | |
| onlineSpu | N | String | OnlinespuCode, if there is | |
| skuId | Y | String | Sys-SkuId | |
| sku | Y | String | Sys-skuCode | |
| skuName | Y | String | Sys-SkuName | |
| singleSkuList | N | List<SubSkuDTO> | If the system product is a combination product, return the sub product information |
SubSkuDTO
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| sku | N | String | subskuCode | |
| skuName | N | String | subskuName | |
| quantity | N | String | subQuantity |
1.6. Sku category
API URL
post {HTTP(S)host} /api/{version}/sku_category
Same rules as ERP page Product - Category (/biz/sku_category/): max three levels; name unique under the same parent; update cannot change parent; delete fails if used by system SKU or supplier, and cascades to children. Update/delete require id and version.
Open platform authorization: None of the four APIs are auto-granted. Enable QUERY_SKU_CATEGORY_LIST / CREATE_SKU_CATEGORY / UPDATE_SKU_CATEGORY / DELETE_SKU_CATEGORY for the app on the open platform, or the call returns SERVICE_TYPE_NOT_ALLOW.
Create/update SKU still attach categories by categoryName1 / categoryName2 / categoryName3.
1.6.1. Query sku category tree
SERVICE_TYPE
QUERY_SKU_CATEGORY_LIST
Request
Same as ERP page /biz/sku_category/get_all: full category tree (level-1 nodes with childList). Not a paged query. Do not send page / pageSize. No business filters and no row cap. bizParam may be empty or {}.
Response
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| errorCode | Y | String | ||
| errorMsg | Y | String | ||
| state | Y | String | success | |
| result | Y | List<SkuCategory> | Level-1 list; children in childList |
SkuCategory
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| id | Y | Long | 1001 | Category primary key |
| name | Y | String | Fruit (A) | Name |
| hsCode | N | String | 3 | HS code |
| level | Y | Number | 1 | 1/2/3 |
| parentId | Y | Long | 0 | Parent id; 0 for level 1 |
| parentName | N | String | Parent name | |
| version | Y | Long | 0 | Optimistic lock; required on update/delete |
| childList | N | List<SkuCategory> | Children |
1.6.2. Create sku category
SERVICE_TYPE
CREATE_SKU_CATEGORY
Request
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| name | Y | String | Fruit | Category name |
| parentId | Y | Long | 0 | Parent id; 0 for level 1 |
| hsCode | N | String | 0801 | HS code |
Response
On success result.id is the new category id. Errors match the page, e.g. SKU_CATEGORY_NAME_EXISTS, SKU_CATEGORY_PARENT_NOT_EXISTS, DATA_INPUT_ERROR (more than three levels).
1.6.3. Update sku category
SERVICE_TYPE
UPDATE_SKU_CATEGORY
Request
| Params | Require | DataType | Description |
|---|---|---|---|
| id | Y | Long | Category primary key |
| version | Y | Long | Optimistic lock |
| name | N | String | Category name |
| hsCode | N | String | HS code |
Cannot change parentId. Version mismatch returns VERSION_DIFF.
1.6.4. Delete sku category
SERVICE_TYPE
DELETE_SKU_CATEGORY
Request
| Params | Require | DataType | Description |
|---|---|---|---|
| id | Y | Long | Category primary key |
| version | Y | Long | Optimistic lock |
Used by SKU: CATEGORY_USED_BY_SKU. Used by supplier: CATEGORY_USED_BY_SUPPLIER. Children are deleted together.
1.7. SKU property
API URL
post {HTTP(S)host}/api/{version}/skuProperty
SKU properties include unit, brand, sales status, and custom classification. This section does not manage SPU attributes. Text limits: name/nameEN max 50, remark max 128.
1.7.1. Create SKU property
SERVICE_TYPE
CREATE_SKU_PROPERTY
Request
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| type | Y | String | BRAND | UNIT, BRAND, SALE_STATUS, CUSTOM. SPU is not accepted |
| name | Y | String | Nike | Unique within the same type, max 50 |
| nameEN | N | String | Nike | English name, max 50 |
| sequence | N | Number | 0 | Sort value, 0-100, default 0 |
| remark | N | String | note | Max 128 |
Response
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| errorCode | Y | String | Error code | |
| errorMsg | Y | String | Error message | |
| state | Y | String | success | Result |
| result.id | Y | Number | 88 | Created id |
Request example:
curl --location --request POST 'https://gerp-test1.800best.com/api/v1/skuProperty' \
--form 'appId="TEST"' \
--form 'serviceType="CREATE_SKU_PROPERTY"' \
--form 'bizParam="{\"type\":\"BRAND\",\"name\":\"Nike\"}"' \
--form 'timestamp="1756865700001"' \
--form 'sign="sign"'
Response example:
{
"state": "success",
"errorCode": "",
"errorMsg": "",
"bizContent": "{\"notSuccess\":false,\"result\":{\"id\":88,\"name\":\"Nike\",\"sequence\":0,\"type\":\"BRAND\"},\"state\":\"success\"}"
}
1.7.2. Update SKU property
SERVICE_TYPE
UPDATE_SKU_PROPERTY
Request
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| id | Y | Number | 88 | Property id |
| type | Y | String | BRAND | Must match the stored type |
| name | Y | String | Nike | Unique within the same type |
| nameEN | N | String | Nike | Unchanged when omitted |
| sequence | N | Number | 10 | Unchanged when omitted |
| remark | N | String | Unchanged when omitted |
On success, the decoded bizContent is:
{"notSuccess":false,"state":"success"}
1.7.3. Delete SKU property
SERVICE_TYPE
DELETE_SKU_PROPERTY
Request
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| id | Y | Number | 88 | Property id |
| type | Y | String | BRAND | Must match the stored type |
The success response is the same as update. A missing target or type mismatch returns a business error.
1.7.4. Query SKU property list
SERVICE_TYPE
QUERY_SKU_PROPERTY_LIST
Request
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| page | N | Number | 1 | Page number, default 1, must be >= 1 |
| pageSize | N | Number | 20 | Default 20, range 1-200 |
| type | Y | String | BRAND | UNIT, BRAND, SALE_STATUS, CUSTOM |
| name | N | String | Nike | Exact match |
Response
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| total | Y | Number | 1 | Total count |
| result | Y | List<SkuProperty> | Records |
SkuProperty
| Params | Require | DataType | Sample | Description |
|---|---|---|---|---|
| id | Y | Number | 88 | Id |
| type | Y | String | BRAND | Type |
| name | Y | String | Nike | Name |
| nameEN | N | String | Nike | English name |
| sequence | Y | Number | 0 | Sort |
| remark | N | String | Remark |
An empty page returns result=[] and total=0.
Page response example:
{
"state":"success",
"errorCode":"",
"errorMsg":"",
"bizContent":"{\"notSuccess\":false,\"result\":[{\"id\":88,\"type\":\"BRAND\",\"name\":\"Nike\",\"sequence\":0}],\"state\":\"success\",\"total\":1}"
}
1.7.5. Error response
Validation, duplicate-name, missing-target, and type-mismatch errors are returned inside bizContent. See Error Code.
{
"state":"success",
"errorCode":"",
"errorMsg":"",
"bizContent":"{\"errorCode\":\"sku.property.type.invalid\",\"errorMsg\":\"Invalid sku property type\",\"notSuccess\":true,\"state\":\"failure\"}"
}
1.8. SPU attribute
API URL
post {HTTP(S) address}/api/{version}/spuAttribute
Manage SPU attribute names and values. Names and values are trimmed, max 50 characters; at most 300 values. An attribute referenced by an SPU cannot be deleted; a referenced name or value cannot be removed or renamed.
1.8.1. Create SPU attribute
SERVICE_TYPE
CREATE_SPU_ATTRIBUTE
Request
| Field | Required | Type | Example | Notes |
|---|---|---|---|---|
| name | Y | String | Color | Attribute name must be unique, max 50 |
| values | Y | List<String> | ["Red","Blue"] | Full list, each max 50, at most 300 |
Response
| Field | Required | Type | Example | Notes |
|---|---|---|---|---|
| errorCode | Y | String | Error code | |
| errorMsg | Y | String | Error message | |
| state | Y | String | success | Result |
| result.id | Y | Number | 88 | New id |
Response example:
{
"state":"success",
"errorCode":"",
"errorMsg":"",
"bizContent":"{\"notSuccess\":false,\"result\":{\"id\":88,\"name\":\"Color\",\"values\":[\"Red\",\"Blue\"]},\"state\":\"success\"}"
}
1.8.2. Update SPU attribute
SERVICE_TYPE
UPDATE_SPU_ATTRIBUTE
Request
| Field | Required | Type | Example | Notes |
|---|---|---|---|---|
| id | Y | Number | 88 | Missing id does not create |
| name | Y | String | Color | Cannot rename when referenced |
| values | Y | List<String> | ["Red","Blue"] | Full target list; referenced values cannot be dropped |
On success, decoded bizContent is {"notSuccess":false,"state":"success"}.
1.8.3. Delete SPU attribute
SERVICE_TYPE
DELETE_SPU_ATTRIBUTE
Request
| Field | Required | Type | Example | Notes |
|---|---|---|---|---|
| id | Y | Number | 88 | Fails when referenced |
The success response is the same as update. A referenced attribute returns a business error and is not deleted.
1.8.4. Get SPU attribute
SERVICE_TYPE
GET_SPU_ATTRIBUTE
Request
| Field | Required | Type | Example | Notes |
|---|---|---|---|---|
| id | Y | Number | 88 | Attribute id |
Detail returns id, name, values, and attributeValues with related.
Each attributeValues item contains name, value, and related; related=true means that the value is referenced by an SPU.
1.8.5. Query SPU attribute list
SERVICE_TYPE
QUERY_SPU_ATTRIBUTE_LIST
Request
| Field | Required | Type | Example | Notes |
|---|---|---|---|---|
| page | N | Number | 1 | Default 1, >= 1 |
| pageSize | N | Number | 20 | Default 20, 1-200 |
| name | N | String | Color | Exact match |
Empty result is result=[] and total=0. List does not include per-value reference flags; use detail.
A successful list response contains result and total inside bizContent; each result item contains id, name, and values. Failures use the same envelope as SKU property errors.
1.9. SPU Module API
API URL
post {HTTP(S)host}/api/{version}/spu
The current version is v1, and the request URL is /api/v1/spu.
1.9.1. Create system SPU
SERVICE_TYPE
CREATE_SPU
Creates one system SPU per request. You can create new SKUs and link existing SKUs in the same request. Both single-variant and multi-variant products are supported.
The app must be granted separate access to CREATE_SPU; existing permissions for SKU creation or SPU attribute APIs do not grant access to this API. The default rate limit is 50 requests per 60 seconds. The actual quota depends on the app configuration.
Request
All the following parameters are provided in bizParam.
| Params | Required | DataType | Example | Description |
|---|---|---|---|---|
| spu | Y | String | OPEN-SPU-001 | SPU code, up to 255 characters; must be unique within the current customer |
| title | Y | String | Basic top | SPU name, up to 255 characters |
| isMultiAttribute | Y | Boolean | true | Whether the product has multiple variants; defaults to true. false means a single variant. For multiple variants, provide spuAttributes |
| brandName | N | String | Example Brand | Existing brand name, looked up within the current customer; returns an error if not found and does not create a brand automatically |
| categoryName1 | N | String | Clothing | Existing level-1 product category name |
| categoryName2 | N | String | Tops | Existing level-2 category name; the correct level-1 category must also be provided |
| categoryName3 | N | String | Short sleeves | Existing level-3 category name; the correct level-1 and level-2 categories must also be provided |
| picUrls | N | List<String> | ["https://example.com/main.jpg"] | SPU image URLs; the first is the main image and the rest are additional images. Omitted, null, or an empty list does not set images |
| details | N | String | Product details | Rich-text details in HTML format |
| video | N | Video | See below | Product video |
| priceUnit | Y | String | USD | Selling price currency, such as CNY, USD, EUR, JPY, or VND; must be a currency enum supported by the system. Currency enums |
| purchaseCostUnit | Y | String | CNY | Purchase cost currency; must be a currency enum supported by the system. Currency enums |
| dimensionUnit | Y | String | cm | Dimension unit: cm, In, or m; case-sensitive |
| weightUnit | Y | String | KG | Weight unit: KG, LBS, or GRAM; case-sensitive |
| spuAttributes | N | List<Attribute> | See below | SPU attributes and their available values; explicitly providing these is recommended for multi-variant products |
| skus | Conditional | List<SpuSku> | See below | At least 1 SKU row for multiple variants; for a single variant, omit this field or provide 0-1 rows |
Brands and categories must already exist under the customer associated with the current app. Blank category names are treated as omitted. Specified categories must match their levels and the complete parent-child path. Categories are not created automatically.
If priceUnit, purchaseCostUnit, dimensionUnit, or weightUnit is omitted or null, the system's creation rules apply; an empty string is an invalid enum value. The SPU selling price currency defaults to USD. For newly created SKUs, the selling price and purchase cost currencies default to the customer's effective currency. Shared top-level fields and default rules also apply when linking existing SKUs; see below.
Video (product video)
| Params | Required | DataType | Example | Description |
|---|---|---|---|---|
| videoName | N | String | Product showcase | Video name |
| videoUrl | N | String | https://example.com/product.mp4 | Video URL |
Attribute (available SPU attributes)
| Params | Required | DataType | Example | Description |
|---|---|---|---|---|
| name | Y | String | Color | Attribute name; must be unique within the same SPU |
| attributeValues | Conditional | List<AttributeValue> | See below | Use this field for attribute value images and sorting; takes precedence over values when both fields are non-empty |
Shared attributes and attribute values are automatically created or supplemented according to the system's creation rules. Internal attribute IDs are not required. Values within the same attribute must be unique. Shared attributes may remain even if SPU creation fails.
AttributeValue (attribute value)
| Params | Required | DataType | Example | Description |
|---|---|---|---|---|
| name | Y | String | Color | Attribute name |
| value | Y | String | Red | Attribute value |
| picUrl | N | String | https://example.com/red.jpg | Attribute value image URL |
| sort | N | Integer | 1 | Sort order |
SpuSku (create or link a SKU)
| Params | Required | DataType | Example | Description |
|---|---|---|---|---|
| skuBindMode | Y | String | CREATE | CREATE: create a SKU and link it; LINK: link an existing SKU |
| sku | Y | String | OPEN-SKU-RED | Required; matches an existing SKU within the current customer by code, case-insensitively |
| title | Y | String | Basic top - Red | Required; SKU name |
| price | N | Decimal | 19.90 | Default selling price; for LINK, retains the original value if omitted or null |
| purchaseCost | N | Decimal | 10.00 | Purchase cost; for LINK, retains the original value if omitted or null |
| width | N | Decimal | 20 | Width, using the top-level dimensionUnit; for LINK, retains the original value if omitted or null |
| height | N | Decimal | 2 | Height, using the top-level dimensionUnit; for LINK, retains the original value if omitted or null |
| length | N | Decimal | 30 | Length, using the top-level dimensionUnit; for LINK, retains the original value if omitted or null |
| weight | N | Decimal | 0.2 | Weight, using the top-level weightUnit; for LINK, retains the original value if omitted or null |
| attributeValues | Conditional | List<AttributeValue> | [{"name":"Color","value":"Red"}] | Variant attribute values for this SPU association; variant information is required for multi-variant products |
| attributeValueList | N | List<String> | ["Red","M"] | Compatible variant value array; attribute names correspond to the order of spuAttributes. Non-empty attributeValues takes precedence |
| sort | N | Integer | 1 | SKU row sort order |
| priceControlConfig | N | PriceControl | See below | SKU price control configuration; price control settings must be consistent across SKUs, for example, enabled must be true for all SKUs and priceMode must be UNIFIED for all SKUs |
For a newly created SKU, omitted length, width, height, and weight values each default to 1. New SKUs have type SINGLE.
Variant and linking rules:
- Single variant:
isMultiAttribute=false, with at most one SKU row. If no SKU is provided, only the SPU is created; no SKU is created automatically. Variant attribute associations are not saved for single-variant products. - Multiple variants:
isMultiAttribute=trueor omitted, with at least one SKU row. Each row must contain variant information. Variant combinations must be unique across SKUs, and attribute names must be unique within each row. - If a SKU uses an attribute whose available values are defined in the SPU, its value must be one of those available values.
- Each SKU row must explicitly specify
skuBindMode. If LINK cannot find the SKU, the request fails instead of creating one. The same existing SKU cannot be linked more than once. - A LINK target must be enabled, must not be associated with another SPU, and must have type SINGLE or ASSEMBLY. An ASSEMBLY SKU whose purchase cost is linked to its component SKUs cannot be linked to an SPU.
- For LINK rows, omitted or null name, image, selling price, purchase cost, dimensions, and weight fields are filled with their original values. Non-null values are used for updates; 0 and empty strings also enter business processing.
- Brand, categories, selling price currency, purchase cost currency, dimension unit, and weight unit all use the top-level parameters and system rules. Omitting these fields does not guarantee that the corresponding fields of an existing SKU remain unchanged. When linking, an omitted selling price currency defaults to USD, and omitted dimension and weight units default to cm and KG. To preserve shared fields, explicitly provide the desired values.
- Variant values and sort order come from the current request and are not filled from the existing SKU's previous variant associations.
Only the business fields listed above participate in creation. Callers cannot specify internal primary keys, tenants, login identities, validation switches, or similar fields. Specify brands and categories by name, and existing SKUs by code.
PriceControl (SKU price control configuration)
| Params | Required | DataType | Description |
|---|---|---|---|
| selfConfig | N | RuleConfig | Price control configuration for self-operated sales |
| distributionConfig | N | RuleConfig | Distribution price control configuration |
RuleConfig (price control rule)
| Params | Required | DataType | Example | Description |
|---|---|---|---|---|
| enabled | Y | Boolean | true | Whether enabled; use false to disable the rule |
| priceMode | Conditional | String | UNIFIED | Required when enabled: UNIFIED (unified price control) or BY_COUNTRY (price control by country) |
| defaultMinPrice | N | Decimal | 15.00 | Unified minimum price, optional; must be non-negative and accompanied by a currency when provided |
| defaultCurrency | Conditional | String | USD | Required when the unified minimum price is provided |
| countryRules | N | CountryRuleSet | See below | Country-specific price control rules; required for price control by country |
CountryRuleSet (country rule set)
| Params | Required | DataType | Description |
|---|---|---|---|
| countries | N | List<CountryRule> | Rules for individual countries; country codes must be unique |
| defaultCountryRule | N | DefaultCountryRule | Default rule for other countries |
CountryRule (country rule)
| Params | Required | DataType | Example | Description |
|---|---|---|---|---|
| countryCode | Y | String | US | Country code; see Countries |
| minPrice | Y | Decimal | 15.00 | Minimum price; must not be negative |
| currency | Y | String | USD | Price limit currency; see Currency enums |
DefaultCountryRule (default rule for other countries)
| Params | Required | DataType | Example | Description |
|---|---|---|---|---|
| enabled | N | Boolean | true | Whether enabled |
| minPrice | Conditional | Decimal | 15.00 | Required when enabled; must not be negative |
| currency | Conditional | String | USD | Required when enabled; see Currency enums |
Price control is processed as rule objects. This API does not support partial updates to arbitrary nested fields. skuId is not required.
Response
The API uses a two-layer response. bizContent is a JSON string and must be parsed separately. Success in the outer response only means that protocol processing succeeded; also check bizContent.state to determine whether creation succeeded.
Outer response
| Params | Required | DataType | Example | Description |
|---|---|---|---|---|
| state | Y | String | success | success / failure |
| errorCode | Y | String | SIGNATURE_ERROR | Protocol error code; an empty string on success |
| errorMsg | Y | String | Signature error | Protocol error message; an empty string on success |
| bizContent | N | String | See response example | Business response as a JSON string; may be absent on protocol failure |
| requestId | N | String | Request identifier; refer to the actual response |
Business response (after parsing bizContent)
| Params | Required | DataType | Example | Description |
|---|---|---|---|---|
| state | Y | String | success | Creation result: success / failure |
| notSuccess | Y | Boolean | false | Whether the operation failed |
| errorCode | N | String | spu.number.repeat | Business error code; returned on failure |
| errorMsg | N | String | Duplicate SPU code | Business error message; returned on failure, with text depending on the language setting |
| args | N | List | Error arguments, as returned in the actual response | |
| extraData | N | List | Additional information for some business failures | |
| traceId | N | String | Identifier for troubleshooting |
A successful response does not return result, an SPU ID, or a SKU list. Repeated requests with the same SPU code do not update the original product, and idempotent success is not guaranteed.
Request examples
Multiple variants: create new SKUs and link existing SKUs
In the following bizParam example, the brand and categories must already exist, and existing SKUs must meet the linking requirements above:
{
"spu": "YF_20261026_01",
"title": "YF_20261026_01",
"picUrls":
[
"https://qianyierp-test.oss.aliyuncs.com/attachment/20261026/image/NmJiYmY2MGIxNTAyZWE2YjRhODk5YTYwNzE4MzY0NDU.png",
"https://qianyierp-test.oss.aliyuncs.com/attachment/20261026/image/MjU5YjMyODMxNTE1MjJmNDUwOTc5YzkxZmI1ZmU4MWI.jpg"
],
"video":
{
"videoUrl": "https://qianyierp-test.oss.aliyuncs.com/attachment/20261026/video/ZjMyNWMxZmRhNmYwZmI0NDg5ZmYwODk4Y2Q2Y2RmM2M.mp4",
"videoName": "NzVkMTE0NDNhYzc5YTQ2OTY1NTMxODlmMmZhMzc4MWU=.mp4"
},
"priceUnit": "BZD",
"purchaseCostUnit": "BZD",
"weightUnit": "KG",
"dimensionUnit": "cm",
"details": "%3Cp%3EProduct%20details%3C%2Fp%3E",
"description": "",
"isMultiAttribute": true,
"brandName": "brand",
"categoryName1": "111",
"categoryName2": "222",
"categoryName3": "333",
"spuAttributes":
[
{
"name": "YF_TEST",
"attributeValues":
[
{
"value": "Test 1",
"name": "YF_TEST",
"sort": 1
},
{
"value": "Test 2",
"name": "YF_TEST",
"picUrl": null,
"sort": 2
}
]
},
{
"name": "Flavor",
"attributeValues":
[
{
"value": "Lemon",
"sort": 1
},
{
"value": "Blueberry",
"picUrl": null,
"sort": 2
}
]
}
],
"skus":
[
{
"skuBindMode": "LINK",
"attributeValueList":
[
"Test 1",
"Lemon"
],
"sku": "YF_20261026_02",
"title": "YF_20261026_02",
"sort": 1,
"priceControlConfig":
{
"selfConfig":
{
"enabled": true,
"priceMode": "BY_COUNTRY",
"countryRules":
{
"countries":
[
{
"countryCode": "US",
"currency": "USD",
"minPrice": 100
}
],
"defaultCountryRule":
{
"enabled": true,
"minPrice": 11,
"currency": "BZD"
}
}
},
"distributionConfig":
{
"enabled": true,
"priceMode": "UNIFIED",
"defaultMinPrice": 200,
"defaultCurrency": "BZD"
}
}
},
{
"skuBindMode": "LINK",
"picUrl": null,
"attributeValueList":
[
"Test 2",
"Blueberry"
],
"sku": "YF_20261026_04",
"purchaseCost": 2,
"price": 3,
"weight": 4,
"length": 3,
"width": 4,
"height": 100,
"title": "YF_20261026_04",
"sort": 2
}
]
}
Single variant: create an SPU and one SKU
curl --location --request POST 'https://gerp-test1.800best.com/api/v1/spu' \
--form-string 'appId=TEST' \
--form-string 'serviceType=CREATE_SPU' \
--form-string 'bizParam={"spu":"OPEN-SPU-002","title":"Basic cup","isMultiAttribute":false,"priceUnit":"USD","purchaseCostUnit":"CNY","dimensionUnit":"cm","weightUnit":"KG","skus":[{"skuBindMode":"CREATE","sku":"OPEN-SKU-CUP","title":"Basic cup","price":19.90,"purchaseCost":10.00,"length":10,"width":10,"height":20,"weight":0.3}]}' \
--form-string 'timestamp=1793059200000' \
--form-string 'sign=REPLACE_WITH_SIGNATURE_CALCULATED_FROM_ALL_CURRENT_REQUEST_PARAMETERS'
Replace the example timestamp and signature with actual values. Each --form-string value is the form string received by the server; do not add another pair of enclosing double quotes around the JSON.
Single variant: create only an SPU
bizParam:
{
"spu": "OPEN-SPU-003",
"title": "Product awaiting SKU linking",
"isMultiAttribute": false
}
Response examples
Success:
{
"state": "success",
"errorCode": "",
"errorMsg": "",
"bizContent": "{\"notSuccess\":false,\"state\":\"success\"}"
}
Business failure (duplicate SPU code):
{
"state": "success",
"errorCode": "",
"errorMsg": "",
"bizContent": "{\"errorCode\":\"spu.number.repeat\",\"errorMsg\":\"Duplicate SPU code\",\"notSuccess\":true,\"state\":\"failure\"}"
}
Protocol failure (signature error):
{
"state": "failure",
"errorCode": "SIGNATURE_ERROR",
"errorMsg": "Signature error"
}
The examples above omit optional troubleshooting fields. Error messages are illustrative only.
Common error codes
Business error codes are case-sensitive. The table below lists the actual error code values returned.
| Error code | Description |
|---|---|
| data.input.error | Empty business parameters, an empty SKU row, no binding mode, multiple SKU rows for a single-variant product, or similar errors |
| data.input.error.msg | Invalid top-level currency or unit; the error message includes the relevant field name |
| spu.number.blank | SPU code is blank |
| spu.title.blank | SPU name is blank |
| spu.title.length.more.then.number | SPU code or name exceeds 255 characters |
| spu.number.repeat | SPU code already exists |
| spu.multi.attribute.sku.required | No SKU provided for a multi-variant product |
| sku.not.exist | The SKU specified by LINK does not exist or does not belong to the current customer |
| spu.sku.repeat | The same SKU is linked more than once |
| sku.exist | The code of a newly created SKU already exists |
| sku.duplicate | Duplicate new SKU codes in the request |
| sku.related.other.spu | SKU is already associated with another SPU |
| sku.can.not.be.disabled | SKU is disabled and cannot be linked |
| unsupport.sku.type | SKU type does not support linking |
| invalid.attribute | Variant information is missing for a multi-variant SKU |
| spu.attribute.name.duplicate | Duplicate SPU attribute names or duplicate attribute names within the same SKU row |
| spu.attribute.value.duplicate | Duplicate available values within the same SPU attribute |
| sku.attribute.value.duplicate | Different SKUs use the same variant combination |
| sku.attribute.not.exist.spu | A SKU attribute value is outside the available values defined in the SPU |
| brand.not.exist | Brand does not exist |
| sku.category.level1.not.exists | Level-1 category does not exist or does not match |
| sku.category.level2.not.exists | Level-2 category does not exist or its parent-child path does not match |
| sku.category.level3.not.exists | Level-3 category does not exist or its parent-child path does not match |
Signature, app authorization, IP allowlist, and rate limit failures are usually returned in the outer response:
| Error code | Description |
|---|---|
| APP_NOT_EXIST | App does not exist or is invalid |
| SIGNATURE_ERROR | Incorrect signature |
| SERVICE_TYPE_NOT_EXIST | Unsupported service type |
| SERVICE_TYPE_NOT_ALLOW | The app has not been granted access to this API |
| SERVICE_IP_NOT_ALLOW | The caller's IP address is not in the allowlist |
| REQUEST_IS_THROTTLED | Request quota exceeded |
| SYSTEM_ERROR | JSON deserialization failed or another unexpected exception occurred |
If the primary account of the customer associated with the app does not exist or is invalid, the business response returns user.not.exist. Other product, image, and price control errors use the system's existing error codes. For complete definitions, see Error Code.
1.9.2. Update system SPU
SERVICE_TYPE
UPDATE_SPU
Updates one system SPU per request. You can create new SKUs and link existing SKUs in the same request. Both single-variant and multi-variant products are supported.
The app must be granted separate access to UPDATE_SPU; existing permissions for SKU creation or SPU attribute APIs do not grant access to this API. The default rate limit is 50 requests per 60 seconds. The actual quota depends on the app configuration.
Request
All the following parameters are provided in bizParam.
| Params | Required | DataType | Example | Description |
|---|---|---|---|---|
| spu | Y | String | OPEN-SPU-001 | SPU code that already exists in the ERP system |
| title | Y | String | Basic top | SPU name, up to 255 characters |
| isMultiAttribute | Y | Boolean | true | Whether the product has multiple variants; defaults to true. false means a single variant. For multiple variants, provide spuAttributes |
| brandName | N | String | Example Brand | Existing brand name, looked up within the current customer; returns an error if not found and does not create a brand automatically |
| categoryName1 | N | String | Clothing | Existing level-1 product category name |
| categoryName2 | N | String | Tops | Existing level-2 category name; the correct level-1 category must also be provided |
| categoryName3 | N | String | Short sleeves | Existing level-3 category name; the correct level-1 and level-2 categories must also be provided |
| picUrls | N | List<String> | ["https://example.com/main.jpg"] | SPU image URLs; the first is the main image and the rest are additional images. Omitted, null, or an empty list does not set images |
| details | N | String | Product details | Rich-text details in HTML format |
| video | N | Video | See below | Product video |
| priceUnit | Y | String | USD | Selling price currency, such as CNY, USD, EUR, JPY, or VND; must be a currency enum supported by the system. Currency enums |
| purchaseCostUnit | Y | String | CNY | Purchase cost currency; must be a currency enum supported by the system. Currency enums |
| dimensionUnit | Y | String | cm | Dimension unit: cm, In, or m; case-sensitive |
| weightUnit | Y | String | KG | Weight unit: KG, LBS, or GRAM; case-sensitive |
| spuAttributes | N | List<Attribute> | See below | SPU attributes and their available values; required for multi-variant products |
| skus | Conditional | List<SpuSku> | See below | At least 1 SKU row for multiple variants; for a single variant, omit this field or provide 0-1 rows |
Brands and categories must already exist under the customer associated with the current app. Blank category names are treated as omitted. Specified categories must match their levels and the complete parent-child path. Categories are not created automatically.
If priceUnit, purchaseCostUnit, dimensionUnit, or weightUnit is omitted or null, the system's creation rules apply; an empty string is an invalid enum value. The SPU selling price currency defaults to USD. For newly created SKUs, the selling price and purchase cost currencies default to the customer's effective currency. Shared top-level fields and default rules also apply when linking existing SKUs; see below.
Video (product video)
| Params | Required | DataType | Example | Description |
|---|---|---|---|---|
| videoName | N | String | Product showcase | Video name |
| videoUrl | N | String | https://example.com/product.mp4 | Video URL |
Attribute (available SPU attributes)
| Params | Required | DataType | Example | Description |
|---|---|---|---|---|
| name | Y | String | Color | Attribute name; must be unique within the same SPU |
| attributeValues | Conditional | List<AttributeValue> | See below | Use this field for attribute value images and sorting; takes precedence over values when both fields are non-empty |
Shared attributes and attribute values are automatically created or supplemented according to the system's creation rules. Internal attribute IDs are not required. Values within the same attribute must be unique. Shared attributes may remain even if SPU creation fails.
AttributeValue (attribute value)
| Params | Required | DataType | Example | Description |
|---|---|---|---|---|
| name | Y | String | Color | Attribute name |
| value | Y | String | Red | Attribute value |
| picUrl | N | String | https://example.com/red.jpg | Attribute value image URL |
| sort | N | Integer | 1 | Sort order |
SpuSku (create or link a SKU)
| Params | Required | DataType | Example | Description |
|---|---|---|---|---|
| skuBindMode | Y | String | CREATE | CREATE: create a SKU and link it; LINK: link an existing SKU |
| sku | Y | String | OPEN-SKU-RED | Required; matches an existing SKU within the current customer by code, case-insensitively |
| title | Y | String | Basic top - Red | Required; SKU name |
| price | N | Decimal | 19.90 | Default selling price; for LINK, retains the original value if omitted or null |
| purchaseCost | N | Decimal | 10.00 | Purchase cost; for LINK, retains the original value if omitted or null |
| width | N | Decimal | 20 | Width, using the top-level dimensionUnit; for LINK, retains the original value if omitted or null |
| height | N | Decimal | 2 | Height, using the top-level dimensionUnit; for LINK, retains the original value if omitted or null |
| length | N | Decimal | 30 | Length, using the top-level dimensionUnit; for LINK, retains the original value if omitted or null |
| weight | N | Decimal | 0.2 | Weight, using the top-level weightUnit; for LINK, retains the original value if omitted or null |
| attributeValues | Conditional | List<AttributeValue> | [{"name":"Color","value":"Red"}] | Variant attribute values for this SPU association; variant information is required for multi-variant products |
| attributeValueList | N | List<String> | ["Red","M"] | Compatible variant value array; attribute names correspond to the order of spuAttributes. Non-empty attributeValues takes precedence |
| sort | N | Integer | 1 | SKU row sort order |
| priceControlConfig | N | PriceControl | See below | SKU price control configuration; price control settings must be consistent across SKUs, for example, enabled must be true for all SKUs and priceMode must be UNIFIED for all SKUs |
For a newly created SKU, omitted length, width, height, and weight values each default to 1. New SKUs have type SINGLE.
Variant and linking rules:
- Single variant:
isMultiAttribute=false, with at most one SKU row. If no SKU is provided, only the SPU is created; no SKU is created automatically. Variant attribute associations are not saved for single-variant products. - Multiple variants:
isMultiAttribute=trueor omitted, with at least one SKU row. Each row must contain variant information. Variant combinations must be unique across SKUs, and attribute names must be unique within each row. - If a SKU uses an attribute whose available values are defined in the SPU, its value must be one of those available values.
- Each SKU row must explicitly specify
skuBindMode. If LINK cannot find the SKU, the request fails instead of creating one. The same existing SKU cannot be linked more than once. - A LINK target must be enabled, must not be associated with another SPU, and must have type SINGLE or ASSEMBLY. An ASSEMBLY SKU whose purchase cost is linked to its component SKUs cannot be linked to an SPU.
- Brand, categories, selling price currency, purchase cost currency, dimension unit, and weight unit all use the top-level parameters and system rules. Omitting these fields does not guarantee that the corresponding fields of an existing SKU remain unchanged. When linking, an omitted selling price currency defaults to USD, and omitted dimension and weight units default to cm and KG. To preserve shared fields, explicitly provide the desired values.
- Variant values and sort order come from the current request and are not filled from the existing SKU's previous variant associations.
Only the business fields listed above participate in creation. Callers cannot specify internal primary keys, tenants, login identities, validation switches, or similar fields. Specify brands and categories by name, and existing SKUs by code.
PriceControl (SKU price control configuration)
| Params | Required | DataType | Description |
|---|---|---|---|
| selfConfig | N | RuleConfig | Price control configuration for self-operated sales |
| distributionConfig | N | RuleConfig | Distribution price control configuration |
RuleConfig (price control rule)
| Params | Required | DataType | Example | Description |
|---|---|---|---|---|
| enabled | Y | Boolean | true | Whether enabled; use false to disable the rule |
| priceMode | Conditional | String | UNIFIED | Required when enabled: UNIFIED (unified price control) or BY_COUNTRY (price control by country) |
| defaultMinPrice | N | Decimal | 15.00 | Unified minimum price, optional; must be non-negative and accompanied by a currency when provided |
| defaultCurrency | Conditional | String | USD | Required when the unified minimum price is provided |
| countryRules | N | CountryRuleSet | See below | Country-specific price control rules; required for price control by country |
CountryRuleSet (country rule set)
| Params | Required | DataType | Description |
|---|---|---|---|
| countries | N | List<CountryRule> | Rules for individual countries; country codes must be unique |
| defaultCountryRule | N | DefaultCountryRule | Default rule for other countries |
CountryRule (country rule)
| Params | Required | DataType | Example | Description |
|---|---|---|---|---|
| countryCode | Y | String | US | Country code; see Countries |
| minPrice | Y | Decimal | 15.00 | Minimum price; must not be negative |
| currency | Y | String | USD | Price limit currency; see Currency enums |
DefaultCountryRule (default rule for other countries)
| Params | Required | DataType | Example | Description |
|---|---|---|---|---|
| enabled | N | Boolean | true | Whether enabled |
| minPrice | Conditional | Decimal | 15.00 | Required when enabled; must not be negative |
| currency | Conditional | String | USD | Required when enabled; see Currency enums |
Price control is processed as rule objects. This API does not support partial updates to arbitrary nested fields. skuId is not required.
Response
The API uses a two-layer response. bizContent is a JSON string and must be parsed separately. Success in the outer response only means that protocol processing succeeded; also check bizContent.state to determine whether creation succeeded.
Outer response
| Params | Required | DataType | Example | Description |
|---|---|---|---|---|
| state | Y | String | success | success / failure |
| errorCode | Y | String | SIGNATURE_ERROR | Protocol error code; an empty string on success |
| errorMsg | Y | String | Signature error | Protocol error message; an empty string on success |
| bizContent | N | String | See response example | Business response as a JSON string; may be absent on protocol failure |
| requestId | N | String | Request identifier; refer to the actual response |
Business response (after parsing bizContent)
| Params | Required | DataType | Example | Description |
|---|---|---|---|---|
| state | Y | String | success | Creation result: success / failure |
| notSuccess | Y | Boolean | false | Whether the operation failed |
| errorCode | N | String | spu.number.repeat | Business error code; returned on failure |
| errorMsg | N | String | Duplicate SPU code | Business error message; returned on failure, with text depending on the language setting |
| args | N | List | Error arguments, as returned in the actual response | |
| extraData | N | List | Additional information for some business failures | |
| traceId | N | String | Identifier for troubleshooting |
A successful response does not return result, an SPU ID, or a SKU list. Repeated requests with the same SPU code do not update the original product, and idempotent success is not guaranteed.
Request examples
Multiple variants: create new SKUs and link existing SKUs
In the following bizParam example, the brand and categories must already exist, and existing SKUs must meet the linking requirements above:
{
"spu": "YF_20261026_01",
"title": "YF_20261026_011",
"picUrls":
[
"https://qianyierp-test.oss.aliyuncs.com/attachment/20261026/image/NmJiYmY2MGIxNTAyZWE2YjRhODk5YTYwNzE4MzY0NDU.png"
],
"video":
{
"videoUrl": "https://qianyierp-test.oss.aliyuncs.com/attachment/20261026/video/ZjMyNWMxZmRhNmYwZmI0NDg5ZmYwODk4Y2Q2Y2RmM2M.mp4",
"videoName": "NzVkMTE0NDNhYzc5YTQ2OTY1NTMxODlmMmZhMzc4MWU=.mp4"
},
"priceUnit": "BZD",
"purchaseCostUnit": "BZD",
"weightUnit": "KG",
"dimensionUnit": "cm",
"details": "%3Cp%3EProduct%20details%3C%2Fp%3E",
"isMultiAttribute": true,
"brandName": "Nanjiren",
"categoryName1": "2",
"spuAttributes":
[
{
"name": "YF_TEST",
"attributeValues":
[
{
"value": "Test 1",
"name": "YF_TEST",
"sort": 1
},
{
"value": "Test 3",
"sort": 2
}
]
},
{
"name": "Flavor",
"attributeValues":
[
{
"value": "Lemon",
"sort": 1
},
{
"value": "Blueberry",
"picUrl": null,
"sort": 2
}
]
}
],
"skus":
[
{
"skuBindMode": "CREATE",
"attributeValueList":
[
"Test 1",
"Lemon"
],
"sku": "YF_20261029_02",
"title": "YF_20261029_02",
"sort": 1,
"priceControlConfig":
{
"selfConfig":
{
"enabled": true,
"priceMode": "UNIFIED",
"defaultMinPrice": 100,
"defaultCurrency": "USD",
"countryRules":
{
"countries":
[
{
"countryCode": "US",
"currency": "USD",
"minPrice": 100
}
],
"defaultCountryRule":
{
"enabled": true,
"minPrice": 11,
"currency": "BZD"
}
}
},
"distributionConfig":
{
"enabled": true,
"priceMode": "UNIFIED",
"defaultMinPrice": 200,
"defaultCurrency": "BZD"
}
}
},
{
"skuBindMode": "LINK",
"picUrl": null,
"attributeValueList":
[
"Test 3",
"Blueberry"
],
"sku": "YF_20261026_04",
"purchaseCost": 2,
"price": 3,
"weight": 4,
"length": 3,
"width": 4,
"height": 100,
"title": "YF_20261026_04",
"sort": 2,
"priceControlConfig":
{
"selfConfig":
{
"enabled": true,
"priceMode": "UNIFIED",
"defaultMinPrice": 200,
"defaultCurrency": "USD",
"countryRules":
{
"countries":
[
{
"countryCode": "US",
"currency": "USD",
"minPrice": 100
}
],
"defaultCountryRule":
{
"enabled": true,
"minPrice": 11,
"currency": "BZD"
}
}
},
"distributionConfig":
{
"enabled": true,
"priceMode": "UNIFIED",
"defaultMinPrice": 200,
"defaultCurrency": "BZD"
}
}
}
]
}
Response examples
Success:
{
"state": "success",
"errorCode": "",
"errorMsg": "",
"bizContent": "{\"notSuccess\":false,\"state\":\"success\"}"
}
Business failure (SPU code is required):
{
"state": "success",
"errorCode": "",
"errorMsg": "",
"bizContent": "{\"errorCode\":\"spu.number.repeat\",\"errorMsg\":\"SPU code is required\",\"notSuccess\":true,\"state\":\"failure\"}"
}
Protocol failure (signature error):
{
"state": "failure",
"errorCode": "SIGNATURE_ERROR",
"errorMsg": "Signature error"
}
The examples above omit optional troubleshooting fields. Error messages are illustrative only.
1.9.3. Query system SPU codes
SERVICE_TYPE
QUERY_SPU_CODE
Queries a list of SPU codes based on the query criteria. To retrieve SPU details, call the SPU details API.
Request
All the following parameters are provided in bizParam.
| Params | Required | DataType | Example | Description |
|---|---|---|---|---|
| page | Y | int | 1 | Page number, starting from 1 |
| pageSize | Y | int | 100 | Number of records per page, up to 200 |
| titleList | N | List |
["SPU name"] | List of SPU names |
| updateTimeFrom | N | String | 2026-01-01 00:00:00 | Update time range start. When both start and end times are provided, the start is inclusive and the end is exclusive. When only one bound is provided, that bound is inclusive |
| updateTimeTo | N | String | 2026-02-01 00:00:00 | Update time range end. When both start and end times are provided, the start is inclusive and the end is exclusive. When only one bound is provided, that bound is inclusive |
Response
The API uses a two-layer response. bizContent is a JSON string and must be parsed separately. Success in the outer response only means that protocol processing succeeded; also check bizContent.state to determine whether creation succeeded.
Outer response
| Params | Required | DataType | Example | Description |
|---|---|---|---|---|
| state | Y | String | success | success / failure |
| errorCode | Y | String | SIGNATURE_ERROR | Protocol error code; an empty string on success |
| errorMsg | Y | String | Signature error | Protocol error message; an empty string on success |
| bizContent | N | String | See response example | Business response as a JSON string; may be absent on protocol failure |
| requestId | N | String | Request identifier; refer to the actual response |
Business response (after parsing bizContent)
| Params | Required | DataType | Example | Description |
|---|---|---|---|---|
| state | Y | String | success | Creation result: success / failure |
| notSuccess | Y | Boolean | false | Whether the operation failed |
| errorCode | N | String | spu.number.repeat | Business error code; returned on failure |
| errorMsg | N | String | Duplicate SPU code | Business error message; returned on failure, with text depending on the language setting |
| args | N | List | Error arguments, as returned in the actual response | |
| extraData | N | List | Additional information for some business failures | |
| traceId | N | String | Identifier for troubleshooting | |
| result | Y | List | Returns SPU codes only; see the response example for the structure |
A successful response does not return result, an SPU ID, or a SKU list. Repeated requests with the same SPU code do not update the original product, and idempotent success is not guaranteed.
Request examples
In the following bizParam example, the brand and categories must already exist, and existing SKUs must meet the linking requirements above:
{"page":1,"pageSize":10,"updateTimeFrom":"2026-10-29 00:00:00","updateTimeTo":"2026-10-30 23:59:00","titleList":["YF_20261026_011"]}
Response examples
Success:
{
"state": "success",
"errorCode": "",
"errorMsg": "",
"bizContent": "{\"notSuccess\":false,\"result\":[{\"spu\":\"YF_20261026_01\"}],\"state\":\"success\",\"total\":1,\"traceId\":\"a92f7e5ef3a142af946ac72ae6dca7cc\"}",
"requestId": "f1c3fcd9-9dce-4e5e-a46b-856c55fe6152"
}
1.9.4. Query system SPU details
SERVICE_TYPE
QUERY_SPU_INFO
Send a POST request to /api/v1/spu. Queries SPU details in batches by SPU code for the customer associated with the app, including brands, categories, variant attributes, linked SKUs, and SKU price control configurations.
Request
The following parameters are provided in bizParam. The common form parameters are appId, serviceType, bizParam, timestamp, and sign.
| Params | Required | DataType | Example | Description |
|---|---|---|---|---|
| spuList | Y | List<String> | ["OPEN-SPU-001","OPEN-SPU-002"] | List of SPU codes; must not be empty and must contain 1-200 items per request |
- This API does not use pagination. Do not provide
pageorpageSize. Split requests into batches if there are more than 200 items. - Only SPUs found under the customer associated with the current app are returned. Codes that do not exist or belong to another customer do not produce placeholder records. If none match, the request succeeds with an empty list.
- The result order is not guaranteed to match the input code order. Match results using the
spufield.
Response
The API uses a two-layer response. bizContent is a JSON string and must be parsed separately. Success in the outer response means that protocol processing succeeded; also check bizContent.state to determine whether the query succeeded.
Outer response
| Params | Required | DataType | Example | Description |
|---|---|---|---|---|
| state | Y | String | success | success / failure |
| errorCode | Y | String | Protocol error code; an empty string on success | |
| errorMsg | Y | String | Protocol error message; an empty string on success | |
| bizContent | N | String | See response example | Business response as a JSON string; may be absent on protocol failure |
| requestId | N | String | Request identifier; refer to the actual response |
Business response (after parsing bizContent)
| Params | Required | DataType | Example | Description |
|---|---|---|---|---|
| state | Y | String | success | Query result: success / failure |
| notSuccess | Y | Boolean | false | Whether the operation failed |
| result | On success | List<SpuInfo> | See below | SPU details list; [] if no SPUs match |
| errorCode | N | String | data.input.error.msg | Business error code; returned on failure |
| errorMsg | N | String | Business error message; text depends on the language setting | |
| args | N | List | Error arguments, as returned in the actual response | |
| extraData | N | List | Additional information for some business failures | |
| traceId | N | String | Identifier for troubleshooting |
This API does not return a pagination count total or hasMore. The optional fields below may be absent if they are not set.
SpuInfo (SPU details)
| Params | Required | DataType | Example | Description |
|---|---|---|---|---|
| spu | Y | String | OPEN-SPU-001 | SPU code |
| title | Y | String | Basic top | SPU name |
| picUrls | Y | List<String> | [] | List of image URLs |
| brandName | N | String | Example Brand | Brand name |
| categoryName1 | N | String | Clothing | Level-1 category name |
| categoryName2 | N | String | Tops | Level-2 category name |
| categoryName3 | N | String | T-shirt | Level-3 category name |
| details | N | String | Product details | |
| isMultiAttribute | N | Boolean | true | Whether the product has multiple variants |
| priceUnit | N | String | USD | Default selling price currency |
| purchaseCostUnit | N | String | CNY | Purchase cost currency |
| dimensionUnit | N | String | cm | Dimension unit |
| weightUnit | N | String | KG | Weight unit |
| video | N | VideoInfo | See below | Product video |
| spuAttributes | Y | List<AttributeInfo> | See below | SPU attributes and available values; [] if no data is available |
| skus | Y | List<SkuInfo> | See below | Linked SKU information; [] if there are no linked SKUs |
VideoInfo (product video)
| Params | Required | DataType | Description |
|---|---|---|---|
| videoName | N | String | Video name |
| videoUrl | N | String | Video URL |
AttributeInfo (SPU attribute)
| Params | Required | DataType | Example | Description |
|---|---|---|---|---|
| name | N | String | Color | Attribute name |
| values | N | List<String> | ["Red","Blue"] | Available attribute values |
| attributeValues | Y | List<AttributeValueInfo> | See below | Attribute value details; [] if no data is available |
AttributeValueInfo (SPU attribute value)
| Params | Required | DataType | Example | Description |
|---|---|---|---|---|
| name | N | String | Color | Attribute name |
| value | N | String | Red | Attribute value |
| related | N | Boolean | true | Whether linked to a SKU |
| picUrl | N | String | Attribute value image URL | |
| sort | N | Integer | 1 | Attribute value sort order |
SkuInfo (linked SKU information)
| Params | Required | DataType | Example | Description |
|---|---|---|---|---|
| sku | Y | String | OPEN-SKU-RED | SKU code |
| title | Y | String | Basic top - Red | SKU name |
| picUrl | N | String | SKU image URL | |
| categoryName1 | N | String | Clothing | Level-1 category name |
| categoryName2 | N | String | Tops | Level-2 category name |
| categoryName3 | N | String | T-shirt | Level-3 category name |
| description | N | String | Product description | |
| descriptionEn | N | String | English product description | |
| price | N | Decimal | 19.90 | Default selling price |
| priceUnit | N | String | USD | Default selling price currency |
| purchaseCost | N | Decimal | 10.00 | Purchase cost |
| purchaseCostUnit | N | String | CNY | Purchase cost currency |
| length | N | Decimal | 30 | Length, using this row's dimensionUnit |
| width | N | Decimal | 20 | Width, using this row's dimensionUnit |
| height | N | Decimal | 2 | Height, using this row's dimensionUnit |
| dimensionUnit | N | String | cm | Dimension unit |
| weight | N | Decimal | 0.2 | Weight, using this row's weightUnit |
| weightUnit | N | String | KG | Weight unit |
| attributeValues | Y | List<SkuAttributeInfo> | See below | SKU variant attributes; [] if no data is available |
| priceControlConfig | N | PriceControlInfo | See below | Price control configurations for self-operated sales and distribution |
SkuAttributeInfo (SKU variant attribute)
| Params | Required | DataType | Example | Description |
|---|---|---|---|---|
| name | N | String | Color | Attribute name |
| value | N | String | Red | Attribute value |
PriceControlInfo (SKU price control configuration)
| Params | Required | DataType | Description |
|---|---|---|---|
| selfConfig | N | RuleConfig | Price control configuration for self-operated sales |
| distributionConfig | N | RuleConfig | Distribution price control configuration |
The fields of RuleConfig, CountryRuleSet, CountryRule, and DefaultCountryRule have the same structures as those defined in "Create system SPU" in this section. The query returns the saved configuration: enabled indicates whether the rule is enabled; priceMode is UNIFIED (unified price control) or BY_COUNTRY (price control by country); defaultMinPrice / defaultCurrency specify the unified minimum price and currency; and countryRules contains country-specific rules and the default rule for other countries. Fields that are not set may be absent.
Request examples
bizParam:
{
"spuList": ["OPEN-SPU-001", "OPEN-SPU-002"]
}
Complete form request:
curl --location --request POST 'https://gerp-test1.800best.com/api/v1/spu' \
--form-string 'appId=TEST' \
--form-string 'serviceType=QUERY_SPU_INFO' \
--form-string 'bizParam={"spuList":["OPEN-SPU-001","OPEN-SPU-002"]}' \
--form-string 'timestamp=1793059200000' \
--form-string 'sign=REPLACE_WITH_SIGNATURE_CALCULATED_FROM_ALL_CURRENT_REQUEST_PARAMETERS'
Replace the example timestamp and signature with actual values. bizParam is a JSON string; do not add another pair of enclosing double quotes.
Response examples
Success (only one SPU matches in this example):
{
"state": "success",
"errorCode": "",
"errorMsg": "",
"bizContent": "{\"notSuccess\":false,\"result\":[{\"brandName\":\"JJ Exclusive Brand\",\"categoryName1\":\"111\",\"categoryName2\":\"222\",\"categoryName3\":\"333\",\"details\":\"%3Cp%3EProduct%20details%3C/p%3E%20%0A%3Cfigure%20class=%22image%22%3E%20%0A%20%3Cimg%20src=%22https://qianyierp-test.oss.aliyuncs.com/attachment/20261103/image/NjU4ZjU5MzFhN2NmYmM5ZTE4OGQ0YTdiZjZjYjI5MmU.jpg%22%20width=%22432%22%20height=%22268%22%3E%20%0A%3C/figure%3E\",\"dimensionUnit\":\"cm\",\"isMultiAttribute\":true,\"picUrls\":[\"https://qianyierp-test.oss.aliyuncs.com/attachment/20261026/image/NmJiYmY2MGIxNTAyZWE2YjRhODk5YTYwNzE4MzY0NDU.png\"],\"priceUnit\":\"BZD\",\"purchaseCostUnit\":\"BZD\",\"skus\":[{\"attributeValues\":[{\"name\":\"YF_TEST\",\"value\":\"Test 3\"},{\"name\":\"Flavor\",\"value\":\"Blueberry\"}],\"categoryName1\":\"111\",\"categoryName2\":\"222\",\"categoryName3\":\"333\",\"dimensionUnit\":\"cm\",\"height\":100.0,\"length\":3.0,\"picUrl\":\"https://qianyierp-test.oss.aliyuncs.com/attachment/20261026/image/NmJiYmY2MGIxNTAyZWE2YjRhODk5YTYwNzE4MzY0NDU.png\",\"price\":3.0000,\"priceControlConfig\":{\"distributionConfig\":{\"countryRules\":{\"countries\":[],\"defaultCountryRule\":{\"enabled\":false}},\"defaultCurrency\":\"BZD\",\"defaultMinPrice\":200.0000,\"enabled\":true,\"priceMode\":\"UNIFIED\"},\"selfConfig\":{\"countryRules\":{\"countries\":[],\"defaultCountryRule\":{\"enabled\":false}},\"defaultCurrency\":\"USD\",\"defaultMinPrice\":200.0000,\"enabled\":true,\"priceMode\":\"UNIFIED\"}},\"priceUnit\":\"BZD\",\"purchaseCost\":2.0000,\"purchaseCostUnit\":\"BZD\",\"sku\":\"YF_20261026_04\",\"title\":\"YF_20261026_04\",\"weight\":4.0,\"weightUnit\":\"KG\",\"width\":4.0}],\"spu\":\"YF_20261026_01\",\"spuAttributes\":[{\"attributeValues\":[{\"name\":\"YF_TEST\",\"picUrl\":\"https://qianyierp-test.oss.aliyuncs.com/attachment/20261026/image/NmJiYmY2MGIxNTAyZWE2YjRhODk5YTYwNzE4MzY0NDU.png\",\"sort\":1,\"value\":\"Test 1\"},{\"name\":\"YF_TEST\",\"picUrl\":\"https://qianyierp-test.oss.aliyuncs.com/attachment/20261026/image/NmJiYmY2MGIxNTAyZWE2YjRhODk5YTYwNzE4MzY0NDU.png\",\"sort\":2,\"value\":\"Test 3\"}],\"name\":\"YF_TEST\",\"values\":[\"Test 1\",\"Test 3\"]},{\"attributeValues\":[{\"name\":\"Flavor\",\"sort\":1,\"value\":\"Lemon\"},{\"name\":\"Flavor\",\"sort\":2,\"value\":\"Blueberry\"}],\"name\":\"Flavor\",\"values\":[\"Lemon\",\"Blueberry\"]}],\"title\":\"YF_20261026_011\",\"video\":{\"videoName\":\"NzVkMTE0NDNhYzc5YTQ2OTY1NTMxODlmMmZhMzc4MWU=.mp4\",\"videoUrl\":\"https://qianyierp-test.oss.aliyuncs.com/attachment/20261026/video/ZjMyNWMxZmRhNmYwZmI0NDg5ZmYwODk4Y2Q2Y2RmM2M.mp4\"},\"weightUnit\":\"KG\"}],\"state\":\"success\",\"traceId\":\"c920de9db71e42adb0f3950b58b9eb7c\"}",
"requestId": "edc11513-1f1c-462c-8844-2eaab89e8a07"
}
No matching SPUs:
{
"state": "success",
"errorCode": "",
"errorMsg": "",
"bizContent": "{\"notSuccess\":false,\"state\":\"success\",\"result\":[]}"
}
Business failure (code list is empty or exceeds 200 items):
{
"state": "success",
"errorCode": "",
"errorMsg": "",
"bizContent": "{\"errorCode\":\"data.input.error.msg\",\"errorMsg\":\"Invalid input parameters: spuList.size: 1-200\",\"notSuccess\":true,\"state\":\"failure\"}"
}
The examples above omit optional troubleshooting fields. Error messages are illustrative only. Protocol failures such as signature, authorization, and rate limit errors use the error codes described in "Create system SPU" in this section.