مفاهیم

همه‌ی وب‌سرویس‌های SOAP ورودی خود را به صورت یک ساختار XML که در body درخواست POST ارسال شده دریافت می‌کنند. خروجی نیز به صورت یک ساختار XML برگردانده می‌شود. هر خروجی یک ساختار به شکل زیر دارد. اگر status صفر باشد می‌توانید از اعتبار پاسخ مطمئن شوید. در غیر این صورت پاسخ نامعتبر است و برای اطلاع از خطای پیش آمده مقدار status را با مقادیری که در بخش مقادیر می‌آید مقایسه کنید.

📄 ساختار کلی پاسخ
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:tns="urn:Soap">
  <SOAP-ENV:Body>
    ...
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

برای مثال یک مقدار برگشتی صحیح برای وب‌سرویس درخواست اعتبار کاربر به صورت زیر است:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:tns="urn:Soap">
  <SOAP-ENV:Body>
      <ns1:GetUserCreditResponse xmlns:ns1="idehpayam-api">
          <return xsi:type="tns:UserCreditResponse">
              <status xsi:type="xsd:int">0</status>
              <value xsi:type="xsd:decimal">165.11</value>
          </return>
      </ns1:GetUserCreditResponse>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

همچنین مقدار برگشتی زیر نیز یک مقدار درست است که به صورت صحیح یک خطای پیش آمده را نشان می‌دهد:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:tns="urn:Soap">
  <SOAP-ENV:Body>
      <ns1:GetUserCreditResponse xmlns:ns1="idehpayam-api">
          <return xsi:type="tns:UserCreditResponse">
              <status xsi:type="xsd:int">1</status>
              <value xsi:type="xsd:decimal">0</value>
          </return>
      </ns1:GetUserCreditResponse>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

احراز هویت

جهت احراز هویت می‌توانید از توکن ایجاد شده در پنل کاربری سامانه یا نام کاربری و رمز عبور استفاده کنید. در حالتی که مایل به استفاده از توکن هستید، در بدنه‌ی ارسالی token را با مقدار مشخص ارسال کنید. در صورتی که مایل به استفاده از نام کاربری و رمز عبور هستید در بدنه‌ی درخواست‌های ارسالی username و password را با مقادیر درست ارسال کنید.

در این راهنما از username و password در XML ارسالی استفاده شده است که با تغییر آدرس پایه و درج token به جای username و password می‌توانید از نسخه‌ی توکن استفاده کنید.

آدرس پایه

آدرس پایه وب‌سرویس soap سامانه جهت استفاده همراه با نام کاربری و رمز عبور:

https://api-payamak.com/api/v2/soap.php

آدرس پایه وب‌سرویس soap سامانه جهت استفاده همراه با توکن:

https://api-payamak.com/api/v2/soap-token.php

مقادیر

وضعیت‌های کاربر

کدهای با مقادیر صحیح که در پاسخ بعضی از وب‌سرویس‌ها برگشت داده می‌شود.

  • 0 - کاربر در وضعیت فعال قرار دارد.
  • 1 - کاربر مورد بررسی یافت نشده است.
  • 2 - کاربر آزمایشی.
  • 3 - کاربر قفل شده.
  • 4 - کاربر منقضی شده.
  • 5 - کاربر تایید نشده.
  • 6 - عدم دسترسی به وب‌سرویس.

وضعیت‌های درخواست ثبت کاربر جدید

  • 0 - ثبت‌نام کاربر با موفقیت انجام شده است.
  • 10 - نام کاربری ارسال شده نامعتبر است.
  • 11 - موبایل ارسال شده نامعتبر است.
  • 12 - کد ملی ارسال شده نامعتبر است.
  • 13 - ایمیل ارسال شده نامعتبر است.
  • 14 - مدیر کاربر درخواستی دسترسی کافی ندارد.
  • 15 - نام کاربری ارسال شده قبلا ثبت شده است.
  • 16 - پکیج درخواستی اشتباه است.
  • 17 - رمزعبور و تکرار آن هماهنگ نیست.

وضعیت‌های ارسال پیامک

  • 0 - ارسال پیامک با موفقیت انجام شده است.
  • 21 - تعداد دریافت‌کننده‌ها از مقدار مجاز بیشتر است.
  • 22 - کاربر اعتبار کافی برای ارسال پیامک ندارد.
  • 23 - شماره اشتباه برای ارسال انتخاب شده است.
  • 24 - پیام ارسال شده خالی است.
  • 25 - هیچ گیرنده‌ای انتخاب نشده است.
  • 26 - زمان ارسال اشتباه تنظیم شده است.
  • 27 - خطای نامشخص در ارسال برای اپراتور.
  • 28 - داده‌های ارسالی مغایرت دارد.
  • 29 - الگوی انتخاب شده فعال نیست.

وضعیت گزارش‌های پیامکی

  • 0 - گزارش با موفقیت ایجاد شد.
  • 30 - هیچ پیامکی انتخاب نشده است.
  • 31 - هیچ گزارشی موجود نیست.
  • 32 - تعداد پیام‌ها از حد مجاز فراتر رفته است.

وضعیت دفترچه تلفن

  • 0 - عملیات با موفقیت انجام شد.
  • 40 - رکوردی با این اطلاعات وجود ندارد.
  • 41 - دفترچه تلفن با این اطلاعات در حال حاضر موجود است.
  • 42 - شماره‌ای ارسال نشده است.
  • 43 - عملیات شکست خورد.

سایر کدهای وضعیت

  • 1000 - اشکال در پایگاه داده.
  • 2000 - اشکال در سرور.

دریافت اعتبار کاربر SOAP

SOAP operation: GetUserCredit

برای دریافت اعتبار کاربر از مقدار operation برابر با GetUserCredit استفاده کرده و به همراه نام کاربری و رمز عبور در یک ساختار XML ارسال کنید.

📤 مثال درخواست
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:tns="urn:Soap">
  <SOAP-ENV:Body>
    <ideh:GetUserCredit soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <username xsi:type="xsd:string">...</username>
      <password xsi:type="xsd:string">...</password>
    </ideh:GetUserCredit>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
📤 مثال پاسخ موفق
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:tns="urn:Soap">
  <SOAP-ENV:Body>
    <ns1:GetUserCreditResponse xmlns:ns1="idehpayam-api">
      <return xsi:type="tns:UserCreditResponse">
        <status xsi:type="xsd:int">0</status>
        <value xsi:type="xsd:decimal">165.11</value>
      </return>
    </ns1:GetUserCreditResponse>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

کلید status مشخص می‌کند که مقدار value معتبر است یا خیر. در صورتی که status صفر باشد مقدار value معتبر است.

دریافت جزئیات کاربر SOAP

SOAP operation: GetUserDetails

جهت دریافت جزئیات حساب کاربری، مانند کد ملی از این وب‌سرویس استفاده می‌شود.

📤 مثال درخواست
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:tns="urn:Soap">
  <SOAP-ENV:Body>
    <ideh:GetUserDetails soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <username xsi:type="xsd:string">...</username>
      <password xsi:type="xsd:string">...</password>
    </ideh:GetUserDetails>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
📤 مثال پاسخ موفق
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:tns="urn:Soap">
  <SOAP-ENV:Body>
    <ns1:GetUserDetailsResponse xmlns:ns1="idehpayam-api">
      <return xsi:type="tns:UserDetailsResponse">
        <status xsi:type="xsd:int">0</status>
        <details xsi:type="tns:UserDetails">
          <fullname xsi:type="xsd:string">...</fullname>
          <date xsi:type="xsd:string">...</date>
          <fax xsi:type="xsd:string">...</fax>
          <mellicode xsi:type="xsd:string">...</mellicode>
          <shenasname xsi:type="xsd:string">...</shenasname>
          <addr xsi:type="xsd:string">...</addr>
          <postcode xsi:type="xsd:string">...</postcode>
        </details>
      </return>
    </ns1:GetUserDetailsResponse>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

ثبت کاربر جدید SOAP

SOAP operation: RegisterUser

برای ثبت کاربر جدید از operation برابر با RegisterUser استفاده کرده و به همراه نام کاربری و رمز عبور در یک ساختار XML ارسال کنید.

📤 مثال درخواست
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:tns="urn:Soap">
  <SOAP-ENV:Body>
    <api:RegisterUser soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:api="SoapAPI">
      <username xsi:type="xsd:string">...</username>
      <password xsi:type="xsd:string">...</password>
      <repeatPassword xsi:type="xsd:string">...</repeatPassword>
      <firstName xsi:type="xsd:string">...</firstName>
      <lastName xsi:type="xsd:string">...</lastName>
      <name xsi:type="xsd:string">...</name>
      <melliCode xsi:type="xsd:string">...</melliCode>
      <shShenasname xsi:type="xsd:string">...</shShenasname>
      <postalCode xsi:type="xsd:string">...</postalCode>
      <phoneNumber xsi:type="xsd:string">...</phoneNumber>
      <mobileNumber xsi:type="xsd:string">...</mobileNumber>
      <email xsi:type="xsd:string">...</email>
      <addres xsi:type="xsd:string">...</addres>
      <modir xsi:type="xsd:string">...</modir>
      <package xsi:type="xsd:integer">...</package>
    </api:RegisterUser>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
📤 مثال پاسخ موفق
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:tns="urn:Soap">
  <SOAP-ENV:Body>
    <ns1:RegisterUserResponse xmlns:ns1="API">
      <return xsi:type="xsd:integer">0</return>
    </ns1:RegisterUserResponse>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

ارسال پیامک SOAP

SOAP operation: SendSms

برای ارسال پیامک از operation برابر با SendSms همراه با نام کاربری و رمز عبور استفاده کنید.

📤 مثال درخواست
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:tns="urn:Soap">
  <SOAP-ENV:Body>
    <api:SendSms soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:api="API">
      <username xsi:type="xsd:string">...</username>
      <password xsi:type="xsd:string">...</password>
      <from xsi:type="xsd:string">...</from>
      <recipients xsi:type="urn:stringArray" SOAP-ENC:arrayType="xsd:string[]" xmlns:urn="urn:Soap">
        <value>...</value>
        <value>...</value>
      </recipients>
      <message xsi:type="xsd:string">...</message>
      <type xsi:type="xsd:integer">...</type>
    </api:SendSms>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
📤 مثال پاسخ موفق
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:tns="urn:Soap">
  <SOAP-ENV:Body>
    <ns1:SendSmsResponse xmlns:ns1="API">
      <return xsi:type="tns:SendSmsResponse">
        <status xsi:type="xsd:int">0</status>
        <id xsi:type="xsd:int">12345</id>
      </return>
    </ns1:SendSmsResponse>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

ارسال پیامک در آینده SOAP

SOAP operation: FutureSendSms

برای ارسال پیامک در آینده از operation برابر با FutureSendSms استفاده کنید.

📤 مثال درخواست
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:tns="urn:Soap">
  <SOAP-ENV:Body>
    <api:SendSms soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:api="API">
      <username xsi:type="xsd:string">...</username>
      <password xsi:type="xsd:string">...</password>
      <from xsi:type="xsd:string">...</from>
      <recipients xsi:type="urn:stringArray" SOAP-ENC:arrayType="xsd:string[]" xmlns:urn="urn:Soap">
        <value>...</value>
        <value>...</value>
      </recipients>
      <message xsi:type="xsd:string">...</message>
      <sendDate xsi:type="xsd:string">...</sendDate>
      <prtrys xsi:type="xsd:string">...</prtrys>
      <sentPeriod xsi:type="xsd:string">...</sentPeriod>
    </api:SendSms>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

ارسال پیامک مبتنی بر الگو SOAP

SOAP operation: SendSmsByPattern

برای ارسال پیامک مبتنی بر الگو از operation برابر با SendSmsByPattern استفاده کنید.

📤 مثال درخواست
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:tns="urn:Soap">
  <SOAP-ENV:Body>
    <api:SendSms soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:api="API">
      <username xsi:type="xsd:string">...</username>
      <password xsi:type="xsd:string">...</password>
      <from xsi:type="xsd:string">...</from>
      <recipients xsi:type="urn:stringArray" SOAP-ENC:arrayType="xsd:string[]" xmlns:urn="urn:Soap">
        <value>...</value>
        <value>...</value>
      </recipients>
      <message xsi:type="xsd:string">...</message>
      <patternId xsi:type="xsd:integer">...</patternId>
      <type xsi:type="xsd:integer">...</type>
    </api:SendSms>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

ارسال به شماره‌های دفترچه تلفن SOAP

SOAP operation: SendSmsToPhoneBook

برای ارسال پیامک به شماره‌های دفترچه تلفن از operation برابر با SendSmsToPhoneBook استفاده کنید.

📤 مثال درخواست
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:tns="urn:Soap">
  <SOAP-ENV:Body>
    <api:SendSms soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:api="API">
      <username xsi:type="xsd:string">...</username>
      <password xsi:type="xsd:string">...</password>
      <from xsi:type="xsd:string">...</from>
      <recipients xsi:type="urn:stringArray" SOAP-ENC:arrayType="xsd:string[]" xmlns:urn="urn:Soap">
        <value>...</value>
        <value>...</value>
      </recipients>
      <bookId xsi:type="xsd:integer">...</bookId>
      <message xsi:type="xsd:string">...</message>
      <type xsi:type="xsd:integer">...</type>
    </api:SendSms>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

ارسال همزمان چندین پیامک مختلف SOAP

SOAP operation: SendMultiSms

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

📤 مثال درخواست
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:tns="urn:Soap">
  <SOAP-ENV:Body>
    <ideh:SendMultiSms soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <username xsi:type="xsd:string">...</username>
      <password xsi:type="xsd:string">...</password>
      <fromArray xsi:type="urn:stringArray" SOAP-ENC:arrayType="xsd:string[]" xmlns:urn="urn:Soap">
        <item xsi:type="xsd:string">...</item>
      </fromArray>
      <recipients xsi:type="urn:stringArray" SOAP-ENC:arrayType="xsd:string[]" xmlns:urn="urn:Soap">
        <item xsi:type="xsd:string">...</item>
      </recipients>
      <messageArray xsi:type="urn:stringArray" SOAP-ENC:arrayType="xsd:string[]" xmlns:urn="urn:Soap">
        <item xsi:type="xsd:string">...</item>
      </messageArray>
      <typeArray xsi:type="urn:intArray" SOAP-ENC:arrayType="xsd:integer[]" xmlns:urn="urn:Soap">
        <item xsi:type="xsd:integer">...</item>
      </typeArray>
    </ideh:SendMultiSms>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

دریافت جزئیات آخرین پیامک ارسال شده SOAP

SOAP operation: GetLatestSmsDetails

برای دریافت اطلاعات آخرین پیام ارسال شده از operation برابر با GetLatestSmsDetails استفاده کنید.

📤 مثال درخواست
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:tns="urn:Soap">
  <SOAP-ENV:Body>
    <ideh:GetLatestSmsDetails soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <username xsi:type="xsd:string">...</username>
      <password xsi:type="xsd:string">...</password>
    </ideh:GetLatestSmsDetails>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
📤 مثال پاسخ موفق
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:tns="urn:Soap">
  <SOAP-ENV:Body>
    <ns1:GetLatestSmsDetailsResponse xmlns:ns1="idehpayam-api">
      <return xsi:type="tns:SmsReportResponse">
        <status xsi:type="xsd:int">0</status>
        <details xsi:type="tns:SmsReport">
          <id xsi:type="xsd:integer">12345</id>
          <message xsi:type="xsd:string">...</message>
          <recipients xsi:type="xsd:integer">2</recipients>
          <from xsi:type="xsd:string">...</from>
          <state xsi:type="xsd:string">...</state>
          <now xsi:type="xsd:string">...</now>
          <time xsi:type="xsd:string">...</time>
        </details>
      </return>
    </ns1:GetLatestSmsDetailsResponse>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

دریافت وضعیت پیامک SOAP

SOAP operation: GetSmsStatus

برای دریافت اطلاعات پیام مشخص از operation برابر با GetSmsStatus استفاده کنید.

📤 مثال درخواست
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:tns="urn:Soap">
  <SOAP-ENV:Body>
    <ideh:GetSmsStatus soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <username xsi:type="xsd:string">...</username>
      <password xsi:type="xsd:string">...</password>
      <idArray xsi:type="urn:intArray" SOAP-ENC:arrayType="xsd:integer[]" xmlns:urn="urn:Soap">
        <value>12345</value>
        <value>12346</value>
      </idArray>
    </ideh:GetSmsStatus>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
📤 مثال پاسخ موفق
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:tns="urn:Soap">
  <SOAP-ENV:Body>
    <ns1:GetSmsStatusResponse xmlns:ns1="idehpayam-api">
      <return xsi:type="tns:SmsStatusResponse">
        <status xsi:type="xsd:int">0</status>
        <result xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:SmsStatusItem[2]">
          <item xsi:type="tns:SmsStatusItem">
            <unique_id xsi:type="xsd:string">12345</unique_id>
            <state xsi:type="xsd:int">4</state>
          </item>
          <item xsi:type="tns:SmsStatusItem">
            <unique_id xsi:type="xsd:string">12346</unique_id>
            <state xsi:type="xsd:int">10</state>
          </item>
        </result>
      </return>
    </ns1:GetSmsStatusResponse>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

مقادیر state: 0=ارسال به مخابرات (بدون گزارش)، 1=ارسال به مخابرات، 2=نرسیده به مخابرات، 3=رسیده به مخابرات، 4=رسیده به گوشی، 5=نرسیده به گوشی، 6=برگشتی

مشاهده‌ی فهرست دفترچه‌های تلفن SOAP

SOAP operation: GetPhonebookList

برای استفاده از این وب‌سرویس از operation برابر با GetPhonebookList استفاده کنید. مقدار name اختیاری است.

📤 مثال درخواست
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:tns="urn:Soap">
  <SOAP-ENV:Body>
    <ideh:GetPhonebookList soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <username xsi:type="xsd:string">...</username>
      <password xsi:type="xsd:string">...</password>
      <name xsi:type="xsd:string">...</name>
    </ideh:GetPhonebookList>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

ساخت یک دفترچه تلفن جدید SOAP

SOAP operation: NewPhonebook

برای استفاده از این وب‌سرویس از operation برابر با NewPhonebook استفاده کنید.

📤 مثال درخواست
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:tns="urn:Soap">
  <SOAP-ENV:Body>
    <ideh:NewPhonebook soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <username xsi:type="xsd:string">...</username>
      <password xsi:type="xsd:string">...</password>
      <name xsi:type="xsd:string">...</name>
      <numbers xsi:type="urn:stringArray" SOAP-ENC:arrayType="xsd:string[]" xmlns:urn="urn:Soap">
        <value>...</value>
        <value>...</value>
      </numbers>
      <flag xsi:type="xsd:string">...</flag>
    </ideh:NewPhonebook>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

حذف یک دفترچه تلفن SOAP

SOAP operation: DeletePhonebook

برای استفاده از این وب‌سرویس از operation برابر با DeletePhonebook استفاده کنید.

📤 مثال درخواست
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:tns="urn:Soap">
  <SOAP-ENV:Body>
    <ideh:DeletePhonebook soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <username xsi:type="xsd:string">...</username>
      <password xsi:type="xsd:string">...</password>
      <bookId xsi:type="xsd:integer">...</bookId>
    </ideh:DeletePhonebook>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

دریافت شماره‌های یک دفترچه تلفن SOAP

SOAP operation: GetPhonebookNumbers

برای استفاده از این وب‌سرویس از operation برابر با GetPhonebookNumbers استفاده کنید.

📤 مثال درخواست
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:tns="urn:Soap">
  <SOAP-ENV:Body>
    <ideh:GetPhonebookNumbers soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <username xsi:type="xsd:string">...</username>
      <password xsi:type="xsd:string">...</password>
      <bookId xsi:type="xsd:integer">...</bookId>
    </ideh:GetPhonebookNumbers>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

افزودن شماره به دفترچه تلفن SOAP

SOAP operation: AddNumbersToPhonebook

برای استفاده از این وب‌سرویس از operation برابر با AddNumbersToPhonebook استفاده کنید.

📤 مثال درخواست
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:tns="urn:Soap">
  <SOAP-ENV:Body>
    <ideh:AddNumbersToPhonebook soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <username xsi:type="xsd:string">...</username>
      <password xsi:type="xsd:string">...</password>
      <bookId xsi:type="xsd:integer">...</bookId>
      <numbers xsi:type="urn:stringArray" SOAP-ENC:arrayType="xsd:string[]" xmlns:urn="urn:Soap">
        <value>...</value>
        <value>...</value>
      </numbers>
      <flag xsi:type="xsd:string">...</flag>
    </ideh:AddNumbersToPhonebook>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

حذف شماره از دفترچه تلفن SOAP

SOAP operation: RemoveNumbersFromPhonebook

برای استفاده از این وب‌سرویس از operation برابر با RemoveNumbersFromPhonebook استفاده کنید.

📤 مثال درخواست
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:tns="urn:Soap">
  <SOAP-ENV:Body>
    <ideh:RemoveNumbersFromPhonebook soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <username xsi:type="xsd:string">...</username>
      <password xsi:type="xsd:string">...</password>
      <bookId xsi:type="xsd:integer">...</bookId>
      <numbers xsi:type="urn:stringArray" SOAP-ENC:arrayType="xsd:string[]" xmlns:urn="urn:Soap">
        <value>...</value>
        <value>...</value>
      </numbers>
      <flag xsi:type="xsd:string">...</flag>
    </ideh:RemoveNumbersFromPhonebook>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

مستندات وب سرویس SOAP پیامکی پیشرو پیامک - نسخه 2.0

پیشرو پیامک
درخواست مشاوره

سبد خرید

سبد خرید شما خالی است.

محصولات مورد نظر خود را به سبد اضافه کنید.

فروشگاه