<?php
$json = <<<'JSON'
{
"messageId": "19099a24-6477-4640-ba10-5e7ea1e35aa9",
"acceptedAt": "2025-01-02T17:37:16",
"sentDate": "2025-01-02T17:37:16",
"channel": {
"channelId": "f433d284-b6a5-11ec-a3d5-2cea7f78b3e5",
"name": "mainAccount",
"type": "SMS",
"flow": "TRANSACTIONAL"
},
"type": "SMS",
"direction": "MT",
"recipient": {
"to": "33600011122"
},
"from": "Expediteur",
"body": {
"text": "Bonjour ....",
"encoding": "GSM7",
"messagePartCount": 1,
"length": 121
},
"price": {
"amount": 1,
"currency": "EUR"
},
"status": {
"deliveryDate": "2025-01-02T17:37:17",
"value": "DELIVERED",
"lookup": {
"mccMnc": "20810",
"mcc": "208",
"mnc": "10",
"country": "France",
"countryPrefix": "33",
"isoCountryCode": "FR",
"network": "Sfr"
}
},
"refClient": "1001",
"href": "https://sitesms.com/sms/v1/messages/19099a24-6477-..."
}
JSON;
$obj = json_decode($json, true);
echo $obj['status']['deliveryDate'];
- Output for 8.2.0 - 8.2.27, 8.3.0 - 8.3.15, 8.4.1 - 8.4.2
- 2025-01-02T17:37:17
preferences:
40.97 ms | 406 KiB | 5 Q