Batch single push API(VIP)

Last updated:2022-08-09
Expand all
Batch single push API(VIP)

Function description

You can use this interface if you push different content to each user.

If you need to open this interface, please contact:Business customer service

Calling address

RegID Way

POST https://api.jpush.cn/v3/push/batch/regid/single

Alias Way

POST https://api.jpush.cn/v3/push/batch/alias/single

Call verification

For details, see REST API Outlined Authentication method illustrate.

Call instructions

Before using this interface, you need to use Get push unique identifier The interface is obtained in advance cid Pool, when getting type=push or not passed type value; get cid After the value, the format of passing parameters is as follows:

{"pushlist":{ "cid 值 1":{...}, "cid 值 2":{...},... }}
          {"pushlist":{
 "cid 值 1":{...},
 "cid 值 2":{...},...
}}

        
This code block is shown in the floating window

Request example

Request Header

> POST /v3/push/batch/regid/single HTTP/1.1 > Authorization: Basic N2Q0MzFlNDJkZmE2YTZkNjkzYWMyZDA0OjVlOTg3YWM2ZDJlMDRkOTVhOWQ4ZjBkMQ==
          > POST /v3/push/batch/regid/single HTTP/1.1
> Authorization: Basic N2Q0MzFlNDJkZmE2YTZkNjkzYWMyZDA0OjVlOTg3YWM2ZDJlMDRkOTVhOWQ4ZjBkMQ==

        
This code block is shown in the floating window

or

> POST /v3/push/batch/alias/single HTTP/1.1 > Authorization: Basic N2Q0MzFlNDJkZmE2YTZkNjkzYWMyZDA0OjVlOTg3YWM2ZDJlMDRkOTVhOWQ4ZjBkMQ==
          > POST /v3/push/batch/alias/single HTTP/1.1
> Authorization: Basic N2Q0MzFlNDJkZmE2YTZkNjkzYWMyZDA0OjVlOTg3YWM2ZDJlMDRkOTVhOWQ4ZjBkMQ==

        
This code block is shown in the floating window

Request Parameters

pushlist 必填参数。JSON 类型,最多支持填写 1000 个 cid 值。 cid 值 必填参数。JSON 类型,取值:push(默认),JSON Value 部分具体字段参考下面表格说明。
          pushlist
 必填参数。JSON 类型,最多支持填写 1000 个 cid 值。
cid 值
 必填参数。JSON 类型,取值:push(默认),JSON Value 部分具体字段参考下面表格说明。

        
This code block is shown in the floating window
Keywords Options meaning
platform Required Push platform settings, please refer to the details Push API
target Required Push device designation.
  • If it is calling RegID Method batch single push interface (/v3/push/batch/regid/single), then here is the specified regid value.
  • If it is calling Alias Method batch single push interface (/v3/push/batch/alias/single), then here is the specified alias value.
  • notification Optional
  • The notification content body is the content pushed to the client. For details, please refer to Push API
  • and message There must be one of the two, and both can coexist.
  • message Optional
  • The message content body is the content pushed to the client. For details, please refer to Push API
  • and notification There must be one of the two, and both can coexist.
  • sms_message Optional The text message channel supplements the delivery content, please refer to it for details. Push API
    options Optional Push optional parameters, please refer to the details Push API
    callback Optional Push optional parameters, please refer to the details Push API
    notification_3rd Optional
  • Customize the message to the content body of the manufacturer's notification.
  • and message used together.
  • Complete parameter example:

    {"pushlist":{ "cid1":{ "platform": "all", "target": "aliasvalue1", // 此处填写的是 regid 值或者 alias 值 "notification": {... // 省略参数同 push api 部分}, "message": {... // 省略参数同 push api 部分}, "sms_message":{... // 省略参数同 push api 部分}, "options": {... // 省略参数同 push api 部分}, "callback":{... // 省略参数同 push api 部分} }, "cid2":{ "platform": "all", "target": "aliasvalue2", // 此处填写的是 regid 值或者 alias 值 "message": {...}, "notification_3rd":{...}, "options": { "notification_3rd_ver": "v2" // 自定义消息转厂商通知功能需特别注意此字段,具体参考 push api 文档说明;省略其它参数同 push api 部分 } "callback":{...} },... }}
              {"pushlist":{
     "cid1":{
     "platform": "all",
     "target": "aliasvalue1", // 此处填写的是 regid 值或者 alias 值
     "notification": {... // 省略参数同 push api 部分},
     "message": {... // 省略参数同 push api 部分},
     "sms_message":{... // 省略参数同 push api 部分},
     "options": {... // 省略参数同 push api 部分},
     "callback":{... // 省略参数同 push api 部分}
     },
     "cid2":{
     "platform": "all",
     "target": "aliasvalue2", // 此处填写的是 regid 值或者 alias 值
     "message": {...},
     "notification_3rd":{...},
     "options": {
     "notification_3rd_ver": "v2" // 自定义消息转厂商通知功能需特别注意此字段,具体参考 push api 文档说明;省略其它参数同 push api 部分
     }
     "callback":{...}
     },...
    }}
    
            
    This code block is shown in the floating window

    Return example

    Return successfully

    HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 Success Response Data { "cid1":{"msg_id":134123478}, "cid1":{ "msg_id":134123478, "error":{ "code":1011, "message":"****" } }, "cid3":{ "error":{ "code":1009, "message":"****" } },... }
              HTTP/1.1 200 OK
    Content-Type: application/json; charset=utf-8
    
    Success Response Data
    {
     "cid1":{"msg_id":134123478},
     "cid1":{
     "msg_id":134123478,
     "error":{
     "code":1011,
     "message":"****"
     }
     },
     "cid3":{
     "error":{
     "code":1009,
     "message":"****"
     }
     },...
    }
    
            
    This code block is shown in the floating window

    Return on failure

    HTTP/1.1 400 OK Content-Type: application/json; charset=utf-8 Failed Response Data { "error":{ "message":"Authen failed", "code":1004 } }
              HTTP/1.1 400 OK
    Content-Type: application/json; charset=utf-8
    
     Failed Response Data
    {
     "error":{
     "message":"Authen failed",
     "code":1004
     }
    }
    
            
    This code block is shown in the floating window

    call returns

    For details, please refer to Push API

    call limit

    • all of the above API interface frequency and Push API v3 The interface frequencies are shared and will affect and consume each other.
    • Example: Use the batch single push interface to push 1regid or 1alias, consumption Push API The frequency is 1.
    Was this document helpful?

    Copyright 2011-2026, jiguang.cn, All Rights Reserved. 粤ICP备12056275号-13 Shenzhen Hexun Huagu Information Technology Co., Ltd.

    Open in Docs Center