跳到主要内容
版本:202201

创建商品

POST 

/openapi/2022-01/products

根据提供的信息创建一个新商品。

请求

请求体

    product object必填
    titlestring必填

    Product's title

    briefstring

    Product's briefing description

    descriptionstring

    Product's description

    publishedboolean

    Whether it is published or not

    requires_shippingboolean

    Whether it is required to shipping

    taxableboolean

    Whether it is taxable

    tagsstring

    Tags, separated by comma, for example: tag1,tag2

    vendorstring

    Vendor's name

    vendor_urlstring

    Vendor's URL

    notestring
    seo_titlestring

    SEO title

    seo_descriptionstring

    SEO description

    seo_keywordsstring

    SEO keywords, separated by comma, for example: key1,key2

    handlestring

    Product's handle

    has_only_default_variantboolean必填

    Whether it is a single variant

    默认值: true
    inventory_trackingboolean

    Whether to tracking inventory

    inventory_policystring

    Inventory policy: continue, deny, auto_unpublished, required while inventory_tracking is true

    need_variant_imageboolean

    Whether variant image is needed. It's required if has_only_default_variant is false

    spustring

    Product's SPU

    fake_salesint32

    Product's fake sales

    display_fake_salesboolean

    Whether to display fake sales

    options object[]
  • Array [
  • namestring必填

    Option's name, for example: "color","size".

    valuesstring[]必填

    Option's values, for example: ["red", "black"],["small", "large"]

    默认值: []
  • ]
  • images object[]
  • Array [
  • srcstring必填

    Image's URL

    widthint32

    Image's width in px

    heightint32

    Image's height in px

    altstring

    Image's alt

  • ]
  • variants object[]
  • Array [
  • option1string

    Option 1

    option2string

    Option 2

    option3string

    Option 3

    image object

    Variant's images, e.g.: {"src":"//cn.cdn.shoplazza.com/c8bf5695d347092d7a010f00182581f7.jpeg"}

    srcstring必填

    Image's URL

    widthint32

    Image's width in px

    heightint32

    Image's height in px

    altstring

    Image's alt

    compare_at_pricestring

    Compare at price ( original price )

    pricestring必填

    Price, set it to "0.00" if you want to leave the price empty.

    skustring

    SKU

    barcodestring

    The barcode of the variant

    notestring
    inventory_quantityint32

    Inventory quantity

    weightstring
    weight_unitstring

    Unit of weight, possible value are: kg, g, lb, oz

    cost_pricestring

    Cost price

    wholesale_price object[]
  • Array [
  • pricestring
    min_quantityint32

    Mini Order Quantity

  • ]
  • ]
  • unique_tokenstring

    Unique_token is a unique string identifier generated by your app, will be used for idempotency verification, for example: e6cc4df1-d4f5-4ad4-a019-2e0f3ddd6e63

    mixed_wholesaleboolean

    Whether mixed wholesale is supported

响应

200

数据结构
    product object
    idstring
    示例: 9fb9f3c6-2300-42c1-8593-d9008d7cfc09
    titlestring
    示例: Stylish Shirt
    briefstring
    示例: A stylish shirt.
    descriptionstring
    示例:
    publishedboolean
    默认值: true
    示例: true
    requires_shippingboolean
    默认值: true
    示例: true
    taxableboolean
    默认值: true
    示例: true
    tagsstring
    示例: shirt,stylish,cotton
    vendorstring
    示例: Awesome Vendor
    vendor_urlstring
    示例: https://awesomevendor.com
    inventory_quantityinteger
    默认值: 0
    示例: 300
    published_atstring
    示例: 2024-12-03T19:02:30Z
    created_atstring
    示例: 2024-12-03T19:02:30Z
    updated_atstring
    示例: 2024-12-03T19:02:30Z
    notestring
    示例: Special promotion item.
    seo_titlestring
    示例: Buy Stylish Shirt Online
    seo_descriptionstring
    示例: Premium cotton
    seo_keywordsstring
    示例: shirt, cotton, stylish
    handlestring
    示例: stylish-shirt-zbxf
    has_only_default_variantboolean
    默认值: true
    示例: false
    inventory_trackingboolean
    默认值: true
    示例: true
    inventory_policystring
    示例: continue
    need_variant_imageboolean
    默认值: true
    示例: false
    spustring
    示例: SS1234
    fake_salesinteger
    默认值: 0
    示例: 50
    display_fake_salesboolean
    默认值: true
    示例: true
    mixed_wholesaleboolean
    默认值: true
    示例: true
    image object
    srcstring
    示例: //img.fantaskycdn.com/loading.png
    widthinteger
    默认值: 0
    示例: 100
    heightinteger
    默认值: 0
    示例: 100
    pathstring
    示例: loading.png
    altstring
    示例:
    images object[]
  • Array [
  • idstring
    示例: 15333433-a0d5-44c9-941b-2c59ea07683e
    product_idstring
    示例: 9fb9f3c6-2300-42c1-8593-d9008d7cfc09
    positioninteger
    默认值: 0
    示例: 1
    srcstring
    示例: //img.fantaskycdn.com/loading.png
    widthinteger
    默认值: 0
    示例: 100
    heightinteger
    默认值: 0
    示例: 100
    altstring
    示例:
    created_atstring
    示例: 2024-12-03T19:02:30Z
    updated_atstring
    示例: 2024-12-03T19:02:30Z
  • ]
  • options object[]
  • Array [
  • idstring
    示例: 8e40555e-a152-45fc-9587-fe85280701c5
    product_idstring
    示例: 9fb9f3c6-2300-42c1-8593-d9008d7cfc09
    positioninteger
    默认值: 0
    示例: 1
    namestring
    示例: Size
    valuesstring[]
  • ]
  • variants object[]
  • Array [
  • idstring
    示例: d7c7f9ba-f824-46b6-94af-1c2d1befaf27
    product_idstring
    示例: 9fb9f3c6-2300-42c1-8593-d9008d7cfc09
    image_idstring
    示例:
    created_atstring
    示例: 2024-12-03T19:02:30Z
    updated_atstring
    示例: 2024-12-03T19:02:30Z
    titlestring
    示例: Small-Red
    option1string
    示例: Small
    option2string
    示例: Red
    option3string
    示例:
    image
    positioninteger
    默认值: 0
    示例: 1
    compare_at_pricestring
    示例: 29.99
    pricestring
    示例: 19.99
    skustring
    示例: SS1234-RD-S
    barcodestring
    示例: 123456789012
    notestring
    示例: Limited
    inventory_quantityinteger
    默认值: 0
    示例: 100
    weightstring
    示例: 0.50
    weight_unitstring
    示例: kg
    cost_pricestring
    示例: 12.99
    wholesale_price object[]
  • Array [
  • pricestring
    示例: 19.99
    min_quantityinteger
    默认值: 0
    示例: 1
  • ]
  • extend
  • ]
  • category