Prva stranica 
Natrag 
Naprijed 
Novosti 
 Kopiraj URL stranice 
 
Natisni stranNatisni stran  
e-računi upute za uporabu  >  Internetske usluge i in...  >  Using web services, aut...

Using web services, authentication and message representation format

After enabling web services for your company, you'll be given a unique company identification and authentication token. For every API request you send, you'll need to present the following:

To generate the MD5 password hash you can use the md5sum command on Linux as shown down under. In the example MD5 password hash is generated for the user with username ivan and password novak (exact case as it is set). The username has to be in UPPERCASE while the password has to be exactly as it is set.

# echo -n "IVANnovak" | md5sum


API method request can be sent using HTTP POST as shown in the following example:

POST /WebServicesSI/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="SalesInvoiceGet">
  <parameter name="number" value="1/01/161" />
  <parameter name="date" type="Date" value="2016-12-15" />
</method>
</request>



The web services have limit of maximum 4 requests in 4s. This means that 4 requests can be sent within 4 seconds, in case 4 were sent in 1 second, it is then necessary to wait 3 seconds, or just send request every second. There is also delay functionality for sending responses, so if you wait for each response before sending another request, there is no need for delay implementation on client side.

---
Zadnja sprememba 08.03.2021 14:41:17
© E-RAČUNI d.o.o. 2003-2024