API send SMS

There is one endpoint to send an SMS to a loan. This article will go over how to send an SMS with the API.

Sending an SMS Message

To send an SMS, send a POST request to the /sbt/sendTemplateToLoan(). The body will contain the following fields:

  • type – The type of SMS message to send (either ‘account’ or ‘marketing’)
  • template – the SMS template to use
  • triggerSoundEvent – whether or not to trigger sound effects (1 – yes, 0 – no)
  • sentToPrimaryCustomer -Whether or not to send to primary customer (1 – yes, 0 – no)
  • sentToPrimaryCustomerPhone – Whether or not to send to primary customer’s primary phone (1 – yes, 0 – no)
  • sentToPrimaryCustomerSecPhone – Whether or not to send to primary customer’s secondary phone (1 – yes, 0 – no)
  • sentToSecondaryCustomer – Whether or not to send to secondary customer (1 – yes, 0 – no)
  • sentToSecondaryCustomerPhone – Whether or not to send to secondary customer’s primary phone (1 – yes, 0 – no)
  • sentToSecondaryCustomerSecPhone – Whether or not to send to secondary customer’s secondary phone (1 – yes, 0 – no)

Below is a sample request:

POST https://loanpro.simnang.com/api/public/api/1/sbt/sendTemplateToLoan(226)
{
    "type":"account",
    "template":1,
    "triggerSoundEvent":0,
    "sentToPrimaryCustomer":1,
    "sentToPrimaryCustomerPhone":1,
    "sentToPrimaryCustomerSecPhone":1,
    "sentToSecondaryCustomer":1,
    "sentToSecondaryCustomerPhone":1,
    "sentToSecondaryCustomerSecPhone":1
}

In the response you will receive the id’s of customers sent to, the phone numbers used, and whether or not each sent message was a success. Below is a sample response:

{
    "d": {
        "sendResponse": [
            {
                "customerId": "44",
                "customerPhoneId": "44",
                "loanId": "226",
                "loanDisplayId": "44449966",
                "messageId": "369",
                "phone": "15555555555",
                "success": 1,
                "message": "Message sent successfully"
            }
        ]
    }
}

 

Related Articles

Leave A Comment?