创建ITEM

接口描述

该接口可创建已存在的SPV下的ITEM。该接口下默认商品物流模式为商家默认物流模式,如需更改商品物流模式请使用【编辑ITEM物流模式】接口进行更改。

URL

/ark/open_api/v1/spv/{spv_id}/item

URL Parameter

名称 类型 必填 说明
spv_id String Yes 已存在的SPV ID

Method

POST

Request Body (content-type:application/json;charset=utf8)

请务必按以下字段要求添加数据,以免系统报错。

{
    "item":{
            "price": 252.69,
            "original_price": 699.0,
            "pre_tax_price": 200.0
    }
}

Request Body Parameters

名称 类型 说明
item Dict item模块信息
original_price Float 商品原价
pre_tax_price Float 税前价,跨境税商家必填
price Float 税后价,非跨境税商家必填

Response 200 (application/json;charset=utf-8)

{
    "error_code": 0,
    "data": {
        "spvs": [
            {
                "spu_id": "58e4a96caf0a672dcda6db07",
                "pending_changes": null,
                "import_cost": 1234,
                "net_weight": 250,
                "qty": 1,
                "spl_id": "58e4a96caf0a672dcda6db08",
                "id": "58e4a96daf0a672dcda6db0b",
                "unit": "件",
                "barcode_type": "upc",
                "non_desc_variants": [
                    {
                        "ename": "Shoes Size",
                        "id": "56d84f9a805d891008705276",
                        "value": "M",
                        "name": "尺码"
                    }
                ],
                "state": 1,
                "usage": "test",
                "shelf_life": 190,
                "ingredient": "test",
                "status": 2,
                "customs_photos_urls": [
                    "http://img.xiaohongshu.com/items/3135edc58855dcf047fc39161ee9f687@2o.jpg"
                ],
                "barcode": "test01",
                "gross_weight": 450,
                "customs_photos": [],
                "manufacturer": "test",
                "customs_specification": "test specification",
                "country": "中国"
            }
        ],
        "items": [
            {
                "spu_id": "58e4a96caf0a672dcda6db07",
                "update_time": 1491380589,
                "ename": "GUCCI test1 white L",
                "name": "GUCCI古驰 test1 white L",
                "logistics": "auto",
                "skucode": "test01",
                "tax": 52.700000000000003,   
                "pre_tax_price": 200.0,   
                "price": 252.69999999999999,   
                "tax_rate": 0.26350000000000001,
                "barcode": "test01",
                "pending_changes": null,
                "available": true,
                "buyable": false,
                "spv_id": "58e4a96daf0a672dcda6db0b",
                "state": 1,
                "create_time": 1491380589,
                "status": 1,
                "spl_id": "58e4a96caf0a672dcda6db08",
                "top_image": null,
                "id": "58e4a96daf0a672dcda6db0d",
                "barcode_type": "upc"
            }
        ],
        "spls": [
            {
                "spu_id": "58e4a96caf0a672dcda6db07",
                "status": 2,
                "id": "58e4a96caf0a672dcda6db08",
                "state": 1,
                "variants": [
                    {
                        "ename": "Color",
                        "id": "56d84f9a805d891008705275",
                        "value": "white",
                        "name": "颜色"
                    }
                ],
                "pending_change": null
            }
        ],
        "spus": [
            {
                "pending_changes": null,
                "ename": "test1",
                "name": "test1",
                "short_name": "test1",
                "brand": {
                    "ename": "GUCCI",
                    "id": "52d0deb1b4c4d655316b7d4b",
                    "name": "古驰"
                },
                "brand_id": "52d0deb1b4c4d655316b7d4b",
                "category_id": "572dd173939e250d08ec59f2",
                "id": "58e4a96caf0a672dcda6db07",
                "categories": [
                    {
                        "ename": "Shoes",
                        "id": "52ce1c02b4c4d649b58b892f",
                        "name": "鞋子"
                    },
                    {
                        "ename": "Women's shoes",
                        "id": "56a6eecd8e7989cd56fcea7f",
                        "name": "女鞋"
                    },
                    {
                        "ename": "Women's high heels",
                        "id": "572dd173939e250d08ec59f2",
                        "name": "女士高跟鞋"
                    }
                ]
            }
        ],
        "spl_items": [
            {
                "spu_id": "58e4a96caf0a672dcda6db07",
                "status": 2,
                "videos": null,
                "spl_id": "58e4a96caf0a672dcda6db08",
                "feature": "initial",
                "image_urls": [
                    "http://img.xiaohongshu.com/items/3135edc58855dcf047fc39161ee9f687@2o.jpg"
                ],
                "faqs": [
                    {
                        "answer": "answer",
                        "question": "question"
                    }
                ],
                "state": 1,
                "pending_changes": {
                    "status": 0,
                    "videos": null,
                    "feature": null,
                    "faqs": null,
                    "images": [
                        {
                            "name": null,
                            "extension": ".jpg",
                            "height": 1200,
                            "width": 900,
                            "link": "http://img.xiaohongshu.com/items/d84d018842bbff888a8a132fcf445769",
                            "path": "items/d84d018842bbff888a8a132fcf445769"
                        }
                    ],
                    "attributes": null,
                    "desc": null
                },
                "user_guide": {
                    "images": [
                        {
                            "name": null,
                            "extension": ".jpg",
                            "height": 1200,
                            "width": 900,
                            "link": "//img.xiaohongshu.com/items/d84d018842bbff888a8a132fcf445769",
                            "path": "items/d84d018842bbff888a8a132fcf445769"
                        }
                    ],
                    "videos": []
                },
                "image_desc": {
                    "images": [
                        {
                            "name": null,
                            "extension": ".jpg",
                            "height": 1200,
                            "width": 900,
                            "link": "//img.xiaohongshu.com/items/d84d018842bbff888a8a132fcf445769",
                            "path": "items/d84d018842bbff888a8a132fcf445769"
                        }
                    ],
                    "image_urls": []
                },
                "images": null,
                "attributes": [
                    {
                        "ename": null,
                        "name": "材质",
                        "image": null,
                        "value": "TEST MATERIAL",
                        "image_url": null,
                        "property_id": "58450b30805d89635938325e"
                    },
                    {
                        "ename": null,
                        "name": "产地",
                        "image": null,
                        "value": "CHINA",
                        "image_url": null,
                        "property_id": "58450b30805d89635938325f"
                    }
                ],
                "id": "58e4a96caf0a672dcda6db09",
                "desc": "initial"
            }
        ]
    },
    "error_msg": null,
    "success": true
}

Response parameters

名称 类型 说明
pending_changes Array 待审核的更改信息
spus Array SPU模块信息
id String SPU ID
categories Array 分类列表,从一级分类到末级分类
spls Array SPL模块信息
id String SPV ID
spl_items Array SPL ITEM模块信息
id String SPL ID
spvs Array SPV模块信息
id String SPV ID
items Array ITEM模块信息
id String ITEM ID
available Bool true为可选择上架,false为不可选择上架
buyable Bool true为可售卖,实际上架状态, false为不可售卖,实际下架状态
top_image String 天王图
create_time Int 商品创建时间
update_time Int 最后更新时间
original_price Float 商品原价
tax Float 税金
pre_tax_price Float 税前价,跨境税商家必填
price Float 税后价,非跨境税商家必填
logistics String ITEM的物流模式
tax_rate Float 税率
spu_id String SPU ID
spl_id String SPL ID
spv_id String SPV ID
id String ITEM ID,商品id

补充说明

  1. state & status 具体状态码请参考商品状态码