文档
测试

推送-接口

POST
http://xhk.kaxinkeji.com:8080/im/api-push/push

接口描述

推送接口

请求头

参数名
类型
描述
必填
Content-Type
application/json
必填

请求参数

参数名
类型
描述
必填
type
string
推送类型,one、list 、all
必填
title
string
消息标题
必填
content
string
消息内容
必填
list
array
推送账号
必填
map
object
消息类型
必填
type
string
示例:1
必填
childType
string
示例:0
必填

说明 / 示例

## 请求包数据示例: ```json // 单用户推送 { "type":"one", "title":"测试推送", "content":"抢红包了!", "list":["15084909584"], "map":{"type":"1","childType":"0"} } // 多用户推送 { "type":"list", "title":"测试推送", "content":"抢红包了!", "list":["15084909584","13807310731"], "map":{"type":"2","childType":"3"} } // 推送全部用户 { "type":"all", "title":"测试推送", "content":"抢红包了!", "list":[], "map":{"type":"2","childType":"3"} } ``` ## 字段说明: |字段| 类型 | 属性 |默认值 | 说明 | |-|-|-|-|-| | type |String|必填||推送类型:one - 单账号 list - 批量 all - 全部。该字段为all时,platform字段无效,默认推送全平台| | title |String|必填||推送标题| | content |String|必填||推送内容| | platform |String|非必填|all|推送平台 android - 安卓平台,iOS - ios平台,all - 推送全平台。| | list | ArrayList |非必填||推送用户账号(使用用户手机号)| | map | HashMap |必填||推送信息类型| ### map - 推送消息类型说明: 示例: ```json { "type":"1", "childType":"0" } ``` **type:消息类型** |消息类型(type)|描述|特性说明| |-|-|-| |1|收益消息|普通通知提示| |2|红包消息|红包通知| |3|🐟消息|🐟通知| |4|公告消息|后台推送公告| **childType:消息子类型** 默认为 0 - 无类型 |消息类型(type)|消息子类型(childType)|描述|特性说明| |-|-|-|-| |2|1|20元现金红包|20元现金红包| |2|2|100元抵扣券|100元抵扣券| |2|3|80元红包|80元红包| |3|1|金鱼| 金鱼 | |3|2|银鱼|银鱼| |3|3|锦鲤| 锦鲤 |