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

وضعیت تحویل صف پیامک

آخرین به‌روزرسانی: 23 آبان 1405

آدرس وب سرویس

متد GetSMSQueueDeliveries

از این متد جهت دریافت گزارش‌ وضعیت تحویل پیامک‌های ثبت‌شده در صف، استفاده کنید.

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

نام پارامترنوع پارامترتوضیحات
id long[]اجباری شناسه‌های داخلی پیامک در صف
username String اجباری نام کاربری پنل پیامکی شما در سامانه
password String اجباری مقدار API Key شما در سامانه

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

نام پارامترنوع پارامترتوضیحات
returnValue int[] وضعیت هر پیام
2-: بیش از سقف مجاز است.
3-: اطلاعات ورود نامعتبر است.
10-: خطای داخلی رخ داده است.
108- تا 110-: خطاهای مشترک حساب کاربری هستند (به متدهای ارسال پیامک ساده مراجعه کنید)

وضعیت تحویل پیامک‌های ثبت‌شده در صف از طریق URL:

https://api.payamak-panel.com/post/send.asmx/GetSMSQueueDeliveries?id=&username=&password=

GetSMSQueueDeliveries
$client = new SoapClient('https://api.payamak-panel.com/post/send.asmx?wsdl', ['encoding' => 'UTF-8', 'exceptions' => true]);
$params = [
    'id' => 123456,
    'username' => 'YOUR_USERNAME',
    'password' => 'YOUR_API_KEY',
];
$result = $client->__soapCall('GetSMSQueueDeliveries', [$params]);
var_dump($result);
import soap from "soap";
const [client] = await soap.createClientAsync("https://api.payamak-panel.com/post/send.asmx?wsdl");
const [result] = await client.GetSMSQueueDeliveriesAsync({
  id: 123456,
  username: "YOUR_USERNAME",
  password: "YOUR_API_KEY",
});
console.log(result);
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

var requestBody = """

               xmlns:xsd="http://www.w3.org/2001/XMLSchema"
               xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  
    
      123456
      YOUR_USERNAME
      YOUR_API_KEY
    
  

""";
var request = HttpRequest.newBuilder().uri(URI.create("https://api.payamak-panel.com/post/send.asmx"))
    .header("Content-Type", "text/xml; charset=utf-8")
    .header("SOAPAction", "\"http://tempuri.org/GetSMSQueueDeliveries\"")
    .POST(HttpRequest.BodyPublishers.ofString(requestBody)).build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
// Add https://api.payamak-panel.com/post/send.asmx?wsdl as a Connected Service before using the generated proxy.
var client = new SendSoapClient(SendSoapClient.EndpointConfiguration.SendSoap);
var request = new GetSMSQueueDeliveriesRequest
{
    id = 123456,
    username = "YOUR_USERNAME",
    password = "YOUR_API_KEY",
};
var result = await client.GetSMSQueueDeliveriesAsync(request);
Console.WriteLine(result);
from zeep import Client
client = Client("https://api.payamak-panel.com/post/send.asmx?wsdl")
result = client.service.GetSMSQueueDeliveries(
    id=123456,
    username="YOUR_USERNAME",
    password="YOUR_API_KEY",
)
print(result)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

var requestBody = """

               xmlns:xsd="http://www.w3.org/2001/XMLSchema"
               xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  
    
      123456
      YOUR_USERNAME
      YOUR_API_KEY
    
  

""";
var request = HttpRequest.newBuilder().uri(URI.create("https://api.payamak-panel.com/post/send.asmx"))
    .header("Content-Type", "text/xml; charset=utf-8")
    .header("SOAPAction", "\"http://tempuri.org/GetSMSQueueDeliveries\"")
    .POST(HttpRequest.BodyPublishers.ofString(requestBody)).build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
package main
import ("fmt"; "io"; "net/http"; "strings")
func main() {
  requestBody := `
               xmlns:xsd="http://www.w3.org/2001/XMLSchema"
               xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  
    
      123456
      YOUR_USERNAME
      YOUR_API_KEY
    
  
`
  request, err := http.NewRequest(http.MethodPost, "https://api.payamak-panel.com/post/send.asmx", strings.NewReader(requestBody)); if err != nil { panic(err) }
  request.Header.Set("Content-Type", "text/xml; charset=utf-8")
  request.Header.Set("SOAPAction", "\"http://tempuri.org/GetSMSQueueDeliveries\"")
  response, err := http.DefaultClient.Do(request); if err != nil { panic(err) }; defer response.Body.Close()
  body, err := io.ReadAll(response.Body); if err != nil { panic(err) }; fmt.Println(string(body))
}
//پاسخ موفق SOAP

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>
    <GetSMSQueueDeliveriesResponse xmlns="http://tempuri.org/">
      <GetSMSQueueDeliveriesResult>
        <int>int</int>
        <int>int</int>
      </GetSMSQueueDeliveriesResult>
    </GetSMSQueueDeliveriesResponse>
  </soap:Body>
</soap:Envelope>

//خطای کاربردی SOAP

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetSMSQueueDeliveriesResponse xmlns="http://tempuri.org/">
      <GetSMSQueueDeliveriesResult><int>-3</int></GetSMSQueueDeliveriesResult>
    </GetSMSQueueDeliveriesResponse>
  </soap:Body>
</soap:Envelope>