promotion/README.MD
2019-07-09 19:24:03 +08:00

4.3 KiB
Raw Blame History

推广系统接口文档

1、获得公司列表

接口地址

http://192.168.100.20:8888/company

返回格式json
请求方式get
请求示范

http://192.168.100.20:8888/company?status=0

请求参数说明
名称 类型 必填
status int 0=未审批1=审批通过2=审批未通过
id int 返回该id对应公司信息
上述参数为空返回所有信息
返回参数说明
名称 类型 必填 说明
id int 自动产生的公司ID
name string 公司名称
contact string 联系人
tel int 联系电话
companyid string 公司标识
companykey string 用于API认证
返回示例

{ "code": 200, "message": [ { "appid": "zpoHY37u", "appkey": "undefined", "contact": "miles", "id": "1006", "name": "kingsome", "status": 0, "tel": "17771" }, { "appid": "5bOaA82t", "appkey": "undefined", "contact": "miles", "id": "1007", "name": "kingsome", "status": 0, "tel": "17771" } ] }

2、新增公司信息

接口地址

http://192.168.100.20:8888/company

返回格式json
请求方式post
请求示范

http://192.168.100.20:8888/company?name=kings&contact=pt&tel=1234

请求参数说明
名称 类型 必填
name string 公司名称
contact string 联系人
tel string 联系电话
返回参数说明
名称 类型 必填 说明
code int 返回状态
返回示例

{ "code": 200 }

3、更改公司信息

接口地址

http://192.168.100.20:8888/company

返回格式json
请求方式put
请求示范

http://192.168.100.20:8888/company?appid=zpoHY37u&appkey=undefined&contact=miles&id=1006&name=kingsome&status=1&tel=17771

请求参数说明
名称 类型 必填
name string 公司名称
contact string 联系人
tel string 联系电话
id int 公司id(唯一值)
appid string 公司标识
appkey string 认证用,暂无
status int 审批状态
返回参数说明
名称 类型 必填 说明
code int 返回状态
返回示例

{ "code": 200 }

4、删除公司信息

接口地址

http://192.168.100.20:8888/company

返回格式json
请求方式delete
请求示范

http://192.168.100.20:8888/company?id=1006

请求参数说明
名称 类型 必填
id int 公司id(唯一值)
返回参数说明
名称 类型 必填 说明
code int 返回状态
返回示例

{ "code": 200 }

5、添加位置服务信息

接口地址

http://192.168.100.20:8888/location

返回格式json
请求方式get
请求示范

http://192.168.100.20:8888/location

请求参数说明
名称 类型 必填
返回参数说明
名称 类型 必填 说明
code int 返回状态
返回示例

{ "code": 200 }