94 lines
1.8 KiB
Markdown
94 lines
1.8 KiB
Markdown
# 客户查询接口
|
||
|
||
## 1. 客户分类列表
|
||
|
||
```
|
||
GET https://openapi.77ircloud.com/organization-aggregation/organizations/customer-categories
|
||
```
|
||
|
||
**Header:** `access_token: {token}`
|
||
|
||
**返回:**
|
||
```json
|
||
{
|
||
"code": 200,
|
||
"data": [
|
||
{"id": 2116753907815520, "name": "普通客户", "defaultFlag": true},
|
||
{"id": 2116796845712896, "name": "尊宝快递", "defaultFlag": false},
|
||
{"id": 2116796846321152, "name": "家庭客户", "defaultFlag": false}
|
||
]
|
||
}
|
||
```
|
||
|
||
---
|
||
|
||
## 2. 客户列表(查询)
|
||
|
||
```
|
||
POST https://openapi.77ircloud.com/organization-aggregation/customer/search
|
||
```
|
||
|
||
**Header:** `access_token: {token}` + `Content-Type: application/json`
|
||
|
||
**Body 参数:**
|
||
```json
|
||
{
|
||
"pageNum": 1,
|
||
"pageSize": 10,
|
||
"keyword": "成都" // 可选,按客户名称模糊搜索
|
||
}
|
||
```
|
||
|
||
**返回:**
|
||
```json
|
||
{
|
||
"code": 200,
|
||
"data": {
|
||
"items": [
|
||
{
|
||
"id": 2139500795701856,
|
||
"code": "0411190513901",
|
||
"name": "成都冷鲜优选供应链公司",
|
||
"contactName": "周总",
|
||
"contactPhone": "136xxx",
|
||
"categoryId": 2116753907815520,
|
||
"categoryName": "普通客户"
|
||
}
|
||
]
|
||
}
|
||
}
|
||
```
|
||
|
||
**说明:** 这是查询类接口(POST 方法是业务含义上的查询,不是写操作)
|
||
|
||
---
|
||
|
||
## 3. 收货地址列表
|
||
|
||
```
|
||
GET https://openapi.77ircloud.com/organization-aggregation/organizations/{orgId}/delivery-addresses
|
||
```
|
||
|
||
**Header:** `access_token: {token}`
|
||
|
||
**路径参数:**
|
||
- `orgId`: 客户ID(从客户列表获取)
|
||
|
||
**返回:**
|
||
```json
|
||
{
|
||
"code": 200,
|
||
"data": [
|
||
{
|
||
"id": 2139500796169856,
|
||
"contactName": "",
|
||
"contactPhone": "",
|
||
"provinceId": 510000,
|
||
"cityId": 510100,
|
||
"districtId": 510106,
|
||
"address": "四川省成都市金牛区..."
|
||
}
|
||
]
|
||
}
|
||
```
|