EPHONE Api

Xml Http Request:

See:
1.  Xml Http Protocol
The Http/Xml protocol is defined as XML document and requires HTTP POST method with a specific format.
The XML structure includes:
Header section - described the general information include authentication fields
Body section - provide the specific data and destination fields
Optional section - contains optional parameters


2.  XML Structure

<?xml version="1.0" encoding="utf-8" ?>
<!-- MT Message RB|CB -->
<Netcell>
  <Header Method="SMSMT|SMSWP|MMSMT|BINMT" Billing="CB|RB">
  <User></User>
  <Password></Password>
  <Sender></Sender>
  <!--For RB MT Only-->
  <ServiceCode></ServiceCode>
  <Context></Context>
  </Header>
  <Body>
  <Content Type="TEXT|LINK|RINGTON|TRUETON|IMAGE|ANIMATION|JAVA|VIDEO|MMS" Id="0" >
  <Data><![CDATA[...]]></Data>
  <Url></Url>
  <!--Optional for MediaType=MMS 2 mb maximum-->
  <Stream>123f56e899...</Stream>
  </Content>
  <Destination>
  <Target SendTo="" Personal="avi;netcell">0527464292</Target>
  <Target SendTo="" Personal="dany;netcell">0527464293</Target>
  </Destination>
  </Body>
  <Optional>
  <!--Optional for Campaign -->
  <CampaignId></CampaignId>
  <!--Optional for Notification-->
  <Notify></Notify>
  <!--Optional for Pending-->
  <TimeToSend></TimeToSend>
  </Optional>
</Netcell>


3.  XML Parameters
Field Description Mandatory
Netcell Root element True
Header Header element True
Method The request method one of SMSMT|SMSWP|MMSMT|BINMT True
Billing Billing type CB=Credit billing RB=Reverse billing True
User Unique User name  (provide by My-T) True
Password Unique user password (provide by My-T) True
Sender The sender mobile phone number True
ServiceCode Service code for RB only RB only
Context User request context Optional
Body Body element True
Content Content element True
Type The content type attributes TEXT|LINK|RINGTON|TRUETON|IMAGE|ANIMATION|JAVA|VIDEO|MMS True
Id The content ID Optional
Data The text message True
Url The content's url For Wap Push
Stream Optional for mms streaming Optional
Destination Destination element True
Target The destination mobile number True
SendTo Optional for send to friend Optional
Personal The personal target fields
Optional Optional element Optional
CampaignId Campaign ID Optional
Notify Notification url Optional
TimeToSend Optional for pending messages Optional



4.0  Methods
The following methods are available in the API interface
·  SMSMT Send a mobile terminated SMS message
·  SMSWP Send a mobile terminated SMS Multimedia message
·  MMSMT Send a mobile terminated MMS message
·  BINMT Send a mobile terminated binary message



4.1 URL:

The XML HTTP protocol requires a HTTP post request with a specific XML format
5.1  Xml Http Request (Sms):
http://api.my-t.co.il:9008/gw/SendSms.aspx?XmlMessage=
<Netcell>
  <Header Method="SMSMT " Billing="CB">
  <User>tal</User>
  <Password>123</Password>
  <Sender>1234</Sender>
  </Header>
  <Body>
  <Content Type="TEXT">
  <Data><![CDATA[Hello..]]></Data>
  </Content>
  <Destination>
  <Target>0527464292</Target>
  <Target>0527464293</Target>
  </Destination>
  </Body>
</Netcell>

5.2  Xml Http Request With Optional Section (Sms):
Url: http://api.my-t.co.il:9008/gw/SendSms.aspx
Post:
<?xml version="1.0" encoding="utf-8" ?>

<Netcell>
  <Header Method="SMSMT " Billing="CB">
   <User>tal</User>
  <Password>123</Password>
  <Sender>1234</Sender>
  </Header>
  <Body>
  <Content Type="TEXT">
  <Data><![CDATA[Hello..]]></Data>
  </Content>
  <Destination>
  <Target>0527464292</Target>
  <Target>0527464293</Target>
  </Destination>
  </Body>
  <Optional>
  <Notify>http://my-t.co.il/notify.aspx</Notify>
  <!--Optional for Pending-->
  <TimeToSend>2009-01-01 08:00</TimeToSend>
  </Optional>
</Netcell>


5.3  Xml Http Request With Personal Fields (Sms):
Url: http://api.my-t.co.il:9008/gw/SendSms.aspx
Post:
<?xml version="1.0" encoding="utf-8" ?>
<Netcell>
  <Header Method="SMSMT " Billing="CB">
  <User>tal</User>
  <Password>123</Password>
  <Sender>1234</Sender>
  </Header>
  <Body>
  <Content Type="TEXT">
  <Data><![CDATA[Hello {0} your coupon number is {1}]]></Data>
  </Content>
  <Destination>
  <Target Personal="avi;12345">0527464292</Target>
  <Target Personal="dany;12346">0527464293</Target>
  </Destination>
  </Body>
  <Optional>
  <Notify>http://my-t.co.il/notify.aspx</Notify>
  <!--Optional for Pending-->
  <TimeToSend>2009-01-01 08:00</TimeToSend>
  </Optional>
</Netcell>

5.4  Xml Http Request (Wap):
Url: http://api.my-t.co.il:9008/gw/SendSms.aspx
Post:
<?xml version="1.0" encoding="utf-8" ?>
<Netcell>
  <Header Method="SMSWP" Billing="CB">
  <User>tal</User>
  <Password>123</Password>
  <Sender>1234</Sender>
  </Header>
  <Body>
  <Content Type="LINK">
  <Data><![CDATA[Download …]]></Data>
  <Url>http:my-t.co.il/contents/wap.aspx?id=123</Url>
  </Content>
  <Destination>
  <Target>0527464292</Target>
  <Target>0527464293</Target>
  </Destination>
  </Body>
  <Optional>
  <!--Optional for Notification-->
  <Notify>http://my-t.co.il/notify.aspx</Notify>
  <!--Optional for Pending-->
  <TimeToSend>2009-01-01 08:00</TimeToSend>
  </Optional>
</Netcell>

5.5  Response

See Response Description



5.6 Send SMS Using Xml Http POST In C# :