名称 | 类型 | 只读 | 必填 | 注释 |
---|---|---|---|---|
sgId | int | 是 | 否 | 客服分组ID,系统自动生成 |
url | varchar | 是 | 否 | 该客服分组的资源url |
sgName | varchar | 否 | 是 | 客服分组名称 |
{ "sgId": 1, "url": "https://www.bangwo8.com/api/v1/supportgroups/1.json", "sgName": "北京办" }
GET /api/v1/supportgroups.json
调用者权限
管理员
调用示例
curl https://www.bangwo8.com/api/v1/supportgroups.json \ -v -u {account}:{password}
返回值示例
Status: 200 OK { "supportgroups": [ { "sgId": 1, "sgName": "北京办" }, { "sgId": 2, "sgName": "上海办" } ] }
GET /api/v1/supportgroups/{id}.json
调用者权限
管理员
调用示例
curl https://www.bangwo8.com/api/v1/supportgroups/{id}.json \ -v -u {account}:{password}
返回值示例
Status: 200 OK { "supportgroup": { "sgId": 1, "sgName": "北京办" } }
GET /api/v1/supportgroups/show_many.json?ids={ids}
调用者权限
管理员
调用示例
curl https://www.bangwo8.com/api/v1/supportgroups/show_many.json?ids=1,2,3 \ -v -u {account}:{password}
返回值示例
Status: 200 OK { "supportgroups": [ { "sgId": 1, "sgName": "北京办" }, { "sgId": 2, "sgName": "上海办" } ] }
POST /api/v1/supportgroups.json
调用者权限
管理员
调用示例
curl -v -u {account}:{password} https://www.bangwo8.com/api/v1/supportgroups.json \ -H "Content-Type: application/json" -X POST -d '{"supportgroup": {"sgName": "北京办"}}'
说明:创建客服分组时,cgName必填。
返回值示例
Status: 200 OK Location: https://www.bangwo8.com/api/v1/supportgroups/{id}.json { "supportgroup": { "sgId": 1, "sgName": "北京办" } }
PUT /api/v1/supportgroups/{id}.json
调用者权限
管理员
调用示例
curl -v -u {account}:{password} https://www.bangwo8.com/api/v1/supportgroups/123.json \ -H "Content-Type: application/json" -X PUT -d '{"supportgroup": {"sgName": "上海办"}}'
返回值示例
Status: 200 OK { "supportgroup": { "sgId": 1, "sgName": "北京办" } }
DELETE /api/v1/supportgroups/{id}.json
调用者权限
管理员
调用示例
curl -v -u {account}:{password} https://www.bangwo8.com/api/v1/supportgroups/765607.json \ -H "Content-Type: application/json" -X DELETE
返回值示例
Status: 200 OK { "supports": { "sgId": "765607", "sgName": "gnwaycs", "url": "https://www.bangwo8.com/api/v1/supportgroups/765607.json" } }
GET /api/v1/supportgroups/supports/{sgId}.json
调用者权限
管理员
调用示例
curl https://www.bangwo8.com/api/v1/supportgroups/supports/3232.json \ -H "Content-Type: application/json" \ -v -u {account}:{password} -X GET
返回值示例
Status: 200 OK { "sgId": 1, "sgName": "北京办", "supports": [ { "sId": "563562", "sPassportName": "gzcs005", "groupId": "", "sNum": "005", "name": "刘经理", "gnder": "2", "email": "", "fixnumber": "", "mobile": "13076869445", "QQ": "", "isAdmin": "0", "createDT": "2019-08-15 16:29:05" }, { "sId": "563570", "sPassportName": "gzcs006", "groupId": "", "sNum": "006", "name": "陈主管", "gnder": "1", "email": "", "fixnumber": "", "mobile": "15939833813", "QQ": "", "isAdmin": "0", "createDT": "2019-08-15 16:30:33" }, { "sId": "563578", "sPassportName": "gzcs003", "groupId": "134254", "sNum": "003", "name": "卢园", "gnder": "1", "email": "", "fixnumber": "", "mobile": "15506843513", "QQ": "", "isAdmin": "0", "createDT": "2019-08-15 16:32:20" }, { "sId": "644242", "sPassportName": "kssq001", "groupId": "143371", "sNum": "007", "name": "售前1", "gnder": "1", "email": "", "fixnumber": "", "mobile": "15506843512", "QQ": "", "isAdmin": "0", "createDT": "2019-10-22 17:06:36" }, { "sId": "644245", "sPassportName": "kssq002", "groupId": "143374", "sNum": "008", "name": "售后1", "gnder": "1", "email": "", "fixnumber": "", "mobile": "15506843512", "QQ": "", "isAdmin": "0", "createDT": "2019-10-22 17:07:24" } ], "count": "4", "previous_page": "", "next_page": "" }