Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Most programming languages have libraries to work with this protocol. The API uses the same logic as the web interface and works very similar, which makes its usage easier.

Access the API

To access the JSON-RPC interface, use:

Code Block
languagebash
https://<your-system-IP>/jsonrpc/

Before accessing the system, make sure that your IP is allowed on the firewall. Also, please make sure that the rest of the world is blocked by the firewall. You can get more details about it in the JeraSoft Billing First Steps.

...

We strongly recommend having separate API account for each application you make calls from. Besides this, we recommend having a dedicated Role for API users, which allows only needed actions. Authentication is done by sending the following array along with other arguments:

...

NameDescriptionExample

code

Return code, usually true on success or false on failure
1

return

Array with data returned by the method
[client] => Array
(
[id] => 11
[id_companies] => 3
[type] => 0
[name] => Customer A
[groups] => Customers
[c_dt] => 2013-03-30 16:26:15+03
[status] => active
[credit] => 100
...
)
session_idSession ID, which may be used to speed up next calls
1-dsglnqr4qnsdihr8djj6da7qr4
messagesList of success/warning messages returned by message
array()
errorsList of abnormal errors if they fired during processing
array()

...

The request may be either GET or POST , and should include either Login and Password or Session ID. In response, the server will send the file according to HTTP protocol.

...

To find out arguments for this method, you may look for HTTP request in your browser (using FireBug in Firefox, Developer Tools in Chrome). Another way is to check for the dump in /opt/jerasoft/vcs-data/log/runtime.log, which looks like:

...