Return codes SMS API

The choice of XML

The OctopushSMS API will return an XML containing:

  • The return code of the API
  • Cost of the campaign or in the “success” node: cost of sending.
  • Your balance remaining after sending
  • The list of numbers you provided, with the charges in your currency for each number, and the associated error code.

Example

<?xml version=”1.0″ encoding=”UTF-8″ ?>
<octopush>
<error_code>000</error_code>
<cost>0.105</cost>
<balance>6.93</balance>
<ticket>api110000000021</ticket>
<sending_date>1326311820</sending_date>
<number_of_sendings>1</number_of_sendings>
<currency_code>€</currency_code>
<successs>
<success>
<recipient>+33601010101</recipient>
<country_code>FR</country_code>
<cost>0.0550</cost>
</success>
</successs>
<failures>
<failure>
<error_code>150</error_code>
<recipient>+334</recipient>
</failure>
<failure>
<error_code>150</error_code>
<recipient>+335</recipient>
</failure>
<failure>
<error_code>150</error_code>
<recipient>+336</recipient>
</failure>
</failures>
</octopush>

Defining XML Tags

CodeDefinition
costCost of the campaign or in the “success” node: cost of sending.
balanceYour remaining balance.
ticketYour ticket was sent. You can identify your campaign, and recover CA if you have selected “Premium”.
sending_dateExpected date of the campaign launch begining
number_of_sendingsRequired SMS depending on the size, number of SMS, and type of SMS (with Unicode characters: 1 SMS for every 70 characters; 1 SMS up to 160 characters; 1 SMS every 137 characters if the SMS exceeds 160 characters).
currency_codeSMS pricing currency.
successsLists of numbers treated as valid and charged.
recipientFormatted phone numbers.
country_codeCountry of the Phone Number..
failuresList of wrong numbers.