搜索特定群发活动
搜索特定群发活动。
请求 URL
GET {base_url}/{api_path}/message_campaign/search?access_token={access_token}
请求参数
| 参数 | 是否必填 | 类型 | 说明 |
|---|---|---|---|
| page | 是 | Integer | 定义显示第几个页面。 |
| page_size | 是 | Integer | 定义每页显示几项查询结果。 |
| search_value | 否 | String | 搜索关键字。 |
响应参数
| 参数 | 类型 | 说明 |
|---|---|---|
| errcode | Integer | 返回错误码。
注: 更多错误码和错误信息说明,请参见 错误码 & 错误信息。
|
| errmsg | String | 返回信息。
|
| total_number | Integer | 搜索到的群发活动总数。 |
| data | Array <MSGCampaign_Info> | 群发活动信息。 |
- MSGCampaign_Info
-
参数 类型 说明 id Integer 群发活动 ID。 name String 群发活动名称。 status String 群发活动状态。 draft:活动被保存为草稿。scheduled:活动将在指定时间发送。pending:由于当前有其他活动正在执行,该活动正在等待发送消息。executing:活动正在发送消息。completed:活动已完成消息发送。stop:由于系统重启,订阅失效等系统问题导致活动意外停止。retrying:活动正在重新尝试发送消息。
channel_type String 群发活动所使用的消息渠道类型。 sms:SMS 渠道。whatsapp:WhatsApp 渠道。
channel_name String 群发活动所使用的消息渠道名称。 sender String 用于发送消息的号码。 recipient_type String 在群发活动中添加收信人的方式。 input:手动输入或文件导入收信人号码。phonebook:从特定企业联系人群组中获取收信人号码。
recipient_name String 存储了收信人号码的企业联系人群组的名称。 recipient_num_type String 指定号码类型,系统将从指定企业联系人群组中获取此类型号码作为收信人号码。 send_type String 群发活动消息发送时间。 immediately:活动保存后立即发送消息。schedule:在指定时间发送消息。draft:活动被保存为草稿,暂不发送消息。
send_time Integer 活动指定发送时间的时间戳。 send_mode String 活动发送模式。 new_session:发送活动消息时自动创建新会话,并分配给指定对象。direct:直接发送消息,不创建新会话。
result_count String 群发活动的发送结果。 格式:
failed_count/total_count(失败数量/总数)response_rate String 群发活动的回复率。
示例
请求示例
GET /openapi/v1.0/message_campaign/search?access_token=3pLZ96FkWJxfYsOEIMokkGjWMMWT6g4g&search_value=promotion&page=1&page_size=20 HTTP/1.1
Host: 192.168.5.150:8088
响应示例
HTTP/1.1 200 OK
{
"errcode": 0,
"errmsg": "SUCCESS",
"total_number": 3,
"list": [
{
"id": 2,
"name": "July Promotion",
"status": "completed",
"channel_type": "sms",
"channel_name": "SMS channel",
"sender": "+1243546576",
"recipient_type": "input",
"recipient_name": "",
"recipient_num_type": "",
"send_type": "immediately",
"send_time": 1753172394,
"send_mode": "new_session",
"result_count": "10/10",
"response_rate": "0%"
},
{
"id": 1,
"name": "June Promotion",
"status": "completed",
"channel_type": "sms",
"channel_name": "SMS channel",
"sender": "+1243546576",
"recipient_type": "phonebook",
"recipient_name": "Company A Customer",
"recipient_num_type": "business_number",
"send_type": "immediately",
"send_time": 1753163109,
"send_mode": "new_session",
"result_count": "6/6",
"response_rate": "0%"
}
]
}