| API | 说明 |
|---|
| 请求路径 | /good/list |
| 请求方法 | GET |
| 描述 | 使用该API可查询商品的列表 |
| 参数名 | 类型 | 必填 | 说明 |
|---|
| access_token | String | 是 | 帐号授权令牌,通过业务员获取 |
| user_code | String | 是 | 当前帐号编号;如:SEA1001 |
| timestamp | String | 否 | 发送请求的时间戳 |
| 参数名 | 类型 | 必填 | 说明 |
|---|
| page | int | 是 | 页码 |
| limit | int | 是 | 分页大小 |
| sku | String | 否 | 商品sku |
| 参数名 | 类型 | 说明 |
|---|
| good_code | String | 商品编号 |
| sku | String | 商品Sku |
| img | String | 商品图片 |
| name | String | 商品名称 |
| spec | String | 商品规格 |
| length | double | 商品长度/cm |
| width | double | 商品宽度/cm |
| height | double | 商品高度/cm |
| weight | double | 商品重量/kg |
| cost_price | double | 成本价 |
| extend_code | String | 外部编号 |
| depositoryGoodSpecList | List | 仓库商品规格列表 |
| 参数名 | 类型 | 必填 | 说明 |
|---|
| goodCode | String | 是 | 商品编号 |
| depositoryId | Long | 是 | 仓库编号 |
| measureLength | double | 是 | 测量长度 |
| measureWidth | double | 是 | 测量宽度 |
| measureHeight | double | 是 | 测量高度 |
| measureWeight | double | 是 | 测量重量 |
| measureVolume | double | 是 | 测量体积 |
| qualityDate | Date | 是 | 质检时间 |
请求示例: JAVA-OkHttp
OkHttpClient client = new OkHttpClient()
.newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://api-oms.seacang.com/good/list")
.method("GET", body)
.addHeader("access_token", "test")
.addHeader("user_code", "SEA1001")
.build();
Response response = client.newCall(request).execute();
响应示例:
{
"code": 0,
"msg": "成功",
"timestamp": 1722322022500,
"data": [
{
"good_code": "SEATH100001",
"sku": "THBD-020",
"img": "https://static.seacang.com/logo/logo.png",
"name": "智能手表",
"spec": "白色",
"length": 10.0,
"width": 10.0,
"height": 10.0,
"weight": 10.0,
"cost_price": 20
},
]
}