Overview and parameters
HTTP based API will be used for get SMS Delivery through system.
| Parameter | Value | Required | Description |
|---|---|---|---|
| apikey | 54XXXXXXXXXXXXX | Mandatory | Assigned API key of user. This key user can get from portal by logging into the system. |
| messageid | 4XXXXXX | Optional | Unique Message ID returned by our system after sending message. If user wants DLR for few specific messages then he has to pass message IDs (comma separated) into this parameter. |
| externalid | 2XXXXXX | Optional | Unique ID which has been sent by user while sending SMS request. |
| drquantity | 10 | Optional | Total Number of DLR requests. If user has not specified this parameter value, system will consider default number of DLR requests of the system. |
| fromdate | Date as per standard format | Optional | From Date. If from date is not specified by user then system will consider today’s date with 00:00:00 (hours, minutes, and seconds) as From Date. |
| todate | Date as per standard format | Optional | To Date. Default to date is today’s date with 23:59:59 (hours, minutes, and seconds) as To Date. |
Output Parameter Description:
| Parameter | Value (Example) | Description |
|---|---|---|
| message-id | xxxxxxx | Unique Message ID returned by our system after sending message. |
| external-id | xxxxxxx | Unique ID which has been sent by user while sending SMS request. |
Error Codes:
| Sr No | Error Code | Error Status |
|---|---|---|
| 1 | -101 | Unknown |
| 2 | 000 | Success |
| 3 | 001 | Required |
| 4 | 002 | Invalid |
| 5 | 003 | Failed |
| 6 | 004 | Duplicate |
Request reference
Request
Code examples
Code example
curl --location --request GET 'https://{Domain}/client/api/getdlr?apikey={apikey}&messageid={1,2}&externalid={1,2}&drquantity={X}&fromdate={yyyy-mm-dd hh:mm:ss{&todate={yyyy-mm-dd hh:mm:ss}'const url = "https://{Domain}/client/api/getdlr?apikey={apikey}&messageid={1,2}&externalid={1,2}&drquantity={X}&fromdate={yyyy-mm-dd hh:mm:ss{&todate={yyyy-mm-dd hh:mm:ss}";
const options = {
method: "GET"
};
const response = await fetch(url, options);
const data = await response.json();
console.log(data);import requests
url = "https://{Domain}/client/api/getdlr?apikey={apikey}&messageid={1,2}&externalid={1,2}&drquantity={X}&fromdate={yyyy-mm-dd hh:mm:ss{&todate={yyyy-mm-dd hh:mm:ss}"
headers = {}
response = requests.request(
"GET",
url,
headers=headers
)
print(response.json())<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{Domain}/client/api/getdlr?apikey={apikey}&messageid={1,2}&externalid={1,2}&drquantity={X}&fromdate={yyyy-mm-dd hh:mm:ss{&todate={yyyy-mm-dd hh:mm:ss}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET"
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Response example
JSON response
{
"status": {
"error-code": "",
"error-status": "",
"error-description": ""
},
"dlr-details": {
"pending-dr-count": "",
"dr-count": "",
"dlr-list": [{
"message-id": "",
"external-id": ""
}
]
}
}