Get the delivery report of every message in a batch (one bulk send).
https://telcomw.com/api-v2/delivery/batchSend the parameters in the URL (query parameters).
| Parameter | Required | Description |
id |
YES | The batch id of the messages. |
api_key |
YES | Your API key. |
curl --location --request GET 'https://telcomw.com/api-v2/delivery/batch?id=BATCH_ID&api_key=YOUR_API_KEY'
curl --location --request GET "https://telcomw.com/api-v2/delivery/batch?id=BATCH_ID&api_key=YOUR_API_KEY"
<?php
$ch = curl_init('https://telcomw.com/api-v2/delivery/batch?id=BATCH_ID&api_key=YOUR_API_KEY');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
print_r(json_decode($response, true));
const axios = require('axios');
axios.request({
method: 'get',
url: 'https://telcomw.com/api-v2/delivery/batch',
params: {
'id': 'BATCH_ID',
'api_key': 'YOUR_API_KEY'
}
}).then((res) => console.log(res.data))
.catch((err) => console.error(err.response ? err.response.data : err.message));
import requests
params = {
'id': 'BATCH_ID',
'api_key': 'YOUR_API_KEY'
}
response = requests.request('GET', 'https://telcomw.com/api-v2/delivery/batch', params=params)
print(response.json())
The response is JSON.
{
"msg": "Batch details retrieved successfully",
"type": "success",
"code": "200",
"data": [
{
"to": "265992026866",
"from": "WGIT",
"text": "Your message",
"status": 4,
"state": "Delivered",
"sent_at": "2024-11-12 12:07:54",
"delivered_at": "2024-11-12 10:13:07"
},
{
"to": "265884113450",
"from": "WGIT",
"text": "Your message",
"status": 4,
"state": "Delivered",
"sent_at": "2024-11-12 12:07:54",
"delivered_at": null
}
]
}
| Field | Description |
data[].to | The phone number the message was sent to. |
data[].from | The sender ID. |
data[].text | The message. |
data[].status | The status of the message as a number: 3 pending, 4 delivered, 6 failed. |
data[].state | The same in words: Pending, Delivered or Failed. |
data[].sent_at | When the message was sent. |
data[].delivered_at | When the message was delivered, null until it is delivered. |