SMS Callback - nxtele/nxcloud-doc-en GitHub Wiki

Brief Description:

  • SMS DR Push

API url:

  • Webhook url provided by your side.
  • For Example: http://106.15.34.94:8989/sms/testDr

Request Method:

  • POST x-www-form-urlencoded
  • Parameters At post body

Parameters:

Parameter Name Required Type Description
phone Yes string Phone Number
status Yes string StatusCodeCode:2:SuccessfulBelowSend,OtherNumberWordAllNotBelowSendSuccessful
result Yes string DR: DELIVRD\ UNDELIV
drtime Yes string DR type, Format:yyyy-MM-dd HH:mm:ss
messageid Yes string SMSid,CorrespondingofSMSSubmitSuccessfulObtainedofid
currency Yes string Currency CNY/USD
price Yes string Unit Price
rate Yes string USD To RMB Exchange Rate If:7.05
sendtime Yes string SendTime,Format Is:yyyy-MM-dd HH:mm:ss
size Yes string billing size
ext No string extension field, only support http api for single sms mt.

PushExample

2023/5/24 BeforeRegisterofCustomer,url PassParameters

POST http://106.15.34.94:8080/sms/testDr?result=DELIVRD&size=1&phone=6282167624806&rate=6.4845&price=0.045&messageid=b308d94a73f94e6d84ae975c41f4b2a6&drtime=2021-02-26 10:01:15&currency=USD&sendtime=2021-02-26 10:01:15&status=2

2023/5/24 AfterRegisterofCustomer,post body

POST http://106.15.34.94:8080/sms/testDr
Content-Type: x-www-form-urlencoded

result=DELIVRD&size=1&phone=6282167624806&rate=6.4845&price=0.045&messageid=b308d94a73f94e6d84ae975c41f4b2a6&drtime=2021-02-26 10:01:15&currency=USD&sendtime=2021-02-26 10:01:15&status=2

DR code

public static final int DELIVRD = 2; // Successful
public static final int UNDELIV = 5; // Failure
public static final int REJECTD = 6; // Reject
public static final int EXPIRED = 7; // Expired
public static final int DELETED = 8; // Delete
public static final int DND = 9; // Do Not Disturb
public static final int ESME_RINVSRCADR = 11; // Wrong from address(sender/source address)
public static final int UNKNOWN = 12; // unknown, please contact us

Response
Successful Return : success Fail Return: error

Remarks
Description:Dr only try to push once at our best. If missing or fail to process, you can manually pull the DR for processing.