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 Landing can send you reports whenever your client will open the landing page and when he click in any link, map or action button of the landing page.

NOTE
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 The message id.
from The sender of the message you sent.
to The destination number of the message you sent.
custom The custom value of the message you sent.
sms_date The date & time of the message you sent in the format: YYYY-MM-DD HH:MM:SS
status The status of the message, check the following table to see possible values.
dlr_date The date & time of the status.
[
    {
        "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.

Landing Open Request

sms_id The message id.
msisdn The destination number of the message you sent and who has opened the landing page.
timestamp The datetime when your client has opened the landing in the format: YYYY-MM-DD HH:MM:SS.
ip The ip from the landing page has been opened.
city The city from the landing page has been opened.
device The device OS (Operative System) from the landing page has been opened.
user_agent The user_agent of the device from the landing page has been opened.
brand The brand of the device from the landing page has been opened.
model The model of the device from the landing page has been opened.
full_name The model full name of the device from the landing page has been opened.
marketing_name The marketing name of the device from the landing page has been opened.
{
        "034d2acec0eb44af842de6a00bf4d934":
		{
		"msisdn":"34666666666",
		"timestamp":"2017-08-07 17:05:35",
		"ip":"8.8.8.8",
		"city":"Madrid",
		"device":"Android",
		"user_agent":"Mozilla/5.0 (Linux; Android 7.0; SAMSUNG SM-G950F Build/NRD90M) AppleWebKit/537.36",
		"brand":"Samsung",
		"model":"Galaxy S8",
		"full_name":"Samsung Galaxy S8",
		"marketing_name":"SAMSUNG SM-G950F"
	}
}

Landing Click Request

sms_id The message id.
msisdn The destination number of the message you sent and who has opened the landing page.
timestamp The datetime when your client has clicked the link in the format: YYYY-MM-DD HH:MM:SS.
click The link (button, map, image...) which your client have clicked.
{
        "034d2acec0eb44af842de6a00bf4d934":
		{
		"msisdn":"34666666666",
		"timestamp":"2017-08-07 17:06:15",
		"click":"https://yourpage.com/more-information",
	}
}

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.