ezbuy.product.search (搜索商品信息)

GET

调用方获取符合搜索条件的产品信息时使用 公共参数

名称 类型 是否必须 描述
method string y api接口名称
app_key string y ezbuy分配给应用的AppKey
sign_method string y 签名摘要算法,可选值:hmac,md5
sign string y api输入参数的签名结果
timestamp string y 时间戳,格式为yyyy-MM-dd HH:mm:ss,时区为GMT+8。ezbuy api服务端允许客户端请求的最大时间误差为10分钟
version string y api协议版本,可选值:1.0

请求参数

名称 类型 是否必须 示例值 限制 描述
name string n 极有家韩式彩色汤煲 砂锅炖锅陶瓷煲明火耐高温砂锅养生耐热煲汤 产品中文名称,支持模糊搜索
is_onsale bool n true 产品是否是在售状态,在售状态为true
is_sensitive bool n true 产品是否为敏感品,是敏感品为true
fields string y product_id,name 需返回的字段列表;可选值为product数据结构中定义的字段,多个字段用“,”分隔。id默认强制返回
page_no number n 2 页码,传入值为1代表第一页,传入值为2代表第二页,依此类推.默认返回的数据是从第一页开始
page_size number n 99 每页条数,每页返回最多返回100条,默认值为10

备注:不选择查询条件,默认返回本店铺全部产品

响应参数

名称 类型 示例值 描述
request_id string 92128f6e-daf3-11e7-a003-f45c89aebcfb 请求id
status RespCode 接口响应状态
data total_count number 10 匹配条件的总记录数
result Product[] 匹配的商品列表

响应示例

{
    "status": {
        "code": "E0",
        "message": "success"
    },
    "data": {
        "total_count": 1,
        "result": [
            {
                "create_date": "2017-04-18 18:40:28",
                "is_onsale": true,
                "is_sensitive": false,
                "name": "test_product",
                "name_en": "test_product",
                "product_id": 101091,
                "sku_ids": [
                    101092
                ]
            }
        ]
    }
}

ezbuy.product.get (获取单个商品信息)

GET

调用方发布产品时,查询关联产品信息时使用

公共参数

名称 类型 是否必须 描述
method string y api接口名称
app_key string y ezbuy分配给应用的AppKey
sign_method string y 签名摘要算法,可选值:hmac,md5
sign string y api输入参数的签名结果
timestamp string y 时间戳,格式为yyyy-MM-dd HH:mm:ss,时区为GMT+8。ezbuy api服务端允许客户端请求的最大时间误差为10分钟
version string y api协议版本,可选值:1.0 / 2.0

请求参数

名称 类型 是否必须 示例值 限制 描述
product_id number y 782342 大于0 产品id
fields string y product_id,name 需返回的字段列表;可选值为product数据结构中定义的字段,多个字段用“,”分隔。id默认强制返回

响应参数

名称 类型 示例值 描述
request_id string 92128f6e-daf3-11e7-a003-f45c89aebcfb 请求id
status RespCode 接口响应状态
data Product spu信息

响应示例

{
    "request_id":"92128f6e-daf3-11e7-a003-f45c89aebcfb",
    "status": {
        "code": "E0",
        "message": "success"
    },
    "data": {
        "is_onsale": true,
        "name": "test_product",
        "name_en": "test_product",
        "product_id": 100968
    }
}

异常示例

{
    "request_id":"92128f6e-daf3-11e7-a003-f45c89aebcfb",
    "status": {
        "code": "E51",
        "message": "invalid product_id",
        "detail": "0 is not valid"
    }
}

错误码

CODE MESSAGE DETAIL
E51 invalid product_id {product_id} is not valid

ezbuy.product.add (添加一个商品)

POST

自主发布一个新的商品

公共参数

名称 类型 是否必须 描述
method string y api接口名称
app_key string y ezbuy分配给应用的AppKey
sign_method string y 签名摘要算法,可选值:hmac,md5
sign string y api输入参数的签名结果
timestamp string y 时间戳,格式为yyyy-MM-dd HH:mm:ss,时区为GMT+8。ezbuy api服务端允许客户端请求的最大时间误差为10分钟
version string y api协议版本,可选值:1.0

请求参数

名称 类型 是否必须 示例值 限制 描述
name string y 商品中文名称
name_en string n 商品英文
is_sensitive bool n 是否敏感商品(是否含有电池/液体/粉末)
is_onsale bool n 是否上架
cid number y 商品类目id,通过类目api获取
images string[] y 最多支持5张图片 商品图片url
videos Video[] n 最多支持1个视频 商品主图视频
description string y 商品描述
spec map <string,string> n 商品描述属性,支持自定义;(描述属性当前仅在前台列表使用,商品详情页暂未展示)
sku_prop_image SkuPropertyImage[] n 商品sku属性图片,仅颜色属性支持设置图片
skus NewSkuInfo[] y sku信息
size_guide SizeGuide[] n 尺码助手
measure string n 测量方式
origin_cid number n 来源卖家商品类目ID
origin_cname string n 来源卖家商品类目名称
delivery_method number n 派送方式 派送方式
parcel_split number n 包裹拆分方式 商品包裹拆分方式

响应参数

名称 类型 示例值 描述
request_id string 92128f6e-daf3-11e7-a003-f45c89aebcfb 请求id
status RespCode 接口响应状态
data ProductDetail 商品详情

响应示例

{
    "request_id":"92128f6e-daf3-11e7-a003-f45c89aebcfb",
    "status": {
        "code": "E0",
        "message": "success"
    },
    "data": {
        "product_id": 169485,
        "name": "测试商品发布",
        "name_en": "test add product",
        "is_sensitive": false,
        "sku_ids": [
            169486,
            169487
        ],
        "is_onsale": true,
        "create_date": "2017-11-30 11:54:00",
        "images":["https://gd1.alicdn.com/imgextra/i4/356292901/TB2fjMzcrYI8KJjy0FaXXbAiVXa_!!356292901.jpg_400x400.jpg_.webp"],
        "videos":[{
            "url":"https://www.youtube.com/embed/LlNlwY5yWmY",
            "show_status":true
        }],
        "description": "test test test test ",
        "cid": 372,
        "spec": {
            "color": "rgb",
            "size": "M"
        },
        "sku_prop_image": [
            {
                "pid": 3423432,
                "vid": 45346,
                "image": "https://gd1.alicdn.com/imgextra/i4/356292901/TB2fjMzcrYI8KJjy0FaXXbAiVXa_!!356292901.jpg_400x400.jpg_.webp"
            },
            {
                "pid": 23423,
                "vid": 3466,
                "image": "https://gd1.alicdn.com/imgextra/i4/356292901/TB2fjMzcrYI8KJjy0FaXXbAiVXa_!!356292901.jpg_400x400.jpg_.webp"
            }
        ],
        "skus": [
            {
                "sku_id": 169486,
                "name": "颜色:蓝;尺码:M",
                "product_id": 169485,
                "seller_sku_id": "xx123",
                "retail_price": 0,
                "selling_price": 34.23,
                "stock": 123,
                "weight": 21,
                "is_onsale": true,
                "length": 0,
                "width": 23,
                "height": 56
            },
            {
                "sku_id": 169487,
                "name": "颜色:紫色;尺码:XL",
                "product_id": 169485,
                "seller_sku_id": "xx3435",
                "retail_price": 0,
                "selling_price": 20,
                "stock": 100,
                "weight": 0.1,
                "is_onsale": true,
                "length": 12,
                "width": 23,
                "height": 56
            }
        ]
    }
}

异常示例

{
    "request_id":"92128f6e-daf3-11e7-a003-f45c89aebcfb",
    "status": {
        "code": "E56",
        "message": "invalid cid",
        "detail": "372342 is not a valid cid"
    }
}

错误码

CODE MESSAGE DETAIL
E51 invalid product_id {product_id} is not valid
E55 product name can't be empty
E56 invalid cid {cid} is not a valid cid
E57 product image required images is empty
E58 product skus required skus is empty
E59 max number of images reached only support 5 iamges maximumly
E510 product video is unfitted video is unfitted
E511 max number of videos reached only support 1 video maximumly
E63 invalid selling_price selling_price must be larger than zero, and less than retail_price
E64 invalid stock number stock must be equal or larger than zero
E65 invalid weight weight must be larger than zero
E66 sku's props requried sku's props is empty
E67 sku length can't be less than zero
E68 sku width can't be less than zero
E69 sku height can't be less than zero
E83 custom property value can't be empty custom property value is empty for pid: {pid}
E84 max length of custom property value is 30 chars custom property value:{value} is too long
E85 duplicate property duplicate pid:{pid}

ezbuy.product.update(更新单个商品信息)

POST

调用方更新某个产品信息时使用

公共参数

名称 类型 是否必须 描述
method string y api接口名称
app_key string y ezbuy分配给应用的AppKey
sign_method string y 签名摘要算法,可选值:hmac,md5
sign string y api输入参数的签名结果
timestamp string y 时间戳,格式为yyyy-MM-dd HH:mm:ss,时区为GMT+8。ezbuy api服务端允许客户端请求的最大时间误差为10分钟
version string y api协议版本,可选值:1.0

请求参数

名称 类型 是否必须 示例值 限制 描述
product_id number y 782342 大于0 需要更新的产品id
name string n 极有家韩式彩色汤煲 砂锅炖锅陶瓷煲明火耐高温砂锅养生耐热煲汤 200字符以内 产品需要更新为此名称(中文名称)
name_en string n Ladies small bag 2017 new Korean girl fashion oblique cross shoulder bag 200字符以内 产品需要更新为此名称(英文名称)
is_sensitive bool n false 产品是否为敏感品,是敏感品为true
is_onsale bool n true 产品是否是在售状态,在售状态为true
is_deleted bool n true 只能选择true 是否删除该商品;商品删除之后,接口不再返回该数据
description string y 商品描述
sku_prop_image SkuPropertyImage[] n 用于更新商品sku属性图片
size_guide SizeGuide[] n 尺码助手
measure string n 测量方式
spec map <string,string> n 商品描述属性,支持自定义;(描述属性当前仅在前台列表使用,商品详情页暂未展示)
videos Video[] n 最多支持1个视频 商品主图视频
delivery_method number n 派送方式 派送方式
parcel_split number n 包裹拆分方式 商品包裹拆分方式

响应参数

名称 类型 示例值 描述
request_id string 92128f6e-daf3-11e7-a003-f45c89aebcfb 请求id
status RespCode 接口响应状态

响应示例

{
    "request_id":"92128f6e-daf3-11e7-a003-f45c89aebcfb",
    "status": {
        "code": "E0",
        "message": "success"
    }
}

异常示例

{
    "request_id":"92128f6e-daf3-11e7-a003-f45c89aebcfb",
    "status": {
        "code": "E15",
        "message": "record not found"
    }
}

错误码解释

CODE MESSAGE DETAIL
E51 invalid product_id {product_id} is not valid
E52 length of name reached limit max length of name is 200
E53 length of name_en reached limit max length of name_en is 200
E54 invalid is_deleted value is_deleted can only be true
E510 product video is unfitted video is unfitted
E511 max number of videos reached only support 1 video maximumly

ezbuy.product.sku.get(获取单个sku信息)

GET

调用方获取某个SKU信息时使用

公共参数

名称 类型 是否必须 描述
method string y api接口名称
app_key string y ezbuy分配给应用的AppKey
sign_method string y 签名摘要算法,可选值:hmac,md5
sign string y api输入参数的签名结果
timestamp string y 时间戳,格式为yyyy-MM-dd HH:mm:ss,时区为GMT+8。ezbuy api服务端允许客户端请求的最大时间误差为10分钟
version string y api协议版本,可选值:1.0

请求参数

名称 类型 是否必须 示例值 限制 描述
sku_id number y 63767434 大于0 ezbuySKUID
fields string y sku_id,name 需返回的字段列表;可选值为product数据结构中定义的字段,多个字段用“,”分隔。skuid默认强制返回

响应参数

名称 类型 示例值 描述
request_id string 92128f6e-daf3-11e7-a003-f45c89aebcfb 请求id
status RespCode 接口响应状态
data Sku SKU信息

响应示例

{
    "request_id":"92128f6e-daf3-11e7-a003-f45c89aebcfb",
    "status": {
        "code": "E0",
        "message": "success"
    },
    "data": {
        "is_onsale": true,
        "name": "S;粉色;",
        "retail_price": 148.2,
        "sku_id": 100969,
        "stock": 95
    }
}

错误码解释

code message detail
E61 invalid sku_id {sku_id} is not valid

ezbuy.product.sku.update(更新单个sku信息)

POST

调用方更新某个产品的SKU信息时使用

公共参数

名称 类型 是否必须 描述
method string y api接口名称
app_key string y ezbuy分配给应用的AppKey
sign_method string y 签名摘要算法,可选值:hmac,md5
sign string y api输入参数的签名结果
timestamp string y 时间戳,格式为yyyy-MM-dd HH:mm:ss,时区为GMT+8。ezbuy api服务端允许客户端请求的最大时间误差为10分钟
version string y api协议版本,可选值:1.0

请求参数

名称 类型 是否必须 示例值 限制 描述
sku_id number y 63767434 大于0 ezbuySKUID
retail_price float n 88.99 大于0,精确到小数点后两位 sku原价
selling_price float n 77.7 精确到小数点后两位,小于等于原价 sku售卖价
stock number n 888 大于等于零 sku库存
is_onsale bool n true sku是否在售
weight float n 2.45 sku重量

响应参数

名称 类型 示例值 描述
request_id string 92128f6e-daf3-11e7-a003-f45c89aebcfb 请求id
status RespCode 接口响应状态

响应示例

{
    "request_id":"92128f6e-daf3-11e7-a003-f45c89aebcfb",
    "status": {
        "code": "E0",
        "message": "success"
    }
}

异常示例

{
    "request_id":"92128f6e-daf3-11e7-a003-f45c89aebcfb",
    "status": {
        "code": "E63",
        "message": "invalid selling_price",
        "detail": "selling_price must be larger than zero, and  less than retail_price"
    }
}

错误码解释

CODE MESSAGE DETAIL
E62 invalid retail_price retail_price must be larger than zero
E63 invalid selling_price selling_price must be larger than zero, and less than retail_price
E64 invalid stock number stock must be equal or larger than zero
E65 invalid weight weight must be larger than zero

ezbuy.product.sku.add(添加sku)

POST

调用方对某个spu添加sku时调用

公共参数

名称 类型 是否必须 描述
method string y api接口名称
app_key string y ezbuy分配给应用的AppKey
sign_method string y 签名摘要算法,可选值:hmac,md5
sign string y api输入参数的签名结果
timestamp string y 时间戳,格式为yyyy-MM-dd HH:mm:ss,时区为GMT+8。ezbuy api服务端允许客户端请求的最大时间误差为10分钟
version string y api协议版本,可选值:1.0

请求参数

名称 类型 是否必须 示例值 限制 描述
product_id number y 63767434 大于0 ezbuyProductID
skus NewSkuInfo[] y sku信息

响应参数

名称 类型 示例值 描述
request_id string 92128f6e-daf3-11e7-a003-f45c89aebcfb 请求id
status RespCode 接口响应状态
data NewSkuInfo[] sku信息

响应示例

{
    "request_id":"92128f6e-daf3-11e7-a003-f45c89aebcfb",
    "status": {
        "code": "E0",
        "message": "success"
    }
}

异常示例

{
    "request_id":"92128f6e-daf3-11e7-a003-f45c89aebcfb",
    "status": {
        "code": "E63",
        "message": "invalid selling_price",
        "detail": "selling_price must be larger than zero, and  less than retail_price"
    }
}

错误码解释

CODE MESSAGE DETAIL
E62 invalid retail_price retail_price must be larger than zero
E63 invalid selling_price selling_price must be larger than zero, and less than retail_price
E64 invalid stock number stock must be equal or larger than zero
E65 invalid weight weight must be larger than zero