aSMSC API
aSMSC API
To send single text to multiple numbers using a single submission use below link
http://rest.gateway.sa/api/SendSMSMulti
1.1 Parameters
Parameter Name Required Description Example
api_id Yes Your API ID Sent API43404236
in Email
2
api_password Yes Your SPI password@123
Password Sent
in Email
sms_type Yes SMS Type P for Promotional T for
Promotional / Transactional
Transactional
encoding Yes SMS Encoding T for Text
Text, Unicode U for Unicode
etc. FS for Flash Message
UFS for Unicode Flash Message
sender_id Yes Your Sender ID Your Registered Sender ID
phonenumber Yes Recipient Phone Phone Number Should No Contain +
Number Sign
Phone Number Format is Country
Code + Phone Number
Example: 919622333345
In case of bulk submit , separate each
number with a comma like
911234567890,63344455678,971543213066
templateid Optional Required If You Template ID from Customer Panel Example:
Want to Send 10
Existing
Template.
Check
Template ID in
Customer Panel
textmessage Conditional If Template ID is Text of SMS Message to Send
provided text
message is not
required
V1 Optional Variable 1 To Any Data for Variable 1 You Want to
Replace in Replace
Template
V2 Optional Variable 2 To Any Data for Variable 2 You Want to
Replace in Replace
Template
V3 Optional Variable 3 To Any Data for Variable 3 You Want to
Replace in Replace
Template
V4 Optional Variable 4 To Any Data for Variable 4 You Want to
Replace in Replace
Template
V5 Optional Variable 5 To Any Data for Variable 5 You Want to
3
Replace in Replace
Template
ValidityPeriodInSeconds Optional Message Default is 2 days, you can set it manually int
validity period value as second like 60 for 1 min.
(Expiry time)
uid Optional Message xyz
reference
variable, this
value will
return as it is in
quick response
and delivery
callback_url Optional The CallBack- https://xyz.com/
URL where you
wanna delivery
report. We will
post the json
data of
delivery.
pe_id Optional DLT parameter xyz
Note: uid and callback_url parameters is not supported with SendSMSMulti API. Only
for SendSMS API.
4
Post Request JSON Format
{
"api_id": yourapiid,
"api_password": yourapipassword,
"sms_type": T,
"encoding": T,
"sender_id": ASMSC,
"phonenumber": 919990123312,
"templateid": null,
"textmessage":test message,
"V1": null,
"V2": null,
"V3": null,
"V4": null,
"V5": null,
"ValidityPeriodInSeconds": 60,
"uid":"xyz",
"callback_url":"https://xyz.com/",
"pe_id":NULL,
"template_id":NULL
}
{
"message_id": 4125,
"status": "S",
"remarks": "Message Submitted Successfully" ,
“uid”: “xyz”
}
Response Details.
{
"message_id": 32,
5
"PhoneNumber": "9713254",
"SMSMessage": "Test Message",
"MessageType": "Default",
"MessageLength": 159,
"MessageParts": 1,
"ClientCost": 1,
"DLRStatus": "Delivered",
"SMSID": "9cbd20a1-0cd8-420e-b384-5767b7df7a87",
"ErrorCode": 0,
"ErrorDescription": "000",
"SentDateUTC": "2017-05-05T10:16:39.523",
"Remarks": "OK" ,
“uid” : “xyz”
}
6
1.3 Query Delivery Report / Message Status
URL: http://REST.GATEWAY.SA/api/GetDeliveryStatus
1.3.1 Parameters
Parameter Required Description Example
Name
Conditional Message ID You Received at The 4134
message_id Time of Submit (Not Required if
your are using uid parameter)
uid Conditional Reference value as you sent and Xyz
received at the time of submit
message
api_id Yes Your API ID API123
4
api_password Yes Your API password 1234xyz
{
“api_id” : “API123”,
“api_password” : “123”
" message_id ": 32423,
“uid” : “xyz”
}
{
"message_id": 32,
"PhoneNumber": "9713254",
"SMSMessage": "Test Message",
"MessageType": "Default",
"MessageLength": 159,
7
"MessageParts": 1,
"ClientCost": 1,
"DLRStatus": "Delivered",
"SMSID": "9cbd20a1-0cd8-420e-b384-5767b7df7a87",
"ErrorCode": 0,
"ErrorDescription": "000",
"SentDateUTC": "2017-05-05T10:16:39.523",
"Remarks": "OK" ,
“uid” : “xyz”
}
8
2.0 Managing Contact Lists through API
Step 3. Click on Add New Contact List Button & Create a new Contact List
Step 4. Enter Contact List Name and Click Create New Contact List
9
Step 5 : Once Created You Will Find Contact List ID in the Grid Below
Example:
http://REST.GATEWAY.SA/api/AddContact?api_id=API3434144906&api_password=passwor
d&contact_list_id=1&contact_name=Test&contact_number=919990206824
URL: http://REST.GATEWAY.SA/api/AddContact
{
"api_id": yourapiid,
"api_password": yourapipassword,
"contact_list_id": 1,
"contact_name": Test,
"contact_number": 91999020238,
}
10
2.1.5 Response Format for Both GET AND POST
{
"contact_id": 4,
"status": "S",
"remarks": "Contact Created Sucessfully"
}
2.1.6 Response Details
contact_id System generated id of your contact save it for future deletion of this
contact via api.
status S = Contact Created Successfully F
= Failed to create contact
remarks Description of the status
Example:
11
http://REST.GATEWAY.SA/api/DeleteContact?api_id=API4das62144906&api_password=pas
sword&contact_id=4
{
"api_id": yourapiid,
"api_password": yourapipassword,
"contact_id ": 1,
}
{
"contact_id": 0,
"status": "S",
"remarks": "Contact Created Successfully"
}
2.2.5 Response Details
This API helps you to verify user phone number using OTP (One Time Password).
3.1.1 Calling the ASMSC Verify API using Get Request Example:
http://REST.GATEWAY.SA/api/Verfiy?api_id=API651344002&api_password=password&bran
d=aSMSC_name&phonenumber=91340206824&sender_id=S MS ALA
12
3.1.2 Calling the ASMSC Verify API using POST Request
URL: http://REST.GATEWAY.SA/api/Verify
Post Request JSON Format
{
"api_id": yourapiid,
"api_password": yourapipassword,
"brand": ASMSC_Name,
"phonenumber": 91999664445,
"sender_id": ASMSC,
}
{
"verfication_id": 4,
"status": "S",
"remarks": "Verification Code Sent Successfully"
}
13
Post Request JSON Format
{
"verfication_id": 2,
"verfication_code": 4022,
}
URL: http://REST.GATEWAY.SA/api/SenderIDRequest
Reponse JSON:
{
"status": "S",
"remarks": "Sender ID Request Created Sucessfully"
}
status = S (Successful)
status = F (Failed)
{
"api_id" : "Your API ID",
"api_password" : "Your API Password",
}
http://REST.GATEWAY.SA/api/GetSenderIDList?api_id=youapiid&api_password=yourapipassword
Reponse JSON
[
{
"sender_id": "SMS UPDATE",
"country": "United Arab Emirates"
},
{
15
"sender_id": "ASMSC",
"country": "United Arab Emirates"
}
]
URI: http://REST.GATEWAY.SA/api/CheckBalance
Input Parameters :
http://REST.GATEWAY.SA/api/CheckBalance?api_id=yourapiid&api_password=yourapipassword
Response Details:
URL: http://REST.GATEWAY.SA/api/RegisterResellerCustomer
16
Note: For RegistrationUsername and RegistrationPassword you can contact to your
administrator or support team.
Input Parameters :
{
"Username": ”Reseller account username”,
"Password": “Reseller account password”,
"CompanyName": “Reseller clients company name”,
"CompanyEmail": “Reseller clients company name “,
"BillingEmail": “Reseller clients billing email”,
"Phone": “Reseller clients phone number”,
"CustomerPlanID": customers plan id ,
"DefaultSMSPrice: customers default price,
17
"CurrencyID": currency id,
"BalanceAmount": default balance amount,
"TimeZoneID": time zone ,
"TemplateLocked": true or false,
"CountryID": country id of customer,
"SenderID": sender id
}
Response Details:
URL: http://REST.GATEWAY.SA/api/RegisterCustomer
Input Parameters :
18
CurrencyID Yes 50
BalanceAmount Yes 0
TimeZoneID Yes 1
TemplateLocked Yes false
CountryID Yes 0
{
"CompanyName": “clients company name”,
"CompanyEmail": “clients company name” ,
"BillingEmail": “clients billing email”,
"Phone": “clients phone number”,
"CustomerPlanID": customers plan id ,
"CustomerRouteID": customers plan id ,
"DefaultSMSPrice: customers default price,
"CurrencyID": currency id,
"BalanceAmount": default balance amount,
"TimeZoneID": time zone ,
"TemplateLocked": true or false,
"CountryID": country id of customer
Response Details:
URL: http://REST.GATEWAY.SA/api/GetCountryList
Type: POST
19
Note: For RegistrationUsername and RegistrationPassword you can contact to your
administrator or support team.
Response Details:
[
{
“DialingCodeID” : 1,
“CountryRealName” : “India”,
“ISOName” : “IN”,
“ISO3Code” : “IND”
}
]
URL: http://REST.GATEWAY.SA/api/GetTimeZoneList
Type: POST
Response Details:
[
{
“TimeZoneID” : 1,
“Display” : “(GMT-12:00) International Date Line West”
}
]
URL: http://REST.GATEWAY.SA/api/ViewCustomerList
Type: POST
Optional parameter : CustomerID
20
Auth : Basic Auth ( Username as APIUsername, Password as APIPassword)
Note: For APIUsername and APIPassword you can contact to your administrator or
support team.
Response Details:
[
{
“CustomerID” : 1,
“CustomerType” : “CLIENT”,
“CompanyName” : “test client”,
“CompanyEmail” : “testclient@test.com”,
“BillingEmail” : “testclient@test.com”,
“Phone” : “222222222”,
“Username” : “SAU77252123”
}
]
12.0. Get Customer SMPP Account List
URL: http://REST.GATEWAY.SA/api/ViewCustomerSMPPAccountList
Type: POST
Optional Parameter: CustomerID, CustomerSMPPAccountID
Note: For APIUsername and APIPassword you can contact to your administrator or
support team.
Response Details:
[
{
“CustomerSMPPAccountID” : 1,
“SMPPUsername” : “test_SM1”,
“SMPPAccountName” : “SM1”
}
]
URL: http://REST.GATEWAY.SA/api/ViewVendorList
21
Type: POST
Optional Parameter: VendorId
Note: For APIUsername and APIPassword you can contact to your administrator or
support team.
Response Details:
[
{
“VendorID” : 1,
“VendorName” : “test_SM1”,
“VendorEmail” : “test@test.com”,
“VendorBillngEmail” : “test@test.com”,
“VendorTechnicalEmail” : “test@test.com”,
“VendorPhone” : “123456”,
“VendorAddress” : “Xyz”
}
]
URL: http://REST.GATEWAY.SA/api/ReceiveIncoming
Input Parameters :
Note: All parameters are dynamic , you have to set parameter name in incoming vendor in admin panel and use
22
the same parameters name as you mention for the same.
URL: http://REST.GATEWAY.SA/api/ReceiveIncoming
URL: http://REST.GATEWAY.SA/api/SenderIDStatus
Input Parameters :
23
http://REST.GATEWAY.SA/api/SenderIDStatus?api_id=API123&api_password=123&request_id=123
URL: http://REST.GATEWAY.SA/api/SenderIDStatus
Response Details:
Failed:
{
“request_id”:123,
“status”: ”F”,
“remarks”: “API Password Is Invalid”
}
Success:
{
“request_id”: 123,
“company_name”: ”acdsa”,
“country”: ”india”,
“sender_id”: ”TST”,
“status”: “Approved”,
“created_time”: ”2021-05-20 15:30:49.730”,
“approval_time” : ”2021-05-20 15:30:49.730”,
“request_deleted”: 0
}
URL: http://REST.GATEWAY.SA/api/SendVoiceOTP
Input Parameters :
24
phonenumber Yes 1234123123
otp_code Yes 123
URL: http://REST.GATEWAY.SA/api/SendVoiceOTP
Response Details:
{
“message_id”:123,
“status”: ”S”,
“remarks”: “Submitted Successful”
}
URL: http://REST.GATEWAY.SA/api/VoiceOTPStatus
Input Parameters :
25
B) Method-2: Using Post Request
URL: http://REST.GATEWAY.SA/api/VoiceOTPStatus
Response Details:
{
“PhoneNumber”:123,
“status”: ”Delivered”,
“OTP”: “123”,
“Remarks”:”OK”,
“JobDetailID”:123
}
18.0. Add Vendor Invoice
URL: http://REST.GATEWAY.SA/api/AddVendorInvoice
Type: POST
Auth : Basic Auth ( Username as APIUsername, Password as APIPassword)
Note: For APIUsername and APIPassword you can contact to your administrator or
support team.
Input Parameters :
26
A) Method-1: Using Post Request
URL: http://REST.GATEWAY.SA/api/AddVendorInvoice
Response Details:
{
“vendor_invoice_id”:123,
“status”: ”S”,
“remarks”:”Invoice Created Successfully”,
}
19.0. Add Vendor Payment
URL: http://REST.GATEWAY.SA/api/AddVendorPayment
Type: POST
Auth : Basic Auth ( Username as APIUsername, Password as APIPassword)
Note: For APIUsername and APIPassword you can contact to your administrator or
support team.
Input Parameters :
URL: http://REST.GATEWAY.SA/api/AddVendorPayment
27
Post Json data
{
"vendor_id": 1,
"amount": 123.0 ,
"amount_main_currency": 123.0,
"remarks": “wd123” ,
"payment_date": “YYY-mm-dd”
}
Response Details:
{
“vendor_payment_id”:123,
“status”: ”S”,
“remarks”:”Payment Created Successfully”,
}
URL: http://REST.GATEWAY.SA/api/Recharge
Type: POST
Auth : Basic Auth ( Username as APIUsername, Password as APIPassword)
Note: For APIUsername and APIPassword you can contact to your administrator or
support team.
Input Parameters :
URL: http://REST.GATEWAY.SA/api/Recharge
Response Details:
{
“customer_payment_id”:123,
“status”: ”S”,
“remarks”:”Payment Created Successfully”,
}
29