domain说明
序号 | 系统 | 环境 | 地址 | 备注 |
---|---|---|---|---|
1 | 卓易政企通 | 测试 | https://test-gateway.eazytec-cloud.com | 适用【园企通】【行业政企通】【乡镇政企通】【协会政企通】 |
2 | 卓易政企通 | 线上 | https://gateway.eazytec-cloud.com | 适用【园企通】【行业政企通】【乡镇政企通】【协会政企通】 |
3 | 宜兴政企通 | 测试 | https://test-gateway.eazytec-cloud.com/YX | 适用【宜兴政企通】 |
4 | 宜兴政企通 | 线上 | https://gateway.eazytec-cloud.com/YX | 适用【宜兴政企通】 |
5 | 宜兴政企通 | 线上-政务外网 | http://10.36.12.1:8000/YX(vpn) http://2.18.243.11:8000/YX(政务外网) | 适用【宜兴政企通-政务外网】 |
6 | 江苏政企通 | 测试 | https://test-gateway.eazytec-cloud.com/JS | 适用【江苏政企通】 |
7 | 江苏政企通 | 线上 | https://gateway.eazytec-cloud.com/JS | 适用【江苏政企通】 |
8 | 安可 | 测试 | http://192.168.16.163:8091 | 适用安可测试调试,后续路由中忽略/AGCS_zqc,token获取请教蒋超 |
发送消息
1. 发送政企消息
请求URL
/AGCS_zqc/v3_1/msgcenter/send
请求方式
POST
请求Header参数
key | value | 举例 | 是否必须 |
---|---|---|---|
Content-Type | application/json | application/json | 是 |
Authorization | Bearer [token] | Bearer b43bfc94-2c77-46b4-b8f8-87cb549dfef3 | 是 |
请求Body
Type: raw{ "sendData": { "appid": "String | 必填 | 申请的clientID", "appname": "String | 必填 | 应用名称", "title": "String | 必填 | 标题", "body": "HTML富文本| 必填 | 消息正文", "extMap": "json对象{}| 可选 | 扩展字段", "msgtype": "int | 必填 | 消息分类(0-政企消息)", "needpush": "int | 可选 | 是否需要推送移动端(0-否,1-是)", "params": { "sender": "String | 必填 | 发件人名称描述(只用于展示)", "recipient": "JsonString | 可选 | 收件人(用于收件箱解析展示,格式:{'orgId':'政府baseid','esNameList':['标签esName'],'companyIdList':['企业baseid'],'linkmenTypeList':['联系人分类']})", "hasatt": "String | 可选 | 是否有附件(0-否,1-是)", "attfiles": "JsonString | 可选 | 附件列表(格式 [{'name':'','path':''}])", "msgcategory": "String | 必填| 消息类型 (公共公示,新闻通知,政策公示,会议通知)", "msglevel": "String | 必填| 消息级别(紧急,重要,普通)", "needreply": "String | 可选 | 是否需要回复(0-否,1-是)", "needsms":"String | 可选 | 是否需要短信提醒(0-否,1-是)", "redirect_pc":"String | 可选 | pc跳转地址", "redirect_app":"String | 可选 | 移动端app跳转地址" } } }, "from": { "userid": "String | 必填 |发送人用户ID", "usertype": "int | 必填 | 发送人用户分类(1-政府/2-企业)", "orgid": "String | 必填 |发送人组织ID(政企labelid/企业baseid)", "deptid": "String | 可选 |发送人部门ID" }, "to": [{ "userid": "String | 必填 | 接收人用户ID", "usertype": "int | 必填 | 接收人用户分类(1-政府/2-企业)", "orgid": "String | 必填 | 接收人组织ID(政企labelid/企业baseid)", "deptid": "String | 可选 | 接收人部门ID" }] }
示例
{ "sendData": { "appid": "zqtong_gov_app_client", "appname": "政企消息", "title": "[环科园(新街街道)] 环科园第四次全国经济普查单位清查补充登记公告", "body": "<div class='show_content'>消息正文</div>", "extMap":{"test":"测试扩展"}, "msgtype": 0, "needpush": 0, "params": { "sender": "宜兴人民政府", "recipient": "{'orgId':'org-1','esNameList':['c-1','c-2'],'companyIdList':['t-1','t-2'],'linkmenTypeList':['t-1','t-2']}", "hasatt": "1", "attfiles": "[{'name':'附件1','path':'www.path.com'},{'name':'附件2','path':'www.path.com'}]", "msgcategory": "通知公告", "msglevel": "一般", "needreply": "0", "needsms": "0", "redirect_pc":"http://xxx", "redirect_app":"http://xxxx", "redirect_app":"ZQT_xx/#/detail?id=xxx" } }, "from": { "deptid": "0ccaea9f-3a2c-4140-90ec-8496752967bd", "orgid": "d2eeee46-440c-4102-a71b-2770cd865198", "userid": "1154fcc5-58fb-4eb5-ab0e-5ffb95cfc20a", "usertype": 1 }, "to": [{ "deptid": "", "orgid": "ad0f56d2-4c5a-4b02-9127-6db8cc099820", "userid": "2fb5c7c3-6841-4b15-9c4d-b2e807b792e5", "usertype": 2 }] }
返回
{ "data": "outboxid(发件消息ID)" , "msg": "success", "oK": true, "status": 200 }
返回失败: 400(参数缺失)
{ "data": "缺少必要参数" , "msg": "fail", "status": 400 }
返回失败: 401(解决:重新获取token,然后重新请求)
{ "error": "invalid_token", "error_description": "Invalid access token: e9a86405-5b16-4d33-825b-ee5d848ac55" }