This example retrieves outbound SMS Usage Detail Records (UDRs) for a given period. Each record covers the lifecycle from job submission through final delivery confirmation, including routing, billing, timing metrics, encoding, and status fields.
For complete field definitions and advanced options, see the GraphQL API Reference.
query smsOutUdrReport (
$customerId: String!
$datePeriod: DatePeriod!
$pageIndex: Int
$pageSize: Int
$sort: SortDirection
) {
smsOutUdrReport(
customerId: $customerId
datePeriod: $datePeriod
page: $pageIndex
size: $pageSize
sort: $sort
) {
content {
smsId
requestId
jobId
trackingId
reference
recipientReference
dataCenter
customerId
service
serviceAccount
serviceVersion
billingCode
statusRequests
flash
encoding
express
personalized
src
recipient
recipientCountryCode
recipientType
numberOfParts
processStatus
statusCode
status
numberScheduleTs
numberDeliveryTs
numberStatusTs
numberFinalTs
deliveryProcessedTs
jobFinalTs
}
pageIndex
pageSize
hasMoreElements
}
}
{
"customerId": "99999",
"datePeriod": {
"fromIncluded": "2025-06-04T08:00:00.000Z",
"toExcluded": "2025-06-04T08:54:00.000Z"
},
"pageIndex": 0,
"pageSize": 3,
"sort": "ASC"
}
{
"data": {
"smsOutUdrReport": {
"content": [
{
"smsId": "S.20250604-100009.027-0mbhnqjiNMXNJXCAY9",
"requestId": "R.20250604-100009.027-0mbhngiisJ08FR26M5",
"jobId": "J.20250604-100009.017-2mbhnqiki7GYAZNZSF",
"trackingId": "mbhmqiio-de2-usmss-29irrhd3vhs5i",
"reference": "",
"recipientReference": "00491702XXXXXX",
"dataCenter": "DE2",
"customerId": "99999",
"service": "XML2SMS",
"serviceAccount": "",
"serviceVersion": "",
"billingCode": "PASSCODE",
"statusRequests": false,
"flash": false,
"encoding": "GSM-7",
"express": true,
"personalized": false,
"src": "ACME",
"recipient": "+491702XXXXXX",
"recipientCountryCode": "DEU",
"recipientType": "MOBILE",
"numberOfParts": 1,
"processStatus": "DONE",
"statusCode": "200",
"status": "SUC_ACC",
"numberScheduleTs": "2025-06-04T08:00:09.027Z",
"numberDeliveryTs": "2025-06-04T08:00:09.195Z",
"numberStatusTs": null,
"numberFinalTs": "2025-06-04T08:00:09.195Z",
"deliveryProcessedTs": "2025-06-04T08:00:09.195Z",
"jobFinalTs": "2025-06-04T08:00:13.579242Z"
}
...
],
"pageIndex": 0,
"pageSize": 3,
"hasMoreElements": true
}
}
}
Note
Additional records (up to the requestedpageSize
) are omitted for brevity.
Field | Description |
---|---|
smsId | Unique identifier for this SMS record |
requestId | Unique identifier for the API request that created the SMS |
jobId | Unique identifier for the SMS job (may include multiple messages) |
trackingId | Internal tracking identifier for message routing and monitoring |
reference | Customer-provided reference for this message |
recipientReference | Customer-provided recipient-specific reference |
dataCenter | Data center where the message was processed |
customerId | Retarus customer account identifier |
service | Retarus submission service |
serviceAccount | Service account used for submission |
serviceVersion | API or service version used for submission |
billingCode | Cost center or department code for billing |
statusRequests | Whether delivery status requests were enabled |
flash | Whether the message was sent as flash SMS (immediate display) |
encoding | Message encoding used for message content (GSM-7, UCS-2, etc.) |
express | Whether express/priority delivery was requested |
personalized | Whether personalized content was used |
src | SMS sender identifier |
recipient | Destination phone number in international format |
recipientCountryCode | ISO 3166-1 alpha-3 country code of the recipient |
recipientType | Type of the recipient number |
numberOfParts | Number of SMS parts for multi-part messages (1 for single SMS) |
processStatus | Overall processing status |
statusCode | HTTP-style status code indicating the delivery result |
status | Detailed delivery status code |
numberScheduleTs | UTC timestamp when the message was scheduled for delivery |
numberDeliveryTs | UTC timestamp when the message was delivered to carrier |
numberStatusTs | UTC timestamp of the last status update |
numberFinalTs | UTC timestamp when the final delivery status was determined |
deliveryProcessedTs | UTC timestamp when delivery processing was completed |
jobFinalTs | UTC timestamp when the entire job finished processing |