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

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

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

آدرس وب سرویس

متد GetMultiDelivery2

این متد جهت دریافت وضعیت چندگانه تحویل به‌صورت رشته کاربرد دارد. وضعیت تحویل رکوردها را به‌صورت آرایۀ رشته برمی‌گرداند.

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

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

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

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

دریافت وضعیت چندگانه تحویل به‌صورت رشته از طریق URL:

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

GetMultiDelivery2
$client = new SoapClient('https://api.payamak-panel.com/post/send.asmx?wsdl', ['encoding' => 'UTF-8', 'exceptions' => true]);
$params = [
    'recId' => '123456789',
];
$result = $client->__soapCall('GetMultiDelivery2', [$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.GetMultiDelivery2Async({
  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/GetMultiDelivery2\"")
    .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 GetMultiDelivery2Request
{
    recId = "123456789",
};
var result = await client.GetMultiDelivery2Async(request);
Console.WriteLine(result);
from zeep import Client
client = Client("https://api.payamak-panel.com/post/send.asmx?wsdl")
result = client.service.GetMultiDelivery2(
    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/GetMultiDelivery2\"")
    .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/GetMultiDelivery2\"")
  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>
    <GetMultiDelivery2Response xmlns="http://tempuri.org/">
      <GetMultiDelivery2Result><string>1</string><string>2</string></GetMultiDelivery2Result>
    </GetMultiDelivery2Response>
  </soap:Body>
</soap:Envelope>

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