Updated on 2023-09-08 GMT+08:00

Batch Status Reports Receiving API

Function

This API is used to receive SMS status reports from the Message & SMS platform in batches. You can set the callback address on the Application Management page of the console.

Prerequisites:

  • The status report pushed by the platform is not authenticated.
  • If an IP address whitelist is configured for the user server, contact the operation manager to obtain the IP addresses used by the Message & SMS platform and add these IP addresses to the whitelist.
  • A user has configured the address for receiving status reports in batches when creating an SMS application.
  • When a user calls the SMS sending API, the statusCallback field is not carried.
    • After sending SMSs successfully, the platform receives status reports and pushes the reports to users within 72 hours.
    • Status reports are pushed after being aggregated. Therefore, there is a delay in receiving status reports.
    • The Message & SMS platform can send up to 50 status reports at a time.
    • If the statusCallback field is set, the system uses its value as the SMS status report callback address.
    • If the statusCallback field is not set, the system uses the address configured in the application for receiving status reports in batches.
    • If none of the preceding addresses is available, users cannot receive status reports sent by the Message & SMS platform.

Type

Table 1 API type

Method

POST

URI

Address for receiving status reports in batches, which is configured by a user in an application.

Communications Protocol

HTTPS/HTTP

When the callback API uses the HTTPS protocol, the server must support TLS 1.2, and one or more of the following cipher suites must be supported:

TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, and TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Default Value

Description

Content-Type

Yes

String

None

The fixed value is application/json.

Table 3 Request body parameters

Parameter

Mandatory

Type

Default Value

Description

statusReportList

Yes

List<SmsStatusBeanOut>

None

Status report list.

Table 4 SmsStatusBeanOut request parameters

Parameter

Mandatory

Type

Default Value

Description

smsMsgId

Yes

String(1-50)

None

Unique SMS identifier returned after an SMS is successfully sent.

total

No

String(1-2)

None

Number of SMSs that are split from a long SMS.

If the SMS is not split, set this parameter to 1.

sequence

No

String(1-2)

None

Sequence number after a long SMS is split. This parameter is valid only when the value of total is greater than 1.

If the SMS is not split, set this parameter to 1.

status

Yes

String(1-7)

None

Enumerated values of an SMS status report. For details about the values, see Status options. For details about how to rectify the faults, see SMS Status Error Codes.

source

No

String (enumeration)

None

Source of the SMS status report:

  • generated by the Message & SMS platform
  • returned by the SMSC
  • generated by the Huawei platform

updateTime

No

String(1-20)

None

SMS resource update time, which is generally the UTC time when the Message & SMS platform receives the SMS status report. The value is in the format of yyyy-MM-dd'T'HH:mm:ss'Z'. The time is converted to %3a using urlencode.

When the Message & SMS platform does not receive the SMS status report from the SMSC, the platform constructs a status report that does not contain the updateTime parameter.

orgCode

No

String(1-7)

None

Status codes of southbound NEs are transparently transmitted. This parameter is contained only in status reports of international SMSs.

When the status code is not returned, the parameter is not used.

extend

No

String(1-128)

None

Extended field in the request sent by a user. If the SMS sent by a user does not carry the extend parameter, the status report does not contain the extend parameter.

to

No

String(1-21)

None

Recipient number of the SMS corresponding to the status report. This parameter is carried only when the status report contains the extend parameter.

Response Parameters

A user can send any response to the Message & SMS platform, where the response is not processed.

Request Example

POST /batchReport HTTP/1.1
Host: 205.145.111.168:9330
Content-Type: application/JSON;charset=UTF-8
Connection: close
Pooltype: approxy
Ompsid: 7f540777fe4b40dfb3c21d10f48781e3
TerminalIP: ******
TrcModule: AP
UserTrace: application
TraceHandle: DMZ_818405

{"statusReportList":[{"sequence":"1","total":"1","updateTime":"2023-04-18T07:26:00Z","source":"2","smsMsgId":"f6dcba15-ced9-45f7-9f5e-af82328c5253_1188602","status":"DELIVRD"},{"sequence":"1","total":"1","updateTime":"2023-04-18T07:26:00Z","source":"2","smsMsgId":"f6dcba15-ced9-45f7-9f5e-af82328c5253_123456","status":"DELIVRD"}]}

Response Example

HTTP/1.1 200 OK 
Date: Fri, 13 Apr 2018 06:31:45 GMT
Content-Type: application/JSON; charset=UTF-8
Content-Length: 43  

{"returnCode":0,"returnCodeDesc":"Success"}