ملی پیامک

مستندات وب‌سرویس پیامک

ملی پیامک

مستندات وب‌سرویس پیامک

ملی پیامک

مستندات وب‌سرویس پیامک

دریافت تعرفه ارسال

آخرین به روز رسانی: 18 دی 1402

آدرس وب سرویس

متد GetSmsPrice

این متد جهت دریافت قیمت پیامک قبل از ارسال به کار می‌رود.

پارامتر های ورودی

نام پارامترنوع پارامترتوضیحات
username String نام کاربری شما در سامانه
password String کلمه عبور شما در سامانه
irancellCount Int تعداد شماره های ایرانسل
mtnCount Int تعداد شماره های همراه اول
from String شماره فرستنده
text String متن ارسال

مقدار بازگشتی

نام پارامترنوع پارامترتوضیحات
ReturnValue double اگر اطلاعات صحیح باشد، مقدار هزینه اس ام اس بر حسب ریال به صورت اعشار، باز می‌گرداند.

-2 : شماره فرستنده تنظیم شده صحیح نمی‌باشد.

-1 : نام کاربری یا رمز عبور صحیح نمی‌باشد.

URL دریافت تعرفه ارسال پیامک:

api.payamak-panel.com/post/Send.asmx/GetSmsPrice?username=&password=&irancellCount=&mtnCount=&from=&text=

//GitHub نمونه کدهای
$username = 'username';
$password = 'password';
$api = new MelipayamakApi($username,$password);
$sms = $api->sms();
$sms->getBasePrice();

//بدون نیاز به پکیج گیت هاب Procedural PHP نمونه کدهای 
$data = array('username' =>"",'password' =>"",'irancellCount' => ,'mtnCount'=>,'from'=>"",'text'=>"");
$post_data = http_build_query($data);
$handle = curl_init('https://rest.payamak-panel.com/api/SendSMS/GetBasePrice');
curl_setopt($handle, CURLOPT_HTTPHEADER, array(
    'content-type' => 'application/x-www-form-urlencoded'
));
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($handle, CURLOPT_POST, true);
curl_setopt($handle, CURLOPT_POSTFIELDS, $post_data);
$response = curl_exec($handle);
print_r($response);
//GitHub نمونه کدهای
$username = 'username';
$password = 'password';
$api = new MelipayamakApi($username,$password);
$sms = $api->sms('soap');
$sms->getPrice($irancellCount,$mtnCount,$from,$text);

//بدون نیاز به پکیج گیت هاب Procedural PHP نمونه کدهای 
ini_set("soap.wsdl_cache_enabled",0);
$sms = new SoapClient("http://api.payamak-panel.com/post/Send.asmx?wsdl",array("encoding"=>"UTF-8"));
$data = array(
    "username"=>"",
    "password"=>"",
    "irancellCount"=>5,
    "mtnCount"=>15,
    "from"=>"",
    "text"=>"");
echo $sms->GetSmsPrice($data)->GetSmsPriceResult;
const username = 'username';
const password = 'password';
const api = new MelipayamakApi(username,password);
const sms = api.sms();
sms.getBasePrice();
const username = 'username';
const password = 'password';
const api = new MelipayamakApi(username,password);
const sms = api.sms('soap');
sms.getPrice(irancellCount,mtnCount,from,text);
final String username = "username";
final String password = "password";
RestClient restClient = new RestClient(username, password);
restClient.GetBasePrice();
final String username = "username";
final String password = "password";
SoapClient soapClient = new SoapClient(username, password);
soapClient.GetSmsPrice(irancellCount, mtnCount, from, text);
const string username = "username";
const string password = "password";
RestClient restClient = new RestClient(username, password);
restClient.GetBasePrice();
const string username = "username";
const string password = "password";
SendSoapClient soapClient = new SendSoapClient();
soapClient.GetSmsPrice(username, password, irancellCount, mtnCount, from, text);
Const  username As String = "username"
Const  password As String = "password"
Dim restClient As New RestClient(username, password)
restClient.GetBasePrice()
Const  username As String = "username"
Const  password As String = "password"
Dim soapClient As New SendSoapClient()
soapClient.GetSmsPrice(username, password, irancellCount, mtnCount, from, text)
let username: String = "username"
let password: String = "password"
var restClient = RestClient(user: username, pass: password)
restClient.GetBasePrice()
let username: String = "username"
let password: String = "password"
var soapClient = SoapClient(user: username, pass: password)
soapClient.GetSmsPrice(irancellCnt: irancellCount, mtnCnt: mtnCount, from: from, msg: text)
NSString *username = @"username";
NSString *password = @"password";
RestClient *restClient = [[RestClient alloc] initCred:username password:password];
[restClient GetBasePrice];
NSString *username = @"username";
NSString *password = @"password";
SoapClient *soapClient = [[SoapClient alloc] initCred:username password:password];
[soapClient GetSmsPrice:irancellCount mtnCnt:mtnCount from:from msg:text];
username = 'username'
password = 'password'
api = Api(username,password)
sms = api.sms()
sms.get_base_price
username = 'username'
password = 'password'
api = Api(username,password)
sms = api.sms('soap')
sms.get_price(irancell_count,mtn_count,from,text)
final String username = "username";
final String password = "password";
RestClient restClient = new RestClient(username, password);
restClient.GetBasePrice();
final String username = "username";
final String password = "password";
SoapClient soapClient = new SoapClient(username, password);
soapClient.GetSmsPrice(irancellCount, mtnCount, from, text);
username = 'username'
password = 'password'
api = Melipayamakapi.new(username,password)
sms = api.sms
sms.get_base_price
username = 'username'
password = 'password'
api = Melipayamakapi.new(username,password)
sms = api.sms('soap')
sms.get_price(irancell_count,mtn_count,from,text)
my $username = "username";
my $password = "password";
my $restClient = new RestClient($username, $password);
$restClient->GetBasePrice();
my $username = "username";
my $password = "password";
my $soapClient = new SoapClient($username, $password);
$soapClient->GetSmsPrice($irancellCount, $mtnCount, $from, $text);
local username = "username";
local password = "password";
GetBasePrice(username, password);
local username = "username";
local password = "password";
GetSmsPrice(username, password, irancellCount, mtnCount, from, text);
username := "username";
password := "password";
GetBasePrice(username, password);
username := "username";
password := "password";
GetSmsPrice(username, password, irancellCount, mtnCount, from, text);
val username = "username"
val password = "password"
val restClient = new RestClient(username, password)
restClient.GetBasePrice()
val username = "username"
val password = "password"
val soapClient = SoapClient(username, password)
soapClient.GetSmsPrice(irancellCount, mtnCount, from, text)
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetSmsPriceResponse xmlns="http://tempuri.org/">
      <GetSmsPriceResult>double</GetSmsPriceResult>
    </GetSmsPriceResponse>
  </soap:Body>
</soap:Envelope>