English
English
简体中文
Contact Us
Register
Log In

Add Commodity

Last Updated on : 2022-09-27 06:12:08download

Add a commodity to the commodity database of a specified store.

API address

POST: /v1.0/sellercenter/commodity

Request parameter

Description of body

Parameter nameTypeINRequiredDescription
titleString trueThe commodity title with up to 80 characters.
descriptionString falseThe commodity description with up to 250 characters.
brandString falseThe commodity brand with up to 30 characters.
codeString falseThe commodity code or model with up to 50 characters.
pidString falseThe commodity PID with up to 16 characters.
first_category_codeString trueThe code of the level-1 category.
second_category_codeString trueThe code of the level-2 category.
third_category_codeString trueThe code of the level-3 category.
videoString falseThe video to display a commodity. When this API is used, you must upload a video URL, so the video file can be accessed by using a browser. It only supports a video in the MP4 format, no more than 50 MB. The recommended duration is 9-30 seconds.
video_picString falseThe image to display a video. When this API is used, you must upload an image URL, so the image file can be accessed by using a browser. The field is required when video is not empty.
show_picturesList trueThe image to display a commodity. When this API is used, you must upload an image URL, so the image file can be accessed by using a browser. It supports up to 10 images in JPG, PNG, or GIF format, each of which is no more than 500 KB. The recommended dimension is 750 × 750 pixels.
detail_picturesList trueThe image to display commodity details. When this API is used, you must upload an image URL, so the image file can be accessed by using a browser. It supports up to 15 images in JPG, PNG, or GIF format, each of which is no more than 3 MB. The recommended dimension is 750 × 750 pixels.
sku_listList trueThe list of SKUs. Maximum value: 100.
postage_typeInteger trueThe type of postage. Valid values:
  • 1: free shipping.
  • 2: fixed postage.
postage_feeBigDecimal falseThe postage fee of a specified commodity. The field is required if postageType is 2.
install_typeInteger falseThe installation type. Valid values:
  • 1: no need to install. Default value.
  • 2: on-site installation.
  • 3: installation by users.
install_feeBigDecimal falseThe installation fee.
is_jumpBoolean falseIndicates whether to navigate to a third-party page. Valid values:
  • true: support.
  • false: Not support. Default value.
jump_linkString falseThe navigation link of a specified commodity. The field is required if isJump is set to true.
publishBoolean falseIndicates whether to list a specified commodity. Valid values:
  • true: List the commodity at once. Default value.
  • false: Do not list the commodity.
mall_codeString trueThe code of a specified mall.
site_codeString trueThe code of a specified site.

Description of sku_list

Parameter nameTypeINRequiredDescription
original_priceBigDecimal falseThe original price of the SKU. It supports up to two decimal places.
sale_priceBigDecimal trueThe sales price of the SKU. It supports up to two decimal places.
inventoryInteger trueThe inventory. It supports an integer.
weightBigDecimal trueThe weight in kilograms (KG). It supports up to three decimal places.
external_codeString trueThe external code.
sku_attr_listList trueThe list of SKU attributes.

Description of sku_attr_list

Parameter nameTypeINRequiredDescription
attr_codeString trueThe code of a specified attribute.
attr_value_idLong trueThe ID of a specific attribute value.

Return parameter

Parameter nameTypeDescription
resultCommodityAddOpenApiVOThe returned result.

Description of result

Parameter nameTypeDescription
commodity_codeStringThe unique code of a specified commodity.

Request example

POST: /v1.0/sellercenter/commodity
{
  "mall_code": "8h4tiureddm***",
  "site_code": "CN",
  "title": "Refrigerator",
  "brand": "",
  "code": "define_code",
  "detail_pictures": [
    "http://image-demo.oss-cn-hangzhou.aliyuncs.com/exa****.jpg"
  ],
  "first_category_code": "12",
  "second_category_code": "1312",
  "third_category_code": "131211",
  "install_fee": 1,
  "install_type": 2,
  "is_jump": false,
  "pid": "",
  "postage": 100,
  "postage_type": 1,
  "publish": true,
  "show_pictures": [
    "http://image-demo.oss-cn-hangzhou.aliyuncs.com/exa****.jpg"
  ],
  "video": "",
  "video_pic": "",
  "sku_list": [
    {
      "external_code": "",
      "inventory": 100,
      "original_price": 1,
      "sale_price": 2,
      "sku_attr_list": [
        {
          "attr_code": "COLOR",
          "attr_value_id": 1001
        }
      ],
      "weight": 0
    }
  ]
}

Return example

{
    "result": {
        "commodity_code": "CMaplyr4bzck***"
    },
    "t": 1624969838836,
    "success": true
}

Error code

For more information, see error code.