预测试外呼任务号码追加接口
<h3>接口说明:</h3>
<p>已创建的预测式任务中,通过此接口可对任务中的号码进行增加,单次追加号码不要超过10000个。
只有未开始、进行中或已暂停的任务才能追加号码</p>
<h3><strong>请求参数</strong></h3>
<table>
<thead>
<tr>
<th>参数名</th>
<th>类型</th>
<th>是否必须</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>service</td>
<td>string</td>
<td>是</td>
<td>App.Sip_Yccall.TaskAdd</td>
</tr>
<tr>
<td>token</td>
<td>string</td>
<td>是</td>
<td>通过授权接口获取的token</td>
</tr>
<tr>
<td>taskid</td>
<td>string</td>
<td>是</td>
<td>预测式任务ID</td>
</tr>
<tr>
<td>telphone</td>
<td>string(JSON)</td>
<td>是</td>
<td>手机号码、预设呼叫时间(时间戳)(默认当前时间戳,大于此时间则不呼)等。示例:[{“phone”:18012345678,”time”:1500000000,”userid”:””,”memberid”:””,”chengshudu”:””,”customuuid”:””}]</td>
</tr>
</tbody>
</table>
<h3><strong>请求接口示例(PHP)</strong></h3>
<pre><code>&lt;?php
$apiUrl = &#039;http://127.0.0.1:8080&#039;;
$postFields = [
&#039;service&#039; =&gt; &#039;App.Sip_Yccall.TaskAdd&#039;,
&#039;token&#039; =&gt; &#039;ABCDEFG&#039;,
&#039;taskid&#039; =&gt; &#039;ADSFNIDJN&#039;,
&#039;telphone&#039; =&gt; &#039;[{&quot;phone&quot;:18012345678,&quot;time&quot;:1500000000,&quot;userid&quot;:&quot;&quot;,&quot;memberid&quot;:&quot;&quot;,&quot;chengshudu&quot;:&quot;&quot;,&quot;customuuid&quot;:&quot;&quot;}]&#039;
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $apiUrl);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
$curlError = curl_error($curl);
curl_close($curl);
var_dump($response);
?&gt;</code></pre>
<h3><strong>返回数据结构示例</strong></h3>
<pre><code>{
&quot;ret&quot;: 200,
&quot;data&quot;: {
&quot;status&quot;: 0,
&quot;desc&quot;: &quot;追加成功&quot;,
&quot;result&quot;: {
&quot;success&quot;: 7,
&quot;invaliddata&quot;: []
},
&quot;reqtime&quot;: 1613962979,
&quot;rsptime&quot;: 1613962979
},
&quot;msg&quot;: &quot;&quot;
}</code></pre>
<h3><strong>返回参数说明</strong></h3>
<table>
<thead>
<tr>
<th>参数名</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>result</td>
<td>object</td>
<td>返回结果</td>
</tr>
<tr>
<td>success</td>
<td>int</td>
<td>追加成功的号码</td>
</tr>
<tr>
<td>invaliddata</td>
<td>array</td>
<td>无效数据</td>
</tr>
</tbody>
</table>