# Get SKU Information
# Dxplaination of Interface Call Request
http请求方式:POST
https://api.weixin.qq.com/product/sku/get?access_token=xxxxxxxxx
# Example of request parameters
{
"out_sku_id": "1024",
"sku_id": 2352525,
"need_edit_sku": 1, // 默认0:获取线上数据, 1:获取草稿数据
"need_real_stock": 1 // 默认0:获取草稿库存, 1:获取线上真实库存
}
# Examples of back-up
{
"errcode": 0,
"errmsg":"ok",
"data":
{
"product_id": 23423523452345235,
"out_product_id": "1234566",
"out_sku_id": "1024",
"sku_id": 2352525,
"thumb_img": "http://img10.360buyimg.com/n1/s450x450_jfs/t1/100778/17/13648/424215/5e590a40E2d68e774/e171d222a0c9b763.jpg",
"sale_price": 1300,
"market_price": 1500,
"stock_num": 100,
"sku_code": "A24525252",
"barcode": 13251454,
"status": 5,
"sku_attrs":
[
{
"attr_key": "选择颜色",
"attr_value": "红蓝主机"
},
{
"attr_key": "选择套装",
"attr_value": "主机+保护套"
}
]
}
}
# Dxplaination of request parameters
| 参数 | type | Is it compulsory? | Introductions |
|---|---|---|---|
| sku_id | number | no | Out_sku_id, sku_id |
| out_sku_id | string | no | Out_sku_id, sku_id |
| need_real_stock | number | no | Default 0: Get draft inventory, 1: Get real inventory online |
| need_edit_sku | number | no | Default 0: Get online data, 1: Get draft data |
# Dxplaination of callback parameters
| 参数 | type | Introductions |
|---|---|---|
| errcode | number | Error code |
| errmsg | string | Error message |
| data.product_id | number | Small shop internal product ID |
| data.out_product_id | string | Merchant Custom Item ID |
| data.sku_id | number | Small shop internal skuID |
| data.out_sku_id | string | The merchant defines the skuID, the character string |
| data.thumb_img | string | SCU diagram |
| data.sale_price | number | Sell prices divided into units |
| data.market_price | number | The market price is divided into units |
| data.stock_num | number | stock |
| data.barcode | string | barcode |
| data.sku_code | string | Product Codes |
| data.status | number | sku state |
| data.sku_attrs[].attr_key | string | Property key (for property customization) |
| data.sku_attrs[].attr_value | string | Attribute values (for attribute customization) |
# Enumeration - status
| 枚举值 | describe |
|---|---|
| 5 | It's on the shelves. |
| 21 | False deletion |
# Return code
| 返回码 | Error Type |
|---|---|
| -1 | System exceptions |
| -2 | Token too long |
| 9401020 | The parameter is incorrect. |
| 9401006 | SKU does not exist |
| 9401005 | SKU already exists |
| 9401025 | SKU does not allow editing |