Get Reports (Callback)
Once you have submitted a message and the message has been delivered to the handset, the operator responds with a delivery report. It could take seconds or 48 hours to receive the delivery report from the operator, depending on the network.
In addition, SMS Link can send you reports whenever your client will open the URL in your message.
To use this method you need to specify the url callback in the param "report_url" when you send the message.
Request to your server
When we receive delivery reports we will send to your server instantly in batches, so each request can contain up to 1,000 delivery reports in a JSON format. You can read these request reading the raw POST data on your side.
DLR Request
Array of delivery reports founds.
|
[
{
"sms_id":"034d2acec0eb44af842de6a00bf4d934",
"from":"SUPERGOL",
"to":"34666666666",
"custom":"YourReferenceID-774843",
"sms_date":"2015-06-02 01:43:47",
"status":"DELIVRD",
"dlr_date":"2015-06-02 01:43:50"
},
{
"sms_id":"034d2acec0eb44af842de6a00bf4d892",
"from":"SUPERGOL",
"to":"34666666666",
"custom":"YourReferenceID-774849",
"sms_date":"2015-06-02 01:43:47",
"status":"DELIVRD",
"dlr_date":"2015-06-02 01:43:49"
}
]
Two delivery reports sent
Status values
DELIVRD | Message delivered to destination. |
ACCEPTD | Message is in accepted state, this state is temporary. |
EXPIRED | Message validity period has expired, the expiration of a message is 48 hours if not specified. |
DELETED | Message has been deleted due to the operator's reasons. |
UNDELIV | Message wasn't delivered by SMSC, expiration, not reachable, operator problems, portability... |
UNKNOWN | Message is in unknown state, the operator is trying, maybe the cellphone is turned off. |
REJECTD | Message is in rejected state, the destination or the operator rejected the message. |
Link Open Request
|
{
"034d2acec0eb44af842de6a00bf4d934":
{
"msisdn":"34666666666",
"timestamp":"2017-08-07 16:41:57",
"ip":"8.8.8.8",
}
}
Your server response
In order to accept the delivery reports, your server must respond with HTTP status code 200 OK. If you cannot process the data at this time, for example, due to a database problem, you can return any other error such as status code 500. If a status code other than 200 is received, the request will be retried every 30 minutes for a period of 6 hours.