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.

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 requests reading the raw POST data on your side.

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.

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.