API Documentation

  1. 1. Intro
  2. 2. Interfaces
    1. 2.1 XML-RPC
    2. 2.2 SOAP
    3. 2.3 JSON
    4. 2.4 JSONP
  3. 3. Methods
    1. 3.1 Status
    2. 3.2 Sms
    3. 3.3 Fax
    4. 3.4 Mail
    5. 3.5 Routes
    6. 3.6 DefaultRoute
    7. 3.7 Bill
    8. 3.8 Telnumber
    9. 3.9 Email

Intro

Iro API has many methods, that are usefull if you want to send a bunch of messages. This Site describes the API for Iro 1.0.

Interfaces

You can use diffrent interfaces to get to same result.

XML-RPC

Interface-URI: http://localhost:8000/xmlrpc

SOAP

Interface-URI: http://localhost:8000/soap

JSON

Interface-URI: http://localhost:8000/json/<methode>

Not yet implementet

JSONP

Interface-URI: http://localhost:8000/jsonp/<methode>?callback=<callback>

Not yet implementet

Methods

Status

status(user, id=None, detailed=False)

Returns the status of one or more jobs.

Parameter
parameter type description
user string apikey of a user
id integer one job id
detailed boolean return more details about the status
Return
parameter type description
return dict
  • key -- is the job id
  • [key]['status'] -- status of the job

Sms

sms(user, message, recipients, route='default', info='')

Send a sms.

Parameter
parameter type description
user string apikey of a user
message string message
recipients list a list of telefon numbers (use ITU-T E.123)
route string|list route to use to send, or a list of routes as fallback
info string a name, to combine different jobs to one billing group
Return
parameter type description
return integer the job id

Fax

fax(user, subject, fax, recipients, route='default', info='')

Send a fax.

Parameter
parameter type description
user string apikey of a user
subject string subject
fax string content (base64 encoded)
recipients list a list of telefon numbers (use ITU-T E.123)
route string|list route to use to send, or a list of routes as fallback
info string a name, to combine different jobs to one billing group
Return
parameter type description
return integer the job id

Mail

mail(user, subject, body, recipients, frm=None, route='default', info='')

Send a mail.

Parameter
parameter type description
user string apikey of a user
subject string subject
body string mail body
recipients list a list of email addresses
frm string sender mail address
route string|list route to use to send, or a list of routes as fallback
info string a name, to combine different jobs to one billing group
Return
parameter type description
return integer the job id

Routes

routes(user, typ)

Returns a list of all possible offernames.

Parameter
parameter type description
user string apikey of a user
typ string a typ of message -- one of in this list ["sms","fax","mail"]
Return
parameter type description
return list a list of all possible offer names for a typ

DefaultRoute

defaultRoute(user, typ)

Returns all default offernames.

Parameter
parameter type description
user string apikey of a user
typ string a typ of message -- one of in this list ["sms","fax","mail"]
Return
parameter type description
return list a list of all possible offer names for a typ

Bill

bill(user)

Returns the bill, of not paid messages.

Parameter
parameter type description
user string apikey of a user
Return
parameter type description
return dict
  • route -- one offer name ; "total" complete sum
  • [route][info][anz] -- Number of sended messages in one billing group
  • [route][info][price] -- Price for one billing group
  • [route | total][anz] -- Number of sended messages for one offer
  • [route | total][price] -- Price for one offer

Telnumber

telnumber(recipients)

Return True, if all telnumbers a vaild.

Parameter
parameter type description
recipients list a list of telnumbers (use ITU-T E.123)
Return
parameter type description
return boolean True -- all numbers are valid

Email

email(recipients)

Return True, if all mailadresses a valid.

Parameter
parameter type description
recipients list a list of mailadresses
Return
parameter type description
return boolean True -- all addresses are valid