查询超级短信模板

HTTP 头信息:

  1. Accept:application/json;charset=utf-8;
  2. Content-Type:application/x-www-form-urlencoded;charset=utf-8;

请求

  1. URLhttps://vsms.yunpian.com/v2/vsms/get_tpl.json
  2. 访问方式:POST

特别说明 该功能需联系在线客服开通。

请求参数

参数名 类型 是否必传 是否默认开放 描述 示例
apikey string 用户唯一标识,在”账号设置”-“子帐号管理”中查看 9b11127a9701975c
734b8aee81ee3526
tpl_id string 模版 id 126

请求示例

php:

  1. <?php
  2. $ch = curl_init();
  3. $apikey = "xxxxxxxxx"; //修改为您的apikey(https://www.yunpian.com)登录官网后获取
  4. //你后台审核通过的模板id
  5. $tpl_id = 123;
  6. $ch = curl_init();
  7. $data=array('apikey'=> $apikey,'tpl_id'=> $tpl_id);
  8. curl_setopt($ch, CURLOPT_URL, 'https://vsms.yunpian.com/v2/vsms/get_tpl.json');
  9. curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
  10. curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
  11. $json_data = curl_exec($ch);
  12. var_dump($json_data);
  13. //解析返回结果(json格式字符串)
  14. $array = json_decode($json_data,true);
  15. print_r($array);

响应

名称 类型 描述
code integer 0 代表请求成功
msg string code 描述
detail string 详细描述
http_status_code integer http状态码
data object 参考data字段描述

data字段详细描述

名称 类型 描述
tpl_id integer 模版id
check_status string 审核状态(0:待提交审核、1:审核中、2:审核成功、3:审核未通过、4:已过期)
reason string 审核批注
yd_enabled string 此模板是否可发移动号码
lt_enabled string 此模板是否可发联调号码
dx_enabled string 此模板是否可发电信号码
yd_check_status integer 移动审核状态(-1:不需要审核、0:待提交审核、1:审核中、2:审核成功、3:审核未通过、4:已过期)
yd_check_remark string 移动审核备注
lt_check_status integer 联通审核状态(-1:不需要审核、0:待提交审核、1:审核中、2:审核成功、3:审核未通过、4:已过期)
lt_check_remark string 联通审核备注
dx_check_status integer 电信审核状态(-1:不需要审核、0:待提交审核、1:审核中、2:审核成功、3:审核未通过、4:已过期)
dx_check_remark string 电信审核备注
expire_time date 过期时间

Json 返回示例

{
    "data": {
        "tpl_id": 1234,
        "check_status": "3",
        "reason": null,
        "yd_enabled": false,
        "lt_enabled": false,
        "dx_enabled": false,
        "yd_check_status": 3,
        "yd_check_remark": "测试驳回",
        "lt_check_status": 3,
        "lt_check_remark": "测试驳回",
        "dx_check_status": 3,
        "dx_check_remark": "测试驳回",
        "expire_time": null
    },
    "code": 0,
    "msg": "OK",
    "detail": "OK",
    "http_status_code": 200
}