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

گزارش تحویل چندگانه

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

آدرس وب سرویس

متد GetMultiDelivery

از این متد برای دریافت وضعیت تحویل رکورد پیامک‌های ارسال‌شده به‌صورت آرایۀ بایت استفاده کنید.

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

نام پارامترنوع پارامترتوضیحات
recId String اجباری شناسه یا شناسه‌های رکورد پیامک ارسال‌شده

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

نام پارامترنوع پارامترتوضیحات
returnValue byte[] فهرست وضعیت‌های تحویل. در شناسۀ نامعتبر یا در وضعیت خطا، مقدار «null» بازمی‌گردد.

گزارش تحویل چندگانه از طریق URL:

https://api.payamak-panel.com/post/send.asmx/GetMultiDelivery?recId=

GetMultiDelivery
$client = new SoapClient('https://api.payamak-panel.com/post/send.asmx?wsdl', ['encoding' => 'UTF-8', 'exceptions' => true]);
$params = [
    'recId' => '123456789',
];
$result = $client->__soapCall('GetMultiDelivery', [$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.GetMultiDeliveryAsync({
  recId: "123456789",
});
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/">
  
    
      123456789
    
  

""";
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/GetMultiDelivery\"")
    .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 GetMultiDeliveryRequest
{
    recId = "123456789",
};
var result = await client.GetMultiDeliveryAsync(request);
Console.WriteLine(result);
from zeep import Client
client = Client("https://api.payamak-panel.com/post/send.asmx?wsdl")
result = client.service.GetMultiDelivery(
    recId="123456789",
)
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/">
  
    
      123456789
    
  

""";
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/GetMultiDelivery\"")
    .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/">
  
    
      123456789
    
  
`
  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/GetMultiDelivery\"")
  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
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetMultiDeliveryResponse xmlns="http://tempuri.org/">
      <GetMultiDeliveryResult><byte>1</byte><byte>2</byte></GetMultiDeliveryResult>
    </GetMultiDeliveryResponse>
  </soap:Body>
</soap:Envelope>

// خطای کاربردی SOAP
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetMultiDeliveryResponse xmlns="http://tempuri.org/">
      <GetMultiDeliveryResult></GetMultiDeliveryResult>
    </GetMultiDeliveryResponse>
  </soap:Body>
</soap:Envelope>