Spletne storitve API (web services), avtomatizacija postopkov in integracija programa s programi drugih ponudnikov

Program e-računi je mogoče povezati z drugimi spletnimi in običajnimi poslovnimi programi preko uporabe spletnih storitev oz. vmesnika API. Preko vmesnika API program omogoča dostop do podatkov, ki jih določen uporabnik vodi v programu ter avtomatsko izvajanje določenih funkcionalnosti programa.

Primeri uporabe spletnih storitev so npr.:

Za uporabo spletnih storitev je potrebna programska komponenta, ki omogoča povezovanje preko protokola HTTPS (SSL + HTTP). Za uporabo vmesnika API iz ukazne vrstice se lahko uporabita tudi odprtokodna programa curl [https://en.wikipedia.org/wiki/CURL] ali wget [https://en.wikipedia.org/wiki/Wget].

Poglavje o spletnih storitvah je namenjeno programerjem. Specifikacije spletnih storitev oz. vmesnika API so napisane v angleškem jeziku.


Dokumentacija za vmesnik API in testno okolje (peskovnik oz. sandbox) za testno bazo podakov je na voljo na spodnjem naslovu:

https://e-racuni.com/obracuni/index.html?St=APIDeveloper&action=reLogin&username=micka&hash=ddb43e9f119c6805f4770ecc4f6466ba

 

1. Introduction to web services API

The e-racuni.com Web Services API is a programmer's interface for accessing user's account data (the data of the organization) using secure HTTPS connection. The API makes it very easy to integrate 3rd party web and desktop applications with e-racuni.com ERP system. To use the API you do not need any special programming skills, some API functions can even be used by simple command line tools without any programming knowledge.

API can be used in the following use cases:

Web services API supports XML and JSON encoded HTTPS requests and API functions can also be called using simple command line tools (e.g. wget [https://en.wikipedia.org/wiki/Wget] or curl [https://en.wikipedia.org/wiki/CURL]).

The full API reference for the API is available here https://e-racuni.com/obracuni/ApiDocumentation.

For developers we recommend using the API Developer Panel tool which provides easy to use GUI interface for testing the API and generating of source code template for making API method calls.

Use your existing e-racuni.com account to login into the API developer panel at: https://e-racuni.com/obracuni/developer.

1.1 How to activate Web services API for your organization

Ensure that your user account owns privileges for Web Services API management and activation. Then follow the steps below to access API Web Services settings:

  1. Select Settings from the main menu.
  2. Select Company settings in the pull-down menu
  3. Select API Web services in the left panel tree view menu

When you arrive to the API Settings for the first time you should see the following screen:

  
Enable web services by generating web services token
  
  Slika 1: Enable web services by generating web services token

To enable Web Services API for your organization click on the button Enable web services.

If you later decide that you do not want to use the API anymore you can disable API at anytime just by clicking on the Disable web services.

Web services API cannot be used when no API token is available and web services are disabled.

1.2 Adding API user accounts

Once you have enabled the API you need to create API user account. To do this click the button Add API User Account.

  
Adding API user account
  
  Slika 2: Adding API user account

API user account can be entered like any other user account. Instead of specifying user privileges you can specify API methods that you want to access with the API user account. If API will be accessed from a 3rd party server with a fixed IP address then you can type in the IP address from which the API calls will be made. All API functions will be executed in the context of the API user account. This means that the API methods will be executed with the user privileges, confidentiality clearance, cost center, email and language settings of the API user account (among others).

In order to use the API you need to provide the following data to the developer who will be programming the code using the API:

To generate the API password click on the button Get API Password

  
Generate API Password
  
  Slika 3: Generate API Password

Once you have generated the API Password you can provide your API developer with the data needed to access the API:

  
Get API Password and organization token
  
  Slika 4: Get API Password and organization token

1.3 Using the API

To use the e-racuni.com API (i.e. the API for Slovene localization) you need to use following service URL for communication over HTTP:

https://e-racuni.com/WebServicesSI/API


Please note the use of https:// in the URL above. All e-racuni.com API communication is encrypted over HTTPS.

Use the API developer panel to test and discover the API methods. The sandbox environment for Slovenia is available at https://e-racuni.com/obracuni/index.html?St=APIDeveloper&action=reLogin&username=micka&hash=ddb43e9f119c6805f4770ecc4f6466ba.

Once you are logged in the API developer tool you can browse documentation for all API methods and data types that are available by the API.

To test any of the API methods, all you need to do is to enter API method parameters as shown below:

  
API Developer method parameter value entry
  
  Slika 5: API Developer method parameter value entry

Once you have entered the API method parameter values (if required) you can click on the next tab depending on the development language/tool that you will use for communicating with the API.

If you will be using JSON for communicating with the API, then click on Tab JSON  and you will be able to execute API request in the context of the user account and organization that you are currently logged in.

  
Testing API method call in the API developer panel tool
  
  Slika 6: Testing API method call in the API developer panel tool

As you can see in the screenshot above the API developer tool will generate JSON source code for making API call based on API user account data and API method parameters that you have entered before. The API method will be executed and the resulting JSON response will be shown.

Now all you need to do is to copy JSON request source code into your application and start using the API.

If you want to use the API from the command line then see the command generated in tab CURL .

If you want to use the API with XML source code then see the XML source generated in tab XML .

If you want to use the API from PHP then you can start with the code generated in tab PHP .

 

2. 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:

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="07D316568AC3441F89981C68A30370A8" />
<method name="WarehouseGetArticleStockQuantity">
  <parameter name="warehouseCode" value="01" />
  <parameter name="stockDate" type="Date" value="2009-01-01" />
  <parameter name="productCode" type="String" value="123" />
</method>
</request>


To generate MD5 password hash you can use the following command on Linux:

# echo -n "MICKAkovac" | md5sum

or you can use online generator:

http://www.miraclesalad.com/webtools/md5.php

In the example above MD5 password hash is generated for user with username micka (has to be in uppercase) and password kovac (exact case as it is set).

Actual web services token for the company can be found or generated in the menu |Settings |Company settings |Web services - API

The web services have limit of maximum 4 requests in 4s from one client user account. 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.

 

3. API Reference

For a complete and up-to-date API reference open the following link:

https://e-racuni.com/obracuni/ApiDocumentation

Check articles below for examples on how to use the API:

 

3.1. AdvanceInvoice API

AdvanceInvoiceGetGet advance invoice by document number, or by combination of document number and date.
AdvanceInvoiceGetPDFGet PDF file for advance invoice by document number, or by combination of document number and date.
AdvanceInvoiceCreateCreate new advance invoice.
AdvanceInvoiceImportImport advance invoice issued in other IS.
AdvanceInvoiceUpdateUpdate existing advance invoice.
AdvanceInvoiceDeleteDelete advance invoice.
AdvanceInvoiceCancelCancel advance invoice.
AdvanceInvoiceListGet list of advance invoices for specified criteria
AdvanceInvoiceSendByEmailSends document by email to the recipient(s).
AdvanceInvoiceAttachmentAddAdd attachment to advance invoice.
AdvanceInvoiceAttachmentSetDefaultAdd attachment to advance invoice and set is as default.
AdvanceInvoiceAttachmentGetGet default attachment of advance invoice.
AdvanceInvoiceAttachmentListGet all attachments of advance invoice.

3.1.1 AdvanceInvoiceGet

Get advance invoice by document number, or by combination of document number and date.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2010-00002)
dateDocument date
costPositionCost position
businessUnitBusiness unit
vatBookVat book
documentIDInternal document identificator. In case of using this parameter, no other parameter listed abowe is needed for searching by document.

Example request and response

(For internal "XML" format)

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="AdvanceInvoiceGet">
       <parameter name="number" value="1/2013" />
       <parameter name="date" type="Date" value="2013-02-15" />
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
       <AdvanceInvoice>
               <businessYear>2010</businessYear>
               <buyerCode>123456</buyerCode>                   <!-- (Optional). If buyer code is specified, other buyer parameters bellow are not needed as the buyer data is taken from database. If any additional parameter is specified, it will override master buyer data in document
               <buyerCity>RADOVLJICA</buyerCity>
               <buyerCountry>SI</buyerCountry>
               <buyerName>5 FIVER d.o.o.</buyerName>
               <buyerPostalCode>4240</buyerPostalCode>
               <buyerStreet>ULICA 22</buyerStreet>
               <buyerTaxNumber>75882442</buyerTaxNumber>
               <buyerVatRegistration>None</buyerVatRegistration>
               <city>Beograd</city>
               <costPosition>1</costPosition>
               <cashRegisterCode>0001</cashRegisterCode>  <!-- This property must be set for fiscalization
               <businessUnit>0001</businessUnit>          <!-- This property must be set for fiscalization
               <orderReference>123</orderReference>                    <!-- (Optional)
               <date>2010-02-19</date>
               <dateOfSupplyFrom>2010-02-19</dateOfSupplyFrom>
               <prepaymentDate>2010-03-06</prepaymentDate>
               <invoicePricingType>retail</invoicePricingType>
               <vatTransactionType>0</vatTransactionType>
               <vatOutgoingDocumentVatClause>Registered</vatOutgoingDocumentVatClause>
               <status>issuedInvoice</status>
               <totalAmount>90.000</totalAmount>
               <totalCurrency>EUR</totalCurrency>
               <totalDiscount>8.33</totalDiscount>
               <totalNetAmount>75.00</totalNetAmount>
               <totalVatAmountFlatRate>0.00</totalVatAmountFlatRate>
               <totalVatAmountNormalRate>0.00</totalVatAmountNormalRate>
               <totalVatAmountLowerRate>0.00</totalVatAmountLowerRate>
               <totalVatAmountZeroRate>0.0</totalVatAmountZeroRate>
               <totalVatBaseAmountFlatRate>0.00</totalVatBaseAmountFlatRate>
               <totalVatBaseAmountNormalRate>0.00</totalVatBaseAmountNormalRate>
               <totalVatBaseAmountLowerRate>0.00</totalVatBaseAmountLowerRate>
               <totalVatBaseAmountZeroRate>1.55</totalVatBaseAmountZeroRate>
               <reference>05 11290</reference>                         <!-- generated reference number
               <salesInvoicesRef>2014-00001, 2014-00002, 2014-00003</salesInvoicesRef> <!-- references to sales invoices
               <deliveryNotesRef>2014-00004, 2014-00005, 2014-00006</deliveryNotesRef> <!-- references to delivery notes
               <creditNotesRef>2014-00004</creditNotesRef> <!-- references to credit notes
               <cancelledDocumentRef>2012-00015</cancelledDocumentRef> <-- Reference to cancelled document
               <eor>34facd65-622b-745d-a541-30ab1f9d3ac1</eor>  <!-- generated by FURS
               <zoi>a7e5f55e1dbb48b799268e1a6d8618a3</zoi>      <!-- generated when issuing document if it is for fiscalization    
               <fiscalNumber>1</fiscalNumber>                   <!-- fiscal sequential number for fiscal numbering of document
               <introductionText>introduction text</introductionText>
               <Items>
                       <Item>
                               <position>1</position>
                               <amount>75.00</amount>
                               <amountWithoutDiscount>83.33</amountWithoutDiscount>
                               <currency>EUR</currency>
                               <description>Prevoz robe</description>
                               <discountAmount>8.33</discountAmount>
                               <discountPercentage>10.0000</discountPercentage>
                               <netPrice>83.33333</netPrice>
                               <netPriceInDocumentCurrency>83.33333</netPriceInDocumentCurrency>
                               <quantity>1.000</quantity>
                               <price>100.00000</price>
                               <priceInDocumentCurrency>100.00000</priceInDocumentCurrency>
                               <vatAmount>15.00</vatAmount>
                               <vatPercentage>20.0</vatPercentage>
                               <vatTransactionType>0</vatTransactionType>
                               <costPosition>1</costPosition>
                       </Item>
               </Items>
       </AdvanceInvoice>
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="document could not be found"><error/>
</response>


3.1.2 AdvanceInvoiceGetPDF

Get PDF for advance invoice by document number, or by combination of document number and date. Response (on OK) returns binary record for PDF file coded with Base64 coding.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2010-00002)
dateDocument date
costPositionCost position
businessUnitBusiness unit
vatBookVat book
documentIDInternal document identificator. In case of using this parameter, no other parameter listed abowe is needed for searching by document.
markDocumentAsSentMarks document as sent.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="AdvanceInvoiceGetPDF">
       <parameter name="number" value="2" />
       <parameter name="date" type="Date" value="2010-02-22" />
          <parameter name="markDocumentAsSent" />
</method>
</request>


Response
<response status="ok">
       <number>2</number>
       <date>2010-02-22</date>
       <pdfFile>JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0ZpbHRlci9GbGF0ZURlY29kZT4+CnN0cmVhbQp4nJVYS4/bNh...</pdfFile>
</response>

Response (on error)
<response status="error">
       <error description="Can not find advance invoice for number: 2 and date: 2010-02-22">
       </error>
</response>


3.1.3 AdvanceInvoiceCreate

Create new advance invoice.

Document item can be specified with: productCode, quantity, discountPercentage, or can be specified with: description, currency, quantity, price (retail price including VAT for retail document) or netPrice (gross price without VAT for gross document). Default document type is gross. Additional optional item fields are: discountPercentage, unit, vatPercentage, vatTransactionType. Supported values for vatTransactionType are:
0 - Taxable domestic transactions of goods and services // Obdavčen promet blaga in storitev v Sloveniji
4 - Zero-rated transaction - supply of goods within the EU // Oproščen promet - dobava blaga znotraj EU
104 - Vat free transaction - supply of goods in EU by customs procedure 42 and 63 // Oproščen promet - dobava blaga znotraj EU po carinskih postopkih 42 in 63
6 - Zero-rated transaction - tripartite supplies of goods within the EU // Oproščen promet - tristranske dobave blaga znotraj EU
11 - Sales of services in the EU, VAT reverse charge // Oproščen promet - storitve v EU, od katerih plača DDV prejemnik
103 - Vat free transaction - supply of goods in EU by call-of-stock arrangement // Oproščen promet - dobava blaga znotraj EU po skladiščenju na odpoklic
1 - Zero-rated transaction - exports of commodity outside the EU // Oproščen promet - izvoz blaga izven EU
3 - Zero-rated transaction with the right to deduct input VAT // Oproščen promet - s pravico do odbitka vstopnega DDV
2 - Zero-rated transaction - without the right to deduct input VAT // Oproščen promet - brez pravice do odbitka vstopnega DDV
9 - Transactions exempt from VAT with the right of input VAT deduction (transactions outside SLO) // Neobdavčljiv promet s pravico do odbitka vstopnega DDV (prometi izven SLO)
7 - not subject to VAT // Neobdavčen promet - ne gre v DDV evidence
12 - Nontaxable suply - other taxes or duties other than VAT // Neobdavčen promet - ostali davki oziroma dajatve (razen DDV)
105 - Not subject to VAT – supply of goods outside EU // Neobdavčen promet - dobava blaga zunaj Unije (tretje države)
10 - Supply of goods and services in Slovenia, VAT reverse charged by the recipient // Dobava blaga in storitev v SLO, DDV obračuna prejemnik (76.a člen)
5 - Zero-rated transaction - assembly in the EU // Oproščen promet - montaža v EU (obračun tujega DDV)
8 - Distance selling in the EU surpassing annual sales threshold (foreign VAT) // Oproščen promet - prodaja blaga na daljavo (obračun tujega DDV)
101 - Special vat margin calculation for used goods // Posebna ureditev za rabljeno blago
102 - Special vat margin calculation for used goods - tax free // Posebna ureditev za rabljeno blago - oproščen promet
13 - Special vat margin calculation for travel agencies - price difference taxed // Obdavčen promet - posebni postopek obdavčitve razlike v ceni za potovalne agencije (98. člen)
14 - VAT exempt transactions for travel agencies // Oproščen promet za potovalne agencije (99. člen)
100 - Electronic services in other EU member countries (OSS) // Prodaja elektronskih storitev v drugih članicah EU (OSS)
106 - Distance sales of goods to EU consumers (OSS) // Prodaja blaga na daljavo končnim potrošnikom v EU (OSS)
107 - Supply of services to EU consumers (OSS) // Prodaja storitev končnim potrošnikom v EU (OSS)
108 - Distance sales of imported goods to EU consumers (IOSS) // Prodaja na daljavo iz tretjih držav uvoženega blaga končnim potrošnikom v EU (IOSS)
120 - Supply of services from EU to third country consumers (foreign VAT) // Izvoz storitev iz EU končnim potrošnikom v državi izven EU (obračun tujega DDV)
121 - Distance sales of goods to consumers outside EU (foreign VAT) // Prodaja blaga na daljavo končnim potrošnikom v državi izven EU (obračun tujega DDV)

Before using vat transaction types for OSS and IOSS, you must set up registration for OSS and IOSS in company settings under foreign VAT registrations.

Parameters

AdvanceInvoiceComplex parameter with data tags

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="AdvanceInvoiceCreate">
<parameter name="AdvanceInvoice">               
               <date>2010-01-13</date>                         <!-- document date
               <dateOfSupplyFrom>2010-02-19</dateOfSupplyFrom>
               <prepaymentDate>2010-03-06</prepaymentDate>             
               <city>Beograd</city>
               <customerContactPerson></customerContactPerson> <!-- (Optional)
               <type>Retail</type>                                     <!-- (Optional) Type of pricing - default is "Gross"
               <status>issuedInvoice</status>                           <!-- (Optional) Possible values: issuedInvoice, draft - default is issuedInvoice
               <isReccurringInvoice>false</isReccurringInvoice>
               <vatTransactionType>0</vatTransactionType>              <!-- (Optional) default is 0
               <vatOutgoingDocumentVatClause>Registered</vatOutgoingDocumentVatClause> <!-- (Optional and only for invoices with taBookingRef) Possible values: RegisteredTourismLawPart47, RegisteredTourismLawPart31, RegisteredTourismLawPart47And31
               <costPosition>120</costPosition>                        <!-- (Optional)
               <cashRegisterCode>0001</cashRegisterCode>                <!-- Mandatory for fiscalization
               <businessUnit>0001</businessUnit>                        <!-- Mandatory for fiscalization
               <deliveryMethod>Delivery method</deliveryMethod>        <!-- (Optional)
               <superDiscountPercentage>5</superDiscountPercentage> <!-- (Optional)
               <remarks>Remark on Advance invoice</remarks>            <!-- (Optional)
               <introductionText>introduction text</introductionText>   <!-- (Optional)
               <buyerCode>123456</buyerCode>                   <!-- (Optional). If it is specified buyer parameters bellow are not needed as the buyer data is taken from database. If any parameter bellow is sepcified it will override master buyer data in document
               <buyerDocumentID>60:123456</buyerDocumentID>                    <!-- (Optional). If it is specified buyer parameters bellow are not needed as the buyer data is taken from database. If any parameter bellow is sepcified it will override master buyer data in document
               <buyerName>Micka Kovac</buyerName>              
               <buyerTaxNumber>02169711</buyerTaxNumber>       <!-- (Optional)
               <buyerVatRegistration>None</buyerVatRegistration>       <!-- (Unkown, None, Registered)
               <buyerEMail>micka@kovac.com</buyerEMail>                <!-- (Optional)
               <buyerStreet>Iztokova 22</buyerStreet>                  <!-- (Optional)
               <buyerPostalCode>2000</buyerPostalCode>                 <!-- (Optional)
               <buyerCity>Maribor</buyerCity>                  <!-- (Optional)
               <buyerCountry>SI</buyerCountry>                         <!-- (Optional) ISO-2 country code
               <methodOfPayment>bankTransfer</methodOfPayment> <!-- Possible ways of payment: Unknown, BankTransfer, Cash, Cheques, EurocardMastercard, Visa, Karanta, Amex, Diners, Activa, BA, CashOnDelivery, Moneta, CreditCard, PayPal, DirectDebit, SetOff, Coupon, Compensation, GoCrypto
               <documentLanguage>Slovene</documentLanguage> <!-- (Optional) Possible document language: Slovene, English, German, Croatian, Italian, Hungarian, Czech, Slovak, Serbian, Polish and Bulgarian
               <printingTemplate>Predloga2</printingTemplate> <!-- (Optional) Setting printing template for document, posible values is code of uploaded templates in web app
               <salesInvoiceRef>2014-00001</salesInvoiceRef> <!-- (Optional) Setting reference to advance invoice
               <salesQuoteRef>2014-00001</salesQuoteRef> <!-- (Optional) Setting reference to sales quote
               <salesOrderRef>2014-00001</salesOrderRef> <!-- (Optional) Setting reference to sales order
               <taBookingRef>2014-00001</taBookingRef> <!-- (Optional) Setting reference to tourist agency booking
               <Items>
                       <Item>                                          <!-- item specified with ref to product
                               <position>1</position>      <!-- position of item
                               <productCode>020</productCode>          <!-- product code
                               <quantity>100</quantity>
                               <discountPercentage>10</discountPercentage>
                               <vatTransactionType>0</vatTransactionType> <!-- (Optional) default is 0
                               <costPosition>1</costPosition>
                       </Item>
                       <Item>                                          <!-- Item specified for good or service
                               <position>2</position>      <!-- position of item
                               <description>Transport of goods</description>
                               <price>11.00</price>      <!-- price (retail price including VAT for retail document) or netPrice (gross price without VAT for gross document). Default document type is "gross" so use <netPrice> tag in this case or <price> tag in case of document type "retail"
                               <discountPercentage>2</discountPercentage>      <!-- (Optional)
                               <vatPercentage>10</vatPercentage>               <!-- (Optional)
                               <currency>EUR</currency>                        <!-- (Optional)
                               <quantity>10</quantity>                         <!-- (Optional) default 0
                               <unit>km</unit>                         <!-- (Optional)
                               <vatTransactionType>0</vatTransactionType>      <!-- (Optional) default is 0
                               <costPosition>1</costPosition>
                       </Item>
                       ...
               </Items>
       </parameter>
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328
<?xml version="1.0" encoding="utf-8"?>
response status="ok" >
       <number>2/2013</number>         <!-- created document ID or number
       <date>2013-01-13</date>                 <!-- date of document
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- missing mandatory attributes, invalid values, no privileges,  
</response>


3.1.4 AdvanceInvoiceImport

Import advance invoice issued in other IS. Parameter 'importType' can be used to specify type of import. If parameter is not specified, "createOrUpdate" is used as default. For updating advance invoices with this api call, advance invoices's data must contain code as unique identifier.

Parameters

importTypeFlag for the type of import
AdvanceInvoiceAdvance invoice data in xml substructure.
dataFormatIn case some other data format is used for import, this parameter should be used. Possible values are defaul data format "eracuniXML" and "ESLOG". If this parameter is not included in XML, import from default data format is used.
base64dataThis parameter is mandatory in case using dataFormat "ESLOG". Content of this parameter should be eSlog XML encoded into base64 string.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="AdvanceInvoiceImport">
               <parameter name="importType" value="createOrUpdate" />
               <parameter name="AdvanceInvoice">
                    <!-- structure of elements is the same as in AdvanceInvoiceCreate only tag <number> is mandatory here
                <parameter/>
       </method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <number>0001-1206-2014</number>
       <date>2013-06-12</date>
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
        <error description="Property <number> is required."><error/>  <!-- missing number  
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
                <error description="Advance invoice for number: 0001-1206-2013 already exists!"></error>  <!-- Advance Invoice for number already exists  
</response>

(Using ESLOG data format)

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="AdvanceInvoiceImport">
               <parameter name="importType" value="createOrUpdate" />
               <parameter name="dataFormat" value="ESLOG" />
               <parameter name="base64data">JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0ZpbHRlci9GbGF0ZURlY29kZT4+Cn...
                    <!-- eSlog XML encoded into base64 string
                <parameter/>
       </method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <number>0001-1206-2014</number>
       <date>2021-06-12</date>
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
                <error description="Parameter <base64data>: cannot parse contents"></error>  <!-- Error when decoding XML from base64 string  
</response>

<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
                <error description="Error parsing XML file due to invalid syntax"></error>  <!-- Error when parsing XML
</response>

<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
                <error description="Document can not be overwritten because it is already posted."></error>  <!-- There are several different error messages possible.
</response>


3.1.5 AdvanceInvoiceUpdate

Update existing advance invoice.Data must contain advance invoice number to be able to identify document which is to be updated.

Parameters

AdvanceInvoiceComplex parameter with data tags

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="AdvanceInvoiceUpdate">
<parameter name="AdvanceInvoice">
         <number>12</number>                                    <!-- document number is mandatory in UPDATE (Can use sequential document number (example: 12), or formatted number (example: 12/2011))
               <!--  Parameters are identical to the parameters in SalesInvoiceCreate api
       </parameter>
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328
<?xml version="1.0" encoding="utf-8"?>
response status="ok" >
       <number>2/2013</number>         <!-- updated document ID or number
       <date>2013-01-13</date>                 <!-- date of document
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- missing mandatory attributes, invalid values, no privileges,  
</response>



3.1.6 AdvanceInvoiceDelete

Delete advance invoice. Must specify parameter/s (number, number+date) to identify document for deleting. It is possible to delete only last advance invoice.

Parameters

numberDocument number
dateDocument date
costPositionCost position
businessUnitBusiness unit
vatBookVat book

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="AdvanceInvoiceDelete">
       <parameter name="number" value="12/2009" />
       <parameter name="date" type="Date" value="2016-01-13" />
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2016 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="no privileges"><error/>     <!-- document could not be found, no privileges,  
</response>




3.1.7 AdvanceInvoiceCancel

Cancel advance invoice. Must specify parameter/s (number, number+date) to identify document for canceling.

Parameters

numberDocument number
dateDocument date
costPositionCost position
businessUnitBusiness unit
vatBookVat book
statusStatus of cancelation document (draft, issuedInvoice). By Default status is issuedInvoice.
cancellationDocNumberNumber of cancellation document (mandatory and works only for imported documents).

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="AdvanceInvoiceCancel">
       <parameter name="number" value="2013-00014" />
<parameter name="cancellationDocNumber" value="2013-00014" /> <!-- Works only when canceling imported documents where this number is mandatory
       <parameter name="date" type="Date" value="2013-03-26" />
       <parameter name="status" value="draft" />
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Access denied. User account does not have sufficient privileges for the given request"><error/>     <!-- document could not be found, no privileges,  
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Can not cancel advance invoice for arguments number: 2013-00014 date: 2013-03-26"><error/>  <!-- document could not be canceled,  
</response>

Possible error messages:
Access denied. User account does not have sufficient privileges for the given request
Parameter named "number" is required
Can not find advance invoice for number
Can not cancel. Found X advance invoices
Found X advance invoices X. You can only cancel one advance invoice at a time
Can not cancel advance invoice X



3.1.8 AdvanceInvoiceList

Get list of advance invoices for criteria which is specified by API parameters. Mixing different types of dates in search criteria is not supported - date parameters can be combined only as follows: dateFrom/dateTo, prepaymentDateFrom/prepaymentDateTo or dateOfSupplyFrom/dateOfSupplyUntil.

Parameters

numberDocument number
dateFromThe date which is used to select advance invoices whose date is following it
dateToThe date which is used to select advance invoices whose date is preceding it
prepaymentDateFromThe date which is used to select advance invoices whose date of prepayment is following it
prepaymentDateToThe date which is used to select advance invoices whose date of prepayment is preceding it
dateOfSupplyFromThe date which is used to select advance invoices whose date of supply/performance is following it
dateOfSupplyUntilThe date which is used to select advance invoices whose date of supply/performance is preceding it
deliveryAddressDelivery address of the buyer
buyerBuyer code, or buyer name
costPositionCost position code
totalAmountTotal amount of the advance invoices
totalCurrencyCurrency used in advance invoice
articleProduct code, or product name
statusPossible values: Draft, IssuedInvoice, NotBooked, Booked, CanceledCreditInvoice, OpenedClaim, ClosedClaim, OpenedDueClaim, DocumentSentAlready, DocumentNotYetSent, DocumentSentByEMail, DocumentNotSentByEMail, CancellationDocument, CancelledDocument, HasOpenAmountForSalesInvoice, HasNoOpenAmountForSalesInvoice, AccountingEntryOrImportedInvoice, DocumentNotSentOrPrinted, NotCancellationOrCancelledDocument, VatReportDone, VatReportOpen.
issuerIssuer of document, search is done by username

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="AdvanceInvoiceList">
               <parameter name="status" value="issuedInvoice" />
               <parameter name="dateFrom" type="Date" value="2010-02-19" />
       </method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
<AdvanceInvoices>                       
       <AdvanceInvoice>
                <!-- structure of elements is the same as in AdvanceInvoiceGet
       </AdvanceInvoice>
       ...
</AdvanceInvoices>
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- no privileges,  
</response>


3.1.9 AdvanceInvoiceSendByEmail

Sends document by email to the recipient(s).

Parameters

numberDocument number
dateDocument date (optional additional document identification)
senderEmail sender (Optional)
recipientComma delimited list of recipient(s) emails
ccCC email (Optional)
bccBCC email (Optional)
subjectMail subject (Optional)
messageMessage text (Optional)
useHtmlMessageSend message text as HTML (Optional)

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="AdvanceInvoiceSendByEmail">
       <parameter name="number" value="12/2009" />
       <parameter name="date" type="Date" value="2010-01-13" />
       <parameter name="sender" value="micka@kovac.com"/>
       <parameter name="recipient" value="zoran@kovac.com,zlatko@kovac.com"/>
       <parameter name="cc" value=""/>
       <parameter name="bcc" value=""/>
       <parameter name="subject" value="TEST d.o.o.: Sales invoice nr. 0002/2010"/>
       <parameter name="message" value="Message text"/>
        <parameter name="useHtmlMessage" value="true"/>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="no privileges"><error/>     <!-- document could not be found, no privileges, mail sending failed
</response>


3.1.10 AdvanceInvoiceAttachmentAdd

Add image/attachment to advance invoice.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="AdvanceInvoiceAttachmentAdd">
       <parameter name="number" type="String" value="2020-00001" />
       <parameter name="attachment">
               <contents encoding="BASE64">BASE64...</contents>
               <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added attachment att.jpg to advance invoice 2020-00001.</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find advance invoice for number: 2020-00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>


3.1.11 AdvanceInvoiceAttachmentSetDefault

Add attachment to advance invoice and set is as default.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="AdvanceInvoiceAttachmentSetDefault">
       <parameter name="number" type="String" value="2020-00001" />
       <parameter name="attachment">
               <contents encoding="BASE64">BASE64...</contents>
               <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added attachment att.jpg to advance invoice 2020-00001.</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find advance invoice for number: 2020-00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>


3.1.12 AdvanceInvoiceAttachmentGet

Get default attachment of advance invoice.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="AdvanceInvoiceAttachmentGet">
       <parameter name="number" type="String" value="2020-00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <AdvanceInvoice>
               <Attachments>
                       <Attachment>
                               <fileName>att.jpg</fileName>
                               <contents encoding="BASE64">BASE64</contents>
                       </Attachment>
               </Attachments>
       </AdvanceInvoice>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find advance invoice for number: 2020-00001 advance invoice does not have attachemnts.
</response>


3.1.13 AdvanceInvoiceAttachmentList

Get all images/attachments of article.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="AdvanceInvoiceAttachmentList">
       <parameter name="number" type="String" value="2020-00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <AdvanceInvoice>
               <Attachments>
                       <Attachment>
                               <fileName>att1.jpg</fileName>
                               <contents encoding="BASE64">1BASE64</contents>
                       </Attachment>
                       <Attachment>
                               <fileName>att2.jpg</fileName>
                               <contents encoding="BASE64">2BASE64</contents>
                       </Attachment>
                       <Attachment>
                               <fileName>att3.jpg</fileName>
                               <contents encoding="BASE64">3BASE64</contents>
                       </Attachment>
               </Attachments>
       </AdvanceInvoice>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find advance invoice for number: 2020-00001 advance invoice does not have attachemnts.
</response>

 

3.2. BillOfMaterials API

BillOfMaterialsGetGet bill of materials by number.
BillOfMaterialsCreateCreate new bill of materials.
BillOfMaterialsUpdateUpdate existing bill of materials.
BillOfMaterialsDeleteDelete bill of materials.
BillOfMaterialsListGet list of bills of materials for specified criteria.

3.2.1 BillOfMaterialsGet

Get bill of materials by number.

Parameters

numberNumber of bill of materials.
documentIDInternal document identificator. In case of using this parameter, no other parameter listed abowe is needed for searching by document.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="BillOfMaterialsGet">
       <parameter name="number" value="055/11" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <BillOfMaterials>
               <date>2015-05-06</date>
               <number>055/11</number>
               <productCode>055</productCode>
               <productQuantity>10.000000</productQuantity>
               <status>Active</status>
               <MaterialItems>
                       <MaterialItem>
                               <itemProductCode>000011</itemProductCode>
                               <position>1</position>
                               <quantity>5.000000</quantity>
                       </MaterialItem>
                       <MaterialItem>
                               <itemProductCode>000001</itemProductCode>
                               <position>2</position>
                               <quantity>1.000000</quantity>
                       </MaterialItem>
               </MaterialItems>
               <WorkingHours>
                       <WorkingHour>
                               <description>consulting</description>
                               <hoursPlanned>6.0000</hoursPlanned>
                               <position>1</position>
                               <workTask>consulting</workTask>
                       </WorkingHour>
                       <WorkingHour>
                               <description>Programiranje</description>
                               <hoursPlanned>8.0000</hoursPlanned>
                               <position>2</position>
                               <workTask>consulting</workTask>
                       </WorkingHour>
                       <WorkingHour>
                               <description>Testiranje</description>
                               <hoursPlanned>2.0000</hoursPlanned>
                               <position>3</position>
                               <workTask>consulting</workTask>
                       </WorkingHour>
               </WorkingHours>
       </BillOfMaterials>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named "number" is required, Can not find bill of materials number: 055/11,  
</response>


3.2.2 BillOfMaterialsCreate

Create new bill of materials.

Parameters

BillOfMaterialsBill of materials's data in xml substructure.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="BillOfMaterialsCreate">
       <parameter name="BillOfMaterials">
               <date>2015-05-06</date>                          <!-- Mandatory
               <productCode>055</productCode>                   <!-- Mandatory
               <productQuantity>10.000000</productQuantity>     <!-- Mandatory
               <status>Active</status>                          <!-- Mandatory possible values: Draft, Active, Inactive
               <MaterialItems>
                       <MaterialItem>
                               <itemProductCode>000011</itemProductCode>    <!-- Mandatory
                               <position>1</position>                       <!-- Optional
                               <quantity>5.000000</quantity>                <!-- Mandatory
                       </MaterialItem>
               </MaterialItems>
               <WorkingHours>
                       <WorkingHour>
                               <description>test working hour</description> <!-- Mandatory
                               <hoursPlanned>6.0000</hoursPlanned>          <!-- Mandatory
                               <position>1</position>                       <!-- Optional
                               <workTask>consulting</workTask>              <!-- Mandatory
                       </WorkingHour>
               </WorkingHours>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <number>055/11</number>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Bill of materials for number: 055/11 already exists!><error/> <!-- Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named "number" must be specified., missing mandatory attributes, invalid values, no privileges, Error creating bill of materials  
</response>


3.2.3 BillOfMaterialsUpdate

Update existing bill of materials.

Parameters

BillOfMaterialsProduct's data in xml substructure

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="BillOfMaterialsUpdate">
       <parameter name="BillOfMaterials">
               <date>2015-05-06</date>                          <!-- Mandatory
               <number>055/11</number>                          <!-- Mandatory
               <productCode>055</productCode>                   <!-- Mandatory
               <productQuantity>10.000000</productQuantity>     <!-- Mandatory
               <status>Active</status>                          <!-- Mandatory possible values: Draft, Active, Inactive
               <MaterialItems>
                       <MaterialItem>
                               <itemProductCode>000011</itemProductCode>    <!-- Mandatory
                               <position>1</position>                       <!-- Optional
                               <quantity>9.000000</quantity>                <!-- Mandatory
                       </MaterialItem>
               </MaterialItems>
               <WorkingHours>
                       <WorkingHour>
                               <description>test working hour</description> <!-- Mandatory
                               <hoursPlanned>7.0000</hoursPlanned>          <!-- Mandatory
                               <position>1</position>                       <!-- Optional
                               <workTask>consulting</workTask>              <!-- Mandatory
                       </WorkingHour>
               </WorkingHours>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <productCode>PA2521U-2AC3</productCode>
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/> <!-- Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named "number" is required, Can not find bill of materials for number: 055/11, missing mandatory attributes, invalid values, no privileges,  
</response>


3.2.4 BillOfMaterialsDelete

Delete bill of materials.

Parameters

numberUnique identifier for bill of materials.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="BillOfMaterialsDelete">
       <parameter name="number" value="055/11" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>   <! Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named "number" is required, Can not find bill of materials for number: 055/11, Can not delete. Found 3  bill of materials with number 055,
</response>


3.2.5 BillOfMaterialsList

Get list of bills of materials for specified criteria.

Parameters

numberBillOfMaterials number.
dateFromSearch by bill of materials date range.
dateToSearch by bill of materials date range.
articleSearch by material.
statusUsage status (Active, Inactive, Draft)

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="BillOfMaterialsList">
       <parameter name="number" value="123456" />
       <parameter name="status" value="active"/>
</method>
</request>

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="BillOfMaterialsList">
       <parameter name="dateFrom" value="2015-05-01" />
    <parameter name="dateTo" value="2015-05-26" />
</method>
</request>


Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <BillOfMaterials>
                <!-- structure of bill of materials data is the same as in BillOfMaterialsGet
       </BillOfMaterials>
       <BillOfMaterials>
                <!-- structure of bill of materials data is the same as in BillOfMaterialsGet
       </BillOfMaterials>
       ...
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Access denied. User account does not have sufficient privileges for the given request, Invalid search keys, invalid values, no privileges,  
</response>

 

3.3. CreditNote API

CreditNoteGetGet credit note by document number, or by combination of document number and date.
CreditNoteGetPDFGet PDF file for credit note by document number, or by combination of document number and date.
CreditNoteCreateCreate new credit note.
CreditNoteImportImport credit note issued in other IS.
CreditNoteUpdateUpdate existing credit note.
CreditNoteDeleteDelete credit note.
CreditNoteCancelCancel credit note.
CreditNoteListGet list of credit notes for specified criteria
CreditNoteSendByEmailSends document by email to the recipient(s).
CreditNoteAttachmentAddAdd attachment to credit note.
CreditNoteAttachmentSetDefaultAdd attachment to credit note and set is as default.
CreditNoteAttachmentGetGet default attachment of credit note.
CreditNoteAttachmentListGet all attachments of credit note.

3.3.1 CreditNoteGet

Get credit note by document number, or by combination of document number and date.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2010-00002)
dateDocument date
costPositionCost position
businessUnitBusiness unit
vatBookVat book
documentIDInternal document identificator. In case of using this parameter, no other parameter listed abowe is needed for searching by document.

Example request and response

(For internal "XML" format)

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="CreditNoteGet">
       <parameter name="number" value="1/2013" />
       <parameter name="date" type="Date" value="2013-02-15" />
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
       <CreditNote>
               <businessYear>2010</businessYear>
               <buyerCode>123456</buyerCode>                   <!-- (Optional). If buyer code is specified, other buyer parameters bellow are not needed as the buyer data is taken from database. If any additional parameter is specified, it will override master buyer data in document
               <buyerCity>RADOVLJICA</buyerCity>
               <buyerCountry>SI</buyerCountry>
               <buyerName>5 FIVER d.o.o.</buyerName>
               <buyerPostalCode>4240</buyerPostalCode>
               <buyerStreet>ULICA 22</buyerStreet>
               <buyerTaxNumber>75882442</buyerTaxNumber>
               <buyerVatRegistration>None</buyerVatRegistration>
               <city>Beograd</city>
               <costPosition>1</costPosition>
               <cashRegisterCode>0001</cashRegisterCode>  <!-- This property must be set for fiscalization
               <businessUnit>0001</businessUnit>          <!-- This property must be set for fiscalization
               <methodOfPayment>bankTransfer</methodOfPayment>  <!-- This property must be set for fiscalization
               <orderReference>123</orderReference>                    <!-- (Optional)
               <date>2010-02-19</date>
               <dateOfSupplyFrom>2010-02-19</dateOfSupplyFrom>
               <paymentDueDate>2010-03-06</paymentDueDate>
               <invoicePricingType>retail</invoicePricingType>
               <number>2010-00002</number>             <!-- document number optional AUTO numbering
               <vatTransactionType>0</vatTransactionType>
               <vatOutgoingDocumentVatClause>Registered</vatOutgoingDocumentVatClause>
               <status>issuedInvoice</status>
               <totalAmount>90.000</totalAmount>
               <totalCurrency>EUR</totalCurrency>
               <totalDiscount>8.33</totalDiscount>
               <totalNetAmount>75.00</totalNetAmount>
               <totalVatAmountFlatRate>0.00</totalVatAmountFlatRate>
               <totalVatAmountNormalRate>0.00</totalVatAmountNormalRate>
               <totalVatAmountLowerRate>0.00</totalVatAmountLowerRate>
               <totalVatAmountZeroRate>0.0</totalVatAmountZeroRate>
               <totalVatBaseAmountFlatRate>0.00</totalVatBaseAmountFlatRate>
               <totalVatBaseAmountNormalRate>0.00</totalVatBaseAmountNormalRate>
               <totalVatBaseAmountLowerRate>0.00</totalVatBaseAmountLowerRate>
               <totalVatBaseAmountZeroRate>1.55</totalVatBaseAmountZeroRate>
               <reference>05 11290</reference>                         <!-- generated reference number
               <cancelledDocumentRef>2012-00015</cancelledDocumentRef> <-- Reference to cancelled document
               <eor>34facd65-622b-745d-a541-30ab1f9d3ac1</eor>  <!-- generated by FURS
               <zoi>a7e5f55e1dbb48b799268e1a6d8618a3</zoi>      <!-- generated when issuing document if it is for fiscalization    
               <fiscalNumber>1</fiscalNumber>                   <!-- fiscal sequential number for fiscal numbering of document
               <introductionText>introduction text</introductionText>  
               <vatCountryIsoCode>HR</vatCountryIsoCode>
               <Address>                        <!-- (Optional) Setting delivery address on document and partner buyer if it doesn't exists              
                       <city>Celje</city>
                       <country>SI</country>
                       <postalCode>3000</postalCode>
                       <street>Ulica 10</street>
                       <type>Delivery</type>
                       <firstAddressLine>Delivery address</firstAddressLine>
               </Address>
               <Items>
                       <Item>
                               <position>1</position>
                               <amount>75.00</amount>
                               <amountWithoutDiscount>83.33</amountWithoutDiscount>
                               <currency>EUR</currency>
                               <description>Prevoz robe</description>
                               <discountAmount>8.33</discountAmount>
                               <discountPercentage>10.0000</discountPercentage>
                               <netPrice>83.33333</netPrice>
                               <netPriceInDocumentCurrency>83.33333</netPriceInDocumentCurrency>
                               <quantity>1.000</quantity>
                               <price>100.00000</price>
                               <priceInDocumentCurrency>100.00000</priceInDocumentCurrency>
                               <vatAmount>15.00</vatAmount>
                               <vatPercentage>20.0</vatPercentage>
                               <vatTransactionType>0</vatTransactionType>
                               <costPosition>1</costPosition>
                       </Item>
               </Items>
       </CreditNote>
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="document could not be found"><error/>
</response>


3.3.2 CreditNoteGetPDF

Get PDF for credit note by document number, or by combination of document number and date. Response (on OK) returns binary record for PDF file coded with Base64 coding.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2010-00002)
dateDocument date
costPositionCost position
businessUnitBusiness unit
vatBookVat book
documentIDInternal document identificator. In case of using this parameter, no other parameter listed abowe is needed for searching by document.
markDocumentAsSentMarks document as sent.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="CreditNoteGetPDF">
       <parameter name="number" value="2" />
       <parameter name="date" type="Date" value="2010-02-22" />
          <parameter name="markDocumentAsSent" />
</method>
</request>


Response
<response status="ok">
       <number>2</number>
       <date>2010-02-22</date>
       <pdfFile>JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0ZpbHRlci9GbGF0ZURlY29kZT4+CnN0cmVhbQp4nJVYS4/bNh...</pdfFile>
</response>

Response (on error)
<response status="error">
       <error description="Can not find credit note for number: 2 and date: 2010-02-22">
       </error>
</response>


3.3.3 CreditNoteCreate

Create new credit note.

Document item can be specified with: productCode, quantity, discountPercentage, or can be specified with: description, currency, quantity, price (retail price including VAT for retail document) or netPrice (gross price without VAT for gross document). Default document type is gross. Additional optional item fields are: discountPercentage, unit, vatPercentage, vatTransactionType. Supported values for vatTransactionType are:
0 - Taxable domestic transactions of goods and services // Obdavčen promet blaga in storitev v Sloveniji
4 - Zero-rated transaction - supply of goods within the EU // Oproščen promet - dobava blaga znotraj EU
104 - Vat free transaction - supply of goods in EU by customs procedure 42 and 63 // Oproščen promet - dobava blaga znotraj EU po carinskih postopkih 42 in 63
6 - Zero-rated transaction - tripartite supplies of goods within the EU // Oproščen promet - tristranske dobave blaga znotraj EU
11 - Sales of services in the EU, VAT reverse charge // Oproščen promet - storitve v EU, od katerih plača DDV prejemnik
103 - Vat free transaction - supply of goods in EU by call-of-stock arrangement // Oproščen promet - dobava blaga znotraj EU po skladiščenju na odpoklic
1 - Zero-rated transaction - exports of commodity outside the EU // Oproščen promet - izvoz blaga izven EU
3 - Zero-rated transaction with the right to deduct input VAT // Oproščen promet - s pravico do odbitka vstopnega DDV
2 - Zero-rated transaction - without the right to deduct input VAT // Oproščen promet - brez pravice do odbitka vstopnega DDV
9 - Transactions exempt from VAT with the right of input VAT deduction (transactions outside SLO) // Neobdavčljiv promet s pravico do odbitka vstopnega DDV (prometi izven SLO)
7 - not subject to VAT // Neobdavčen promet - ne gre v DDV evidence
12 - Nontaxable suply - other taxes or duties other than VAT // Neobdavčen promet - ostali davki oziroma dajatve (razen DDV)
105 - Not subject to VAT – supply of goods outside EU // Neobdavčen promet - dobava blaga zunaj Unije (tretje države)
10 - Supply of goods and services in Slovenia, VAT reverse charged by the recipient // Dobava blaga in storitev v SLO, DDV obračuna prejemnik (76.a člen)
5 - Zero-rated transaction - assembly in the EU // Oproščen promet - montaža v EU (obračun tujega DDV)
8 - Distance selling in the EU surpassing annual sales threshold (foreign VAT) // Oproščen promet - prodaja blaga na daljavo (obračun tujega DDV)
101 - Special vat margin calculation for used goods // Posebna ureditev za rabljeno blago
102 - Special vat margin calculation for used goods - tax free // Posebna ureditev za rabljeno blago - oproščen promet
13 - Special vat margin calculation for travel agencies - price difference taxed // Obdavčen promet - posebni postopek obdavčitve razlike v ceni za potovalne agencije (98. člen)
14 - VAT exempt transactions for travel agencies // Oproščen promet za potovalne agencije (99. člen)
100 - Electronic services in other EU member countries (OSS) // Prodaja elektronskih storitev v drugih članicah EU (OSS)
106 - Distance sales of goods to EU consumers (OSS) // Prodaja blaga na daljavo končnim potrošnikom v EU (OSS)
107 - Supply of services to EU consumers (OSS) // Prodaja storitev končnim potrošnikom v EU (OSS)
108 - Distance sales of imported goods to EU consumers (IOSS) // Prodaja na daljavo iz tretjih držav uvoženega blaga končnim potrošnikom v EU (IOSS)
120 - Supply of services from EU to third country consumers (foreign VAT) // Izvoz storitev iz EU končnim potrošnikom v državi izven EU (obračun tujega DDV)
121 - Distance sales of goods to consumers outside EU (foreign VAT) // Prodaja blaga na daljavo končnim potrošnikom v državi izven EU (obračun tujega DDV)
Number of credit note which is created from this web service is automatically set if parameter status is set to "issuedInvoice".

Before using vat transaction types for OSS and IOSS, you must set up registration for OSS and IOSS in company settings under foreign VAT registrations.

Parameters

CreditNoteComplex parameter with data tags

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="CreditNoteCreate">
<parameter name="CreditNote">           
               <date>2010-01-13</date>                         <!-- document date
               <dateOfSupplyFrom>2010-02-19</dateOfSupplyFrom>
               <paymentDueDate>2010-03-06</paymentDueDate>             
               <city>Beograd</city>
               <customerContactPerson></customerContactPerson> <!-- (Optional)
               <type>Retail</type>                                     <!-- (Optional) Type of pricing - default is "Gross"
               <status>issuedInvoice</status>                           <!-- (Optional) Possible values: issuedInvoice, draft - default is issuedInvoice
               <isReccurringInvoice>false</isReccurringInvoice>
               <vatTransactionType>0</vatTransactionType>              <!-- (Optional) default is 0
               <vatOutgoingDocumentVatClause>Registered</vatOutgoingDocumentVatClause> <!-- (Optional and only for invoices with taBookingRef) Possible values: RegisteredTourismLawPart47, RegisteredTourismLawPart31, RegisteredTourismLawPart47And31
               <costPosition>120</costPosition>                        <!-- (Optional)
               <cashRegisterCode>0001</cashRegisterCode>                <!-- Mandatory for fiscalization
               <businessUnit>0001</businessUnit>                        <!-- Mandatory for fiscalization
               <deliveryMethod>Delivery method</deliveryMethod>        <!-- (Optional)
               <superDiscountPercentage>5</superDiscountPercentage> <!-- (Optional)
               <remarks>Remark on Sales invoice</remarks>              <!-- (Optional)
               <introductionText>introduction text</introductionText>   <!-- (Optional)
               <buyerCode>123456</buyerCode>                   <!-- (Optional). If it is specified buyer parameters bellow are not needed as the buyer data is taken from database. If any parameter bellow is sepcified it will override master buyer data in document
               <buyerDocumentID>60:123456</buyerDocumentID>                    <!-- (Optional). If it is specified buyer parameters bellow are not needed as the buyer data is taken from database. If any parameter bellow is sepcified it will override master buyer data in document
               <buyerName>Micka Kovac</buyerName>              
               <buyerTaxNumber>02169711</buyerTaxNumber>       <!-- (Optional)
               <buyerVatRegistration>None</buyerVatRegistration>       <!-- (Unkown, None, Registered)
               <buyerEMail>micka@kovac.com</buyerEMail>                <!-- (Optional)
               <buyerStreet>Iztokova 22</buyerStreet>                  <!-- (Optional)
               <buyerPostalCode>2000</buyerPostalCode>                 <!-- (Optional)
               <buyerCity>Maribor</buyerCity>                  <!-- (Optional)
               <buyerCountry>SI</buyerCountry>                         <!-- (Optional) ISO-2 country code
               <documentLanguage>Slovene</documentLanguage> <!-- (Optional) Possible document language: Slovene, English, German, Croatian, Italian, Hungarian, Czech, Slovak, Serbian, Polish and Bulgarian
               <printingTemplate>Predloga2</printingTemplate> <!-- (Optional) Setting printing template for document, posible values is code of uploaded templates in web app
               <salesInvoiceRef>2014-00001</salesInvoiceRef> <!-- (Optional) Setting reference to sales invoice
               <advanceInvoiceRef>2014-00001</advanceInvoiceRef> <!-- (Optional) Setting reference to advance invoice
               <taBookingRef>2014-00001</taBookingRef> <!-- (Optional) Setting reference to tourist agency booking
               <methodOfPayment>bankTransfer</methodOfPayment> <!-- Possible ways of payment: Unknown, BankTransfer, Cash, Cheques, EurocardMastercard, Visa, Karanta, Amex, Diners, Activa, BA, CashOnDelivery, Moneta, CreditCard, PayPal, DirectDebit, SetOff, Coupon, Compensation, GoCrypto
               <vatCountryIsoCode>HR</vatCountryIsoCode> <!-- Mandatory if using vatTransactionTypes: 100, 8 and 5 and it determines that VAT procentages for specified country has to be taken
               <Address>                        <!-- (Optional) Setting delivery address on document and partner buyer if it doesn't exists              
                       <city>Celje</city>
                       <country>SI</country>
                       <postalCode>3000</postalCode>
                       <street>Ulica 10</street>
                       <type>Delivery</type>
                       <firstAddressLine>Delivery address</firstAddressLine>
               </Address>
               <Items>
                       <Item>                                          <!-- item specified with ref to product
                               <position>1</position>      <!-- position of item
                               <productCode>020</productCode>          <!-- product code
                               <quantity>100</quantity>
                               <discountPercentage>10</discountPercentage>
                               <vatTransactionType>0</vatTransactionType> <!-- (Optional) default is 0. Foreign VAT transaction types (100, 8 and 5) can only be set on document level.
                               <costPosition>1</costPosition>
                       </Item>
                       <Item>                                          <!-- Item specified for good or service
                               <position>2</position>      <!-- position of item
                               <description>Transport of goods</description>
                               <price>11.00</price>      <!-- price (retail price including VAT for retail document) or netPrice (gross price without VAT for gross document). Default document type is "gross" so use <netPrice> tag in this case or <price> tag in case of document type "retail"
                               <discountPercentage>2</discountPercentage>      <!-- (Optional)
                               <vatPercentage>10</vatPercentage>               <!-- (Optional)
                               <currency>EUR</currency>                        <!-- (Optional)
                               <quantity>10</quantity>                         <!-- (Optional) default 0
                               <unit>km</unit>                         <!-- (Optional)
                               <vatTransactionType>0</vatTransactionType>      <!-- (Optional) default is 0. Foreign VAT transaction types (100, 8 and 5) can only be set on document level.
                               <costPosition>1</costPosition>
                       </Item>
                       ...
               </Items>
       </parameter>
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328
<?xml version="1.0" encoding="utf-8"?>
response status="ok" >
       <number>2/2013</number>         <!-- created document ID or number
       <date>2013-01-13</date>                 <!-- date of document
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- missing mandatory attributes, invalid values, no privileges,  
</response>


3.3.4 CreditNoteImport

Import Credit note issued in other IS. Parameter 'importType' can be used to specify type of import. If parameter is not specified, "createOrUpdate" is used as default. For updating Credit notes with this api call, Credit notes's data must contain code as unique identifier.

Parameters

importTypeFlag for the type of import
CreditNoteSales invoice data in xml substructure.
dataFormatIn case some other data format is used for import, this parameter should be used. Possible values are defaul data format "eracuniXML" and "ESLOG". If this parameter is not included in XML, import from default data format is used.
base64dataThis parameter is mandatory in case using dataFormat "ESLOG". Content of this parameter should be eSlog XML encoded into base64 string.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="CreditNoteImport">
               <parameter name="importType" value="createOrUpdate" />
               <parameter name="CreditNote">
                    <!-- structure of elements is the same as in CreditNoteCreate only tag <number> is mandatory here
                <parameter/>
       </method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <number>0001-1206-2014</number>
       <date>2013-06-12</date>
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
        <error description="Property <number> is required."><error/>  <!-- missing number  
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
                <error description="Credit note for number: 0001-1206-2013 already exists!"></error>  <!-- Credit note for number already exists  
</response>

(Using ESLOG data format)

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="CreditNoteImport">
               <parameter name="importType" value="createOrUpdate" />
               <parameter name="dataFormat" value="ESLOG" />
               <parameter name="base64data">JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0ZpbHRlci9GbGF0ZURlY29kZT4+Cn...
                    <!-- eSlog XML encoded into base64 string
                <parameter/>
       </method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <number>0001-1206-2014</number>
       <date>2021-06-12</date>
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
                <error description="Parameter <base64data>: cannot parse contents"></error>  <!-- Error when decoding XML from base64 string  
</response>

<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
                <error description="Error parsing XML file due to invalid syntax"></error>  <!-- Error when parsing XML
</response>

<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
                <error description="Document can not be overwritten because it is already posted."></error>  <!-- There are several different error messages possible.
</response>


3.3.5 CreditNoteUpdate

Update existing credit note.Data must contain credit note number to be able to identify document which is to be updated.

Parameters

CreditNoteComplex parameter with data tags

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="CreditNoteUpdate">
<parameter name="CreditNote">
         <number>12</number>                                    <!-- document number is mandatory in UPDATE (Can use sequential document number (example: 12), or formatted number (example: 12/2011))
               <!--  Parameters are identical to the parameters in SalesInvoiceCreate api
       </parameter>
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328
<?xml version="1.0" encoding="utf-8"?>
response status="ok" >
       <number>2/2013</number>         <!-- updated document ID or number
       <date>2013-01-13</date>                 <!-- date of document
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- missing mandatory attributes, invalid values, no privileges,  
</response>


3.3.6 CreditNoteDelete

Delete credit note. Must specify parameter/s (number, number+date) to identify document for deleting. It is possible to delete only last credit note.

Parameters

numberDocument number
dateDocument date
costPositionCost position
businessUnitBusiness unit
vatBookVat book

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="CreditNoteDelete">
       <parameter name="number" value="12/2009" />
       <parameter name="date" type="Date" value="2016-01-13" />
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2016 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="no privileges"><error/>     <!-- document could not be found, no privileges,  
</response>



3.3.7 CreditNoteCancel

Cancel credit note. Must specify parameter/s (number, number+date) to identify document for cancelling.

Parameters

numberDocument number
dateDocument date
costPositionCost position
businessUnitBusiness unit
vatBookVat book
statusStatus of cancelation document (draft, issuedInvoice). By Default status is issuedInvoice.
cancellationDocNumberNumber of cancellation document (mandatory and works only for imported documents).

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="CreditNoteCancel">
       <parameter name="number" value="2013-00014" />
       <parameter name="cancellationDocNumber" value="2013-00014" />  <!-- Works only when canceling imported documents where this number is mandatory
       <parameter name="date" type="Date" value="2013-03-26" />
       <parameter name="status" value="draft" />
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Access denied. User account does not have sufficient privileges for the given request"><error/>     <!-- document could not be found, no privileges,  
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Can not cancel credit note for arguments number: 2013-00014 date: 2013-03-26"><error/>      <!-- document could not be canceled,  
</response>

Possible error messages:
Access denied. User account does not have sufficient privileges for the given request
Parameter named "number" is required
Can not find credit note for number
Can not cancel. Found X credit notes
Found X credit notes X. You can only cancel one credit note at a time
Can not cancel credit note X



3.3.8 CreditNoteList

Get list of credit notes for criteria which is specified by API parameters. Mixing different types of dates in search criteria is not supported - date parameters can be combined only as follows: dateFrom/dateTo, paymentDueDateFrom/paymentDueDateTo or dateOfSupplyFrom/dateOfSupplyUntil.

Parameters

numberDocument number
dateFromThe date which is used to select credit notes whose date is following it
dateToThe date which is used to select credit notes whose date is preceding it
paymentDueDateFromThe date which is used to select credit notes whose payment due date is following it
paymentDueDateToThe date which is used to select credit notes whose payment due date is preceding it
dateOfSupplyFromThe date which is used to select credit notes whose date of supply/performance is following it
dateOfSupplyUntilThe date which is used to select credit notes whose date of supply/performance is preceding it
deliveryAddressDelivery address of the buyer
buyerBuyer code, or buyer name
costPositionCost position code
totalAmountTotal amount of the credit notes
totalCurrencyCurrency used in credit note
articleProduct code, or product name
statusPossible values: Draft, IssuedInvoice, NotBooked, Booked, CanceledCreditInvoice, OpenedClaim, ClosedClaim, OpenedDueClaim, DocumentSentAlready, DocumentNotYetSent, DocumentSentByEMail, DocumentNotSentByEMail, WithInvoiceReference, WithoutInvoiceReference, CancellationDocument, CancelledDocument, AccountingEntryOrImportedInvoice, DocumentNotSentOrPrinted, NotCancellationOrCancelledDocument, VatReportDone, VatReportOpen
issuerIssuer of document, search is done by username

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="CreditNoteList">
               <parameter name="status" value="issuedInvoice" />
               <parameter name="dateFrom" type="Date" value="2010-02-19" />
       </method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
<CreditNotes>                   
       <CreditNote>
                <!-- structure of elements is the same as in CreditNoteGet
       </CreditNote>
       ...
</CreditNotes>
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- no privileges,  
</response>


3.3.9 CreditNoteSendByEmail

Sends document by email to the recipient(s).

Parameters

numberDocument number
dateDocument date (optional additional document identification)
senderEmail sender (Optional)
recipientComma delimited list of recipient(s) emails
ccCC email (Optional)
bccBCC email (Optional)
subjectMail subject (Optional)
messageMessage text (Optional)
useHtmlMessageSend message text as HTML (Optional)

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="CreditNoteSendByEmail">
       <parameter name="number" value="12/2009" />
       <parameter name="date" type="Date" value="2010-01-13" />
       <parameter name="sender" value="micka@kovac.com"/>
       <parameter name="recipient" value="zoran@kovac.com,zlatko@kovac.com"/>
       <parameter name="cc" value=""/>
       <parameter name="bcc" value=""/>
       <parameter name="subject" value="TEST d.o.o.: Sales invoice nr. 0002/2010"/>
       <parameter name="message" value="Message text"/>
        <parameter name="useHtmlMessage" value="true"/>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="no privileges"><error/>     <!-- document could not be found, no privileges, mail sending failed
</response>


3.3.10 CreditNoteAttachmentAdd

Add image/attachment to credit note.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="CreditNoteAttachmentAdd">
       <parameter name="number" type="String" value="2020-00001" />
       <parameter name="attachment">
               <contents encoding="BASE64">BASE64...</contents>
               <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added attachment att.jpg to credit note 2020-00001.</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find credit note for number: 2020-00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>


3.3.11 CreditNoteAttachmentSetDefault

Add attachment to credit note and set is as default.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="CreditNoteAttachmentSetDefault">
       <parameter name="number" type="String" value="2020-00001" />
       <parameter name="attachment">
               <contents encoding="BASE64">BASE64...</contents>
               <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added attachment att.jpg to credit note 2020-00001.</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find credit note for number: 2020-00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>


3.3.12 CreditNoteAttachmentGet

Get default attachment of credit note.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="CreditNoteAttachmentGet">
       <parameter name="number" type="String" value="2020-00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <CreditNote>
               <Attachments>
                       <Attachment>
                               <fileName>att.jpg</fileName>
                               <contents encoding="BASE64">BASE64</contents>
                       </Attachment>
               </Attachments>
       </CreditNote>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find credit note for number: 2020-00001 Credit note does not have attachemnts.
</response>


3.3.13 CreditNoteAttachmentList

Get all images/attachments of article.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="CreditNoteAttachmentList">
       <parameter name="number" type="String" value="2020-00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <CreditNote>
               <Attachments>
                       <Attachment>
                               <fileName>att1.jpg</fileName>
                               <contents encoding="BASE64">1BASE64</contents>
                       </Attachment>
                       <Attachment>
                               <fileName>att2.jpg</fileName>
                               <contents encoding="BASE64">2BASE64</contents>
                       </Attachment>
                       <Attachment>
                               <fileName>att3.jpg</fileName>
                               <contents encoding="BASE64">3BASE64</contents>
                       </Attachment>
               </Attachments>
       </CreditNote>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find credit note for number: 2020-00001 Credit note does not have attachemnts.
</response>

 

3.4. DebitNote API

DebitNoteGetGet debit note by document number, or by combination of document number and date.
DebitNoteGetPDFGet PDF file for debit note by document number, or by combination of document number and date.
DebitNoteCreateCreate new debit note.
DebitNoteImportImport debit note issued in other IS.
DebitNoteUpdateUpdate existing debit note.
DebitNoteDeleteDelete debit note.
DebitNoteCancelCancel debit note.
DebitNoteListGet list of debit notes for specified criteria
DebitNoteSendByEmailSends document by email to the recipient(s).
DebitNoteAttachmentAddAdd attachment to debit note.
DebitNoteAttachmentSetDefaultAdd attachment to debit note and set is as default.
DebitNoteAttachmentGetGet default attachment of debit note.
DebitNoteAttachmentListGet all attachments of debit note.

3.4.1 DebitNoteGet

Get debit note by document number, or by combination of document number and date.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2010-00002)
dateDocument date
costPositionCost position
businessUnitBusiness unit
vatBookVat book
documentIDInternal document identificator. In case of using this parameter, no other parameter listed abowe is needed for searching by document.

Example request and response

(For internal "XML" format)

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="DebitNoteGet">
       <parameter name="number" value="1/2013" />
       <parameter name="date" type="Date" value="2013-02-15" />
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
       <DebitNote>
               <businessYear>2010</businessYear>
               <buyerCode>123456</buyerCode>                   <!-- (Optional). If buyer code is specified, other buyer parameters bellow are not needed as the buyer data is taken from database. If any additional parameter is specified, it will override master buyer data in document
               <buyerCity>RADOVLJICA</buyerCity>
               <buyerCountry>SI</buyerCountry>
               <buyerName>5 FIVER d.o.o.</buyerName>
               <buyerPostalCode>4240</buyerPostalCode>
               <buyerStreet>ULICA 22</buyerStreet>
               <buyerTaxNumber>75882442</buyerTaxNumber>
               <buyerVatRegistration>None</buyerVatRegistration>
               <city>Beograd</city>
               <costPosition>1</costPosition>
               <cashRegisterCode>0001</cashRegisterCode>  <!-- This property must be set for fiscalization
               <businessUnit>0001</businessUnit>          <!-- This property must be set for fiscalization
               <orderReference>123</orderReference>                    <!-- (Optional)
               <date>2010-02-19</date>
               <dateOfSupplyFrom>2010-02-19</dateOfSupplyFrom>
               <paymentDueDate>2010-03-06</paymentDueDate>
               <invoicePricingType>retail</invoicePricingType>
               <number>2010-00002</number>             <!-- document number optional AUTO numbering
               <vatTransactionType>0</vatTransactionType>
               <vatOutgoingDocumentVatClause>Registered</vatOutgoingDocumentVatClause>
               <status>issuedInvoice</status>
               <totalAmount>90.000</totalAmount>
               <totalCurrency>EUR</totalCurrency>
               <totalDiscount>8.33</totalDiscount>
               <totalNetAmount>75.00</totalNetAmount>
               <totalVatAmountFlatRate>0.00</totalVatAmountFlatRate>
               <totalVatAmountNormalRate>0.00</totalVatAmountNormalRate>
               <totalVatAmountLowerRate>0.00</totalVatAmountLowerRate>
               <totalVatAmountZeroRate>0.0</totalVatAmountZeroRate>
               <totalVatBaseAmountFlatRate>0.00</totalVatBaseAmountFlatRate>
               <totalVatBaseAmountNormalRate>0.00</totalVatBaseAmountNormalRate>
               <totalVatBaseAmountLowerRate>0.00</totalVatBaseAmountLowerRate>
               <totalVatBaseAmountZeroRate>1.55</totalVatBaseAmountZeroRate>
               <reference>05 11290</reference>                         <!-- generated reference number
               <cancelledDocumentRef>2012-00015</cancelledDocumentRef> <-- Reference to cancelled document
               <eor>34facd65-622b-745d-a541-30ab1f9d3ac1</eor>  <!-- generated by FURS
               <zoi>a7e5f55e1dbb48b799268e1a6d8618a3</zoi>      <!-- generated when issuing document if it is for fiscalization    
               <fiscalNumber>1</fiscalNumber>                   <!-- fiscal sequential number for fiscal numbering of document
               <introductionText>introduction text</introductionText>   
               <vatCountryIsoCode>HR</vatCountryIsoCode>
               <Address>                        <!-- (Optional) Setting delivery address on document and partner buyer if it doesn't exists              
                       <city>Celje</city>
                       <country>SI</country>
                       <postalCode>3000</postalCode>
                       <street>Ulica 10</street>
                       <type>Delivery</type>
                       <firstAddressLine>Delivery address</firstAddressLine>
               </Address>
               <Items>
                       <Item>
                               <position>1</position>
                               <amount>75.00</amount>
                               <amountWithoutDiscount>83.33</amountWithoutDiscount>
                               <currency>EUR</currency>
                               <description>Prevoz robe</description>
                               <discountAmount>8.33</discountAmount>
                               <discountPercentage>10.0000</discountPercentage>
                               <netPrice>83.33333</netPrice>
                               <netPriceInDocumentCurrency>83.33333</netPriceInDocumentCurrency>
                               <quantity>1.000</quantity>
                               <price>100.00000</price>
                               <priceInDocumentCurrency>100.00000</priceInDocumentCurrency>
                               <vatAmount>15.00</vatAmount>
                               <vatPercentage>20.0</vatPercentage>
                               <vatTransactionType>0</vatTransactionType>
                               <costPosition>1</costPosition>
                       </Item>
               </Items>
       </DebitNote>
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="document could not be found"><error/>
</response>


3.4.2 DebitNoteGetPDF

Get PDF for debit note by document number, or by combination of document number and date. Response (on OK) returns binary record for PDF file coded with Base64 coding.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2010-00002)
dateDocument date
costPositionCost position
businessUnitBusiness unit
vatBookVat book
documentIDInternal document identificator. In case of using this parameter, no other parameter listed abowe is needed for searching by document.
markDocumentAsSentMarks document as sent.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="DebitNoteGetPDF">
       <parameter name="number" value="2" />
       <parameter name="date" type="Date" value="2010-02-22" />
          <parameter name="markDocumentAsSent" />
</method>
</request>


Response
<response status="ok">
       <number>2</number>
       <date>2010-02-22</date>
       <pdfFile>JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0ZpbHRlci9GbGF0ZURlY29kZT4+CnN0cmVhbQp4nJVYS4/bNh...</pdfFile>
</response>

Response (on error)
<response status="error">
       <error description="Can not find debit note for number: 2 and date: 2010-02-22">
       </error>
</response>


3.4.3 DebitNoteCreate

Create new debit note.

Document item can be specified with: productCode, quantity, discountPercentage, or can be specified with: description, currency, quantity, price (retail price including VAT for retail document) or netPrice (gross price without VAT for gross document). Default document type is gross. Additional optional item fields are: discountPercentage, unit, vatPercentage, vatTransactionType. Supported values for vatTransactionType are:
0 - Taxable transactions of goods and services in Slovenia //Obdavčen promet blaga in storitev v Sloveniji
1 - Zero-rated transaction - exports of goods outside the EU //Oproščen promet - izvoz blaga izven EU
2 - Zero-rated transaction - without the right to deduct input VAT //Oproščen promet - brez pravice do odbitka vstopnega DDV
3 - Zero-rated transaction - with the right to deduct input VAT //Oproščen promet - s pravico do odbitka vstopnega DDV
4 - Zero-rated transaction - supply of goods within the EU //Oproščen promet - dobava blaga znotraj EU
5 - Zero-rated transaction - assembly in the EU //Oproščen promet - montaža v EU (obračun tujega DDV)
6 - Zero-rated transaction - tripartite supplies of goods within the EU //Oproščen promet - tristranske dobave blaga znotraj EU
7 - Transactions exempt from VAT - not for VAT records //Neobdavčen promet - ne gre v DDV evidence
8 - Zero-rated transaction - remote sales of goods //Oproščen promet - prodaja blaga na daljavo (obračun tujega DDV)
9 - Transactions exempt from VAT with the right of input VAT deduction (transactions outside SLO) //Neobdavčljiv promet s pravico do odbitka vstopnega DDV (prometi izven SLO)
10- Supply of goods and services in SLO, VAT charged by the recipient //Dobava blaga in storitev v SLO, DDV obračuna prejemnik (76.a člen)
11- Sales of services in the EU, VAT paid by the recipient //Oproščen promet - storitve v EU, od katerih plača DDV prejemnik
100- Sales of electronic services taxed in other EU country //
101- Special vat margin calculation for used goods//Posebna ureditev za rabljeno blago
102- Special vat margin calculation for used goods - tax free //Posebna ureditev za rabljeno blago - oproščen promet
103- Vat free transaction - supply of goods in EU by call-of-stock arrangement //Oproščen promet - dobava blaga znotraj EU po skladiščenju na odpoklic
104- Vat free transaction - supply of goods in EU by customs procedure 42 and 63 //Oproščen promet - dobava blaga znotraj EU po carinskih postopkih 42 in 63
105- Not subject to VAT – supply of goods outside EU //Neobdavčen promet - dobava blaga zunaj Unije (tretje države)
106- Distance sales of goods to EU consumers (OSS) //Prodaja blaga na daljavo končnim potrošnikom v EU (OSS)
107- Supply of services to EU consumers (OSS) //Prodaja storitev končnim potrošnikom v EU (OSS)
109- Distance sales of goods to domestic consumers (OSS) //Prodaja blaga na daljavo končnim potrošnikom v SLO (OSS)
108- Distance sales of imported goods to EU consumers (IOSS) //Prodaja na daljavo iz tretjih držav uvoženega blaga končnim potrošnikom v EU (IOSS)
110- Distance sales of imported goods to domestic consumers (IOSS)//Prodaja na daljavo iz tretjih držav uvoženega blaga končnim potrošnikom v SLO (IOSS)
120- Supply of services from EU to third country consumers (foreign VAT) //Izvoz storitev iz EU končnim potrošnikom v državi izven EU (obračun tujega DDV)
Number of debit note which is created from this web service is automatically set if parameter status is set to "issuedInvoice".

Before using vat transaction types for OSS and IOSS, you must set up registration for OSS and IOSS in company settings under foreign VAT registrations.

Parameters

DebitNoteComplex parameter with data tags

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="DebitNoteCreate">
<parameter name="DebitNote">            
               <date>2010-01-13</date>                         <!-- document date
               <dateOfSupplyFrom>2010-02-19</dateOfSupplyFrom>
               <paymentDueDate>2010-03-06</paymentDueDate>             
               <city>Beograd</city>
               <customerContactPerson></customerContactPerson> <!-- (Optional)
               <type>Retail</type>                                     <!-- (Optional) Type of pricing - default is "Gross"
               <status>issuedInvoice</status>                           <!-- (Optional) Possible values: issuedInvoice, draft - default is issuedInvoice
               <isReccurringInvoice>false</isReccurringInvoice>
               <vatTransactionType>0</vatTransactionType>              <!-- (Optional) default is 0
               <vatOutgoingDocumentVatClause>Registered</vatOutgoingDocumentVatClause> <!-- (Optional) Possible values: Registered, NotRegistered, RegisteredTourismLawPart47, RegisteredTourismLawPart31, RegisteredTourismLawPart47And31
               <costPosition>120</costPosition>                        <!-- (Optional)
               <cashRegisterCode>0001</cashRegisterCode>                <!-- Mandatory for fiscalization
               <businessUnit>0001</businessUnit>                        <!-- Mandatory for fiscalization
               <deliveryMethod>Delivery method</deliveryMethod>        <!-- (Optional)
               <superDiscountPercentage>5</superDiscountPercentage> <!-- (Optional)
               <remarks>Remark on Sales invoice</remarks>              <!-- (Optional)
               <introductionText>introduction text</introductionText>   <!-- (Optional)
               <buyerCode>123456</buyerCode>                   <!-- (Optional). If it is specified buyer parameters bellow are not needed as the buyer data is taken from database. If any parameter bellow is sepcified it will override master buyer data in document
               <buyerDocumentID>60:123456</buyerDocumentID>                    <!-- (Optional). If it is specified buyer parameters bellow are not needed as the buyer data is taken from database. If any parameter bellow is sepcified it will override master buyer data in document
               <buyerName>Micka Kovac</buyerName>              
               <buyerTaxNumber>02169711</buyerTaxNumber>       <!-- (Optional)
               <buyerVatRegistration>None</buyerVatRegistration>       <!-- (Unkown, None, Registered)
               <buyerEMail>micka@kovac.com</buyerEMail>                <!-- (Optional)
               <buyerStreet>Iztokova 22</buyerStreet>                  <!-- (Optional)
               <buyerPostalCode>2000</buyerPostalCode>                 <!-- (Optional)
               <buyerCity>Maribor</buyerCity>                  <!-- (Optional)
               <buyerCountry>SI</buyerCountry>                         <!-- (Optional) ISO-2 country code
               <documentLanguage>Slovene</documentLanguage> <!-- (Optional) Possible document language: Slovene, English, German, Croatian, Italian, Hungarian, Czech, Slovak, Serbian, Polish and Bulgarian
               <printingTemplate>Predloga2</printingTemplate> <!-- (Optional) Setting printing template for document, posible values is code of uploaded templates in web app
               <salesInvoiceRef>2014-00001</salesInvoiceRef> <!-- (Optional) Setting reference to sales invoice
               <vatCountryIsoCode>HR</vatCountryIsoCode> <!-- Mandatory if using vatTransactionTypes: 100, 8 and 5 and it determines that VAT procentages for specified country has to be taken
               <Address>                        <!-- (Optional) Setting delivery address on document and partner buyer if it doesn't exists              
                       <city>Celje</city>
                       <country>SI</country>
                       <postalCode>3000</postalCode>
                       <street>Ulica 10</street>
                       <type>Delivery</type>
                       <firstAddressLine>Delivery address</firstAddressLine>
               </Address>
               <Items>
                       <Item>                                          <!-- item specified with ref to product
                               <position>1</position>      <!-- position of item
                               <productCode>020</productCode>          <!-- product code
                               <quantity>100</quantity>
                               <discountPercentage>10</discountPercentage>
                               <vatTransactionType>0</vatTransactionType> <!-- (Optional) default is 0. Foreign VAT transaction types (100, 8 and 5) can only be set on document level.
                               <costPosition>1</costPosition>
                       </Item>
                       <Item>                                          <!-- Item specified for good or service
                               <position>2</position>      <!-- position of item
                               <description>Transport of goods</description>
                               <price>11.00</price>      <!-- price (retail price including VAT for retail document) or netPrice (gross price without VAT for gross document). Default document type is "gross" so use <netPrice> tag in this case or <price> tag in case of document type "retail"
                               <discountPercentage>2</discountPercentage>      <!-- (Optional)
                               <vatPercentage>10</vatPercentage>               <!-- (Optional)
                               <currency>EUR</currency>                        <!-- (Optional)
                               <quantity>10</quantity>                         <!-- (Optional) default 0
                               <unit>km</unit>                         <!-- (Optional)
                               <vatTransactionType>0</vatTransactionType>      <!-- (Optional) default is 0. Foreign VAT transaction types (100, 8 and 5) can only be set on document level.
                               <costPosition>1</costPosition>
                       </Item>
                       ...
               </Items>
       </parameter>
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328
<?xml version="1.0" encoding="utf-8"?>
response status="ok" >
       <number>2/2013</number>         <!-- created document ID or number
       <date>2013-01-13</date>                 <!-- date of document
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- missing mandatory attributes, invalid values, no privileges,  
</response>


3.4.4 DebitNoteImport

Import Debit note issued in other IS. Parameter 'importType' can be used to specify type of import. If parameter is not specified, "createOrUpdate" is used as default. For updating Debit notes with this api call, Debit notes's data must contain code as unique identifier.

Parameters

importTypeFlag for the type of import
DebitNoteSales invoice data in xml substructure.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="DebitNoteImport">
               <parameter name="importType" value="createOrUpdate" />
               <parameter name="DebitNote">
                    <!-- structure of elements is the same as in DebitNoteCreate only tag <number> is mandatory here
                <parameter/>
       </method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <number>0001-1206-2014</number>
       <date>2013-06-12</date>
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
        <error description="Property <number> is required."><error/>  <!-- missing number  
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
                <error description="Debit note for number: 0001-1206-2013 already exists!"></error>  <!-- Debit note for number already exists  
</response>


3.4.5 DebitNoteUpdate

Update existing debit note.Data must contain debit note number to be able to identify document which is to be updated.

Parameters

DebitNoteComplex parameter with data tags

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="DebitNoteUpdate">
<parameter name="DebitNote">
         <number>12</number>                                    <!-- document number is mandatory in UPDATE (Can use sequential document number (example: 12), or formatted number (example: 12/2011))
               <!--  Parameters are identical to the parameters in SalesInvoiceCreate api
       </parameter>
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328
<?xml version="1.0" encoding="utf-8"?>
response status="ok" >
       <number>2/2013</number>         <!-- updated document ID or number
       <date>2013-01-13</date>                 <!-- date of document
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- missing mandatory attributes, invalid values, no privileges,  
</response>


3.4.6 DebitNoteDelete

Delete debit note. Must specify parameter/s (number, number+date) to identify document for deleting. It is possible to delete only last debit note.

Parameters

numberDocument number
dateDocument date
costPositionCost position
businessUnitBusiness unit
vatBookVat book

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="DebitNoteDelete">
       <parameter name="number" value="12/2009" />
       <parameter name="date" type="Date" value="2016-01-13" />
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2016 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="no privileges"><error/>     <!-- document could not be found, no privileges,  
</response>



3.4.7 DebitNoteCancel

Cancel debit note. Must specify parameter/s (number, number+date) to identify document for cancelling.

Parameters

numberDocument number
dateDocument date
costPositionCost position
businessUnitBusiness unit
vatBookVat book
statusStatus of cancelation document (draft, issuedInvoice). By Default status is issuedInvoice.
cancellationDocNumberNumber of cancellation document (mandatory and works only for imported documents).

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="DebitNoteCancel">
       <parameter name="number" value="2013-00014" />
       <parameter name="cancellationDocNumber" value="2013-00014" />  <!-- Works only when canceling imported documents where this number is mandatory
       <parameter name="date" type="Date" value="2013-03-26" />
       <parameter name="status" value="draft" />
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Access denied. User account does not have sufficient privileges for the given request"><error/>     <!-- document could not be found, no privileges,  
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Can not cancel debit note for arguments number: 2013-00014 date: 2013-03-26"><error/>       <!-- document could not be canceled,  
</response>

Possible error messages:
Access denied. User account does not have sufficient privileges for the given request
Parameter named "number" is required
Can not find debit note for number
Can not cancel. Found X debit notes
Found X debit notes X. You can only cancel one debit note at a time
Can not cancel debit note X



3.4.8 DebitNoteList

Get list of debit notes for criteria which is specified by API parameters. Mixing different types of dates in search criteria is not supported - date parameters can be combined only as follows: dateFrom/dateTo, paymentDueDateFrom/paymentDueDateTo or dateOfSupplyFrom/dateOfSupplyUntil.

Parameters

numberDocument number
dateFromThe date which is used to select debit notes whose date is following it
dateToThe date which is used to select debit notes whose date is preceding it
paymentDueDateFromThe date which is used to select debit notes whose payment due date is following it
paymentDueDateToThe date which is used to select debit notes whose payment due date is preceding it
dateOfSupplyFromThe date which is used to select debit notes whose date of supply/performance is following it
dateOfSupplyUntilThe date which is used to select debit notes whose date of supply/performance is preceding it
deliveryAddressDelivery address of the buyer
buyerBuyer code, or buyer name
costPositionCost position code
totalAmountTotal amount of the debit notes
totalCurrencyCurrency used in debit note
articleProduct code, or product name
statusPossible values: Draft, IssuedInvoice, NotBooked, Booked, CanceledCreditInvoice, OpenedClaim, ClosedClaim, OpenedDueClaim, DocumentSentAlready, DocumentNotYetSent, DocumentSentByEMail, DocumentNotSentByEMail, CancellationDocument, CancelledDocument, AccountingEntryOrImportedInvoice, DocumentNotSentOrPrinted, NotCancellationOrCancelledDocument, VatReportDone, VatReportOpen
issuerIssuer of document, search is done by username

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="DebitNoteList">
               <parameter name="status" value="issuedInvoice" />
               <parameter name="dateFrom" type="Date" value="2010-02-19" />
       </method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
<DebitNotes>                    
       <DebitNote>
                <!-- structure of elements is the same as in DebitNoteGet
       </DebitNote>
       ...
</DebitNotes>
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- no privileges,  
</response>


3.4.9 DebitNoteSendByEmail

Sends document by email to the recipient(s).

Parameters

numberDocument number
dateDocument date (optional additional document identification)
senderEmail sender (Optional)
recipientComma delimited list of recipient(s) emails
ccCC email (Optional)
bccBCC email (Optional)
subjectMail subject (Optional)
messageMessage text (Optional)
useHtmlMessageSend message text as HTML (Optional)

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="DebitNoteSendByEmail">
       <parameter name="number" value="12/2009" />
       <parameter name="date" type="Date" value="2010-01-13" />
       <parameter name="sender" value="micka@kovac.com"/>
       <parameter name="recipient" value="zoran@kovac.com,zlatko@kovac.com"/>
       <parameter name="cc" value=""/>
       <parameter name="bcc" value=""/>
       <parameter name="subject" value="TEST d.o.o.: Sales invoice nr. 0002/2010"/>
       <parameter name="message" value="Message text"/>
        <parameter name="useHtmlMessage" value="true"/>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="no privileges"><error/>     <!-- document could not be found, no privileges, mail sending failed
</response>


3.4.10 DebitNoteAttachmentAdd

Add image/attachment to debit note.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="DebitNoteAttachmentAdd">
       <parameter name="number" type="String" value="2020-00001" />
       <parameter name="attachment">
               <contents encoding="BASE64">BASE64...</contents>
               <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added attachment att.jpg to debit note 2020-00001.</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find debit note for number: 2020-00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>


3.4.11 DebitNoteAttachmentSetDefault

Add attachment to debit note and set is as default.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="DebitNoteAttachmentSetDefault">
       <parameter name="number" type="String" value="2020-00001" />
       <parameter name="attachment">
               <contents encoding="BASE64">BASE64...</contents>
               <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added attachment att.jpg to debit note 2020-00001.</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find debit note for number: 2020-00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>


3.4.12 DebitNoteAttachmentGet

Get default attachment of debit note.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="DebitNoteAttachmentGet">
       <parameter name="number" type="String" value="2020-00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <DebitNote>
               <Attachments>
                       <Attachment>
                               <fileName>att.jpg</fileName>
                               <contents encoding="BASE64">BASE64</contents>
                       </Attachment>
               </Attachments>
       </DebitNote>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find debit note for number: 2020-00001 Debit note does not have attachemnts.
</response>


3.4.13 DebitNoteAttachmentList

Get all images/attachments of article.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="DebitNoteAttachmentList">
       <parameter name="number" type="String" value="2020-00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <DebitNote>
               <Attachments>
                       <Attachment>
                               <fileName>att1.jpg</fileName>
                               <contents encoding="BASE64">1BASE64</contents>
                       </Attachment>
                       <Attachment>
                               <fileName>att2.jpg</fileName>
                               <contents encoding="BASE64">2BASE64</contents>
                       </Attachment>
                       <Attachment>
                               <fileName>att3.jpg</fileName>
                               <contents encoding="BASE64">3BASE64</contents>
                       </Attachment>
               </Attachments>
       </DebitNote>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find debit note for number: 2020-00001 Debit note does not have attachemnts.
</response>

 

3.5. DeliveryNote API

DeliveryNoteGetGet delivery notes by document number, or by combination of document number and date.
DeliveryNoteGetPDFGet PDF for delivery note by document number, or by combination of document number and date.
DeliveryNoteCreateCreate new delivery note.
DeliveryNoteUpdateUpdate existing delivery note.
DeliveryNoteDeleteDelete delivery note.
DeliveryNoteCancelCancel delivery note.
DeliveryNoteListGet list of delivery notes for specified criteria
DeliveryNoteSendByEmailSends document by email to the recipient(s).
DeliveryNoteAttachmentAddAdd attachment to delivery note.
DeliveryNoteAttachmentSetDefaultAdd attachment to delivery note and set is as default.
DeliveryNoteAttachmentGetGet default attachment of delivery note.
DeliveryNoteAttachmentListGet all attachments of delivery note.

3.5.1 DeliveryNoteGet

Get delivery note by document number, or by combination of document number and date.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2010-00002)
dateDocument date
costPositionCost position
warehouseWarehouse code
documentIDInternal document identificator. In case of using this parameter, no other parameter listed abowe is needed for searching by document.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="DeliveryNoteGet">
       <parameter name="number" value="2012-00014" />
       <parameter name="date" type="Date" value="2012-09-26" />
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 November 2012 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
               <DeliveryNote>
               <businessUnit>0001</businessUnit>
               <businessYear>2014</businessYear>
               <buyerCity>Pivka</buyerCity>
               <buyerCode>123456</buyerCode>                   <!-- (Optional). If buyer code is specified, other buyer parameters bellow are not needed as the buyer data is taken from database. If any additional parameter is specified, it will override master buyer data in document
               <buyerCountry>SI</buyerCountry>
               <buyerEMail>marjanbajc@hotmail.com</buyerEMail>
               <buyerName>RRA Notranjsko-kra ke regije, d.o.o.</buyerName>
               <buyerPostalCode>6257</buyerPostalCode>
               <buyerStreet>Precna ulica 1</buyerStreet>
               <buyerVatRegistration>None</buyerVatRegistration>
               <cancelledDocumentRef>2012-00015</cancelledDocumentRef> <-- Reference to cancelled document
               <orderReference>123</orderReference>                    <!-- (Optional)
               <city>Maribor</city>
               <costPosition>0001</costPosition>
               <date>2014-03-18</date>
               <dateOfSupply>2014-03-18</dateOfSupply>
               <number>0019/2014</number>
               <salesInvoiceRef>2014-00005</salesInvoiceRef>
               <status>IssuedInvoice</status>
               <totalCurrency>EUR</totalCurrency>
               <totalDiscount>0.0</totalDiscount>
               <totalNetAmount>78.62</totalNetAmount>
               <totalVatAmountFlatRate>0.00</totalVatAmountFlatRate>
               <totalVatAmountNormalRate>7.49</totalVatAmountNormalRate>
               <totalVatAmountLowerRate>4.23</totalVatAmountLowerRate>
               <totalVatAmountZeroRate>0.0</totalVatAmountZeroRate>
               <totalVatBaseAmountFlatRate>0.00</totalVatBaseAmountFlatRate>
               <totalVatBaseAmountNormalRate>34.05</totalVatBaseAmountNormalRate>
               <totalVatBaseAmountLowerRate>44.57</totalVatBaseAmountLowerRate>
               <totalVatBaseAmountZeroRate>0.00</totalVatBaseAmountZeroRate>
               <vatTransactionType>0</vatTransactionType>
               <warehouseCode>8956</warehouseCode>
               <vatCountryIsoCode>HR</vatCountryIsoCode>
               <Address>                        <!-- (Optional) Setting delivery address on document and partner buyer if it doesn't exists              
                       <city>Celje</city>
                       <country>SI</country>
                       <postalCode>3000</postalCode>
                       <street>Ulica 10</street>
                       <type>Delivery</type>
                       <firstAddressLine>Delivery address</firstAddressLine>
               </Address>
               <Items>
                       <Item>
                               <calculationCurrency>EUR</calculationCurrency>
                               <calculationQuantity>-1.000000</calculationQuantity>
                               <costsDirectAmount>0.00000</costsDirectAmount>
                               <costsDirectPercentage>0.00</costsDirectPercentage>
                               <costsOfCustomsAmount>0.00000</costsOfCustomsAmount>
                               <costsOfCustomsPercentage>0.00</costsOfCustomsPercentage>
                               <costsOfTransportAmount>0.00000</costsOfTransportAmount>
                               <costsOfTransportPercentage>0.00</costsOfTransportPercentage>
                               <discountPercentage>0.0000</discountPercentage>
                               <grossMarginAmount>6.69000</grossMarginAmount>
                               <grossMarginPercentage>17.66</grossMarginPercentage>
                               <grossPrice>44.57000</grossPrice>
                               <inboundVatAmount>-3.60000</inboundVatAmount>
                               <inboundVatPercentage>9.50</inboundVatPercentage>
                               <inventoryAmount>-37.88000</inventoryAmount>
                               <inventoryPrice>37.88000</inventoryPrice>
                               <outgoingVatAmount>4.64000</outgoingVatAmount>
                               <outgoingVatPercentage>9.50</outgoingVatPercentage>
                               <position>2</position>
                               <productCode>000013</productCode>
                               <retailMarginAmount>10.96000</retailMarginAmount>
                               <retailMarginPercentage>28.93</retailMarginPercentage>
                               <retailPrice>48.84000</retailPrice>
                               <salesPrice>48.80415</salesPrice>
                               <salesPriceAmount>-48.80415</salesPriceAmount>
                               <supplierAmountInCalculationCurrency>-37.88000</supplierAmountInCalculationCurrency>
                               <supplierDiscountAmount>0.00000</supplierDiscountAmount>
                               <supplierDiscountPercentage>0.00</supplierDiscountPercentage>
                               <supplierPrice>37.88000</supplierPrice>
                               <supplierPriceAmount>-37.88000</supplierPriceAmount>
                               <supplierPriceCurrency>EUR</supplierPriceCurrency>
                               <supplierPriceInCalculationCurrency>37.88000</supplierPriceInCalculationCurrency>
                                <productName>Product 1</productName>                          
                                <description>this is product with code 000013</description>      
                                <remarks>test 1. 2.</remarks>                                    
                       </Item>
                       <Item>
                               <calculationCurrency>EUR</calculationCurrency>
                               <calculationQuantity>-2.000000</calculationQuantity>
                               <costsDirectAmount>0.00000</costsDirectAmount>
                               <costsDirectPercentage>0.00</costsDirectPercentage>
                               <costsOfCustomsAmount>0.00000</costsOfCustomsAmount>
                               <costsOfCustomsPercentage>0.00</costsOfCustomsPercentage>
                               <costsOfTransportAmount>0.00000</costsOfTransportAmount>
                               <costsOfTransportPercentage>0.00</costsOfTransportPercentage>
                               <discountPercentage>0.0000</discountPercentage>
                               <grossMarginAmount>17.02459</grossMarginAmount>
                               <grossMarginPercentage>0.00</grossMarginPercentage>
                               <grossPrice>17.02459</grossPrice>
                               <inboundVatAmount>0.00000</inboundVatAmount>
                               <inboundVatPercentage>22.00</inboundVatPercentage>
                               <inventoryAmount>0.00000</inventoryAmount>
                               <inventoryPrice>0.00000</inventoryPrice>
                               <outgoingVatAmount>3.75000</outgoingVatAmount>
                               <outgoingVatPercentage>22.00</outgoingVatPercentage>
                               <position>1</position>
                               <productCode>320003</productCode>
                               <retailMarginAmount>17.02000</retailMarginAmount>
                               <retailMarginPercentage>0.00</retailMarginPercentage>
                               <retailPrice>17.02000</retailPrice>
                               <salesPrice>20.77000</salesPrice>
                               <salesPriceAmount>-41.54000</salesPriceAmount>
                               <supplierAmountInCalculationCurrency>0.00000</supplierAmountInCalculationCurrency>
                               <supplierDiscountAmount>0.00000</supplierDiscountAmount>
                               <supplierDiscountPercentage>0.00</supplierDiscountPercentage>
                               <supplierPrice>0.00000</supplierPrice>
                               <supplierPriceAmount>0.00000</supplierPriceAmount>
                               <supplierPriceCurrency>EUR</supplierPriceCurrency>
                               <supplierPriceInCalculationCurrency>0.00000</supplierPriceInCalculationCurrency>
                                <productName>Product 1</productName>                          
                                <description>this is product with code 320003</description>      
                                <remarks>test 1. 2.</remarks>
                       </Item>
               </Items>
       </DeliveryNote>
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Can not find delivery note for number: XXX and date: XXX"><error/>
</response>

Error messages:
Parameter named "number" is required.
Can not find delivery note for number: XXX and date: XXX



3.5.2 DeliveryNoteGetPDF

Get PDF for delivery note by document number, or by combination of document number and date. User can also mark document as sent if the correct parameter is used. Response (on OK) returns binary record for PDF file coded with Base64 coding.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2014-00001)
dateDocument date
costPositionCost position
documentIDInternal document identificator. In case of using this parameter, no other parameter listed abowe is needed for searching by document.
markDocumentAsSentMarks document as sent.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="DeliveryNoteGetPDF">
       <parameter name="number" value="12/2009" />
       <parameter name="date" type="Date" value="2009-12-15" />
        <parameter name="markDocumentAsSent" />
</method>
</request>


Response
<response status="ok">
       <number>2012-01293</number>
       <date>2013-01-02</date>
       <pdfFile>JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0ZpbHRlci9GbGF0ZURlY29kZT4+CnN0cmVhbQp4nJVYS4/bNh...</pdfFile>
</response>

Response (on error)
<response status="error">
       <error description="Can not find delivery note for number: 2013-01293 and date: 2013-01-02">
       </error>
</response>



3.5.3 DeliveryNoteCreate

Create new delivery note.

Mandatory document attributes are: warehouseCode, dateOfSupply.Mandatory document item attribute is productCode. Other attributes are optional and web service will use default values and those from specified product. Default calculationQuantity is 1, default date is day of execution.
Additional optional item fields are: calculationQuantity, associatedSerialNumbers, lotNumber (optionali expirationDate can be defined for given LOT number), discountPercentage, salesPrice (retail price including VAT for retail document) or grossPrice (gross price without VAT for gross document), position, productName, description, remarks and vatTransactionType. Supported values for vatTransactionType are:
0 - Taxable transactions of goods and services in Slovenia,
1 - Zero-rated transaction - exports of goods outside the EU,
2 - Zero-rated transaction - without the right to deduct input VAT,
3 - Zero-rated transaction - with the right to deduct input VAT,
4 - Zero-rated transaction - supply of goods within the EU,
5 - Zero-rated transaction - assembly in the EU,
6 - Zero-rated transaction - tripartite supplies of goods within the EU,
7 - Transactions exempt from VAT - not for VAT records,
8 - Zero-rated transaction - remote sales of goods,
9 - Transactions exempt from VAT with the right of input VAT deduction (transactions outside SLO),
10- Supply of goods and services in SLO, VAT charged by the recipient,
11- Sales of services in the EU, VAT paid by the recipient.
100- Sales of electronic services taxed in other EU country.

Parameters

DeliveryNoteComplex parameter with data tags like:

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="DeliveryNoteCreate">
<parameter name="DeliveryNote">
               <date>2014-03-26</date>                                 <!-- document date
               <dateOfSupply>2014-03-26</dateOfSupply>                 <!-- date of receival
               <city>Ljubljana</city>                                          <!-- (Optional)
               <businessYear>2012</businessYear>                               <!-- (Optional)
               <purchaseOrder>13</purchaseOrder>                       <!-- (Optional)
               <warehouseCode>8956</warehouseCode>                     <!-- (Mandatory)
               <status>issuedInvoice</status>                           <!-- (Optional) Possible values: issuedInvoice, draft - default is issuedInvoice
               <costPosition>120</costPosition>                                <!-- (Optional)
               <deliveryMethod>Delivery method</deliveryMethod>        <!-- (Optional)
               <buyerCode>123456</buyerCode>                   <!-- (Optional). If buyer code is specified, other buyer parameters bellow are not needed as the buyer data is taken from database. If any additional parameter is specified, it will override master buyer data in document
               <buyerDocumentID>60:123456</buyerDocumentID>                    <!-- (Optional). If it is specified buyer parameters bellow are not needed as the buyer data is taken from database. If any parameter bellow is sepcified it will override master buyer data in document
               <buyerCity>RADOVLJICA</buyerCity>
               <buyerCountry>SI</buyerCountry>
               <buyerName>5 FIVER d.o.o.</buyerName>
               <buyerPostalCode>4240</buyerPostalCode>
               <buyerStreet>ULICA 22</buyerStreet>
               <buyerTaxNumber>75882442</buyerTaxNumber>
               <buyerVatRegistration>none</buyerVatRegistration>       <!-- (Unkown, None, Registered)
               <vatTransactionType>0</vatTransactionType>              <!-- (Optional) default is 0
               <vatOutgoingDocumentVatClause>Registered</vatOutgoingDocumentVatClause> <!-- (Optional) Possible values: Registered, NotRegistered, RegisteredTourismLawPart47, RegisteredTourismLawPart31, RegisteredTourismLawPart47And31
               <remarks>Remark on delivery note</remarks>              <!-- (Optional)
               <salesInvoiceRef>2014-00001</salesInvoiceRef> <!-- (Optional) Setting reference to sales invoice
               <advanceInvoiceRef>2014-00001</advanceInvoiceRef> <!-- (Optional) Setting reference to advanceinvoice
               <salesQuoteRef>2014-00001</salesQuoteRef> <!-- (Optional) Setting reference to sales quote
               <vatCountryIsoCode>HR</vatCountryIsoCode> <!-- Mandatory if using vatTransactionTypes: 100, 8 and 5 and it determines that VAT procentages for specified country has to be taken
               <documentLanguage>Slovene</documentLanguage> <!-- (Optional) Possible document language: Slovene, English, German, Croatian, Italian, Hungarian, Czech, Slovak, Serbian, Polish and Bulgarian
               <Address>                        <!-- (Optional) Setting delivery address on document and partner buyer if it doesn't exists              
                       <city>Celje</city>
                       <country>SI</country>
                       <postalCode>3000</postalCode>
                       <street>Ulica 10</street>
                       <type>Delivery</type>
                       <firstAddressLine>Delivery address</firstAddressLine>
               </Address>
               <Items>
                       <Item>                                                          <!-- item specified with ref to product
                               <position>1</position>      <!-- position of item                                
                               <productCode>666666</productCode>                                <!-- product code
                               <calculationQuantity>2</calculationQuantity>                    <!-- quantity (default is 1)
                               <discountPercentage>10</discountPercentage>                     <!-- discount percentage
                               <productName>Product name</productName>                          <!-- change product name if this is enabled on article
                               <description>this is product with code 666666</description>      <!-- change product description if this is enabled on article
                               <remarks>test 1. 2.</remarks>                                    <!-- remarks on delivery note item
                               <associatedSerialNumbers>111, 222</associatedSerialNumbers>      <!-- serial numbers
                               <grossPrice>145,66</grossPrice>                                  <!-- set gross price when document type is "gross" or use <salesPrice> for setting price when document type is "retail"
                              <vatTransactionType>0</vatTransactionType>       <!-- (Optional) default is 0. Foreign VAT transaction types (100, 8 and 5) can only be set on document level.
                       </Item>
                       <Item>
                               <position>2</position>      
                               <calculationQuantity>2.000</calculationQuantity>
                               <productCode>666666</productCode>
                       </Item>
                       <Item>
                               <position>3</position>     
                               <productCode>666666</productCode>
                               <calculationQuantity>2.000</calculationQuantity>
                       </Item>
                       <Item>   <!-- (default quantity is 1)
                               <position>4</position>    
                               <productCode>666666</productCode>
                       </Item>
                        ...
               </Items>
       </parameter>
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328
<?xml version="1.0" encoding="utf-8"?>
response status="ok" >
       <number>2014-00014</number>             <!-- created document ID or number
       <date>2014-03-26</date>                 <!-- date of document
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          
</response>

Generic error messages (not related to concrete property):
Access denied. User account does not have sufficient privileges for the given request
Parameter named DeliveryNote needed.
Error creating delivery note (descrition)

Error messages which are related to properties are formated in a a way: "Error nr: N #propertyName - error description"
warehouseCode - Missing warehouse code
warehouseCode - Warehouse does not exist
date - Entry is mandatory
date - Document cannot be issued retroactively because document with later date was already issued.
dateOfSupply - Entry is mandatory

Errors for document items data are formated like shown bellow (X is item sequence number)
ItemX_productCode - Entry is mandatory
ItemX_productCode - Can not find product for code:
ItemX_inboundVatPercentage - Entry is mandatory



3.5.4 DeliveryNoteUpdate

Update existing delivery note.Data must contain delivery note number to be able to identify document which is to be updated.

Parameters

DeliveryNote Complex parameter with data tags

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="DeliveryNoteUpdate">
<parameter name="DeliveryNote">
               <!--  Parameters are identical to the parameters in DeliveryNoteCreate api
       </parameter>
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328
<?xml version="1.0" encoding="utf-8"?>
response status="ok" >
       <number>2012-00014</number>             <!-- updated document ID or number
       <date>2012-09-26</date>                 <!-- date of document
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- Error messages are returned in format as described in DeliveryNoteCreate api
</response>



3.5.5 DeliveryNoteDelete

Delete delivery note. Must specify parameter/s (number, number+date) to identify document for deleting.

Parameters

numberDocument number
dateDocument date
costPositionCost position

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="DeliveryNoteDelete">
       <parameter name="number" value="2013-00014" />
       <parameter name="date" type="Date" value="2013-03-26" />
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="no privileges"><error/>     <!-- document could not be found, no privileges,  
</response>

Possible error messages:
Access denied. User account does not have sufficient privileges for the given request
Parameter named "number" is required
Can not find delivery note for number
Can not delete. Found X delivery notes
Data cannot be deleted because they are needed or referenced by other documents or data.



3.5.6 DeliveryNoteCancel

Cancel delivery note. Must specify parameter/s (number, number+date) to identify document for cancelling.

Parameters

numberDocument number
dateDocument date
costPositionCost position
statusStatus of cancelation document (draft, issuedInvoice). By Default status is issuedInvoice.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="DeliveryNoteCancel">
       <parameter name="number" value="2013-00014" />
       <parameter name="date" type="Date" value="2013-03-26" />
       <parameter name="status" value="draft" />
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Access denied. User account does not have sufficient privileges for the given request"><error/>     <!-- document could not be found, no privileges,  
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Can not cancel delivery note for arguments number: 2013-00014 date: 2013-03-26"><error/>    <!-- document could not be canceled,  
</response>

Possible error messages:
Access denied. User account does not have sufficient privileges for the given request
Parameter named "number" is required
Can not find delivery note for number
Can not cancel. Found X delivery notes
Found X delivery notes X. You can only cancel one delivery note at a time
Can not cancel credit note X



3.5.7 DeliveryNoteList

Get list of delivery notes for criteria which is specified by API parameters.

Parameters

numberDocument number
dateFromThe date which is used to select delivery notes whose date is following it
dateToThe date which is used to select delivery notes whose date is preceding it
warehouseWarehouse code
dateOfSupplyThe date of receival
orderReferencePurchase order number
serialNumberProduct serial number
supplierBuyer code, or buyer name
costPositionCost position code
productProduct code, or product name
statusPossible values: Draft, IssuedInvoice, NotBooked, Booked, WithSalesInvoiceReference, WithoutSalesInvoiceReference, Opened, Closed, DocumentSentAlready, DocumentNotYetSent, DocumentSentByEMail, DocumentNotSentByEMail, WithWorkOrderReference, WithoutWorkOrderReference, CancellationDocument, CancelledDocument, DocumentNotSentOrPrinted, NotCancellationOrCancelledDocument

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="DeliveryNoteList">
               <parameter name="status" value="Issued" />
               <parameter name="dateFrom" type="Date" value="2012-09-26" />
       </method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
<DeliveryNotes>                 
       <DeliveryNote>
                <!-- structure of elements is the same as in DeliveryNoteGet
       </DeliveryNote>
       ...
</DeliveryNotes>
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- no privileges,  
</response>

Possible error messages:
Access denied. User account does not have sufficient privileges for the given request.
Invalid search key!
Invalid search value:  X



3.5.8 DeliveryNoteSendByEmail

Sends document by email to the recipient(s).

Parameters

numberDocument number
dateDocument date (optional additional document identification)
senderEmail sender (Optional)
recipientComma delimited list of recipient(s) emails
ccCC email (Optional)
bccBCC email (Optional)
subjectMail subject (Optional)
messageMessage text (Optional)
useHtmlMessageSend message text as HTML (Optional)

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="DeliveryNoteSendByEmail">
       <parameter name="number" value="2012-00014" />
       <parameter name="date" type="Date" value="2012-09-26" />
       <parameter name="sender" value="micka@kovac.com"/>
       <parameter name="recipient" value="zoran@kovac.com,zlatko@kovac.com"/>
       <parameter name="cc" value=""/>
       <parameter name="bcc" value=""/>
       <parameter name="subject" value="TEST d.o.o.: delivery notes nr. 0002/2010"/>
       <parameter name="message" value="Message text"/>
        <parameter name="useHtmlMessage" value="true"/>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="no privileges"><error/>     <!-- document could not be found, no privileges, mail sending failed
</response>

Error messages
Access denied. User account does not have sufficient privileges for the given request.
number   asp.error.MandatoryEntry
stDok - Document does not exist
stDok - More then one document matches criteria !



3.5.9 DeliveryNoteAttachmentAdd

Add image/attachment to delivery note.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="DeliveryNoteAttachmentAdd">
       <parameter name="number" type="String" value="2020-00001" />
       <parameter name="attachment">
               <contents encoding="BASE64">BASE64...</contents>
               <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added attachment att.jpg to delivery note 2020-00001.</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find delivery note for number: 2020-00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>


3.5.10 DeliveryNoteAttachmentSetDefault

Add attachment to delivery note and set is as default.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="DeliveryNoteAttachmentSetDefault">
       <parameter name="number" type="String" value="2020-00001" />
       <parameter name="attachment">
               <contents encoding="BASE64">BASE64...</contents>
               <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added attachment att.jpg to delivery note 2020-00001.</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find delivery note for number: 2020-00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>


3.5.11 DeliveryNoteAttachmentGet

Get default attachment of delivery note.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="DeliveryNoteAttachmentGet">
       <parameter name="number" type="String" value="2020-00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <DeliveryNote>
               <Attachments>
                       <Attachment>
                               <fileName>att.jpg</fileName>
                               <contents encoding="BASE64">BASE64</contents>
                       </Attachment>
               </Attachments>
       </DeliveryNote>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find delivery note for number: 2020-00001 Delivery note does not have attachemnts.
</response>


3.5.12 DeliveryNoteAttachmentList

Get all images/attachments of article.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="DeliveryNoteAttachmentList">
       <parameter name="number" type="String" value="2020-00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <DeliveryNote>
               <Attachments>
                       <Attachment>
                               <fileName>att1.jpg</fileName>
                               <contents encoding="BASE64">1BASE64</contents>
                       </Attachment>
                       <Attachment>
                               <fileName>att2.jpg</fileName>
                               <contents encoding="BASE64">2BASE64</contents>
                       </Attachment>
                       <Attachment>
                               <fileName>att3.jpg</fileName>
                               <contents encoding="BASE64">3BASE64</contents>
                       </Attachment>
               </Attachments>
       </DeliveryNote>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find delivery note for number: 2020-00001 Delivery note does not have attachemnts.
</response>

 

3.6. Document Management API

DocumentInboxImportImport electronic document to document management inbox
DocumentInboxAddEntryAdd an entry to document management inbox (document capture inbox)
DocumentInboxListList entries in the document management inbox

3.6.1 DocumentInboxImport

Import electronic document to document inbox. This can be only a document which is unique to a specific organization and which contains all data needed to identify its type and receiver. Examples of such documents include ISO SEPA bank statements in XML, electronic invoices in XML (eSLOG, UBL), etc.

Parameters

checkExistingBoolean parameter. If true, importing an already existing document will fail. The document is equal to an already existing document if document number or filename match existing/already imported document.
allOrganizationsBoolean parameter. If true, the organization lookup will be performed before actual import is done. The document will be imported into the organization for which the document is destined according to the data it contains (VAT ID, TaxID, IBAN, etc.).
electronicDocumentElectronic document file. This can be either ISO SEPA XML or eSLOG XML
documentVisualizationPDF visualization of electronic document (optional parameter)
automaticallyImportDocumentOptional parameter, that determines, that document (for now only received invoices and bank statements) will be automatically imported after successfully imported into inbox.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="DocumentInboxImport">
       <parameter name="checkExisting" value="true" />
       <parameter name="allOrganizations" value="true" />
       <parameter name="automaticallyImportDocument" value="true" />
       <parameter name="electronicDocument">
                       <documentDate>2012-11-15 12:00:00<documentDate>
                       <fileName>ISO_sepa.xml<fileName>
                       <contents encoding="BASE64">ASDASDASDASD</contents>
        </parameter>
       <parameter name="documentVisualization">
                       <documentDate>2012-11-15 12:00:00<documentDate>
                       <fileName>ISO_sepa.pdf<fileName>
                       <contents encoding="BASE64">ASDASDASDASD</contents>
        </parameter>
</method>
</request>



3.6.2 DocumentInboxAddEntry

Add new entry to document inbox. This can be either a PDF document, scanned image, XML electronic invoice or even multiple files each of its own type.

Parameters

checkExistingBoolean parameter. If true, importing an already existing document will fail. The document is equal to an already existing document if document date, partner and document number all match.
automaticallyImportDocumentOptional parameter, that determines, that document (for now only received invoices and bank statements) will be automatically imported after successfully imported into inbox.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="DocumentInboxAddEntry">
       <parameter name="checkExisting" value="true" />
       <parameter name="automaticallyImportDocument" value="true" />
       <parameter name="document">
                       <documentDate>2012-11-15 12:00:00</documentDate>
                       <documentNumber>22309-001-003</documentNumber>
                       <documentType>PurchaseInvoice</documentType>    <!-- Document type (Unknown, PurchaseInvoice, ReceivedSalesQuote, BankStatement, Contract, Advertising, ReceivedSalesOrder, ReceivedCreditNote, ReceivedAdvanceInvoice, GoodsReceipt, CashbookDailyTurnoverSummary, SalesInvoice, Compensation, PayrollDocuments, Other, SingleAdministrativeDocument)
                       <senderPartnerIdentifier>88888888</senderPartnerIdentifier>
                       <senderPartnerCode>00001</senderPartnerCode>
                       <senderPartnerName>Test Sender d.o.o.</senderPartnerName>
                       <emailSubject>Incoming mail subject</emailSubject>
                       <mailDescription>Description in incoming mail</mailDescription>
                       <receivedDate>2020-01-01</receivedDate>
                       <Attachments>
                               <Attachment>
                                       <fileName>Invoice.pdf</fileName>
                                       <fileType>PDF</fileType>
                                       <contents encoding="BASE64">ASDASDASDASD</contents>
                               </Attachment>
                               <Attachment>
                                       <fileName>Invoice.xml</fileName>
                                       <fileType>XML</fileType>
                                       <contents encoding="BASE64">ASDASDASDASD</contents>
                               </Attachment>
                       </Attachments>
        </parameter>
</method>
</request>



3.6.3 DocumentInboxList

List entries in the document management inbox.

Parameters

documentNumberDocument number received by mail.
dateFromDocument date from received by mail.
dateToDocument date to received by mail.
receivalDateFromMail receival from.
receivalDateToMail receival to.
statusStatus of mail.
sequentialNumberSequential number of mail.
senderNameSender name.
typeType of mail.
deliveryMethodDelivery method of mail.
descriptionSearch by word or sentence from mail description.
fileNameSearch mail by their attachemnt filenames.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="DocumentInboxList">
               <parameter name="status" value="Open" />
               <parameter name="receivalDateFrom" type="Date" value="2017-01-01" />
              <parameter name="receivalDateTo" type="Date" value="2021-01-01" />
       </method>
</request>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
       <Document>
               <businessYear>2021</businessYear>
               <deliveryMethod>ElectronicViaWebServicesAPI</deliveryMethod>
               <description>Incoming mail subject
------------------------------

Description in incoming mail</description>
               <documentDate>2012-11-15</documentDate>
               <documentNumber>22309-001-003</documentNumber>
               <enteredTS>2021-03-18 08:14:01</enteredTS>
               <receivedDate>2020-01-01</receivedDate>
               <senderName>WorldStream B.V.</senderName>
               <sequentialNumber>5</sequentialNumber>
               <status>Open</status>
               <type>PurchaseInvoice</type>
       </Document>
       <Document>
               <businessYear>2021</businessYear>
               <deliveryMethod>ElectronicViaWebServicesAPI</deliveryMethod>
               <description>Incoming mail subject
------------------------------

Description in incoming mail</description>
               <documentDate>2012-11-15</documentDate>
               <documentNumber>22309-001-003</documentNumber>
               <enteredTS>2021-03-18 08:13:10</enteredTS>
               <receivedDate>2020-01-01</receivedDate>
               <senderName>Tastno 2x</senderName>
               <sequentialNumber>4</sequentialNumber>
               <status>Open</status>
               <type>PurchaseInvoice</type>
       </Document>
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Access denied. User account does not have sufficient privileges for the given request"><error/>   <!-- There are several different error messages possible.
</response>

 

3.7. E-Banking API

BankStatementImportImport bank statement file.

3.7.1 BankStatementImport

Import bank statement file.

Parameters

IBANBank account number (used when importing bank statements of type "IsoSepaXml", "ZbsXml")
payPalAccountPayPal account name (used when importing bank statements of type "PayPalCsv")
importTransactionFeeAsOutflowCan be used only with type "PayPalCsv". This parameter is optional, default this parameter is true.
stripeAccountStripe account name (used when importing bank statements of type "StripeCsv")
glsAccountGLS account name (used when importing bank statements of type "GLSSpreadsheet")
statementNumberBank statement number (optional, because it can be in the statement)
typeType of bank statement ("IsoSepaXml", "ZbsXml", "PayPalCsv", "StripeCsv", "GLSSpreadsheet", "PostaSlovenijeXml", "eracuniSpreadsheet")
accountThis parameter is mandatory in case of using type "eracuniSpreadsheet", to select for which account statement is beeing imported. It can contain IBAN or payment account name.
statementDataBank statement coded with base64 coder
pdfStatementDataBank statement pdf coded with base64 coder (optional)
pdfStatementFileNameFile name of bank statement pdf (optional)
dateFormatCan be used only for types "PayPalCsv" and "eracuniSpreadsheet". This parameter is optional, default format in case of "PayPalCsv" is "MM/DD/YYYY", all possible formats are: "MM/DD/YYYY" and "DD/MM/YYYY". Default format in case of "eracuniSpreadsheet" is "DD.MM.YYYY", all possible formats are: "DD.MM.YYYY", "DD.MM.YYYY.", "DD/MM/YYYY", "MM/DD/YYYY", "YYYY-MM-DD", "YYYY.MM.DD" and "YYYY.MM.DD.".

Example request and response


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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="BankStatementImport">
       <parameter name="IBAN" value="SI56 0443 0000 0256 970" />
       <parameter name="type" value="IsoSepaXml" />
       <parametername="statementData" value="D94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyIgPz4NCjxEb2N1bWV..."/>
       <parameter name="pdfStatementData" value="JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0ZpbHRlci9GbGF0ZURlY29kZT4+Cn..."/>
       <parameter name="pdfStatementFileName" value="test.pdf"/>
</method>
</request>

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="BankStatementImport">
       <parameter name="payPalAccount" value="payPalAccount@payPal.com" />
       <parameter name="type" value="PayPalCsv" />
       <parametername="statementData" value="D94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyIgPz4NCjxEb2N1bWV..."/>
       <parameter name="pdfStatementData" value="JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0ZpbHRlci9GbGF0ZURlY29kZT4+Cn..."/>
       <parameter name="pdfStatementFileName" value="test.pdf"/>
</method>
</request>

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="BankStatementImport">
       <parameter name="glsAccount" value="GLS Slovenija" />
       <parameter name="type" value="GLSSpreadsheet" />
       <parametername="statementData" value="D94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyIgPz4NCjxEb2N1bWV..."/>
       <parameter name="pdfStatementData" value="JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0ZpbHRlci9GbGF0ZURlY29kZT4+Cn..."/>
       <parameter name="pdfStatementFileName" value="test.pdf"/>
</method>
</request>

HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

Bank statement with attachement.
<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
        <statementNumber>Bank statement number 31 was imported</statementNumber>
        <pdfStatementFileName>PDF attachment added</pdfStatementFileName>
</response>

Bank statement without attachement.
<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
        <statementNumber>Bank statement number 31 was imported</statementNumber>
        <pdfStatementFileName>No PDF attachment added</pdfStatementFileName>
</response>

Response on error if one of required parameters is missing
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Parameter named <IBAN> is required."><error/>       
</response>

Response on error if iban is not one of your
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Parameter named <IBAN> is not one of your bank accounts"><error/>   
</response>

Response on error if xml data is missing or it is not correct
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Error importing data!"><error/>     
</response>

Response on error if pdf attachement file is corrupted.
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="PDF file is corrupted!"><error/>    
</response>

 

3.8. General Ledger API

3.8.1 GeneralLedgerGetAccountBalance

Get account balance from the general ledger.

Parameters

fiscalYearSelect fiscal year (business year). Fiscal year which is set as default will be used if absent from the request.
accountNumberGeneral ledger account number
partnerCodeIf partner code is specified the balance will be calculated for that partner with only.
voucherStatusGeneral ledger journal voucher status of entries used in balance calculation. Possible values are:
  • all  Include open and posted vouchers/entries when calculating the balance. This is the default parameter value.
  • open  Include only open vouchers.
  • posted  Include only posted vouchers.
balanceDateThe date of the balance returned.
costPositionCost center code.

Example request and response


Example 1.

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="GeneralLedgerGetAccountBalance">
  <parameter name="fiscalYear" value="2014" />
  <parameter name="balanceDate" type="Date" value="2004-01-31" />
  <parameter name="accountNumber" type="String" value="1200" />
  <parameter name="partnerCode" type="String" value="003" />
  <parameter name="voucherStatus" type="String" value="all" />
</method>
</request>

HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 Apr 2009 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
       <AccountBalance accountNumber="1200" partnerCode="003" balanceCredit="11.00" balanceDebit="12.00" balance="-1.0" currency="EUR">
</response>



3.8.2 GeneralLedgerAccountStatementGetEntries

Get general ledger account statement entries.

Parameters

businessYearSelect business year. Business year which is set as default will be used if not specified.
accountNumberGeneral ledger account number.
partnerCodeIf partner code is specified, only entries assigned to the given partner will be returned.
documentIf document ID is specified, the statement will include only entries assigned to the given document. Document string can containt the * (star) character to match entries where document Id matches the search string.
transactionDateFromEntries for transactions from the given date
transactionDateToEntries for transactions up to the given date
documentDateFromEntries for document from date
documentDateToEntries for documents up to given date
dueDateFromEntry due date from
dueDateToEntry due date to
postingDateFromEntry posting date from
postingDateToEntry posting date to
transactionAmountFilter out entries matching approximate transaction amount. If currency parameter is also specified, then the amount will be matched with the entry amount in the foreign currency.
transactionCurrencyUse this criteria when you need to filter out transaction originating in a foreign currency
costCentreFilter out entries on the given cost centre. Character * (star) can be used for matching multiple cost center codes
descriptionFilter out entries matching description (* character can be used)
creditOrDebitOptional to filter out only debit or credit transactions. Possible values are:
  • debit  Only debit transactions
  • credit  Only credit transaction
voucherStatusOptional to limit list to entries depending on the GL journal voucher status. Possible values are:
  • all  Include open and posted vouchers/entries when calculating the balance. This is the default parameter value.
  • open  Include only open vouchers.
  • posted  Include only posted vouchers.
entryStatusOptional to specify entry status regarding document payment status. Possible values are:
  • open  list open items only
  • cleared  list cleared entries only

Example request and response


Example 1.
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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="GeneralLedgerAccountStatementGetEntries">
  <parameter name="businessYear" value="2018" />
  <parameter name="documentDateFrom" type="Date" value="2018-01-31" />
  <parameter name="documentDateTo" type="Date" value="2018-02-28" />
  <parameter name="accountNumber" type="String" value="1200" />
  <parameter name="partnerCode" type="String" value="003" />
  <parameter name="transactionAmount" type="Decimal" value="50.00" />
</method>
</request>

HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 Apr 2009 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
<AccountStatement>
<businessYear>
<account>
               <Entry>
               <amountDebit>200000.000</amountDebit>
               <costPosition></costPosition>
               <description>KBM-Infond, družba za upravljanje d.o.o.</description>
               <document></document>
               <documentDate>2011-12-31</documentDate>
               <dueDate>2011-12-31</dueDate>
               <generalLedgerAccountNumber>12000</generalLedgerAccountNumber>
               <partner>KBM-Infond, družba za upravljanje d.o.o.</partner>
               <partnerCode>1142</partnerCode>
               <referencedDocument></referencedDocument>
               <sequenceNumber>89</sequenceNumber>
               <status>0</status>
               <transactionDate>2011-12-31</transactionDate>
               <vatDate>2011-12-31</vatDate>
       </Entry>
       <Entry>
               <amountDebit>200000.000</amountDebit>
               <costPosition></costPosition>
               <description>KBM-Infond, družba za upravljanje d.o.o.</description>
               <document></document>
               <documentDate>2011-12-31</documentDate>
               <dueDate>2011-12-31</dueDate>
               <generalLedgerAccountNumber>12000</generalLedgerAccountNumber>
               <partner>KBM-Infond, družba za upravljanje d.o.o.</partner>
               <partnerCode>1142</partnerCode>
               <referencedDocument></referencedDocument>
               <sequenceNumber>268</sequenceNumber>
               <status>0</status>
               <transactionDate>2011-12-31</transactionDate>
               <vatDate>2011-12-31</vatDate>
       </Entry>
       <Entry>
               <amountDebit>200000.000</amountDebit>
               <costPosition></costPosition>
               <description>KBM-Infond, družba za upravljanje d.o.o.</description>
               <document></document>
               <documentDate>2011-12-31</documentDate>
               <dueDate>2011-12-31</dueDate>
               <generalLedgerAccountNumber>12000</generalLedgerAccountNumber>
               <partner>KBM-Infond, družba za upravljanje d.o.o.</partner>
               <partnerCode>1142</partnerCode>
               <referencedDocument></referencedDocument>
               <sequenceNumber>447</sequenceNumber>
               <status>0</status>
               <transactionDate>2011-12-31</transactionDate>
               <vatDate>2011-12-31</vatDate>
       </Entry>
       .....
<AccountStatement>
</response>

 

3.9. GeneralLedgerJournalVoucher API

GeneralLedgerJournalVoucherGetGet general ledger journal voucher by document number, or by combination of document number and business year.
GeneralLedgerJournalVoucherGetPDFGet PDF for general ledger journal voucher by document number, or by combination of document number and business year.
GeneralLedgerJournalVoucherCreateCreate new general ledger journal voucher.
GeneralLedgerJournalVoucherUpdateUpdate existing general ledger journal voucher.
GeneralLedgerJournalVoucherDeleteDelete general ledger journal voucher.
GeneralLedgerJournalVoucherListGet list of general ledger journal vouchers for specified criteria.
GeneralLedgerJournalVoucherCancelCancel general ledger journal voucher.

3.10. GeneralLedgerJournalVoucherGet

Get general ledger journal voucher by document number, or by combination of document number and business year.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (00002)
businessYearBusiness year.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
       <method name="GeneralLedgerJournalVoucherGet">
               <parameter name="number" value="00003"/>
               <parameter name="businessYear" value="2016"/>
       </method>
</request>

Response
<response status="ok">
       <GeneralLedgerJournalVoucher>
               <amountCredit>6404.870</amountCredit>
               <amountDebit>6404.870</amountDebit>
               <businessEventType>salesInvoices</businessEventType>
               <businessEventTypeDescription>izdani računi</businessEventTypeDescription>
               <businessYear>2016</businessYear>
               <createdBy>MICKA KOVAC</createdBy>
               <currency>EUR</currency>
               <dateOfPosting>2016-09-29</dateOfPosting>
               <dateOfTransaction>2016-09-29</dateOfTransaction>
               <number>3</number>
               <numberAsString>00003</numberAsString>
               <postedBy>MICKA KOVAC</postedBy>
               <status>open</status>
               <Items>
                       <Item>
                               <amountCredit>6391.530</amountCredit>
                               <businessYear>2016</businessYear>
                               <costPosition></costPosition>
                               <description>test</description>
                               <document>RA2016-00046</document>
                               <documentDate>2016-07-29</documentDate>
                               <dueDate>2016-07-29</dueDate>
                               <exchangeRate>0.913076</exchangeRate>
                               <foreignAmount>7000.000</foreignAmount>
                               <foreignCurrency>USD</foreignCurrency>
                               <generalLedgerAccountNumber>008</generalLedgerAccountNumber>
                               <partner>ABANKA ,D.D.</partner>
                               <partnerCode>87</partnerCode>
                               <sequenceNumber>7</sequenceNumber>
                               <status>0</status>
                               <transactionDate>2016-09-29</transactionDate>
                               <vatDate>2016-07-29</vatDate>
                       </Item>
                       <Item>
                               <amountDebit>6391.530</amountDebit>
                               <businessYear>2016</businessYear>
                               <costPosition></costPosition>
                               <description>test</description>
                               <document>RA2016-00046</document>
                               <documentDate>2016-07-29</documentDate>
                               <dueDate>2016-07-29</dueDate>
                               <exchangeRate>0.913076</exchangeRate>
                               <foreignAmount>7000.000</foreignAmount>
                               <foreignCurrency>USD</foreignCurrency>
                               <generalLedgerAccountNumber>007</generalLedgerAccountNumber>
                               <partner>ABANKA ,D.D.</partner>
                               <partnerCode>87</partnerCode>
                               <sequenceNumber>6</sequenceNumber>
                               <status>0</status>
                               <transactionDate>2016-09-29</transactionDate>
                               <vatDate>2016-07-29</vatDate>
                       </Item>
                       <Item>
                               <amountCredit>7.240</amountCredit>
                               <businessYear>2016</businessYear>
                               <costPosition></costPosition>
                               <description>test</description>
                               <document>RA2016-00046</document>
                               <documentDate>2016-07-29</documentDate>
                               <dueDate>2016-07-29</dueDate>
                               <exchangeRate>0.007240</exchangeRate>
                               <foreignAmount>1000.000</foreignAmount>
                               <foreignCurrency>ALL</foreignCurrency>
                               <generalLedgerAccountNumber>00800</generalLedgerAccountNumber>
                               <partner>TEST BOJAN</partner>
                               <partnerCode>PA00048</partnerCode>
                               <sequenceNumber>5</sequenceNumber>
                               <status>0</status>
                               <transactionDate>2016-09-29</transactionDate>
                               <vatDate>2016-07-29</vatDate>
                       </Item>
                       <Item>
                               <amountDebit>7.240</amountDebit>
                               <businessYear>2016</businessYear>
                               <costPosition></costPosition>
                               <description>test</description>
                               <document>RA2016-00046</document>
                               <documentDate>2016-07-29</documentDate>
                               <dueDate>2016-07-29</dueDate>
                               <exchangeRate>0.007240</exchangeRate>
                               <foreignAmount>1000.000</foreignAmount>
                               <foreignCurrency>ALL</foreignCurrency>
                               <generalLedgerAccountNumber>001</generalLedgerAccountNumber>
                               <partner>TEST BOJAN</partner>
                               <partnerCode>PA00048</partnerCode>
                               <sequenceNumber>4</sequenceNumber>
                               <status>0</status>
                               <transactionDate>2016-09-29</transactionDate>
                               <vatDate>2016-07-29</vatDate>
                       </Item>
                       <Item>
                               <amountCredit>5.000</amountCredit>
                               <businessYear>2016</businessYear>
                               <costPosition></costPosition>
                               <document>RA2016-00046</document>
                               <documentDate>2016-07-29</documentDate>
                               <dueDate>2016-08-12</dueDate>
                               <generalLedgerAccountNumber>763</generalLedgerAccountNumber>
                               <partner>4 Partner Foreign Company</partner>
                               <partnerCode>PA00069</partnerCode>
                               <sequenceNumber>3</sequenceNumber>
                               <status>0</status>
                               <transactionDate>2016-07-29</transactionDate>
                               <vatDate>2016-07-29</vatDate>
                       </Item>
                       <Item>
                               <amountCredit>1.100</amountCredit>
                               <businessYear>2016</businessYear>
                               <costPosition></costPosition>
                               <document>RA2016-00046</document>
                               <documentDate>2016-07-29</documentDate>
                               <dueDate>2016-08-12</dueDate>
                               <generalLedgerAccountNumber>26000</generalLedgerAccountNumber>
                               <partner>4 Partner Foreign Company</partner>
                               <partnerCode>PA00069</partnerCode>
                               <sequenceNumber>2</sequenceNumber>
                               <status>0</status>
                               <transactionDate>2016-07-29</transactionDate>
                               <vatDate>2016-07-29</vatDate>
                       </Item>
                       <Item>
                               <amountDebit>6.100</amountDebit>
                               <businessYear>2016</businessYear>
                               <costPosition></costPosition>
                               <document>RA2016-00046</document>
                               <documentDate>2016-07-29</documentDate>
                               <dueDate>2016-08-12</dueDate>
                               <generalLedgerAccountNumber>121</generalLedgerAccountNumber>
                               <partner>4 Partner Foreign Company</partner>
                               <partnerCode>PA00069</partnerCode>
                               <sequenceNumber>1</sequenceNumber>
                               <status>0</status>
                               <transactionDate>2016-07-29</transactionDate>
                               <vatDate>2016-07-29</vatDate>
                       </Item>
               </Items>
       </GeneralLedgerJournalVoucher>
</response>



3.11. GeneralLedgerJournalVoucherGetPDF

Get PDF for general ledger journal voucher by document number, or by combination of document number and business year.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (00002)
businessYearBusiness year.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
       <method name="GeneralLedgerJournalVoucherGet">
               <parameter name="number" value="00003"/>
               <parameter name="businessYear" value="2016"/>
       </method>
</request>

Response
<response status="ok">
       <number>2012-01293</number>
       <pdfFile>JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0ZpbHRlci9GbGF0ZURlY29kZT4+CnN0cmVhbQp4nNVaS2/jNhC+51fovIBdviUBgY...</pdfFile>
</response>

Response (on error)
<response status="error">
       <error description="Can not find general ledger voucher for number: 0003 and business year: 2016">
       </error>
</response>


3.11.1 GeneralLedgerJournalVoucherCreate

Create new general ledger journal voucher. In tag "Items" you specifie general ledger journal entries.

Parameters

GeneralLedgerJournalVoucherComplex parameter with data tags

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
       <method name="GeneralLedgerJournalVoucherCreate">
               <parameter name="generalLedgerJournalVoucher">
               <businessEventType>salesInvoices</businessEventType>   <!-- Possible values: other, manuallyClearedOpenItems, salariesRemuneration, currencyDifferences, VATReport, compensations, closingOfTheFiscalYear, deliveryNotes, goodsReceipts, salesInvoices, advanceInvoices, creditNotes, debitNotes, calculationOfInterest, receivedInvoices, receivedAdvanceInvoices, receivedCreditNotes, receivedDebitNotes, fixedAssets, openingOfGLJournal, openingGeneralLedgerJournalVoucherUnreconciled, travelOrders, bankStatements, bankStatementsForeignCurrency, cashbook, priceChanges, inventoryOfGoods, internalMovements, payroll, securities, allowanceSettlement, settlementUnderWorkContract, rentSettlements, royaltySettlement, meetingsFeeSettlement, apprenticePaySettlement, dividendSettlement
               <businessYear>2016</businessYear>   <!-- business year of posting (mandatory)
               <dateOfPosting>2016-09-29</dateOfPosting>    <!-- date of posting (mandatory)
               <dateOfTransaction>2016-09-29</dateOfTransaction>    <!-- date of transaction/period date(mandatory)
               <number>4</number>    <!-- sequential number of general ledger journal voucher in selected business year
               <status>open</status>    <!-- status of general ledger journal voucher. Possible values: open, closed
               <remarks>test</remarks>   <!-- remarks for general ledger journal voucher
               <glJournalVoucherTypeCode>TEM-0067</glJournalVoucherTypeCode>   <!-- company defined general ledger journal voucher type
               <Items>
                       <Item>
                               <amountCredit>6391.530</amountCredit>   <!-- credit amount mandatory if no debit amount
                               <costPosition></costPosition>   <!-- cost position
                               <description>test</description>    <!-- description max length: 250 (mandatory)
                               <document>RA2016-00046</document>   <!-- document number
                               <referencedDocument></referencedDocument>   <!-- referenced document
                               <documentDate>2016-07-29</documentDate>   <!-- document date
                               <dueDate>2016-07-29</dueDate>   <!-- document due date
                               <exchangeRate>0.913076</exchangeRate>   <!-- enter if foreign amount is inserted
                               <foreignAmount>7000.000</foreignAmount>   <!-- foreign amount
                               <foreignCurrency>USD</foreignCurrency>   <!-- foreign currency
                               <generalLedgerAccountNumber>008</generalLedgerAccountNumber>   <!-- general ledger account number (mandatory)
                               <partner>ABANKA ,D.D.</partner>   <!-- partner name (mandatory if no partner code <partnerCode> parameter)
                               <partnerCode>87</partnerCode>   <!-- partner code (mandatory if no partner name <partner> parameter)
                               <sequenceNumber>7</sequenceNumber>   <!-- sequential number of entry
                               <transactionDate>2016-09-29</transactionDate>    <!-- date of transaction/period date(mandatory)
                               <vatDate>2016-07-29</vatDate>    <!-- VAT date
                       </Item>
                       <Item>
                               <amountDebit>6391.530</amountDebit>   <!-- debit amount mandatory if no credit amount
                               <costPosition></costPosition>
                               <description>test</description>
                               <document>RA2016-00046</document>
                               <referencedDocument></referencedDocument>   <!-- referenced document
                               <documentDate>2016-07-29</documentDate>
                               <dueDate>2016-07-29</dueDate>
                               <exchangeRate>0.913076</exchangeRate>
                               <foreignAmount>7000.000</foreignAmount>
                               <foreignCurrency>USD</foreignCurrency>
                               <generalLedgerAccountNumber>007</generalLedgerAccountNumber>
                               <partner>ABANKA ,D.D.</partner>
                               <partnerCode>87</partnerCode>
                               <sequenceNumber>6</sequenceNumber>
                               <status>0</status>
                               <transactionDate>2016-09-29</transactionDate>
                               <vatDate>2016-07-29</vatDate>
                       </Item>
                       ...
               </Items>
               </parameter>
       </method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2016 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <number>0003</number>           <!-- created general ledger journal voucher number
       <businessYear>2016/businessYear>                        <!-- general ledger journal voucher business year
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- missing mandatory attributes, invalid values, no privileges,  
</response>



3.11.2 GeneralLedgerJournalVoucherUpdate

Update existing general ledger journal voucher.Data must contain general ledger journal voucher number and business year to be able to identify document which is to be updated.

Parameters

GeneralLedgerJournalVoucherComplex parameter with data tags

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="GeneralLedgerJournalVoucherUpdate">
<parameter name="GeneralLedgerJournalVoucher">
               <businessYear>2016</businessYear>   <!-- general ledger journal voucher business year is mandatory in UPDATE
         <number>3</number>                                     <!-- general ledger journal voucher number is mandatory in UPDATE (Can use sequential document number (example: 12), or formatted number (example: 0003))
               <!--  Parameters are identical to the parameters in GeneralLedgerJournalVoucherCreate api
       </parameter>
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2016 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <number>0003</number>           <!-- updated general ledger journal voucher number
       <businessYear>2016/businessYear>                        <!-- general ledger journal voucher business year
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- missing mandatory attributes, invalid values, no privileges,  
</response>


3.11.3 GeneralLedgerJournalVoucherDelete

Delete general ledger journal voucher. Must specify parameter/s (number and business year) to identify document for deleting.

Parameters

numberGeneral ledger journal voucher number
businessYearGeneral ledger journal voucher date

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="GeneralLedgerJournalVoucherDelete">
       <parameter name="number" value="0003" />
       <parameter name="businessYear" value="2016" />
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2016 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="no privileges"><error/>     <!-- general ledger journal voucher could not be found, no privileges,  
</response>



3.11.4 GeneralLedgerJournalVoucherCancel

Cancel general ledger journal voucher. Must specify parameter/s (number and business year) to identify document for canceling.

Parameters

numberGeneral ledger journal voucher number
businessYearGeneral ledger journal voucher date

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="GeneralLedgerJournalVoucherCancel">
       <parameter name="number" value="0003" />
       <parameter name="businessYear" value="2016" />
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2016 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Access denied. User account does not have sufficient privileges for the given request"><error/>     <!-- document could not be found, no privileges,  
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Can not cancel general ledger journal voucher for number: 0003"><error/>    <!-- general ledger journal voucher could not be canceled,  
</response>

Possible error messages:
Access denied. User account does not have sufficient privileges for the given request
Parameter named "number" is required
Can not find general ledger voucher for number
Can not cancel general ledger journal voucher due to: X



3.11.5 GeneralLedgerJournalVoucherList

Get list of general ledger journal vouchers for criteria which is specified by API parameters.

Parameters

numberGeneral ledger journal voucher number
dateFromThe date which is used to select general ledger journal vouchers whose period date is following it
dateToThe date which is used to select general ledger journal vouchers whose period date is preceding it
statusStatus of general ledger journal vouchers. Possible values: Opened, Closed, Unbalanced and NotTransferred.
remarksSearch from remarks on general ledger journal voucher
businessYearSearch by business year
businessEventTypeSearch by business event type
profitAndLossAccountTypeSearch by user defined type.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="GeneralLedgerJournalVoucherList">
               <parameter name="status" value="opened" />
               <parameter name="businessYear" value="2016" />
       </method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
<GeneralLedgerJournalVouchers>                  
       <GeneralLedgerJournalVoucher>
                <!-- structure of elements is the same as in GeneralLedgerJournalVoucherGet
       </GeneralLedgerJournalVoucher>
       ...
</GeneralLedgerJournalVouchers>
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- no privileges,  
</response>

 

3.12. GoodsReceipt API

GoodsReceiptGetGet goods receipts by document number, or by combination of document number and date.
GoodsReceiptGetPDFGet PDF file for goods receipt by document number, or by combination of document number and date.
GoodsReceiptCreateCreate new goods receipt.
GoodsReceiptUpdateUpdate existing goods receipt.
GoodsReceiptDeleteDelete goods receipt.
GoodsReceiptCancelCancel goods receipt.
GoodsReceiptListGet list of goods receipts for specified criteria
GoodsReceiptSendByEmailSends document by email to the recipient(s).
GoodsReceiptAttachmentAddAdd attachment to goods receipt.
GoodsReceiptAttachmentSetDefaultAdd attachment to goods receipt and set is as default.
GoodsReceiptAttachmentGetGet default attachment of goods receipt.
GoodsReceiptAttachmentListGet all attachments of goods receipt.

3.12.1 GoodsReceiptGet

Get goods receipt by document number, or by combination of document number and date.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2010-00002)
dateDocument date
costPositionCost position

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="GoodsReceiptGet">
       <parameter name="number" value="2012-00014" />
       <parameter name="date" type="Date" value="2012-09-26" />
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 November 2012 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
       <GoodsReceipt>
               <number>2012-00014</number>
               <date>2012-09-26</date>
               <dateOfReceival>2012-09-26</dateOfReceival>
               <businessYear>2012</businessYear>
               <city>Ljubljana</city>
               <costPosition>12</costPosition>
               <purchaseOrder>13</purchaseOrder>
               <warehouseCode>8956</warehouseCode>
               <status>Issued</status>
               <remarks>my remarks on: #(10. oktobar 2012 15:26:28)</remarks>
               <supplierCity>Oslo</supplierCity>
               <supplierCode>666000</supplierCode>
               <supplierDeliveryNote>11</supplierDeliveryNote>
               <supplierDeliveryNoteDate>2012-09-26</supplierDeliveryNoteDate>
               <supplierName>6 Partner Buyer Supplier</supplierName>
               <supplierPostalCode>0182</supplierPostalCode>
               <supplierStreet>Brennerivn.11</supplierStreet>
               <supplierTaxNumber>SI89133749</supplierTaxNumber>
               <cancelledDocumentRef>2012-00015</cancelledDocumentRef> <-- Reference to cancelled document
               <Items>
                       <Item>
                               <position>1</position>
                               <productCode>666666</productCode>
                               <calculationQuantity>2.000</calculationQuantity>
                               <associatedSerialNumbers> 222, 111</associatedSerialNumbers>
                               <supplierPrice>10.00000</supplierPrice>
                               <supplierPriceAmount>20.00000</supplierPriceAmount>
                               <supplierPriceCurrency>EUR</supplierPriceCurrency>
                               <supplierPriceInCalculationCurrency>10.00000</supplierPriceInCalculationCurrency>
                               <supplierAmountInCalculationCurrency>20.00000</supplierAmountInCalculationCurrency>
                               <supplierDiscountPercentage>10.00</supplierDiscountPercentage>
                               <supplierDiscountAmount>2.00000</supplierDiscountAmount>
                               <costsOfTransportPercentage>5.00</costsOfTransportPercentage>
                               <costsOfTransportAmount>0.90000</costsOfTransportAmount>
                               <costsOfCustomsPercentage>2.00</costsOfCustomsPercentage>
                               <costsOfCustomsAmount>0.36000</costsOfCustomsAmount>
                               <inboundVatPercentage>20.00</inboundVatPercentage>
                               <inboundVatAmount>3.60000</inboundVatAmount>
                               <costsDirectPercentage>1.00</costsDirectPercentage>
                               <costsDirectAmount>0.18000</costsDirectAmount>
                               <inventoryPrice>9.72000</inventoryPrice>
                               <inventoryAmount>19.44000</inventoryAmount>
                               <grossMarginPercentage>10.00</grossMarginPercentage>
                               <grossMarginAmount>0.97200</grossMarginAmount>
                               <grossPrice>10.69200</grossPrice>
                               <outgoingVatPercentage>20.00</outgoingVatPercentage>
                               <outgoingVatAmount>2.33280</outgoingVatAmount>
                               <retailMarginAmount>1.94400</retailMarginAmount>
                               <retailMarginPercentage>20.00</retailMarginPercentage>
                               <retailPrice>11.66400</retailPrice>
                               <salesPrice>13.99680</salesPrice>
                               <salesPriceAmount>27.99360</salesPriceAmount>
                               <calculationCurrency>EUR</calculationCurrency>  
                       </Item>
               </Items>
       </GoodsReceipt>
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Can not find goods receipt for number: XXX and date: XXX"><error/>
</response>

Error messages:
Parameter named "number" is required.
Can not find goods receipt for number: XXX and date: XXX



3.12.2 GoodsReceiptGetPDF

Get PDF for goods receipt by document number, or by combination of document number and date. Response (on OK) returns binary record for PDF file coded with Base64 coding.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2014-00001)
dateDocument date
costPositionCost position

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="GoodsReceiptGetPDF">
       <parameter name="number" value="12/2009" />
       <parameter name="date" type="Date" value="2009-12-15" />
</method>
</request>


Response
<response status="ok">
       <number>2012-01293</number>
       <date>2013-01-02</date>
       <pdfFile>JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0ZpbHRlci9GbGF0ZURlY29kZT4+CnN0cmVhbQp4nJVYS4/bNh...</pdfFile>
</response>

Response (on error)
<response status="error">
       <error description="Can not find goods receipt for number: 2013-01293 and date: 2013-01-02">
       </error>
</response>



3.12.3 GoodsReceiptCreate

Create new goods receipt.

Mandatory document attributes are: supplierCode, warehouseCode.Mandatory document item attribute is productCode. Other attributes are optional and web service will use default values and those from specified product. Default amount is 1, default date is day of execution. Amounts in item calculations can be specified by prices, amounts or percantages, where related values will be automaticly recalculated.
Additional optional item fields are: calculationQuantity, associatedSerialNumbers, supplierPrice, supplierPriceAmount, supplierPriceCurrency, supplierPriceInCalculationCurrency, supplierAmountInCalculationCurrency, supplierDiscountPercentage, supplierDiscountAmount, costsOfTransportPercentage, costsOfTransportAmount, costsOfCustomsPercentage, costsOfCustomsAmount, inboundVatPercentage, inboundVatAmount, costsDirectPercentage, costsDirectAmount, inventoryPrice, inventoryAmount, grossMarginPercentage, grossMarginAmount, grossPrice, outgoingVatPercentage, outgoingVatAmount, retailMarginAmount, retailMarginPercentage, retailPrice, salesPrice, salesPriceAmount.

Attribute associatedSerialNumbers is mandatory for products which are declared to use serial numbers (numbers delimited by comma).
Status of document is automatically set to "issued" if parameter number is specified in parameter list, or if it's status is explicitelly set to issued.

Parameters

GoodsReceiptComplex parameter with data tags like:
statusPossible values: Draft, Issued

Special purpose documen item attributes are: inventoryPriceChangeApplyToArticle, grossPriceChangeApplyToArticle, salesPriceChangeApplyToArticle. If some is set to true, related price in product will be modified acording to the price in good receipt item.

If price calculation is not specified at all in XML (all calues are missing), default price calculation from article is taken or new calculation is created based on inventory, gross and sales price from article.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="GoodsReceiptCreate">
<parameter name="GoodsReceipt">
               <date>2012-09-26</date>                                 <!-- document date
               <dateOfReceival>2012-09-26</dateOfReceival>             <!-- date of receival
               <businessYear>2012</businessYear>                               <!-- (Optional)
               <purchaseOrder>13</purchaseOrder>                       <!-- (Optional)
               <warehouseCode>8956</warehouseCode>                     <!-- (Mandatory)
               <status>Issued</status>                                 <!-- (Optional) Issued, Draft, default: Issued
               <costPosition>120</costPosition>                                <!-- (Optional)
               <supplierCode>123456</supplierCode>                     <!-- (Mandatory)
               <supplierDeliveryNote>11</supplierDeliveryNote>         <!-- (Optional)
               <supplierDeliveryNoteDate>2012-09-26</supplierDeliveryNoteDate>
               <remarks>Remark on goods receipt</remarks>              <!-- (Optional)
               <documentLanguage>Slovene</documentLanguage> <!-- (Optional) Possible document language: Slovene, English, German, Italian and Croatian
               <Items>
                       <Item>                                                          <!-- item specified with ref to product
                               <position>1</position>      <!-- position of item
                               <productCode>666666</productCode>                               <!-- product code
                               <calculationQuantity>2</calculationQuantity>                    <!-- quantity (default is 1)
                               <associatedSerialNumbers> 222, 111</associatedSerialNumbers>    <!-- serial numbers (a number per calculationQuantity of products)
                               <discountPercentage>10</discountPercentage>                     <!-- discount percentage
                       </Item>
                       <Item>
                               <position>2</position>      <!-- position of item
                               <calculationQuantity>2.000</calculationQuantity>
                               <productCode>666666</productCode>
                               <salesPriceAmount>30</salesPriceAmount>                         <!-- sales amount (sales price * calculationQuantity)
                               <associatedSerialNumbers>111, 222</associatedSerialNumbers>
                       </Item>
                       <Item>
                               <position>3</position>
                               <productCode>666666</productCode>
                               <calculationQuantity>2.000</calculationQuantity>
                               <supplierPriceAmount>60</supplierPriceAmount>                   <!-- sales amount (sales amount / calculationQuantity)
                               <associatedSerialNumbers>111, 222</associatedSerialNumbers>
                       </Item>
                       <Item>   <!-- (default quantity is 1)
                               <position>4</position>
                               <productCode>666666</productCode>
                               <associatedSerialNumbers>123</associatedSerialNumbers>
                               <supplierPrice>30.00</supplierPrice>
                       </Item>
                       <Item>
                               <position>5</position>
                               <productCode>666666</productCode>
                               <calculationQuantity>2.000</calculationQuantity>
                               <supplierPrice>10</supplierPrice>
                               <costsOfCustomsPercentage>5.00</costsOfCustomsPercentage>               <!-- customs cost percantage
                               <salesPrice>30</salesPrice>                                                     <!-- sales price
                               <associatedSerialNumbers>111, 222</associatedSerialNumbers>
                               <inventoryPriceChangeApplyToArticle>true</inventoryPriceChangeApplyToArticle>   <!-- special atribute for create and update function
                               <grossPriceChangeApplyToArticle>true</grossPriceChangeApplyToArticle>           <!-- special atribute for create and update function
                               <salesPriceChangeApplyToArticle>true</salesPriceChangeApplyToArticle>           <!-- special atribute for create and update function
                       </Item>
                       ...
               </Items>
       </parameter>
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328
<?xml version="1.0" encoding="utf-8"?>
response status="ok" >
       <number>2012-00014</number>             <!-- created document ID or number
       <date>2012-09-26</date>                 <!-- date of document
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          
</response>

Generic error messages (not related to concrete property):
Access denied. User account does not have sufficient privileges for the given request
Parameter named GoodsReceipt needed.
Error creating Goods receipt (descrition)
Goods receipt for number: X already exists!

Error messages which are related to properties are formated in a a way: "Error nr: N #propertyName - error description"
supplierCode - Missing supplier code
supplierCode - Can not find supplier for code:
warehouseCode - Missing warehouse code
warehouseCode - Warehouse does not exist
supplierTaxNumber - Tax number invalid
supplierTaxNumber - ID nr. for VAT invalid
supplierName - Entry is mandatory
city - Entry is mandatory
date - Entry is mandatory
date - Document cannot be issued retroactively because document with later date was already issued.
dateOfReceival - Entry is mandatory

Errors for document items data are formated like shown bellow (X is item sequence number)
ItemX_associatedSerialNumbers - Serial number entry is required for each piece of product.
ItemX_productCode - Entry is mandatory
ItemX_productCode - Can not find product for code:
ItemX_inboundVatPercentage - Entry is mandatory



3.12.4 GoodsReceiptUpdate

Update existing goods receipt.Data must contain goods receipt number to be able to identify document which is to be updated.

Parameters

GoodsReceipt Complex parameter with data tags

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="GoodsReceiptUpdate">
<parameter name="GoodsReceipt">
               <!--  Parameters are identical to the parameters in GoodsReceiptCreate api
       </parameter>
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328
<?xml version="1.0" encoding="utf-8"?>
response status="ok" >
       <number>2012-00014</number>             <!-- updated document ID or number
       <date>2012-09-26</date>                 <!-- date of document
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- Error messages are returned in format as described in GoodsReceiptCreate api
</response>




3.12.5 GoodsReceiptDelete

Delete sales order. Must specify parameter/s (number, number+date) to identify document for deleting.

Parameters

numberDocument number
dateDocument date

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="GoodsReceiptDelete">
       <parameter name="number" value="2012-00014" />
       <parameter name="date" type="Date" value="2012-09-26" />
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="no privileges"><error/>     <!-- document could not be found, no privileges,  
</response>

Possible error messages:
Access denied. User account does not have sufficient privileges for the given request
Parameter named "number" is required
Can not find goods receipt for number
Can not delete. Found X goods receipts
Data cannot be deleted because they are needed or referenced by other documents or data.


3.12.6 GoodsReceiptCancel

Cancel goods receipt. Must specify parameter/s (number, number+date) to identify document for canceling.

Parameters

numberDocument number
dateDocument date
costPositionCost position
statusStatus of cancelation document (draft, issuedInvoice). By Default status is issuedInvoice.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="GoodsReceiptCancel">
       <parameter name="number" value="2013-00014" />
       <parameter name="date" type="Date" value="2013-03-26" />
       <parameter name="status" value="draft" />
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Access denied. User account does not have sufficient privileges for the given request"><error/>     <!-- document could not be found, no privileges,  
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Can not cancel goods receipt for arguments number: 2013-00014 date: 2013-03-26"><error/>    <!-- document could not be canceled,  
</response>

Possible error messages:
Access denied. User account does not have sufficient privileges for the given request
Parameter named "number" is required
Can not find goods receipt for number
Can not cancel. Found X goods receipts
Found X goods receipts X. You can only cancel one goods receipt at a time
Can not cancel goods receipt X


3.12.7 GoodsReceiptList

Get list of goods receipts for criteria which is specified by API parameters.

Parameters

numberDocument number
dateFromThe date which is used to select goods receipts whose date is following it
dateToThe date which is used to select goods receipts whose date is preceding it
warehouseWarehouse code
dateOfReceivalThe date of receival
supplierDeliveryNoteDelivery Note number
purchaseOrderPurchase number
serialNumberProduct serial number
supplierSupplier name
costPositionCost position code
productProduct code, or product name
remarksDocument remarks
statusPossible values: Draft, Issued, Booked, NotBooked, CancellationDocument, CancelledDocument, WithReceivedInvoiceReference, WithoutReceivedInvoiceReference

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="GoodsReceiptList">
               <parameter name="status" value="Issued" />
               <parameter name="dateFrom" type="Date" value="2012-09-26" />
       </method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
<GoodsReceipts>                 
       <GoodsReceipt>
                <!-- structure of elements is the same as in GoodsReceiptGet
       </GoodsReceipt>
       ...
</GoodsReceipts>
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- no privileges,  
</response>


Possible error messages:Access denied. User account does not have sufficient privileges for the given request.Invalid search key!Invalid search value: X

3.12.8 GoodsReceiptSendByEmail

Sends document by email to the recipient(s).

Parameters

numberDocument number
dateDocument date (optional additional document identification)
senderEmail sender (Optional)
recipientComma delimited list of recipient(s) emails
ccCC email (Optional)
bccBCC email (Optional)
subjectMail subject (Optional)
messageMessage text (Optional)
useHtmlMessageSend message text as HTML (Optional)

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="GoodsReceiptSendByEmail">
       <parameter name="number" value="2012-00014" />
       <parameter name="date" type="Date" value="2012-09-26" />
       <parameter name="sender" value="micka@kovac.com"/>
       <parameter name="recipient" value="zoran@kovac.com,zlatko@kovac.com"/>
       <parameter name="cc" value=""/>
       <parameter name="bcc" value=""/>
       <parameter name="subject" value="TEST d.o.o.: Goods receipts nr. 0002/2010"/>
       <parameter name="message" value="Message text"/>
        <parameter name="useHtmlMessage" value="true"/>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="no privileges"><error/>     <!-- document could not be found, no privileges, mail sending failed
</response>

Error messages
Access denied. User account does not have sufficient privileges for the given request.
number   asp.error.MandatoryEntry
stDok - Document does not exist
stDok - More then one document matches criteria !



3.12.9 GoodsReceiptAttachmentAdd

Add image/attachment to goods receipt.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="GoodsReceiptAttachmentAdd">
       <parameter name="number" type="String" value="2020-00001" />
       <parameter name="attachment">
               <contents encoding="BASE64">BASE64...</contents>
               <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added attachment att.jpg to goods receipt 2020-00001.</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find goods receipt for number: 2020-00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>


3.12.10 GoodsReceiptAttachmentSetDefault

Add attachment to goods receipt and set is as default.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="GoodsReceiptAttachmentSetDefault">
       <parameter name="number" type="String" value="2020-00001" />
       <parameter name="attachment">
               <contents encoding="BASE64">BASE64...</contents>
               <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added attachment att.jpg to goods receipt 2020-00001.</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find goods receipt for number: 2020-00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>


3.12.11 GoodsReceiptAttachmentGet

Get default attachment of goods receipt.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="GoodsReceiptAttachmentGet">
       <parameter name="number" type="String" value="2020-00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <GoodsReceipt>
               <Attachments>
                       <Attachment>
                               <fileName>att.jpg</fileName>
                               <contents encoding="BASE64">BASE64</contents>
                       </Attachment>
               </Attachments>
       </GoodsReceipt>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find goods receipt for number: 2020-00001 Goods receipt does not have attachemnts.
</response>


3.12.12 GoodsReceiptAttachmentList

Get all images/attachments of article.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="GoodsReceiptAttachmentList">
       <parameter name="number" type="String" value="2020-00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <GoodsReceipt>
               <Attachments>
                       <Attachment>
                               <fileName>att1.jpg</fileName>
                               <contents encoding="BASE64">1BASE64</contents>
                       </Attachment>
                       <Attachment>
                               <fileName>att2.jpg</fileName>
                               <contents encoding="BASE64">2BASE64</contents>
                       </Attachment>
                       <Attachment>
                               <fileName>att3.jpg</fileName>
                               <contents encoding="BASE64">3BASE64</contents>
                       </Attachment>
               </Attachments>
       </GoodsReceipt>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find goods receipt for number: 2020-00001 Goods receipt does not have attachemnts.
</response>

 

3.13. InternalMovement API

InternalMovementGetGet internal movement by document number, or by combination of document number and date.
InternalMovementGetPDFGet PDF file for internal movement by document number, or by combination of document number and date.
InternalMovementCreateCreate new internal movement.
InternalMovementUpdateUpdate existing internal movement.
InternalMovementDeleteDelete internal movement.

3.13.1 InternalMovementGet

Get internal movements by number.

Parameters

numberNumber of internal movement.
documentIDInternal document identificator. In case of using this parameter, no other parameter listed abowe is needed for searching by document.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="InternalMovementGet">
       <parameter name="number" value="055/11" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <InternalMovement>

       </InternalMovement>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named "number" is required, Can not find internal movement number: 055/11,  
</response>


3.13.2 InternalMovementCreate

Create new internal movement.

Parameters

InternalMovementInternal movement's data in xml substructure.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
       <method name="InternalMovementCreate">
               <parameter name="InternalInventoryChangeDoc">
                       <date>2014-12-13</date>  <!-- Mandatory
                       <status>Issued</status>
                       <remarks>adicijski text</remarks>
                       <warehouseFromCode>MP</warehouseFromCode>  <!-- Mandatory
                       <warehouseCode>8956</warehouseCode>      <!-- Mandatory
                       <Items>
                               <Item>
                                       <calculationQuantity>2</calculationQuantity>   <!-- Mandatory
                    <productCode>666666</productCode>  <!-- Mandatory         
                </Item>
                               <Item>
                                       <calculationQuantity>8</calculationQuantity>   <!-- Mandatory
                    <productCode>666555</productCode>  <!-- Mandatory         
                </Item>
                       </Items>
               </parameter>
       </method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <number>055/11</number>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="internal movement for number: 055/11 already exists!><error/> <!-- Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named "number" must be specified., missing mandatory attributes, invalid values, no privileges, Error creating internal movement  
</response>


3.13.3 InternalMovementUpdate

Update existing internal movement.

Parameters

InternalMovementProduct's data in xml substructure

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="InternalMovementUpdate">
       <parameter name="InternalMovement">
                       <date>2014-12-13</date>  <!-- Mandatory
                       <status>Issued</status>
                       <remarks>adicijski text</remarks>
                       <warehouseFromCode>MP</warehouseFromCode>  <!-- Mandatory
                       <warehouseCode>8956</warehouseCode>      <!-- Mandatory
                       <Items>
                               <Item>
                                       <calculationQuantity>2</calculationQuantity>   <!-- Mandatory
                    <productCode>666666</productCode>  <!-- Mandatory         
                </Item>
                               <Item>
                                       <calculationQuantity>8</calculationQuantity>   <!-- Mandatory
                    <productCode>666555</productCode>  <!-- Mandatory         
                </Item>
                       </Items>
       </parameter>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <number>055/11</number>
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/> <!-- Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named "number" is required, Can not find internal movement for number: 055/11, missing mandatory attributes, invalid values, no privileges,  
</response>


3.13.4 InternalMovementDelete

Delete internal movement.

Parameters

numberUnique identifier for internal movement.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="InternalMovementDelete">
       <parameter name="number" value="055/11" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>   <! Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named "number" is required, Can not find internal movement for number: 055/11, Can not delete. Found 3  internal movement with number 055,
</response>

 

3.14. Partner API

PartnerGetByIDGet partner by partner ID.
PartnerGetByCodeGet partner by partner's code.
PartnerGetByDocumentIDGet partner by partner's documentID (internal identificator from program).
PartnerCreateCreate new partner.
PartnerUpdateUpdate existing partner.
PartnerImportImport partner by creating new and/or updating existing ones.
PartnerDeleteDelete partner.
PartnerListGet list of partners for specified criteria.
PartnerListBuyersGet list of buyers for specified criteria.
PartnerListSuppliersGet list of suppliers for specified criteria.
PartnerListEmployeesGet list of employees for specified criteria.
PartnerBuyerCreditLimitGetGet partner buyer credit limit with unpaid amount by invoices and posted debt.
PartnerAttachmentAddAdd attachment to partner.
PartnerAttachmentSetDefaultAdd attachment to partner and set is as default.
PartnerAttachmentGetGet default attachment of partner.
PartnerAttachmentListGet all attachments of partner.
PartnerAvatarAddAdd partner's avatar.
PartnerAvatarGetGet partner's avatar.
PartnerAvatarRemoveRemove partner's avatar.

3.14.1 PartnerGetByID

Get partner by partner ID.

Parameters

IDPartner ID (partner taxNumber accepted too). Partner ID is external number (matična številka) in case of legal person and in case of natural person it is registration number (EMŠO)

Example request and response


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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PartnerGetByID">
       <parameter name="ID" value="73691234" />
</method>
</request>

HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
       <Partner>
               <ID>02169711</ID>                                       <!-- Partner ID.
               <partnerCode>111</partnerCode>                  <!-- Partner code.
               <taxNumber>02169711</taxNumber>                 <!-- Tax number
               <vatID>1587277000</vatID>                               <!-- VAT number
               <companyName>Micka d.o.o </companyName>         <!-- Company name
               <companyType>Organization</ companyType>                <!-- Type of company. (Contractor, Ltd, Plc, Co, Organization, Subsidiary, Association, Direction, Unit, Division, Edu, Gov, Charity, Cooperative)
               <vatRegistration>Unknown</vatRegistration>              <!-- VAT reg type (Unknown, None, Registered)
               <dateOfRegistration></ dateOfRegistration>              <!-- Company establishment date
               <branchClassification></branchClassification>           <!-- Branch classification
               <firstName>Micka</firstName>                            <!-- For legal person is first name of contact person
               <lastName>Kovac</lastName>                              <!-- For legal person is last name of contact person
               <gender>female</ gender>                                <!-- Type of person sex. (male, female, unknown)
               <dateOfBirth></dateOfBirth>                             <!-- For natural person only   birth date
               <maritalStatus></maritalStatus>                         <!-- For natural person   (single, married, widowed, concubinance)
               <mobilePhone>064/123456</mobilePhone>
               <fax>05/625 94 40</fax>
               <eMail>micka@kovac.com,zlatko@kovac.com</eMail>         <!-- comma delimited list of emails
               <remarks>test partner for testing web services</remarks><!-- remarks for partner
               <homepage>www.testWS.com</homepage>                     <!-- homapege of partner
               <Addresses>
                       <Address>                               
                               <type>Primary</type>                            <!--Primary address (possible address types are: Invoicing, Primary, Delivery)
                               <street>Iztokova 22</street>
                               <city>Maribor</city>
                               <postalCode>2000</postalCode>
                               <country>SI</country>
                               <telephone>05/625 94 39</telephone>
                               <fax>05/625 94 39</fax>
                               <eMail>test@gmail.com<eMail>
                       </Address>
                       <Address >
                               <type>Invoicing</type>                          <!--Invoicing address, can include tags "firstAddressLine" and "additionalLine" for additional data for invoicing
                               <additionalLine>Test Company</additionalLine>
                               <firstAddressLine>Iztok Kladnik</firstAddressLine>
                               <street>Iztokova 22</street>
                               <city>Maribor</city>
                               <postalCode>2000</postalCode>
                               <country>SI</country>
                               <telephone>05/625 94 39</telephone>
                       </Address>
                       <Address >
                               <type>Delivery</type>                           <!--Delivery address, can include tag "additionalLine" for name of recipient
                               <addressCode>PE0001</addressCode>
                               <additionalLine>Test Company</additionalLine>
                               <street>Iztokova 22</street>
                               <city>Maribor</city>
                               <postalCode>2000</postalCode>
                               <country>SI</country>
                               <telephone>05/625 94 39</telephone>
                       </Address>
               </Addresses>
               <EmployeeData>
                       <status>active</status>                         <!-- Employee status (active, inactive)
                       <distanceFromHomeKm>12</distanceFromHomeKm>     <!-- Distance from home in kilometers
                       <transportRelationToWork>mb-sb</transportRelationToWork>        <!-- Route to the place of work
                       <amountOfBusTicket>20</amountOfBusTicket>       <!-- Buss transportation ticket price
                       <ownVehicleModel>audi</ownVehicleModel>         <!-- Own vehicle model
                       <ownVehicleRegNr>mb es-123</ownVehicleRegNr>    <!-- Registration number of the own vehicle
                       <Employments>
                               <Employment>
                                       <jobTitle></jobTitle>                           <!-- Employee job title
                                       <employmentType></employmentType>               <!-- Type of employment. (groupContract, individualContract, craftsman, entrepreneurshipHolder, companyOwner, lumpWorker)
                                       <payClass></payClass>                           <!-- Payment class
                                       <isHandicappedPerson>handicappedNot</isHandicappedPerson> <!-- Is handicapped person (handicapedNot, handicappedToQuota, handicappedOverQuota, handicappedHalfOverQuotaAndHalfWork)
                                       <beginDate>2000-02-01</beginDate>                       <!-- Start date of employment contract
                                       <employmentContractEndDate></employmentContractEndDate> <!-- Optional - End date of employment contract
                                       <primaryEmployment>true</primaryEmployment>                     <!-- Is primary employment (true, false)
                                       <previousWorkExperienceYears></previousWorkExperienceYears>     <!-- Years of previous work experience
                                       <previousWorkExperienceMonths></previousWorkExperienceMonths>   <!-- Months of previous work experience
                                       <previousWorkExperienceDays></previousWorkExperienceDays>               <!-- Days of previous work experience
                                       <workingAgeAllowancePercentage></workingAgeAllowancePercentage> <!-- percentage of working age allowance  
                                       <grossSalary></grossSalary>                                             <!-- Gross salary
                                       <grossSalaryCurrency></grossSalaryCurrency>                             <!-- Currency
                                       <grossSalaryCalculationFactor></grossSalaryCalculationFactor>           <!-- Numeric factor for gross salary calculation
                                       <workingHoursPerWeek></workingHoursPerWeek>                     <!-- Number of working hours per week
                                       <taxRelief></taxRelief>                                                 <!-- Tax relief
                                       <specialTaxRelief></specialTaxRelief>                                   <!-- Special tax relief
                                       <hasLowSalaryTaxRelief>false</hasLowSalaryTaxRelief>            <!-- Has Tax relief for low salary (true,false)
                                       <sickLeaveOver30hourPrice></sickLeaveOver30hourPrice>           <!-- Price for hour for sick leave over 30 days
                                       <sickLeaveOver30hourPriceCurrency>EUR</sickLeaveOver30hourPriceCurrency> <!-- Price currency for sick leave over 30 days
                                       <addPensionInsuranceAmount></>                          <!-- Additional pension insurance amount (employee cost)
                                       <addPensionInsurancePercent></>                         <!-- Additional pension insurance percent (employee cost)
                                       <addPensionInsuranceAccountNumber></>                   <!-- Additional pension insurance account number (employee cost)
                                       <addPensionInsuranceAccountReference></>                        <!-- Additional pension insurance account ref. (employee cost)
                                       <addPensionInsuranceEmployerCostAmount></>                      <!-- Additional pension insurance amount (employer cost)
                                       <addPensionInsuranceEmployerCostPercent></>                     <!-- Additional pension insurance percentage (employer cost)
                                       <addPensionInsuranceEmployerCostAccountNumber></>               <!-- Additional pension insurance account number (employer cost)
                                       <addPensionInsuranceEmployerCostAccountReference></>    <!-- Additional pension insurance account ref. (employer cost)
                               </Employment>
                       </Employments>
               </EmployeeData>
               <BuyerData>
                       <buyerCode>00000105</buyerCode>
                       <buyerGroupCode>01</buyerGroupCode>
                       <costPosition>1</costPosition>
                       <discountPercentage>5.000</discountPercentage>
                       <numberOfDaysForPayment>15</numberOfDaysForPayment>
                       <numberOfDaysForPaymentBaseDate>fromDocumentDate</numberOfDaysForPaymentBaseDate>       <!-- allowed values: fromDocumentDate, fromServiceOrDeliveryDate
                       <serialNumberForCollectionCenter></serialNumberForCollectionCenter>
                       <status>trustworthyBuyer</status>  <!-- allowed values: defaultBuyer, buyerOnBlackList, trustworthyBuyer, buyerDoesNotExistAnymore.
                       <buyerCreditLimit>900.00</buyerCreditLimit> <!-- buyer credit limit
                       <buyerCreditLimitCurrency>EUR</buyerCreditLimitCurrency>
                       <invoicingCurrency>EUR</invoicingCurrency> <!-- invoicing currency, this property is usssed for creating invoices for this buyer
                       <invoicingLanguage>EUR</invoicingLanguage> <!-- allowed values:  'Slovene' 'English' 'German' 'Croatian' 'Italian' 'Hungarian' 'Czech' 'Slovak' 'Serbian' 'Polish' 'Bulgarian'
                       <invoicingTemplateName>templateTestBuyer</invoicingTemplateName> <!-- name of template used for printing invoices for this buyer                   
               </BuyerData>
               <SupplierData>
<acceptsOrdersReceivedAtLeastDaysInAdvance>30</acceptsOrdersReceivedAtLeastDaysInAdvance>
                       <costPosition>1</costPosition>
                       <defaultExpensesAccount>120</defaultExpensesAccount>
                       <numberOfDaysForPayment>14</numberOfDaysForPayment>
                       <numberOfDaysForPaymentBaseDate>fromDocumentDate</numberOfDaysForPaymentBaseDate>       <!-- allowed values: fromDocumentDate, fromServiceOrDeliveryDate, fromDocumentReceivedDate
                       <status>defaultSupplier</status>        <!-- defaultSupplier, supplierOnBlackList, trustworthySupplier, supplierDoesNotExistAnymore
                       <supplierCode>1122</supplierCode>
               </SupplierData>
               <BankAccounts>            
                       <BankAccount>
                               <bank>SKB</bank>
                               <accountNumber>02343-0254045370</accountNumber>
                               <accountReference>99</accountReference>
                               <IBAN></IBAN>
                               <SWIFT>253</SWIFT>
                               <description></description>
                       </BankAccount>
                       <BankAccount>
                               <bank>Nova KBM d.d.</bank>
                               <accountNumber>04430-0000256970</accountNumber>
                               <accountReference>99</accountReference>
                               <IBAN></IBAN>
                               <SWIFT></SWIFT>
                               <currency></currency>
                               <status>Active</status>
                               <description></description>
                       </BankAccount>
               </BankAccounts>
               <ContactPersons>
                       <ContactPerson>
                               <contactPersonFullName>Contact person 1</contactPersonFullName>
                               <contactPersonFunction>Programmer</contactPersonFunction>
                               <eMail>test@gmail.com</eMail>
                               <mobilePhoneNumber>030 999 666</mobilePhoneNumber>
                       </ContactPerson>
                       <ContactPerson>
                               <contactPersonFullName>Contact person 1</contactPersonFullName>
                               <contactPersonFunction>Support</contactPersonFunction>
                               <eMail>test@gmail.com</eMail>
                               <phone>03 746 4362</phone>
                               <remarks>Leed programmer</remarks>
                       </ContactPerson>
               </ContactPersons>
       </Partner>
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Partner not found,  "><error/>      
</response>



3.14.2 PartnerGetByCode

Get partner by partner code.

Parameters

partnerCodePartner code.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PartnerGetByCode">
       <parameter name="partnerCode" value="1234" />
</method>
</request>

Response
Response structure is identical to the structure of response in PartnerGetByID


3.14.3 PartnerGetByDocumentID

Get partner by partner documentID.

Parameters

documentIDPartner documentID (internal id from program).

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PartnerGetByDocumentID">
       <parameter name="documentID" value="34:1234" />
</method>
</request>

Response
Response structure is identical to the structure of response in PartnerGetByID


3.14.4 PartnerCreate

Create new partner. (for more detailed partner's data structure look in API for PartnerGetByID)

Parameters

partnerPartner's data in xml substructure.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PartnerCreate">
       <parameter name="partner">
                <companyType>Organization</companyType>   <!-- Mandatory when creating info about company
                <companyName>Micka d.o.o </companyName>   <!-- Mandatory when creating info about company
               <taxNumber>02169711</taxNumber>   <!-- optional data
               <mobilePhone>064/123456</mobilePhone>
               <fax>05/625 94 40</fax>
               <eMail>micka@kovac.com,zlatko@kovac.com</eMail>
               ...
               <!--  optional data in sub elements (see properties in PartnerGetByID)
               <Addresses>
                       <Address>
                               <type></type>   <!--(possible address types are: Invoicing, Primary, Delivery)
                               ...
                       </Address>
               </Addresses>
               <BuyerData></BuyerData>
               <SupplierData></SupplierData>
               <EmployeeData></EmployeeData>
               <BankAccounts>       <!-- Bank accounts where structure is the same as displayed in abowe example og Get by ID API call
                       <BankAccount></BankAccount>
               </BankAccounts>
               <ContactPersons>     <!-- Contact persons where structure is the same as displayed in abowe example og Get by ID API call
                       <ContactPerson></ContactPerson>
                </ContactPersons>
        </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- missing mandatory attributes, invalid values, no privileges,  
</response>


3.14.5 PartnerUpdate

Update existing partner.

Parameters

partnerPartner's data in xml substructure.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PartnerUpdate">
       <parameter name="partner">
                <partnerCode>7369</partnerCode>
               <!--other params as in PartnerCreate
        </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- missing mandatory attributes, invalid values, no privileges,  
</response>


3.14.6 PartnerDelete

Delete partner.

Parameters

IDPartner's ID.
taxNumberPartner's tax number.
partnerCodePartner's code.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PartnerDelete">
        <parameter name="ID" value="7369" />
</method>
</request>

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PartnerDelete">
        <parameter name="taxNumber" value="SI12345678" />
</method>
</request>

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PartnerDelete">
        <parameter name="partnerCode" value="PA7369" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>
</response>


3.14.7 PartnerImport

Import partner by creating new and/or updating existing ones. Parameter importType can be used to specify type of import. If parameter is not specified, createOrUpdate is used as default. For updating partner with this api call, partner's data must contain code as unique identifier.

Parameters

importTypeFlag for the type of import
  • createOrUpdate Import all - create new and update existing partners
  • createOnly  Skip import for existing partners
  • updateOnly  Skip import of new partners
partnerPartner's data in xml substructure.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PartnerImport">
       <parameter name="importType" value="createOrUpdate" />
       <parameter name="partner">              <!-- parameter here is the same as for PartnerUpdate or PartnerCreate depending on importType
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <ID></ID>
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- missing mandatory attributes, invalid values, no privileges,  
</response>


3.14.8 PartnerList

Get list of partners for specified criteria.

Parameters

partnerTypeType of partners to be answered. If this parameter is missing, answer all types of partners. Possible types are:
  • buyer 
  • supplier 
  • user 
searchKeySearch key. The value from this field is used for searching for: ( company name for partners as legal person, given name and name for partners as physical person)
partnerCodePartner's code
taxNumberTax number
streetStreet
postalCodeOrCityPostal code or City
eMailEmail
mobileOrPhoneNumberMobile or phone number
companyTypeCompany type where parameter value is the same as possible values of tag companyType described abowe

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PartnerList">
       <parameter name="searchKey" type="String" value="MICKA D O O" />
       <parameter name="postalCodeOrCity" type="String" value="Maribor" />
        <parameter name="street" type="String" value="Iztokova" />
       <parameter name="partnerCode" type="String" value="111" />
       <parameter name="partnerType" value="buyer"/>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <Partner>
                <!-- structure of each partner is the same as in PartnerGetByID
       </Partner>
       <Partner>
       </Partner>
       ...
</response>


3.14.9 PartnerListBuyers

Get list of buyers for specified criteria. Response structure is identical to API "PartnerList"

Parameters

searchKeySearch key. The value from this field is used for searching for: (company name for partners as legal person, given name and name for partners as physical person)
partnerCodePartner's code
buyerCodeBuyer's code
taxNumberTax number
streetStreet
postalCodeOrCityPostal code or City
eMailEmail
mobileOrPhoneNumberMobile or phone number
buyerCountryBuyer country iso code
statusStatus of the buyers to be answered. It is optional and possible types are:
  • defaultBuyer 
  • buyerOnBlackList 
  • trustworthyBuyer 
  • buyerDoesNotExistAnymore 

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PartnerListBuyers">
       <parameter name="buyerCode" type="String" value="111" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <Partner>
                <!-- structure of each partner is the same as in PartnerGetByID
       </Partner>
       <Partner>
       </Partner>
       ...
</response>


3.14.10 PartnerListSuppliers

Get list of suppliers for specified criteria. Response structure is identical to API "PartnerList"

Parameters

searchKeySearch key. The value from this field is used for searching for: (company name for partners as legal person, given name and name for partners as physical person)
partnerCodePartner's code
supplierCodeSupplier's code
taxNumberTax number
streetStreet
postalCodeOrCityPostal code or City
eMailEmail
mobileOrPhoneNumberMobile or phone number
statusStatus of the suppliers to be answered. It is optional and possible types are:
  • defaultSupplier 
  • supplierOnBlackList 
  • trustworthySupplier 
  • supplierDoesNotExistAnymore 

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PartnerListSupplier">
       <parameter name="supplierCode" type="String" value="111" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <Partner>
                <!-- structure of each partner is the same as in PartnerGetByID
       </Partner>
       <Partner>
       </Partner>
       ...
</response>


3.14.11 PartnerListEmployees

Get list of employees for specified criteria. Response structure is identical to API "PartnerList"

Parameters

searchKeySearch key. The value from this field is used for searching for: (company name for partners as legal person, given name and name for partners as physical person)
partnerCodePartner's code
taxNumberTax number
statusStatus of the employees. Possible types are:
  • active 
  • inactive 

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PartnerListEmployees">
       <parameter name="partnerCode" type="String" value="111" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <Partner>
                <!-- structure of each partner is the same as in PartnerGetByID
       </Partner>
       <Partner>
       </Partner>
       ...
</response>


3.14.12 PartnerBuyerCreditLimitGet

Get partner buyer credit limit with unpaid amount by invoices and posted debt.

Parameters

IDPartner's ID.
taxNumberPartner's tax number.
partnerCodePartner's code.
creditLimitDateDate on which credit limit is calculated, if parameter is empty or not present, todays date is taken.
currencyCurreny of results, if not specified default currency is taken

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PartnerBuyerCreditLimitGet">
       <parameter name="partnerCode" value="100011" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <buyerCreditLimit>20,00</buyerCreditLimit>
       <unpaidInvoicesAmount>16.278,76</unpaidInvoicesAmount>
       <postedDebt>5.167,96</postedDebt>
       <currency>EUR</currency>
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Partner not found, Partner xyz is not defined as buyer!, Buyer kyz does not have defined credit limit or it is below minimum required amount! "><error/>    
</response>


3.14.13 PartnerAttachmentAdd

Add image/attachment to partner.

Parameters

partnerCodePartner code.
documentIDPartner's document ID.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PartnerAttachmentAdd">
       <parameter name="partnerCode" type="String" value="00001" />
       <parameter name="attachment">
               <contents encoding="BASE64">BASE64...</contents>
               <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added attachment att.jpg to partner 00001.</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named "partnerCode" or "documentID" is required, Can not find partner for code: 00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>


3.14.14 PartnerAttachmentSetDefault

Add attachment to partner and set it as default.

Parameters

partnerCodePartner code.
documentIDPartner's document ID.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PartnerAttachmentSetDefault">
       <parameter name="partnerCode" type="String" value="2020-00001" />
       <parameter name="attachment">
               <contents encoding="BASE64">BASE64...</contents>
               <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added attachment att.jpg to partner 2020-00001.</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named "partnerCode" or "documentID" is required., Can not find partner for code: 00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>


3.14.15 PartnerAttachmentGet

Get default attachment of partner.

Parameters

partnerCodePartner code.
documentIDPartner's document ID.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PartnerAttachmentGet">
       <parameter name="partnerCode" type="String" value="00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <Partner>
               <Attachments>
                       <Attachment>
                               <fileName>att.jpg</fileName>
                               <contents encoding="BASE64">BASE64</contents>
                       </Attachment>
               </Attachments>
       </Partner>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named "partnerCode" or "documentID" is required., Can not find partner for code: 00001, partner does not have attachemnts.
</response>


3.14.16 PartnerAttachmentList

Get all images/attachments of article.

Parameters

partnerCodePartner code.
documentIDPartner's document ID.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PartnerAttachmentList">
       <parameter name="partnerCode" type="String" value="2020-00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <Partner>
               <Attachments>
                       <Attachment>
                               <fileName>att1.jpg</fileName>
                               <contents encoding="BASE64">1BASE64</contents>
                       </Attachment>
                       <Attachment>
                               <fileName>att2.jpg</fileName>
                               <contents encoding="BASE64">2BASE64</contents>
                       </Attachment>
                       <Attachment>
                               <fileName>att3.jpg</fileName>
                               <contents encoding="BASE64">3BASE64</contents>
                       </Attachment>
               </Attachments>
       </Partner>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named "partnerCode" or "documentID" is required., Can not find partner for code: 00001, partner does not have attachemnts.
</response>


3.14.17 PartnerAvatarAdd

Add avatar to partner. If partner already has avatar, old one is removed and new one set.

Parameters

partnerCodePartner code.
documentIDPartner's document ID.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PartnerAvatarAdd">
       <parameter name="partnerCode" type="String" value="00001" />
       <parameter name="attachment">
               <contents encoding="BASE64">BASE64...</contents>
               <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added avatar att.jpg to partner 00001.</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named "partnerCode" or "documentID" is required, Can not find partner for code: 00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>


3.14.18 PartnerAvatarGet

Get partner's avatar.

Parameters

partnerCodePartner code.
documentIDPartner's document ID.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PartnerAvatarGet">
       <parameter name="partnerCode" type="String" value="00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <Partner>
               <Attachments>
                       <Attachment>
                               <fileName>att.jpg</fileName>
                               <contents encoding="BASE64">BASE64</contents>
                       </Attachment>
               </Attachments>
       </Partner>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named "partnerCode" or "documentID" is required., Can not find partner for code: 00001, partner does not have avatar.
</response>


3.14.19 PartnerAvatarRemove

Remove partner's avatar.

Parameters

partnerCodePartner code.
documentIDPartner's document ID.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PartnerAvatarRemove">
       <parameter name="partnerCode" type="String" value="00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully removed avatar att.jpg to partner 00001.</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named "partnerCode" or "documentID" is required., Can not find partner for code: 00001, partner does not have avatar.
</response>

 

3.15. Product API

ProductGetByCodeGet product by product's code.
ProductCreateCreate new product
ProductUpdateUpdate existing product
ProductPriceCalculationUpdateUpdate product price calculation.
ProductMassPriceCalculationUpdateUpdate up to 5000 price calculations with setting only 3 basic prices (supplier price, gross price and sales price)
ProductImportImport product by creating new and/or updating existing one.
ProductMassImportImport up to 5000 products with basic data.
ProductDeleteDelete product.
ProductListGet list of products for specified criteria
ProductPriceListGetGet price list for product if used for specified product
ProductPriceDiscountActionListGet price discount action list for given article.
ProductPriceDiscountActionAddAdd price discount action list for given articles.
ProductImageAddAdd image/attachment to product.
ProductImageSetDefaultAdd image/attachment to product and set is as default.
ProductImageGetGet default image/attachment of product.
ProductImageListGet all images/attachments of product.

3.15.1 ProductGetByCode

Get product by productCode.

Parameters

productCodeProduct code.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ProductGetByCode">
       <parameter name="productCode" value="PA2521U-2AC3" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <Product>
               <productCode>PA2521U-2AC3</productCode>                 <!-- (Mandatory and Unique)
               <barCode></barCode>                                     <!-- (Optional but must be unique)
               <catalogueCode>V000061280</catalogueCode>               <!-- (Optional)
               <status>active</status>                                 <!-- (Optional   if not specified default is used   true=active, false=inactive = product can not be put on the document
               <type>goodsWithoutStockManagement</type>                <!-- (Optional   if not specified default is used - goodsWithStockManagement). Possible types: services, goodsWithStockManagement, goodsWithoutStockManagement, rawMaterial, intermediateProduct, product, license.
               <trackItemsBySerialNumbers>true</trackItemsBySerialNumbers>             <!-- (Optional   default false)
               <name>TOSHIBA charger 15V/ 6A 90 W</name>                               <!-- (one of properties: "name" or "description" is mandatory)
               <description>Toshiba charger for 15V, 6A, 90W, 3-pin</description>                                      <!-- (one of properties: "name" or "description" is mandatory)
               <englishName></englishName>                             <!-- (Optional)
               <englishDescription></englishDescription>               <!-- (Optional)
               <germanName></germanName>                               <!-- (Optional)
               <germanDescription></germanDescription>                 <!-- (Optional)
               <productGroupPrimary>01125</productGroupPrimary>        <!-- (Optional)
               <productGroupSecondary>00106</productGroupSecondary>    <!-- (Optional)
               <customProperty1>true</customProperty1>                 <!-- (Optional)
               <customProperty2>leather</customProperty2>              <!-- (Optional)
               <customProperty3>shine</customProperty3>                <!-- (Optional)
               <customProperty4>XL</customProperty4>                   <!-- (Optional)
               <brand>Minoti</brand>                                   <!-- (Optional)
               <costPosition>0001</costPosition>                       <!-- (Optional). This property can be used as product selection criteria for several reports.
               <unit>piece</unit>                                      <!-- (Optional)
               <packingQuantity>5.000</packingQuantity>                <!-- (Optional)
               <minimalStockQuantity>100.0000</minimalStockQuantity>   <!-- (Optional)
               <warrantyPeriod>24</warrantyPeriod>                     <!-- (Optional)
               <weight>0.500000</weight>                               <!-- (Optional)
               <useOfPriceList>false</useOfPriceList>  <!-- (Optional   default false) true=use price list for the product, false=do not use price list for product.
               <vatPercentage>20.0</vatPercentage>     <!-- (Mandatory. Values: 0, 8.5, 20)
               <currency>EUR</currency>                <!-- (Optional)
               <exchangeRate>SlovenianBankMiddleRate</exchangeRate>    <!-- (Optional. Values: SlovenianBankMiddleRate , NLBSellingRate. Default: SlovenianBankMiddleRate)
               <purchasePrice>20.49</purchasePrice>    <!-- (Optional)
               <retailPrice>30.00</retailPrice>        <!-- for types of products other then: "rawMaterial" and "intermediateProduct", one of product properties: retailPrice or grossPrice must be specified.
               <grossPrice>25.00</grossPrice>          <!-- for types of product: "rawMaterial" or "intermediateProduct", one of product properties: retailPrice or grossPrice must be specified
               <procurementTransactionAccount>760200</procurementTransactionAccount>                           <!-- (Optional)
               <domesticSalesTransactionAccount>760100</domesticSalesTransactionAccount>                       <!-- (Optional)
               <foreignSalesTransactionAccount>760100</foreignSalesTransactionAccount>                         <!-- (Optional)
               <allowChangeOfProductDescriptionOnTheInvoice>false</allowChangeOfProductDescriptionOnTheInvoice> <!-- (Optional   default false)
               <allowChangeOfPriceOnTheInvoice>false</allowChangeOfPriceOnTheInvoice>                          <!-- (Optional   default false)
               <allowChangeOfVatRateOnTheInvoice>false</allowChangeOfVatRateOnTheInvoice>                      <!-- (Optional   default false)
               <invoicingRemarks>Technical documentation for the bottom of the document</invoicingRemarks>     <!-- (Optional)
               <countryOfOrigin>SI</countryOfOrigin>                                         <!-- (Optional) ISO code for country can be inserted
               <defaultWarehouseLocation>Hidden behind doors</defaultWarehouseLocation>      <!-- (Optional) default warehouse location
               <onlineShopVisibility>visibleOnline</onlineShopVisibility>                  <!-- Optional, this attribute is used to tell if product is visible in online web shop, possible values are: visibleOnline, notVisibleOnline.
               <itemWidth>10.90</itemWidth>               <!-- (Optional)
               <itemHeight>20.99</itemHeight>             <!-- (Optional)
               <itemDepth>15.15</itemDepth>               <!-- (Optional)
               <deliveryTimeInDays></deliveryTimeInDays>  <!-- (Optional) delivery time in number of days
               <intrastatCn8Code>88888888</intrastatCn8Code>  <!-- (Optional)
       </Product>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <productCode> is required, Can not find product for code: PA2521U-2AC3,  
</response>


3.15.2 ProductCreate

Create new product. (for product's data structure look in API for ProductGetByCode). Property productCode is not obligatory (if not specified, it will be automatically generated), but if product with such code already exists, error response will be returned.

Parameters

productProduct's data in xml substructure.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ProductCreate">
       <parameter name="product">
               <productCode>PA2521U-2AC3</productCode>                         <!-- (Mandatory and Unique in case there is no counter set. In case counter is set this is optional)
               <catalogueCode>V000061280</catalogueCode>                       <!-- (Optional)
               <status>active</status>                                         <!-- (Optional   if not specified default is used   true=active, false=inactive = product can not be put on the document
               <type>goodsWithStockManagement</type>                           <!-- (Optional   if not specified default is used - goodsWithoutStockManagement). Possible types: services, goodsWithStockManagement, goodsWithoutStockManagement, rawMaterial, intermediateProduct, product, license.
               <trackItemsBySerialNumbers>true</trackItemsBySerialNumbers>     <!-- (Optional   default false)
               <name>TOSHIBA charger 15V/ 6A 90 W</name>                       <!-- (one of properties: "name" or "description" is mandatory)
               <description>Toshiba charger for 15V, 6A, 90W, 3-pin</description>      <!-- (one of properties: "name" or "description" is mandatory)
               <englishName></englishName>                             <!-- (Optional)
               <englishDescription></englishDescription>               <!-- (Optional)
               <germanName></germanName>                               <!-- (Optional)
               <germanDescription></germanDescription>                 <!-- (Optional)
               <productGroupPrimary>01125</productGroupPrimary>                <!-- (Optional)
               <brand>TOSHIBA</brand>                                          <!-- (Optional)
               <unit>piece</unit>                                              <!-- (Optional)
               <packingQuantity>1.000</packingQuantity>                        <!-- (Optional)
               <minimalStockQuantity>10</minimalStockQuantity>                 <!-- (Optional)
               <warrantyPeriod>24</warrantyPeriod>     <!-- (Optional)
               <useOfPriceList>false</useOfPriceList>  <!-- (Optional   default false) true=use price list for the product, false=do not use price list for product.
               <vatPercentage>20.0</vatPercentage>     <!-- (Mandatory. Values: 0, 8.5, 20)
               <currency>EUR</currency>                <!-- (Optional)
               <exchangeRate>SlovenianBankMiddleRate</exchangeRate>            <!-- (Optional. Values: SlovenianBankMiddleRate , NLBSellingRate. Default: SlovenianBankMiddleRate)
               <purchasePrice>20.49</purchasePrice>    <!-- (Optional)
               <retailPrice>30.00</retailPrice>        <!-- for types of products other then: "rawMaterial" and "intermediateProduct", one of product properties: retailPrice or grossPrice must be specified.
               <grossPrice>25.00</grossPrice>          <!-- for types of product: "rawMaterial" or "intermediateProduct", one of product properties: retailPrice or grossPrice must be specified
               <procurementTransactionAccount>760200</procurementTransactionAccount>                   <!-- (Optional)
               <domesticSalesTransactionAccount>760100</domesticSalesTransactionAccount>               <!-- (Optional)
               <foreignSalesTransactionAccount>760100</foreignSalesTransactionAccount>                 <!-- (Optional)
               <allowChangeOfProductDescriptionOnTheInvoice>true</allowChangeOfProductDescriptionOnTheInvoice>         <!-- (Optional   default false)
               <allowChangeOfPriceOnTheInvoice>true</allowChangeOfPriceOnTheInvoice>                   <!-- (Optional   default false)
               <allowChangeOfVatRateOnTheInvoice>false</allowChangeOfVatRateOnTheInvoice>              <!-- (Optional   default false)
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <productCode>PA2521U-2AC3</productCode>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Product for productCode: PA2521U-2AC3 already exists!><error/> <!-- Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named <product> must be specified., missing mandatory attributes, invalid values, no privileges, Error creating product  
</response>


3.15.3 ProductUpdate

Update existing product.

Parameters

productProduct's data in xml substructure

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ProductUpdate">
       <parameter name="product">
               <productCode>PA2521U-2AC3</productCode>                         <!-- (Mandatory and Unique)
               <catalogueCode>V000061280</catalogueCode>                       <!-- (Optional)
               <status>active</status>                                         <!-- (Optional   if not specified default is used   true=active, false=inactive = product can not be put on the document
               <type>product</type>                                            <!-- (Optional   if not specified default is used - goodsWithoutStockManagement). Possible types: services, goodsWithStockManagement, goodsWithoutStockManagement, rawMaterial, intermediateProduct, product, license.
               <trackItemsBySerialNumbers>true</trackItemsBySerialNumbers>     <!-- (Optional   default false)
               <name>TOSHIBA charger 15V/ 6A 90 W </name>                      <!-- (one of properties: "name" or "description" is mandatory)
               <description>Toshiba charger for 15V, 6A, 90W, 3-pin</description>                                      <!-- (one of properties: "name" or "description" is mandatory)
               <englishName></englishName>                             <!-- (Optional)
               <englishDescription></englishDescription>               <!-- (Optional)
               <germanName></germanName>                               <!-- (Optional)
               <germanDescription></germanDescription>                 <!-- (Optional)
               <unit>piece</unit>                                                      <!-- (Optional)
               <packingQuantity>1.000</packingQuantity>                                <!-- (Optional)
               <minimalStockQuantity>20</minimalStockQuantity>                         <!-- (Optional)
               <warrantyPeriod>36</warrantyPeriod>     <!-- (Optional)
               <vatPercentage>20.0</vatPercentage>     <!-- (Mandatory. Values: 0, 8.5, 20)
               <currency>EUR</currency>                        <!-- (Optional)
               <purchasePrice>20.49</purchasePrice>    <!-- (Optional)
               <retailPrice>30.00</retailPrice>                <!-- for types of products other then: "rawMaterial" and "intermediateProduct", one of product properties: retailPrice or grossPrice must be specified.
               <grossPrice>25.00</grossPrice>          <!-- for types of product: "rawMaterial" or "intermediateProduct", one of product properties: retailPrice or grossPrice must be specified
               <allowChangeOfProductDescriptionOnTheInvoice>true</allowChangeOfProductDescriptionOnTheInvoice>                 <!-- (Optional   default false)
               <allowChangeOfPriceOnTheInvoice>false</allowChangeOfPriceOnTheInvoice>          <!-- (Optional   default false)
               <allowChangeOfVatRateOnTheInvoice>true</allowChangeOfVatRateOnTheInvoice>       <!-- (Optional   default false)
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <productCode>PA2521U-2AC3</productCode>
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/> <!-- Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named <product> needed, Product's property <productCode> is required, Can not find product for productCode: PA2521U-2AC3, missing mandatory attributes, invalid values, no privileges,  
</response>


3.15.4 ProductPriceCalculationUpdate

Update product's price calculation.

Parameters

productCodeUnique identifier for product.
applyPricesToArticleDecide if inventory, gross and sales prices are applied also to article.
priceCalculationPrice calculation

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
       <method name="ProductPriceCalculationUpdate">
                  <parameter name="productCode" value="000001" />
                  <parameter name="applyPricesToArticle" type="Boolean" value="true" />
                  <parameter name="priceCalculation">
                               <calculationCurrency>EUR</calculationCurrency>
                               <costsDirectAmount>0.00000</costsDirectAmount>
                               <costsDirectPercentage>0.00</costsDirectPercentage>
                               <costsOfCustomsAmount>0.00000</costsOfCustomsAmount>
                               <costsOfCustomsPercentage>0.00</costsOfCustomsPercentage>
                               <costsOfTransportAmount>0.00000</costsOfTransportAmount>
                               <costsOfTransportPercentage>0.00</costsOfTransportPercentage>
                               <grossMarginAmount>7.00000</grossMarginAmount>
                               <grossMarginPercentage>38.89</grossMarginPercentage>
                               <grossPrice>25.00000</grossPrice>
                               <inboundVatAmount>0.00000</inboundVatAmount>
                               <inboundVatPercentage>0.00</inboundVatPercentage>
                               <inventoryPrice>18.00000</inventoryPrice>
                               <outgoingVatAmount>5.94000</outgoingVatAmount>
                               <outgoingVatPercentage>22.00</outgoingVatPercentage>
                               <retailMarginAmount>9.00000</retailMarginAmount>
                               <retailMarginPercentage>50</retailMarginPercentage>
                               <retailPrice>27.00000</retailPrice>
                               <salesPrice>32.94000</salesPrice>
                               <supplierDiscountAmount>0.00000</supplierDiscountAmount>
                               <supplierDiscountPercentage>0.00</supplierDiscountPercentage>
                               <supplierPrice>18.00000</supplierPrice>
                               <supplierPriceCurrency>EUR</supplierPriceCurrency>
                               <supplierPriceInCalculationCurrency>18.00000</supplierPriceInCalculationCurrency>
                  </parameter>
       </method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
    <message>Successfully updated price calculation for product with code 00001</message>
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>   <! Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named <productCode> is required, Can not find product for productCode: PA2521U-2AC3
</response>


3.15.5 ProductMassPriceCalculationUpdate

Update up to 5000 product's price calculations. In this case only 3 basic prices can be updated which are supplier price, gross price and sales price.

Parameters

applyPricesToArticleDecide if inventory, gross and sales prices are applied also to article.
priceCalculationsPrice calculations

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ProductMassPriceCalculationUpdate">
               <parameter name="applyPricesToArticle"  type="Boolean" value="true"/>
          <parameter name="priceCalculations">
                  <PriceCalculations>
                               <PriceCalculation>
                                       <productCode>36457558</productCode>
                                       <supplierPrice>10.50</supplierPrice>
                                       <grossPrice>30.44</grossPrice>
                                       <salesPrice>40.99</salesPrice>
                               </PriceCalculation>
                               <PriceCalculation>
                                       <productCode>000009</productCode>
                                       <supplierPrice>11.50</supplierPrice>
                                       <grossPrice>32.44</grossPrice>
                                       <salesPrice>42.99</salesPrice>
                               </PriceCalculation>
                               <PriceCalculation>
                                       <productCode>000010</productCode>
                                       <supplierPrice>13.50</supplierPrice>
                                       <grossPrice>36.44</grossPrice>
                                       <salesPrice>47.99</salesPrice>
                               </PriceCalculation>
                       </PriceCalculations>
               </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
         <message>Product price calculation for product with code 36457558 successfully updated.</message>
          <message>Product price calculation for product with code 000009 successfully updated.</message>
          <message>Product price calculation for product with code 000010 successfully updated.</message>
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!--Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Maximum number of  price calculations for update exceeded, Product for code 0099 not foud.
</response>


3.15.6 ProductImport

Import product by creating new and/or updating existing ones. Parameter 'importType' can be used to specify type of import. If parameter is not specified, "createOrUpdate" is used as default. For updating product with this api call, product's data must contain code as unique identifier.

Parameters

importTypeFlag for the type of import
  • createOrUpdate Import all - create new and update existing partners
  • createOnly  Skip import for existing partners
  • updateOnly  Skip import of new partners
productProduct's data in xml substructure.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ProductImport">
       <parameter name="importType" value="createOrUpdate" />
       <parameter name="product">              <!-- parameter here is the same as for ProductUpdate or ProductCreate depending on importType
               <productCode>PA2521U-2AC3</productCode>                         <!-- (Mandatory and Unique)
               <catalogueCode>V000061280</catalogueCode>                       <!-- (Optional)
               <status>active</status>                                         <!-- (Optional   if not specified default is used   true=active, false=inactive = product can not be put on the document
               <type>product</type>                                            <!-- (Optional   if not specified default is used - goodsWithoutStockManagement). Possible types: services, goodsWithStockManagement, goodsWithoutStockManagement, rawMaterial, intermediateProduct, product, license.
               <trackItemsBySerialNumbers>true</trackItemsBySerialNumbers>     <!-- (Optional   default false)
               <name>TOSHIBA charger 15V/ 6A 90 W </name>                      <!-- (one of properties: "name" or "description" is mandatory)
               <description>Toshiba charger for 15V, 6A, 90W, 3-pin</description>                                      <!-- (one of properties: "name" or "description" is mandatory)
               <unit>piece</unit>                                                      <!-- (Optional)
               <packingQuantity>1.000</packingQuantity>                                <!-- (Optional)
               <minimalStockQuantity>20</minimalStockQuantity>                         <!-- (Optional)
               <warrantyPeriod>36</warrantyPeriod>     <!-- (Optional)
               <vatPercentage>20.0</vatPercentage>     <!-- (Mandatory. Values: 0, 8.5, 20)
               <currency>EUR</currency>                        <!-- (Optional)
               <purchasePrice>20.49</purchasePrice>    <!-- (Optional)
               <retailPrice>30.00</retailPrice>                <!-- for types of products other then: "rawMaterial" and "intermediateProduct", one of product properties: retailPrice or grossPrice must be specified.
               <grossPrice>25.00</grossPrice>          <!-- for types of product: "rawMaterial" or "intermediateProduct", one of product properties: retailPrice or grossPrice must be specified
               <allowChangeOfProductDescriptionOnTheInvoice>true</allowChangeOfProductDescriptionOnTheInvoice>                 <!-- (Optional   default false)
               <allowChangeOfPriceOnTheInvoice>false</allowChangeOfPriceOnTheInvoice>          <!-- (Optional   default false)
               <allowChangeOfVatRateOnTheInvoice>true</allowChangeOfVatRateOnTheInvoice>       <!-- (Optional   default false)
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <parameter name="productCode" value="PA2521U-2AC3" />
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!--Possible errors:  Access denied. User account does not have sufficient privileges for the given request, missing mandatory attributes, invalid
</response>


3.15.7 ProductMassImport

Import up to 5000 products with basic data, by creating new and/or updating existing ones. Parameter 'importType' can be used to specify type of import. If parameter is not specified, "createOrUpdate" is used as default. For updating product with this api call, product's data must contain code as unique identifier.

Parameters

importTypeFlag for the type of import
  • createOrUpdate Import all - create new and update existing products
  • createOnly  Skip import for existing products
  • updateOnly  Skip import of new products
productsProducts basic data in xml substructure. Below is and example of all basic basic data that can be set.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ProductMassImport">
       <parameter name="importType" value="createOrUpdate" />
          <parameter name="products">
                  <Products>
                               <Product>
                                       <productCode>36457558</productCode>     <!-- (Mandatory and Unique)
                                       <name>Mass import product 1</name>      <!-- (one of properties: "name" or "description" is mandatory)
                                       <description>Mass import product 1 description</description>        <!-- (one of properties: "name" or "description" is mandatory)
                                       <vatPercentage>22</vatPercentage>         <!-- (Mandatory. Values: 0, 9.5, 22)
                                       <currency>EUR</currency>         <!-- (Optional)
                                       <unit>pc</unit>         <!-- (Optional)
                                       <allowChangeOfProductDescriptionOnTheInvoice>true</allowChangeOfProductDescriptionOnTheInvoice>
                                       <status>active</status>                                         <!-- (Optional   if not specified default is used   true=active, false=inactive = product can not be put on the document
                                       <type>product</type>                                            <!-- (Optional   if not specified default is used - goodsWithoutStockManagement). Possible types: services, goodsWithStockManagement, goodsWithoutStockManagement, rawMaterial, intermediateProduct, product, license.
                                       <purchasePrice>20.49</purchasePrice>    <!-- (Optional)
                                       <retailPrice>30.00</retailPrice>                <!-- for types of products other then: "rawMaterial" and "intermediateProduct", one of product properties: retailPrice or grossPrice must be specified.
                                       <grossPrice>25.00</grossPrice>          <!-- for types of product: "rawMaterial" or "intermediateProduct", one of product properties: retailPrice or grossPrice must be specified
                               </Product>
                               ....
                       </Products>
               </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
       <message>Product for code 36457559 successfully imported.</message>
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!--Possible errors:  Access denied. User account does not have sufficient privileges for the given request, missing mandatory attributes, Product for code 0099 not foud.,  Product for code 8847 already exists.
</response>


3.15.8 ProductDelete

Delete product.

Parameters

productCodeUnique identifier for product.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ProductDelete">
       <parameter name="productCode" value="PA2521U-2AC3" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>   <! Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named <productCode> is required, Can not find product for productCode: PA2521U-2AC3, Can not delete. Found 3  product with productCode: PA2521U-2AC3,
</response>


3.15.9 ProductList

Get list of products for specified criteria.

Parameters

productCodeProduct's code.
productCodeFromSearch by product code range.
productCodeToSearch by product code range.
searchKeySearch key. The value from this property is used for searching for values in fields: "name", "description" and "brand"
supplierCodeSupplier code
barCodeBar code
brandName of the product's brand
productGroupCode of product group (primary or secondary)
statusUsage status (active, inactive)
typeType of article, possible types: services, goodsWithStockManagement, goodsWithoutStockManagement, rawMaterial, intermediateProduct, product, license
catalogueCodeCatalogue code.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ProductList">
       <parameter name="searchKey" type="String" value="" />
       <parameter name="productCode" value="123456" />
       <parameter name="barCode" value="" />
       <parameter name="brand" type="String" value="Samsung" />
       <parameter name="status" value="active"/>
</method>
</request>

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ProductList">
       <parameter name="productCodeFrom" value="ART-1*" />
        <parameter name="productCodeTo" value="ART-3*" />
</method>
</request>


Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <Product>
                <!-- structure of product data is the same as in ProductGetByCode
       </Product>
       <Product>
                <!-- structure of product data is the same as in ProductGetByCode
       </Product>
       ...
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Access denied. User account does not have sufficient privileges for the given request, Invalid search keys, invalid values, no privileges,  
</response>


3.15.10 ProductPriceListGet

Get price list for product if used for specified product.

Parameters

productCodeProduct's code.
priceListCurrencyPrice list currency
priceListDatePrice list date

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ProductPriceListGet">
       <parameter name="productCode" value="123456" />
       <parameter name="priceListCurrency" value="EUR" />
       <parameter name="priceListDate" value="2014-11-13" />
</method>
</request>


Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <PriceListItem>
               <grossPrice>160.00000</grossPrice>
               <productPriceListCurrency>EUR</productPriceListCurrency>
               <purchasePrice>101.00000</purchasePrice>
               <retailPrice>300.00000</retailPrice>
               <validFrom>2014-11-11</validFrom>
               <validTo>2014-11-13</validTo>
       </PriceListItem>
               <PriceListItem>
               <grossPrice>170.00000</grossPrice>
               <productPriceListCurrency>EUR</productPriceListCurrency>
               <purchasePrice>106.00000</purchasePrice>
               <retailPrice>366.00000</retailPrice>
               <validFrom>2014-12-11</validFrom>
               <validTo>2015-01-13</validTo>
       </PriceListItem>
       ...
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Access denied. User account does not have sufficient privileges for the given request, Invalid search keys, invalid values, no privileges,  
</response>

<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Use of price list for this product is disabled."><error/>
</response>


3.15.11 ProductPriceDiscountActionList

Get price discount action list for given article.

Parameters

productCodeProduct's code.
productGroupCodeProduct group's code.
buyerGroupCodeBuyer group's code.
warehouseCodeWarehouse code.
validFromValidity date from.
validToValidity date to.
discountPercentageDisctount percentage.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ProductPriceDiscountActionList">
       <parameter name="productCode" type="String" value="000001" />
       <parameter name="productGroupCode" type="String" value="ABC" />
       <parameter name="buyerGroupCode" type="String" value="101" />
       <parameter name="warehouseCode" type="String" value="WH01" />
       <parameter name="validFrom" type="Date" value="2021-05-01" />
       <parameter name="validTo" type="Date" value="2021-05-31" />      
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
       <ProductPriceDiscountAction>
               <discountPercentage>50.0000</discountPercentage>
               <productCode>000001</productCode>
               <validFrom>2021-05-10</validFrom>
               <validTo>2021-05-14</validTo>
       </ProductPriceDiscountAction>
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, No price discount actions were found matching search criteria!
</response>


3.15.12 ProductPriceDiscountActionAdd

Add price discount action list for given article.

Parameters

priceDiscountActionDiscount action data.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
       <method name="ProductPriceDiscountActionAdd">
                  <parameter name="priceDiscountAction">
                               <productCode>00001</productCode>
                               <articleGroupCode>AR01</articleGroupCode>
                               <buyerGroupCode>BY01</buyerGroupCode>
                               <warehouseCode>00001</warehouseCode>
                               <discountPercentage>34.00</discountPercentage>
                               <validFrom>2022-01-01</validFrom>
                               <validTo>2022-04-01</validTo>
                  </parameter>
       </method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
       <message>Successfully added price discount action for product with code 00001.</message>
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Can not find product for code: 9999.
</response>


3.15.13 ProductImageAdd

Add image/attachment to product.

Parameters

productCodeProduct code.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ProductImageAdd">
       <parameter name="productCode" type="String" value="000001" />
       <parameter name="image">
       <contents encoding="BASE64">BASE64...</contents>
       <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added image att.jpg to Artikel: 000001</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <productCode> is required, Can not find product for code: PA2521U-2AC3, Parameter <image> is missing, Parameter <image>: cannot parse contents
</response>


3.15.14 ProductImageSetDefault

Add image/attachment to product and set is as default.

Parameters

productCodeProduct code.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ProductImageSetDefault">
       <parameter name="productCode" type="String" value="000001" />
       <parameter name="image">
       <contents encoding="BASE64">BASE64...</contents>
       <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added image att.jpg to Artikel: 000001</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <productCode> is required, Can not find product for code: PA2521U-2AC3, Parameter <image> is missing, Parameter <image>: cannot parse contents
</response>


3.15.15 ProductImageGet

Get default image/attachment of product.

Parameters

productCodeProduct code.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ProductImageGet">
       <parameter name="productCode" type="String" value="000001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <Product>
               <Attachments>
                       <Attachment>
                               <fileName>att.jpg</fileName>
                               <contents encoding="BASE64">BASE64</contents>
                       </Attachment>
               </Attachments>
       </Product>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <productCode> is required, Can not find product for code: PA2521U-2AC3, Product does not have attachemnts.
</response>


3.15.16 ProductImageList

Get all images/attachments of product.

Parameters

productCodeProduct code.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ProductImageList">
       <parameter name="productCode" type="String" value="000001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <Product>
               <Attachments>
                       <Attachment>
                               <fileName>att1.jpg</fileName>
                               <contents encoding="BASE64">1BASE64</contents>
                       </Attachment>
                       <Attachment>
                               <fileName>att2.jpg</fileName>
                               <contents encoding="BASE64">2BASE64</contents>
                       </Attachment>
                       <Attachment>
                               <fileName>att3.jpg</fileName>
                               <contents encoding="BASE64">3BASE64</contents>
                       </Attachment>
               </Attachments>
       </Product>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <productCode> is required, Can not find product for code: PA2521U-2AC3, Product does not have attachemnts.
</response>

 

3.16. ProductGroup API

ProductGroupGetByCodeGet product group by product group's code.
ProductGroupCreateCreate new product group
ProductGroupUpdateUpdate existing product group
ProductGroupDeleteDelete product group.
ProductGroupListGet list of product groups for specified criteria

3.16.1 ProductGroupGetByCode

Get product group by product group code.

Parameters

ProductGroupCodeProduct group code.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ProductGroupGetByCode">
       <parameter name="productGroupCode" value="PG2521U" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <ProductGroup>
               <productGroupCode>PG2521U</productGroupCode>
               <productGroupDescription>api test product group</productGroupDescription>
               <purchasingGLAccountNumber>2300</purchasingGLAccountNumber>
               <salesGLAccountNumber>1200</salesGLAccountNumber>
               <status>active</status>
               <warrantyText>This is warranty text</warrantyText>
               <onlineShopVisibility>visibleOnline</onlineShopVisibility>
       </ProductGroup>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <productGroupCode> is required, Can not find ProductGroup for code: PG2521U,  
</response>

3.16.2 ProductGroupCreate

Create new product group. (for product group's data structure look in API for ProductGroupGetByCode).

Parameters

ProductGroupProduct group's data in xml substructure.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ProductGroupCreate">
       <parameter name="productGroup">                      
               <productGroupCode>PG2521U</productGroupCode>                                <!-- (Mandatory and Unique)
               <productGroupDescription>api test product group</productGroupDescription>   <!-- Mandatory
               <purchasingGLAccountNumber>2300</purchasingGLAccountNumber>                 <!-- Optional
               <salesGLAccountNumber>1200</salesGLAccountNumber>                           <!-- Optional
               <parentArticleGroupCode>PG2521A</parentArticleGroupCode>                    <!-- Optional
               <status>active</status>                                                     <!-- Mandatory
               <warrantyText>This is warranty text</warrantyText>                          <!-- Optional
               <onlineShopVisibility>visibleOnline</onlineShopVisibility>                  <!-- Optional, this attribute is used to tell if article group is visible in online web shop, possible values are: visibleOnline, notVisibleOnline.
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <productGroupCode>PG2521U</ProductGroupCode>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="productGroup for ProductGroupCode: PG2521U already exists!><error/> <!-- Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named <ProductGroup> must be specified., missing mandatory attributes, invalid values, no privileges, Error creating ProductGroup  
</response>

3.16.3 ProductGroupUpdate

Update existing ProductGroup.

Parameters

ProductGroupProduct group's data in xml substructure

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ProductGroupUpdate">
       <parameter name="productGroup">
               <productGroupCode>PG2521U</productGroupCode>                                <!-- (Mandatory and Unique)
               <productGroupDescription>api test product group</productGroupDescription>   <!-- Mandatory
               <purchasingGLAccountNumber>2300</purchasingGLAccountNumber>                 <!-- Optional
               <salesGLAccountNumber>1200</salesGLAccountNumber>                           <!-- Optional
               <parentArticleGroupCode>PG2521A</parentArticleGroupCode>                    <!-- Optional
               <status>active</status>                                                     <!-- Mandatory
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <productGroupCode>PG2521U</ProductGroupCode>
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/> <!-- Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named <ProductGroup> needed, ProductGroup's property <productGroupCode> is required, Can not find ProductGroup for ProductGroupCode: PG2521U, missing mandatory attributes, invalid values, no privileges,  
</response>

3.16.4 ProductGroupDelete

Delete ProductGroup.

Parameters

ProductGroupCodeUnique identifier for ProductGroup.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ProductGroupDelete">
       <parameter name="productGroupCode" value="PG2521U" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>   <! Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named <productGroupCode> is required, Can not find ProductGroup for ProductGroupCode: PG2521U, Can not delete. Found 3  ProductGroup with ProductGroupCode: PG2521U,
</response>


3.16.5 ProductGroupList

Get list of Product groups for specified criteria.

Parameters

ProductGroupCodeProductGroup's code.
productGroupDescriptionSearch key. The value from this property is used for searching for values in fields: "name", "description" and "brand"
statusUsage status (active, inactive)

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ProductGroupList">
       <parameter name="productGroupDescription" type="String" value="" />
       <parameter name="productGroupCode" value="123456" />
       <parameter name="status" value="active"/>
</method>
</request>


Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <ProductGroup>
                <!-- structure of ProductGroup data is the same as in ProductGroupGetByCode
       </ProductGroup>
       <ProductGroup>
                <!-- structure of ProductGroup data is the same as in ProductGroupGetByCode
       </ProductGroup>
       ...
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Access denied. User account does not have sufficient privileges for the given request, Invalid search keys, invalid values, no privileges,  
</response>


 

3.17. PurchaseOrder API

PurchaseOrderGetGet purchase orders by document number, or by combination of document number and date.
PurchaseOrderGetPDFGet PDF file for purchase orders by document number, or by combination of document number and date.
PurchaseOrderCreateCreate new purchase order.
PurchaseOrderUpdateUpdate existing purchase order.
PurchaseOrderDeleteDelete purchase order.
PurchaseOrderCancelCancel purchase order.
PurchaseOrderListGet list of purchase orders for specified criteria
PurchaseOrderSendByEmailSends document by email to the recipient(s).
PurchaseOrderAttachmentAddAdd attachment to purchase order.
PurchaseOrderAttachmentSetDefaultAdd attachment to purchase order and set is as default.
PurchaseOrderAttachmentGetGet default attachment of purchase order.
PurchaseOrderAttachmentListGet all attachments of purchase order.

3.17.1 PurchaseOrderGet

Get purchase orders by document number, or by combination of document number and date.

Parameters

numberDocument number. Can use sequential document number (example: 8), or formatted number (example: 2011-00008)
dateDocument date
costPositionCost position
documentIDInternal document identificator. In case of using this parameter, no other parameter listed abowe is needed for searching by document.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PurchaseOrderGet">
       <parameter name="number" value="8" />
       <parameter name="date" type="Date" value="2011-01-11" />
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
       <PurchaseOrder>
               <number>2011-00008</number>
               <date>2011-01-11</date>
               <deliveryDate>2011-01-15</deliveryDate>
               <deliveryMethod>Test delivery method</deliveryMethod>
               <dueDate>2011-01-30</dueDate>
               <businessYear>2011</businessYear>
               <city>Nova Gorica</city>
               <costPosition>120</costPosition>
               <remarks>Remark on Purchase order</remarks>
               <salesQuoteReference>SQ2010-000001</salesQuoteReference>
               <status>Opened</status>
               <superDiscountPercentage>5.0000</superDiscountPercentage>
               <supplierCity>Maribor</supplierCity>
               <supplierCountry>SI</supplierCountry>
               <supplierName>Test supplier</supplierName>
               <supplierPostalCode>1234</supplierPostalCode>
               <supplierStreet>Test ul. 22</supplierStreet>
               <supplierTaxNumber>SI95985352</supplierTaxNumber>
               <supplierVatRegistration>Registered</supplierVatRegistration>
               <totalAmount>22.430</totalAmount>
               <totalCurrency>EUR</totalCurrency>
               <totalDiscount>1.52</totalDiscount>
               <totalNetAmount>20.48</totalNetAmount>
               <totalVatAmountFlatRate>0.00</totalVatAmountFlatRate>
               <totalVatAmountNormalRate>0.00</totalVatAmountNormalRate>
               <totalVatAmountLowerRate>1.95</totalVatAmountLowerRate>
               <totalVatAmountZeroRate>0.0</totalVatAmountZeroRate>
               <totalVatBaseAmountFlatRate>0.00</totalVatBaseAmountFlatRate>
               <totalVatBaseAmountNormalRate>0.00</totalVatBaseAmountNormalRate>
               <totalVatBaseAmountLowerRate>20.48</totalVatBaseAmountLowerRate>
               <totalVatBaseAmountZeroRate>0.00</totalVatBaseAmountZeroRate>
               <vatTransactionType>0</vatTransactionType>
               <vatOutgoingDocumentVatClause>Registered</vatOutgoingDocumentVatClause>
               <goodsReceiptsRef>2011-00007, 2011-00009, 2011-00010</goodsReceiptsRef> <-- References to goods receipts
               <cancelledDocumentRef>2011-00015</cancelledDocumentRef> <-- Reference to cancelled document
               <Items>
                       <Item>
                               <amount>20.48</amount>
                               <amountWithoutDiscount>22.00</amountWithoutDiscount>
                               <currency>EUR</currency>
                               <description>Transport of goods</description>
                               <discountAmount>1.52</discountAmount>
                               <discountPercentage>2.0000</discountPercentage>
                               <netPrice>11.00000</netPrice>
                               <netPriceInDocumentCurrency>11.00000</netPriceInDocumentCurrency>
                               <position>1</position>
                               <price>12.04500</price>
                               <priceInDocumentCurrency>12.04500</priceInDocumentCurrency>
                               <quantity>2.000000</quantity>
                               <totalDiscountPercentage>6.9000</totalDiscountPercentage>
                               <unit>km</unit>
                               <unit>km</unit>
                               <vatAmount>1.95</vatAmount>
                               <vatPercentage>9.5</vatPercentage>
                       </Item>
               </Items>
       </PurchaseOrder>
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="document could not be found"><error/>
</response>


3.17.2 PurchaseOrderGetPDF

Get PDF for purchase order by document number, or by combination of document number and date. Response (on OK) returns binary record for PDF file coded with Base64 coding.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2010-00002)
dateDocument date
costPositionCost position
documentIDInternal document identificator. In case of using this parameter, no other parameter listed abowe is needed for searching by document.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PurchaseOrderGetPDF">
          <parameter name="number" value="8" />
       <parameter name="date" type="Date" value="2011-01-11" />
</method>
</request>


Response
<response status="ok">
       <number>2012-01293</number>
       <date>2013-01-02</date>
       <pdfFile>JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0ZpbHRlci9GbGF0ZURlY29kZT4+CnN0cmVhbQp4nJVYS4/bNh...</pdfFile>
</response>

Response (on error)
<response status="error">
       <error description="Can not find sales invoice for number: 8 and date: 2011-01-11">
       </error>
</response>



3.17.3 PurchaseOrderCreate

Create new purchase order.

Document item can be specified with: productCode, quantity, discountPercentage, or can be specified with: description, currency, quantity, netPrice.Additional optional item fields are: discountPercentage, unit, vatPercentage, vatTransactionType. date Date YYYY-MM-DDunit String OptionalvatTransactionType Enum 0-9 (0 is default) OptionalValues description for vatTransactionType:
0 - Taxable transactions of goods and services in Slovenia,
1 - Zero-rated transaction - exports of goods outside the EU,
2 - Zero-rated transaction - without the right to deduct input VAT,
3 - Zero-rated transaction - with the right to deduct input VAT,
4 - Zero-rated transaction - supply of goods within the EU,
5 - Zero-rated transaction - assembly in the EU,
6 - Zero-rated transaction - tripartite supplies of goods within the EU,
7 - Transactions exempt from VAT - not for VAT records,
8 - Zero-rated transaction - remote sales of goods,
9 - Transactions exempt from VAT with the right of input VAT deduction (transactions outside SLO),
10- Supply of goods and services in SLO, VAT charged by the recipient,
11- Sales of services in the EU, VAT paid by the recipient.

Parameters

PurchaseOrderComplex parameter with data tags

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PurchaseOrderCreate">
        <parameter name="PurchaseOrder">
               <date>2011-01-13</date>                         <!-- (Mandatory) document date
               <city>Nova Gorica</city>                                <!-- (Mandatory)
               <deliveryDate>2011-02-13</deliveryDate>                 <!-- (Optional)
               <dueDate>2011-01-13</dueDate>                   <!-- (Optional)
               <salesQuoteReference>SQ11</salesQuoteReference> <!-- (Optional)
               <costPosition>120</costPosition>                        <!-- (Optional)
               <deliveryMethod>delivery method</deliveryMethod>        <!-- (Optional)
               <superDiscountPercentage>5</superDiscountPercentage> <!-- (Optional)
               <status>Opened</status>                           <!-- (Optional) Possible values: Opened, PartlyDelivered, Completed, Cancelled - default is Opened
               <remarks>Remark on Purchase order</remarks>             <!-- (Optional)
               <orderedByContactPerson>name and surname</orderedByContactPerson>       <!-- (Optional)
               <supplierCode>123456</supplierCode>                     <!-- (Optional). If it is specified supplier parameters bellow are not needed as the supplier data is taken from database. If any parameter bellow is specified it will override master supplier data in document
               <supplierDocumentID>40:123456</supplierDocumentID>                      <!-- (Optional). If it is specified supplier parameters bellow are not needed as the supplier data is taken from database. If any parameter bellow is specified it will override master supplier data in document
               <supplierName>Micka Kovac</supplierName>                <!-- (Optional)
               <supplierTaxNumber>02169711</supplierTaxNumber> <!-- (Optional)
               <supplierVatRegistration>none</supplierVatRegistration> <!-- (unkown, none, registered)
               <supplierEMail>micka@kovac.com</supplierEMail>  <!-- (Optional)
               <supplierStreet>Iztokova 22</supplierStreet>            <!-- (Optional)
               <supplierPostalCode>2000</supplierPostalCode>   <!-- (Optional)
               <supplierCity>Maribor</supplierCity>                    <!-- (Optional)
               <supplierCountry>SI</supplierCountry>                   <!-- (Optional) ISO-2 country code
               <vatTransactionType>0</vatTransactionType> <!-- (Optional) default is 0
               <vatOutgoingDocumentVatClause>Registered</vatOutgoingDocumentVatClause> <!-- (Optional) Possible values: Registered, NotRegistered, RegisteredTourismLawPart47, RegisteredTourismLawPart31, RegisteredTourismLawPart47And31
               <documentLanguage>Slovene</documentLanguage> <!-- (Optional) Possible document language: Slovene, English, German, Croatian, Italian, Hungarian, Czech, Slovak, Serbian, Polish and Bulgarian
               <Items>
                       <Item>                                          <!-- item specified with ref to product
                               <position>1</position>      <!-- position of item
                               <productCode>020</productCode>  <!-- product code
                               <quantity>100</quantity>
                               <discountPercentage>10</discountPercentage>
                       </Item>
                       <Item>                                          <!-- Item specified for good or service
                               <position>2</position>      <!-- position of item
                               <description>Transport of goods</description>
                               <netPrice>11.00</netPrice>
                               <discountPercentage>2</discountPercentage>      <!-- (Optional)
                               <vatPercentage>8.5</vatPercentage>              <!-- (Optional)
                               <currency>EUR</currency>                        <!-- (Optional)
                               <quantity>10</quantity>                         <!-- (Optional) default 0
                               <unit>km</unit>                         <!-- (Optional)
                               <vatTransactionType>0</vatTransactionType>      <!-- (Optional) default is identical to document property
                       </Item>
               </Items>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <number>12/2011</number>                <!-- created document ID or number
       <date>2011-01-13</date>         <!-- document date
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- missing mandatory attributes, invalid values, no privileges,  
</response>



3.17.4 PurchaseOrderUpdate

Update existing purchase order.Data must contain purchase order number to be able to identify document which is to be updated.

Parameters

PurchaseOrderComplex parameter with data tags

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PurchaseOrderUpdate">
       <!--  Parameter is similar to the parameter in PurchaseOrderCreate api
        <parameter name="PurchaseOrder">
               <number>12</number>                                     <!-- document number is mandatory in UPDATE (Can use sequential document number (example: 12), or formatted number (example: 12/2011))
               <date>2011-01-13</date>                         <!-- document date
               <city>Nova Gorica</city>
               <deliveryDate>2011-02-13</deliveryDate>                 <!-- (Optional)
               <dueDate>2011-01-13</dueDate>                   <!-- (Optional)
               <salesQuoteReference>SQ11</salesQuoteReference> <!-- (Optional)
               <costPosition>120</costPosition>                        <!-- (Optional)
               <deliveryMethod>delivery method</deliveryMethod>        <!-- (Optional)
               <superDiscountPercentage>5</superDiscountPercentage> <!-- (Optional)
               <remarks>Remark on Purchase order</remarks>             <!-- (Optional)
               <orderedByContactPerson>name and surname</orderedByContactPerson>       <!-- (Optional)
               <supplierCode>123456</supplierCode>                     <!-- (Optional). If it is specified supplier parameters bellow are not needed as the supplier data is taken from database. If any parameter bellow is specified it will override master supplier data in document
               <supplierName>Micka Kovac</supplierName>                <!-- (Optional)
               <supplierTaxNumber>02169711</supplierTaxNumber> <!-- (Optional)
               <supplierVatRegistration>true</supplierVatRegistration> <!-- (true, false)
               <supplierEMail>micka@kovac.com</supplierEMail>  <!-- (Optional)
               <supplierStreet>Iztokova 22</supplierStreet>            <!-- (Optional)
               <supplierPostalCode>2000</supplierPostalCode>   <!-- (Optional)
               <supplierCity>Maribor</supplierCity>                    <!-- (Optional)
               <supplierCountry>SI</supplierCountry>                   <!-- (Optional) ISO-2 country code
               <vatTransactionType>0</vatTransactionType>              <!-- (Optional) default is 0
               <Items>
                       <Item>                                          <!-- item specified with ref to product
                               <productCode>020</productCode>  <!-- product code
                               <quantity>100</quantity>
                               <discountPercentage>10</discountPercentage>
                       </Item>
                       <Item>                                          <!-- Item specified for good or service
                               <description>Transport of goods</description>
                               <netPrice>11.00</netPrice>
                               <discountPercentage>2</discountPercentage>      <!-- (Optional)
                               <vatPercentage>8.5</vatPercentage>              <!-- (Optional)
                               <currency>EUR</currency>                        <!-- (Optional)
                               <quantity>10</quantity>                         <!-- (Optional) default 0
                               <unit>km</unit>                         <!-- (Optional)
                               <vatTransactionType>0</vatTransactionType>      <!-- (Optional) default is identical to document property
                       </Item>
               </Items>
       </parameter>
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328
<?xml version="1.0" encoding="utf-8"?>
response status="ok" >
       <number>12/2011</number>                <!-- updated document ID or number
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="no privileges"><error/>     <!-- document could not be found, no privileges,  
</response>


3.17.5 PurchaseOrderDelete

Delete purchase order. Must specify parameter/s (number, number+date) to identify document for deleting.

Parameters

numberDocument number
dateDocument date
costPositionCost position

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PurchaseOrderDelete">
       <parameter name="number" value="8/2011" />
       <parameter name="date" type="Date" value="2011-01-13" />
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="no privileges"><error/>     <!-- document could not be found, no privileges,  
</response>


3.17.6 PurchaseOrderCancel

Cancel purchace order. Must specify parameter/s (number, number+date) to identify document for canceling.

Parameters

numberDocument number
dateDocument date
costPositionCost position
statusStatus of cancelation document (draft, issuedInvoice). By Default status is issuedInvoice.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PurchaseOrderCancel">
       <parameter name="number" value="2013-00014" />
       <parameter name="date" type="Date" value="2013-03-26" />
       <parameter name="status" value="draft" />
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Access denied. User account does not have sufficient privileges for the given request"><error/>     <!-- document could not be found, no privileges,  
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Can not cancel purchace order for arguments number: 2013-00014 date: 2013-03-26"><error/>   <!-- document could not be canceled,  
</response>

Possible error messages:
Access denied. User account does not have sufficient privileges for the given request
Parameter named "number" is required
Can not find purchace order for number
Can not cancel. Found X purchace orders
Found X purchace orders X. You can only cancel one purchace order at a time
Can not cancel purchace order X


3.17.7 PurchaseOrderList

Get list of purchase orders for criteria which is specified by API parameters.

Parameters

numberDocument number
dateFromThe date which is used to select purchase orders whose date is following it.
dateToThe date which is used to select purchase orders whose date is preceding it
supplierSupplier name
costPositionCost position code
totalAmountTotal amount of the sales order
totalCurrencyCurrency used in sales order
statusPossible values:
  • Draft 
  • Opened 
  • PartlyDelivered 
  • Completed 
  • Cancelled 

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PurchaseOrderList">
       <parameter name="dateFrom" type="Date" value="2011-01-01" />
        <parameter name="dateTo" type="Date" value="2011-01-31" />
       <parameter name="totalAmount" value= 22.220 />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
<PurchaseOrders>                        
       <PurchaseOrder>
                <!-- structure of elements is the same as in PurchaseOrderGet
       </PurchaseOrder>
       ...
</SalesOrders>
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- no privileges,  
</response>


3.17.8 PurchaseOrderSendByEmail

Sends document by email to the recipient(s).

Parameters

numberDocument number
dateDocument date (optional additional document identification)
senderEmail sender (Optional)
recipientComma delimited list of recipient(s) emails
ccCC email (Optional)
bccBCC email (Optional)
subjectMail subject (Optional)
messageMessage text (Optional)
useHtmlMessageSend message text as HTML (Optional)

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PurchaseOrderSendByEmail">
       <parameter name="number" value="8/2011" />
       <parameter name="date" type="Date" value="2011-01-13" />
       <parameter name="sender" value="micka@kovac.com"/>
       <parameter name="recipient" value="zoran@kovac.com,zlatko@kovac.com"/>
       <parameter name="cc" value=""/>
       <parameter name="bcc" value=""/>
       <parameter name="subject" value="TEST d.o.o.: Purchase order nr. 0008/2011"/>
       <parameter name="message" value="Message text"/>
        <parameter name="useHtmlMessage" value="true"/>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="no privileges"><error/>     <!-- document could not be found, no privileges, mail sending failed
</response>


3.17.9 PurchaseOrderAttachmentAdd

Add image/attachment to purchase order.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PurchaseOrderAttachmentAdd">
       <parameter name="number" type="String" value="2020-00001" />
       <parameter name="attachment">
               <contents encoding="BASE64">BASE64...</contents>
               <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added attachment att.jpg to purchase order 2020-00001.</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find purchase order for number: 2020-00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>


3.17.10 PurchaseOrderAttachmentSetDefault

Add attachment to purchase order and set is as default.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PurchaseOrderAttachmentSetDefault">
       <parameter name="number" type="String" value="2020-00001" />
       <parameter name="attachment">
               <contents encoding="BASE64">BASE64...</contents>
               <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added attachment att.jpg to purchase order 2020-00001.</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find purchase order for number: 2020-00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>


3.17.11 PurchaseOrderAttachmentGet

Get default attachment of purchase order.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PurchaseOrderAttachmentGet">
       <parameter name="number" type="String" value="2020-00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <PurchaseOrder>
               <Attachments>
                       <Attachment>
                               <fileName>att.jpg</fileName>
                               <contents encoding="BASE64">BASE64</contents>
                       </Attachment>
               </Attachments>
       </PurchaseOrder>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find purchase order for number: 2020-00001 Purchase order does not have attachemnts.
</response>


3.17.12 PurchaseOrderAttachmentList

Get all images/attachments of article.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PurchaseOrderAttachmentList">
       <parameter name="number" type="String" value="2020-00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <PurchaseOrder>
               <Attachments>
                       <Attachment>
                               <fileName>att1.jpg</fileName>
                               <contents encoding="BASE64">1BASE64</contents>
                       </Attachment>
                       <Attachment>
                               <fileName>att2.jpg</fileName>
                               <contents encoding="BASE64">2BASE64</contents>
                       </Attachment>
                       <Attachment>
                               <fileName>att3.jpg</fileName>
                               <contents encoding="BASE64">3BASE64</contents>
                       </Attachment>
               </Attachments>
       </PurchaseOrder>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find purchase order for number: 2020-00001 Purchase order does not have attachemnts.
</response>

 

3.18. ReceivedAdvanceInvoice API

ReceivedAdvanceInvoiceGetGet received advance invoice by number.
ReceivedAdvanceInvoiceCreateCreate new received advance invoice.
ReceivedAdvanceInvoiceUpdateUpdate existing received advance invoice.
ReceivedAdvanceInvoiceDeleteDelete received advance invoice.
ReceivedAdvanceInvoiceListGet list of received advance invoices for specified criteria.
ReceivedAdvanceInvoiceAttachmentAddAdd attachment to received advance invoice.
ReceivedAdvanceInvoiceAttachmentSetDefaultAdd attachment to received advance invoice and set is as default.
ReceivedAdvanceInvoiceAttachmentGetGet default attachment of received advance invoice.
ReceivedAdvanceInvoiceAttachmentListGet all attachments of received advance invoice.

3.18.1 ReceivedAdvanceInvoiceGet

Get received advance invoice by number.

Parameters

numberSupplier number of received advance invoice.
internalNumberInternal number of received advance invoice.
dateDocument date.
costPositionCost position.
supplierSupplier name.
documentIDInternal document identificator. In case of using this parameter, no other parameter listed abowe is needed for searching by document.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ReceivedAdvanceInvoiceGet">
       <parameter name="number" value="678/2021" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <ReceivedAdvanceInvoice>
               <businessYear>2021</businessYear>
               <costPosition>001</costPosition>
               <date>2021-01-29</date>
               <prepaymentDate>2021-01-21</prepaymentDate>
               <documentID>51:4488260</documentID>
               <internalNumber>RP9-0003</internalNumber>
               <isInsideTheScopeOfVat>true</isInsideTheScopeOfVat>
               <methodOfPayment>CreditCard</methodOfPayment>
               <number>678/2021</number>
               <paymentBankAccountNumber></paymentBankAccountNumber>
               <paymentDueDate>2021-02-05</paymentDueDate>
               <paymentReference></paymentReference>
               <receivalDate>2021-01-29</receivalDate>
               <receivedAdvanceInvoiceRef></receivedAdvanceInvoiceRef>
               <roundingDifference>0.00</roundingDifference>
               <supplier>4 Partner Foreign Company</supplier>
               <supplierCode>666000</supplierCode>
               <prepaymentAmount>689.000</prepaymentAmount>
               <prepaymentCurrency>EUR</prepaymentCurrency>
               <Items>
                       <Item>
                               <chartAccountNumber>00000</chartAccountNumber>
                               <costPosition></costPosition>
                               <description>OSOS</description>
                               <inputVatTransactionType>2</inputVatTransactionType>
                               <isInputVatDeductible>true</isInputVatDeductible>
                               <isInsideTheScopeOfVat>true</isInsideTheScopeOfVat>
                               <netAmount>689.000</netAmount>
                               <netAmountInDocumentCurrency>689.000</netAmountInDocumentCurrency>
                               <position>1</position>
                               <vatDeductionPercentage>100,00</vatDeductionPercentage>
                               <vatPercentage>22.0</vatPercentage>
                       </Item>
               </Items>
       </ReceivedAdvanceInvoice>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named "number" is required, Cannot find received advance invoice for number: 055/11,  
</response>


3.18.2 ReceivedAdvanceInvoiceCreate

Create new received advance invoice.

Parameters

ReceivedAdvanceInvoicereceived advance invoice's data in xml substructure.

Supported values for items inputVatTransactionType are:
0 - Purchase of goods and services //promet blaga in storitev
1 - Purchase of real estate //nabava nepremičnin
2 - Other fixed assets purchase //nabava ostalih osnovnih sredstev
3 - Intra-Community goods acquisitions //pridobitve blaga znotraj Skupnosti
4 - Tripartite intra-Community goods acquisitions //tristranske pridobitve blaga znotraj Skupnosti
5 - Intra-Community fixed assets acquisitions //pridobitve osn. sredstev znotraj Skupnosti
6 - Goods import from non-EU member countries //Uvoz blaga iz držav izven EU
7 - Fixed assets import from non-EU member countries //Uvoz osnovnih sredstev iz držav izven EU
8 - Purchase of good and services in Slovenia, VAT reverse charge //Nabave blaga in storitev v SLO, od katerih plača DDV prejemnik (76.a člen)
9 - Purchase of real estate in Slovenia, VAT reverse charge //Nabave nepremičnin v SLO, od katerih plača DDV prejemnik (76.a člen)
10- Purchase of other fixed assests in Slovenia, VAT reverse charge //Nabave drugih OS v SLO, od katerih plača DDV prejemnik (76.a člen)
11- Acquisition of real estate within the community //pridobitve nepremičnin znotraj Skupnosti
12- Acquisition of electronic services (reverse charge) //Pridobitev elektronskih storitev (samoobdavčitev)

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ReceivedAdvanceInvoiceCreate">
       <parameter name="ReceivedAdvanceInvoice">
               <prepaymentAmount>689.000</prepaymentAmount>  <!-- (Mandatory) prepayment amount
               <prepaymentCurrency>EUR</prepaymentCurrency>  <!-- (Mandatory) payment currency
               <businessYear>2021</businessYear>       <!-- (Mandatory) business year of received advance invoice
               <costPosition>001</costPosition>        <!-- (Optional/Mandatory) cost center is optional in case mandatory entry is not set in company settings
               <date>2021-01-29</date>                 <!-- (Mandatory) date of received advance invoice          
               <number>678/2021</number>               <!-- (Mandatory) suppliers number of received advance invoice
               <paymentDueDate>2021-02-05</paymentDueDate>                          <!-- (Mandatory) payment due date
               <receivalDate>2021-01-29</receivalDate>                              <!-- (Mandatory) date of receival of document
               <prepaymentDate>2021-01-21</prepaymentDate>                          <!-- (Mandatory) date of prepayment
               <isInsideTheScopeOfVat>true</isInsideTheScopeOfVat>                  <!-- (Optional) settting if received document is inside scope of VAT
               <methodOfPayment>CreditCard</methodOfPayment>                        <!-- (Mandatory) possible values: BankTransfer, Cash, CreditCard, Other
               <paymentBankAccountNumber>SI56 0000 1111 2222 333</paymentBankAccountNumber>    <!-- Mandatory in case "methodOfPayment" value BankTransfer is used
               <paymentReference>SI99</paymentReference>                            <!-- Mandatory in case "methodOfPayment" value BankTransfer is used
               <supplierBookingAccountNumber>26000</supplierBookingAccountNumber>   <!-- Mandatory in case "methodOfPayment" value Other is used
               <receivedAdvanceInvoiceRef>9384-2021</receivedAdvanceInvoiceRef>     <!-- (Optional) received advance invoice reference
               <roundingDifference>0.00</roundingDifference>                        <!-- (Optional)
               <supplierCode>666000</supplierCode>     <!-- (Mandatory) If supplier documentID specified, use this supplier identificator for referencing supplier on received document
               <supplierDocumentID>55:666</supplierDocumentID>     <!-- (Mandatory) If supplier code not specified, use this supplier identificator for referencing supplier on received document
               <Items>
                       <Item>
                               <position>1</position>                                       <!-- (Optional) item position
                               <chartAccountNumber>00000</chartAccountNumber>               <!-- (Mandatory) account number
                               <costPosition>009</costPosition>                             <!-- (Optional) cost center code for referencing cost center on item
                               <description>OSOS</description>                              <!-- (Mandatory) description
                               <inputVatTransactionType>2</inputVatTransactionType>         <!-- (Mandatory) input VAT transaction type
                               <isInputVatDeductible>true</isInputVatDeductible>            <!-- (Optional) settting if received document items VAT is deducated
                               <vatDeductionPercentage>100,00</vatDeductionPercentage>      <!-- (Mandatory) if abowe option is used. Percentage of VAT that is being deducated must be entered
                               <isInsideTheScopeOfVat>true</isInsideTheScopeOfVat>          <!-- (Optional) settting if received document item is inside scope of VAT. This and abowe option "isInputVatDeductible" exclude each other
                               <netAmount>689.000</netAmount>                               <!-- (Mandatory) net amount
                               <netAmountInDocumentCurrency>689.000</netAmountInDocumentCurrency>         <!-- (Optional) net amount id document currency
                               <vatPercentage>22.0</vatPercentage>                          <!-- (Optional) if this property is not present, default normal VAT rate is set
                       </Item>
                       <Item>
                               <position>2</position>                                       <!-- (Optional) item position
                               <productCode>000001</productCode>                            <!-- (Optional) if item with referenced product is added product code should be present in item definition
                               <chartAccountNumber>00000</chartAccountNumber>               <!-- (Mandatory) account number
                               <costPosition>009</costPosition>                             <!-- (Optional) cost center code for referencing cost center on item
                               <description>OSOS</description>                              <!-- (Mandatory) description
                               <inputVatTransactionType>2</inputVatTransactionType>         <!-- (Mandatory) input VAT transaction type
                               <isInputVatDeductible>true</isInputVatDeductible>            <!-- (Optional) settting if received document items VAT is deducated
                               <vatDeductionPercentage>100,00</vatDeductionPercentage>      <!-- (Mandatory) if abowe option is used. Percentage of VAT that is being deducated must be entered
                               <isInsideTheScopeOfVat>true</isInsideTheScopeOfVat>          <!-- (Optional) settting if received document item is inside scope of VAT. This and abowe option "isInputVatDeductible" exclude each other
                               <quantity>1</quantity>                                           <!-- (Mandatory) quantity
                               <price>100.00</price>                                                                    <!-- (Optional) product price, if not present, default purchase price of product is taken
                               <vatPercentage>22.0</vatPercentage>                          <!-- (Optional) if this property is not present, default normal VAT rate is set
                       </Item>
               </Items>        
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <number>055/11</number>
       <date>2021-01-29</date>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="received advance invoice for number: 055/11 already exists!><error/> <!-- Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named "number" must be specified., missing mandatory attributes, invalid values, no privileges, Error creating received advance invoice
</response>


3.18.3 ReceivedAdvanceInvoiceUpdate

Update existing received advance invoice.

Parameters

ReceivedAdvanceInvoicereceived advance invoice data in xml substructure

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ReceivedAdvanceInvoiceUpdate">
       <parameter name="ReceivedAdvanceInvoice">
               <!--  Parameters are identical to the parameters in ReceivedAdvanceInvoiceCreate api
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <number>055/11</number>
       <date>2021-01-29</date>
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/> <!-- Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named "number" is required, Can not find received advance invoice for number: 055/11, missing mandatory attributes, invalid values, no privileges,  
</response>


3.18.4 ReceivedAdvanceInvoiceDelete

Delete received advance invoice.

Parameters

numberSupplier number of received advance invoice.
internalNumberInternal number of received advance invoice.
dateDocument date.
costPositionCost position.
supplierSupplier name.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ReceivedAdvanceInvoiceDelete">
       <parameter name="number" value="055/11" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>   <! Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named "number" is required, Can not find received advance invoice for number: 055/11, Can not delete. Found 3  received advance invoice with number 055,
</response>


3.18.5 ReceivedAdvanceInvoiceList

Get list of received advance invoices for specified criteria.

Parameters

numberSuppliers number
internalNumberInternal number
dateFromThe date which is used to select received advance invoices whose date is following it
dateToThe date which is used to select received advance invoices whose date is preceding it
receivalDateFromThe date which is used to select received advance invoices whose date of receival is following it
receivalDateToThe date which is used to select received advance invoices whose date of receival is preceding it
prepaymentDateFromThe date which is used to select received advance invoices whose date of prepayment is following it
prepaymentDateToThe date which is used to select received advance invoices whose date of prepayment is preceding it
supplierSupplier code or name
costPositionCost position code
articleProduct code, or product name

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ReceivedAdvanceInvoiceList">
       <parameter name="number" value="123456" />
</method>
</request>

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ReceivedAdvanceInvoiceList">
       <parameter name="dateFrom" value="2021-05-01" />
    <parameter name="dateTo" value="2021-05-26" />
</method>
</request>


Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <ReceivedAdvanceInvoice>
                <!-- structure of received advance invoice data is the same as in ReceivedAdvanceInvoiceGet
       </ReceivedAdvanceInvoice>
       <ReceivedAdvanceInvoice>
                <!-- structure of received advance invoice data is the same as in ReceivedAdvanceInvoiceGet
       </ReceivedAdvanceInvoice>
       ...
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Access denied. User account does not have sufficient privileges for the given request, Invalid search keys, invalid values, no privileges,  
</response>


3.18.6 ReceivedAdvanceInvoiceAttachmentAdd

Add image/attachment to received advance invoice.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ReceivedAdvanceInvoiceAttachmentAdd">
       <parameter name="number" type="String" value="2020-00001" />
       <parameter name="attachment">
               <contents encoding="BASE64">BASE64...</contents>
               <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added attachment att.jpg to received advance invoice 2020-00001.</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find received advance invoice for number: 2020-00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>


3.18.7 ReceivedAdvanceInvoiceAttachmentSetDefault

Add attachment to received advance invoice and set it as default.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ReceivedAdvanceInvoiceAttachmentSetDefault">
       <parameter name="number" type="String" value="2020-00001" />
       <parameter name="attachment">
               <contents encoding="BASE64">BASE64...</contents>
               <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added attachment att.jpg to received advance invoice 2020-00001.</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find received advance invoice for number: 2020-00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>


3.18.8 ReceivedAdvanceInvoiceAttachmentGet

Get default attachment of received advance invoice.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ReceivedAdvanceInvoiceAttachmentGet">
       <parameter name="number" type="String" value="2020-00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <ReceivedAdvanceInvoice>
               <Attachments>
                       <Attachment>
                               <fileName>att.jpg</fileName>
                               <contents encoding="BASE64">BASE64</contents>
                       </Attachment>
               </Attachments>
       </ReceivedAdvanceInvoice>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find received advance invoice for number: 2020-00001 received advance invoice does not have attachemnts.
</response>


3.18.9 ReceivedAdvanceInvoiceAttachmentList

Get all images/attachments of received advance invoice.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ReceivedAdvanceInvoiceAttachmentList">
       <parameter name="number" type="String" value="2020-00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <ReceivedAdvanceInvoice>
               <Attachments>
                       <Attachment>
                               <fileName>att1.jpg</fileName>
                               <contents encoding="BASE64">1BASE64</contents>
                       </Attachment>
                       <Attachment>
                               <fileName>att2.jpg</fileName>
                               <contents encoding="BASE64">2BASE64</contents>
                       </Attachment>
                       <Attachment>
                               <fileName>att3.jpg</fileName>
                               <contents encoding="BASE64">3BASE64</contents>
                       </Attachment>
               </Attachments>
       </ReceivedAdvanceInvoice>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find received advance invoice for number: 2020-00001 received advance invoice does not have attachemnts.
</response>

 

3.19. ReceivedCreditNote API

ReceivedCreditNoteGetGet received credit note by number.
ReceivedCreditNoteCreateCreate new received credit note.
ReceivedCreditNoteUpdateUpdate existing received credit note.
ReceivedCreditNoteDeleteDelete received credit note.
ReceivedCreditNoteListGet list of received credit notes for specified criteria.
ReceivedCreditNoteAttachmentAddAdd attachment to received credit note.
ReceivedCreditNoteAttachmentSetDefaultAdd attachment to received credit note and set is as default.
ReceivedCreditNoteAttachmentGetGet default attachment of received credit note.
ReceivedCreditNoteAttachmentListGet all attachments of received credit note.

3.19.1 ReceivedCreditNoteGet

Get received credit note by number.

Parameters

numberSupplier number of received credit note.
internalNumberInternal number of received credit note.
dateDocument date.
costPositionCost position.
supplierSupplier name.
documentIDInternal document identificator. In case of using this parameter, no other parameter listed abowe is needed for searching by document.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ReceivedCreditNoteGet">
       <parameter name="number" value="678/2021" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <ReceivedCreditNote>
               <amountWithVAT>689.000</amountWithVAT>
               <businessYear>2021</businessYear>
               <costPosition>001</costPosition>
               <date>2021-01-29</date>
               <dateOfSupplyFrom>2021-01-21</dateOfSupplyFrom>
               <documentID>51:4488260</documentID>
               <internalNumber>RP9-0003</internalNumber>
               <isInsideTheScopeOfVat>true</isInsideTheScopeOfVat>
               <isReverseChargeVatDocument>false</isReverseChargeVatDocument>
               <methodOfPayment>CreditCard</methodOfPayment>
               <number>678/2021</number>
               <paymentBankAccountNumber></paymentBankAccountNumber>
               <paymentDueDate>2021-02-05</paymentDueDate>
               <paymentReference></paymentReference>
               <receivalDate>2021-01-29</receivalDate>
               <receivedAdvancecredit noteRef></receivedAdvancecredit noteRef>
               <roundingDifference>0.00</roundingDifference>
               <supplier>4 Partner Foreign Company</supplier>
               <supplierCode>666000</supplierCode>
               <paymentAmount>689.000</paymentAmount>
               <paymentCurrency>EUR</paymentCurrency>
               <Items>
                       <Item>
                               <chartAccountNumber>00000</chartAccountNumber>
                               <costPosition></costPosition>
                               <description>OSOS</description>
                               <inputVatTransactionType>2</inputVatTransactionType>
                               <isInputVatDeductible>true</isInputVatDeductible>
                               <isInsideTheScopeOfVat>true</isInsideTheScopeOfVat>
                               <netAmount>689.000</netAmount>
                               <netAmountInDocumentCurrency>689.000</netAmountInDocumentCurrency>
                               <position>1</position>
                               <vatDeductionPercentage>100,00</vatDeductionPercentage>
                               <vatPercentage>22.0</vatPercentage>
                       </Item>
               </Items>
       </ReceivedCreditNote>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named "number" is required, Cannot find received credit note for number: 055/11,  
</response>


3.19.2 ReceivedCreditNoteCreate

Create new received credit note.

Parameters

ReceivedCreditNoteReceived credit note's data in xml substructure.

Supported values for items inputVatTransactionType are:
0 - Purchase of goods and services //promet blaga in storitev
1 - Purchase of real estate //nabava nepremičnin
2 - Other fixed assets purchase //nabava ostalih osnovnih sredstev
3 - Intra-Community goods acquisitions //pridobitve blaga znotraj Skupnosti
4 - Tripartite intra-Community goods acquisitions //tristranske pridobitve blaga znotraj Skupnosti
5 - Intra-Community fixed assets acquisitions //pridobitve osn. sredstev znotraj Skupnosti
6 - Goods import from non-EU member countries //Uvoz blaga iz držav izven EU
7 - Fixed assets import from non-EU member countries //Uvoz osnovnih sredstev iz držav izven EU
8 - Purchase of good and services in Slovenia, VAT reverse charge //Nabave blaga in storitev v SLO, od katerih plača DDV prejemnik (76.a člen)
9 - Purchase of real estate in Slovenia, VAT reverse charge //Nabave nepremičnin v SLO, od katerih plača DDV prejemnik (76.a člen)
10- Purchase of other fixed assests in Slovenia, VAT reverse charge //Nabave drugih OS v SLO, od katerih plača DDV prejemnik (76.a člen)
11- Acquisition of real estate within the community //pridobitve nepremičnin znotraj Skupnosti
12- Acquisition of electronic services (reverse charge) //Pridobitev elektronskih storitev (samoobdavčitev)

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ReceivedCreditNoteCreate">
       <parameter name="ReceivedCreditNote">
               <amountWithVAT>689.000</amountWithVAT>  <!-- (Optional) amount with VAT in default currency
               <paymentAmount>689.000</paymentAmount>  <!-- (Mandatory) payment amount
               <paymentCurrency>EUR</paymentCurrency>  <!-- (Mandatory) payment currency
               <businessYear>2021</businessYear>       <!-- (Mandatory) business year of received credit note
               <costPosition>001</costPosition>        <!-- (Optional/Mandatory) cost center is optional in case mandatory entry is not set in company settings
               <date>2021-01-29</date>                 <!-- (Mandatory) date of received credit note          
               <number>678/2021</number>               <!-- (Mandatory) suppliers number of received credit note
               <paymentDueDate>2021-02-05</paymentDueDate>                          <!-- (Mandatory) payment due date
               <receivalDate>2021-01-29</receivalDate>                              <!-- (Mandatory) date of receival of document
               <dateOfSupplyFrom>2021-01-21</dateOfSupplyFrom>                      <!-- (Mandatory) date of supplay from
               <dateOfSupplyUntil>2021-02-21</dateOfSupplyUntil>                    <!-- (Optional)
               <isInsideTheScopeOfVat>true</isInsideTheScopeOfVat>                  <!-- (Optional) settting if received document is inside scope of VAT
               <isReverseChargeVatDocument>false</isReverseChargeVatDocument>       <!-- (Optional) settting if received document is reverse charge. This and abowe option "isInsideTheScopeOfVat" exclude each other
               <methodOfPayment>CreditCard</methodOfPayment>                        <!-- (Mandatory) possible values: BankTransfer, Cash, CreditCard, Other
               <paymentBankAccountNumber>SI56 0000 1111 2222 333</paymentBankAccountNumber>    <!-- Mandatory in case "methodOfPayment" value BankTransfer is used
               <paymentReference>SI99</paymentReference>                            <!-- Mandatory in case "methodOfPayment" value BankTransfer is used
               <supplierBookingAccountNumber>26000</supplierBookingAccountNumber>   <!-- Mandatory in case "methodOfPayment" value Other is used
               <receivedAdvancecredit noteRef>9384-2021</receivedAdvancecredit noteRef>     <!-- (Optional) received advance credit note reference
               <roundingDifference>0.00</roundingDifference>                        <!-- (Optional)
               <supplierCode>666000</supplierCode>     <!-- (Mandatory) If supplier documentID specified, use this supplier identificator for referencing supplier on received document
               <supplierDocumentID>55:666</supplierDocumentID>     <!-- (Mandatory) If supplier code not specified, use this supplier identificator for referencing supplier on received document
               <Items>
                       <Item>
                               <position>1</position>                                       <!-- (Optional) item position
                               <chartAccountNumber>00000</chartAccountNumber>               <!-- (Mandatory) account number
                               <costPosition>009</costPosition>                             <!-- (Optional) cost center code for referencing cost center on item
                               <description>OSOS</description>                              <!-- (Mandatory) description
                               <inputVatTransactionType>2</inputVatTransactionType>         <!-- (Mandatory) input VAT transaction type
                               <isInputVatDeductible>true</isInputVatDeductible>            <!-- (Optional) settting if received document items VAT is deducated
                               <vatDeductionPercentage>100,00</vatDeductionPercentage>      <!-- (Mandatory) if abowe option is used. Percentage of VAT that is being deducated must be entered
                               <isInsideTheScopeOfVat>true</isInsideTheScopeOfVat>          <!-- (Optional) settting if received document item is inside scope of VAT. This and abowe option "isInputVatDeductible" exclude each other
                               <netAmount>689.000</netAmount>                               <!-- (Mandatory) net amount
                               <netAmountInDocumentCurrency>689.000</netAmountInDocumentCurrency>         <!-- (Optional) net amount id document currency
                               <vatPercentage>22.0</vatPercentage>                          <!-- (Optional) if this property is not present, default normal VAT rate is set
                       </Item>
                       <Item>
                               <position>2</position>                                       <!-- (Optional) item position
                               <productCode>000001</productCode>                            <!-- (Optional) if item with referenced product is added product code should be present in item definition
                               <chartAccountNumber>00000</chartAccountNumber>               <!-- (Mandatory) account number
                               <costPosition>009</costPosition>                             <!-- (Optional) cost center code for referencing cost center on item
                               <description>OSOS</description>                              <!-- (Mandatory) description
                               <inputVatTransactionType>2</inputVatTransactionType>         <!-- (Mandatory) input VAT transaction type
                               <isInputVatDeductible>true</isInputVatDeductible>            <!-- (Optional) settting if received document items VAT is deducated
                               <vatDeductionPercentage>100,00</vatDeductionPercentage>      <!-- (Mandatory) if abowe option is used. Percentage of VAT that is being deducated must be entered
                               <isInsideTheScopeOfVat>true</isInsideTheScopeOfVat>          <!-- (Optional) settting if received document item is inside scope of VAT. This and abowe option "isInputVatDeductible" exclude each other
                               <quantity>1</quantity>                                           <!-- (Mandatory) quantity
                               <price>100.00</price>                                                                    <!-- (Optional) product price, if not present, default purchase price of product is taken
                               <vatPercentage>22.0</vatPercentage>                          <!-- (Optional) if this property is not present, default normal VAT rate is set
                       </Item>
               </Items>        
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <number>055/11</number>
       <date>2021-01-29</date>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Received credit note for number: 055/11 already exists!><error/> <!-- Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named "number" must be specified., missing mandatory attributes, invalid values, no privileges, Error creating received credit note
</response>


3.19.3 ReceivedCreditNoteUpdate

Update existing received credit note.

Parameters

ReceivedCreditNoteReceived credit note data in xml substructure

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ReceivedCreditNoteUpdate">
       <parameter name="ReceivedCreditNote">
               <!--  Parameters are identical to the parameters in ReceivedCreditNoteCreate api
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <number>055/11</number>
       <date>2021-01-29</date>
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/> <!-- Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named "number" is required, Can not find received credit note for number: 055/11, missing mandatory attributes, invalid values, no privileges,  
</response>


3.19.4 ReceivedCreditNoteDelete

Delete received credit note.

Parameters

numberSupplier number of received credit note.
internalNumberInternal number of received credit note.
dateDocument date.
costPositionCost position.
supplierSupplier name.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ReceivedCreditNoteDelete">
       <parameter name="number" value="055/11" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>   <! Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named "number" is required, Can not find received credit note for number: 055/11, Can not delete. Found 3  received credit note with number 055,
</response>


3.19.5 ReceivedCreditNoteList

Get list of received credit notes for specified criteria.

Parameters

numberSuppliers number
internalNumberInternal number
dateFromThe date which is used to select received credit notes whose date is following it
dateToThe date which is used to select received credit notes whose date is preceding it
supplierSupplier code or name
costPositionCost position code
paymentAmountPayment amount of the document
paymentCurrencyPayment currency of document
articleProduct code, or product name

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ReceivedCreditNoteList">
       <parameter name="number" value="123456" />
</method>
</request>

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ReceivedCreditNoteList">
       <parameter name="dateFrom" value="2021-05-01" />
    <parameter name="dateTo" value="2021-05-26" />
</method>
</request>


Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <ReceivedCreditNote>
                <!-- structure of received credit note data is the same as in ReceivedCreditNoteGet
       </ReceivedCreditNote>
       <ReceivedCreditNote>
                <!-- structure of received credit note data is the same as in ReceivedCreditNoteGet
       </ReceivedCreditNote>
       ...
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Access denied. User account does not have sufficient privileges for the given request, Invalid search keys, invalid values, no privileges,  
</response>


3.19.6 ReceivedCreditNoteAttachmentAdd

Add image/attachment to received credit note.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ReceivedCreditNoteAttachmentAdd">
       <parameter name="number" type="String" value="2020-00001" />
       <parameter name="attachment">
               <contents encoding="BASE64">BASE64...</contents>
               <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added attachment att.jpg to received credit note 2020-00001.</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find received credit note for number: 2020-00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>


3.19.7 ReceivedCreditNoteAttachmentSetDefault

Add attachment to received credit note and set it as default.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ReceivedCreditNoteAttachmentSetDefault">
       <parameter name="number" type="String" value="2020-00001" />
       <parameter name="attachment">
               <contents encoding="BASE64">BASE64...</contents>
               <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added attachment att.jpg to received credit note 2020-00001.</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find received credit note for number: 2020-00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>


3.19.8 ReceivedCreditNoteAttachmentGet

Get default attachment of received credit note.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ReceivedCreditNoteAttachmentGet">
       <parameter name="number" type="String" value="2020-00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <ReceivedCreditNote>
               <Attachments>
                       <Attachment>
                               <fileName>att.jpg</fileName>
                               <contents encoding="BASE64">BASE64</contents>
                       </Attachment>
               </Attachments>
       </ReceivedCreditNote>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find received credit note for number: 2020-00001 received credit note does not have attachemnts.
</response>


3.19.9 ReceivedCreditNoteAttachmentList

Get all images/attachments of received credit note.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ReceivedCreditNoteAttachmentList">
       <parameter name="number" type="String" value="2020-00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <ReceivedCreditNote>
               <Attachments>
                       <Attachment>
                               <fileName>att1.jpg</fileName>
                               <contents encoding="BASE64">1BASE64</contents>
                       </Attachment>
                       <Attachment>
                               <fileName>att2.jpg</fileName>
                               <contents encoding="BASE64">2BASE64</contents>
                       </Attachment>
                       <Attachment>
                               <fileName>att3.jpg</fileName>
                               <contents encoding="BASE64">3BASE64</contents>
                       </Attachment>
               </Attachments>
       </ReceivedCreditNote>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find received credit note for number: 2020-00001 received credit note does not have attachemnts.
</response>

 

3.20. ReceivedInvoice API

ReceivedInvoiceGetGet received invoice by number.
ReceivedInvoiceCreateCreate new received invoice.
ReceivedInvoiceUpdateUpdate existing received invoice.
ReceivedInvoiceDeleteDelete received invoice.
ReceivedInvoiceListGet list of received invoices for specified criteria.
ReceivedInvoicePaymentRecordAddAdd payment record on received invoice.
ReceivedInvoiceAttachmentAddAdd attachment to received invoice.
ReceivedInvoiceAttachmentSetDefaultAdd attachment to received invoice and set is as default.
ReceivedInvoiceAttachmentGetGet default attachment of received invoice.
ReceivedInvoiceAttachmentListGet all attachments of received invoice.

3.20.1 ReceivedInvoiceGet

Get received invoice by number.

Parameters

numberSupplier number of received invoice.
internalNumberInternal number of received invoice.
dateDocument date.
costPositionCost position.
supplierSupplier name.
documentIDInternal document identificator. In case of using this parameter, no other parameter listed abowe is needed for searching by document.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ReceivedInvoiceGet">
       <parameter name="number" value="678/2021" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <ReceivedInvoice>
               <amountWithVAT>689.000</amountWithVAT>
               <businessYear>2021</businessYear>
               <costPosition>001</costPosition>
               <date>2021-01-29</date>
               <dateOfSupplyFrom>2021-01-21</dateOfSupplyFrom>
               <documentID>51:4488260</documentID>
               <internalNumber>RP9-0003</internalNumber>
               <isInsideTheScopeOfVat>true</isInsideTheScopeOfVat>
               <isReverseChargeVatDocument>false</isReverseChargeVatDocument>
               <methodOfPayment>CreditCard</methodOfPayment>
               <number>678/2021</number>
               <paymentBankAccountNumber></paymentBankAccountNumber>
               <paymentDueDate>2021-02-05</paymentDueDate>
               <paymentReference></paymentReference>
               <receivalDate>2021-01-29</receivalDate>
               <receivedAdvanceInvoiceRef></receivedAdvanceInvoiceRef>
               <roundingDifference>0.00</roundingDifference>
               <supplier>4 Partner Foreign Company</supplier>
               <supplierCode>666000</supplierCode>
               <paymentAmount>689.000</paymentAmount>
               <paymentCurrency>EUR</paymentCurrency>
               <Items>
                       <Item>
                               <chartAccountNumber>00000</chartAccountNumber>
                               <costPosition></costPosition>
                               <description>OSOS</description>
                               <inputVatTransactionType>2</inputVatTransactionType>
                               <isInputVatDeductible>true</isInputVatDeductible>
                               <isInsideTheScopeOfVat>true</isInsideTheScopeOfVat>
                               <netAmount>689.000</netAmount>
                               <netAmountInDocumentCurrency>689.000</netAmountInDocumentCurrency>
                               <position>1</position>
                               <vatDeductionPercentage>100,00</vatDeductionPercentage>
                               <vatPercentage>22.0</vatPercentage>
                       </Item>
               </Items>
       </ReceivedInvoice>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named "number" is required, Cannot find received invoice for number: 055/11,  
</response>


3.20.2 ReceivedInvoiceCreate

Create new received invoice.

Parameters

ReceivedInvoiceReceived invoice's data in xml substructure.

Supported values for items inputVatTransactionType are:
0 - Purchase of goods and services //promet blaga in storitev
1 - Purchase of real estate //nabava nepremičnin
2 - Other fixed assets purchase //nabava ostalih osnovnih sredstev
3 - Intra-Community goods acquisitions //pridobitve blaga znotraj Skupnosti
4 - Tripartite intra-Community goods acquisitions //tristranske pridobitve blaga znotraj Skupnosti
5 - Intra-Community fixed assets acquisitions //pridobitve osn. sredstev znotraj Skupnosti
6 - Goods import from non-EU member countries //Uvoz blaga iz držav izven EU
7 - Fixed assets import from non-EU member countries //Uvoz osnovnih sredstev iz držav izven EU
8 - Purchase of good and services in Slovenia, VAT reverse charge //Nabave blaga in storitev v SLO, od katerih plača DDV prejemnik (76.a člen)
9 - Purchase of real estate in Slovenia, VAT reverse charge //Nabave nepremičnin v SLO, od katerih plača DDV prejemnik (76.a člen)
10- Purchase of other fixed assests in Slovenia, VAT reverse charge //Nabave drugih OS v SLO, od katerih plača DDV prejemnik (76.a člen)
11- Acquisition of real estate within the community //pridobitve nepremičnin znotraj Skupnosti
12- Acquisition of electronic services (reverse charge) //Pridobitev elektronskih storitev (samoobdavčitev)

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ReceivedInvoiceCreate">
       <parameter name="ReceivedInvoice">
               <amountWithVAT>689.000</amountWithVAT>  <!-- (Optional) amount with VAT in default currency
               <paymentAmount>689.000</paymentAmount>  <!-- (Mandatory) payment amount
               <paymentCurrency>EUR</paymentCurrency>  <!-- (Mandatory) payment currency
               <businessYear>2021</businessYear>       <!-- (Mandatory) business year of received invoice
               <costPosition>001</costPosition>        <!-- (Optional/Mandatory) cost center is optional in case mandatory entry is not set in company settings
               <date>2021-01-29</date>                 <!-- (Mandatory) date of received invoice          
               <number>678/2021</number>               <!-- (Mandatory) suppliers number of received invoice
               <paymentDueDate>2021-02-05</paymentDueDate>                          <!-- (Mandatory) payment due date
               <receivalDate>2021-01-29</receivalDate>                              <!-- (Mandatory) date of receival of document
               <dateOfSupplyFrom>2021-01-21</dateOfSupplyFrom>                      <!-- (Mandatory) date of supplay from
               <dateOfSupplyUntil>2021-02-21</dateOfSupplyUntil>                    <!-- (Optional)
               <isInsideTheScopeOfVat>true</isInsideTheScopeOfVat>                  <!-- (Optional) settting if received document is inside scope of VAT
               <isReverseChargeVatDocument>false</isReverseChargeVatDocument>       <!-- (Optional) settting if received document is reverse charge. This and abowe option "isInsideTheScopeOfVat" exclude each other
               <methodOfPayment>CreditCard</methodOfPayment>                        <!-- (Mandatory) possible values: BankTransfer, Cash, CreditCard, Other
               <paymentBankAccountNumber>SI56 0000 1111 2222 333</paymentBankAccountNumber>    <!-- Mandatory in case "methodOfPayment" value BankTransfer is used
               <paymentReference>SI99</paymentReference>                            <!-- Mandatory in case "methodOfPayment" value BankTransfer is used
               <supplierBookingAccountNumber>26000</supplierBookingAccountNumber>   <!-- Mandatory in case "methodOfPayment" value Other is used
               <receivedAdvanceInvoiceRef>9384-2021</receivedAdvanceInvoiceRef>     <!-- (Optional) received advance invoice reference
               <roundingDifference>0.00</roundingDifference>                        <!-- (Optional)
<supplierCode>666000</supplierCode>     <!-- (Mandatory) If supplier documentID specified, use this supplier identificator for referencing supplier on received document
               <supplierDocumentID>55:666</supplierDocumentID>     <!-- (Mandatory) If supplier code not specified, use this supplier identificator for referencing supplier on received document
               <Items>
                       <Item>
                               <position>1</position>                                       <!-- (Optional) item position
                               <chartAccountNumber>00000</chartAccountNumber>               <!-- (Mandatory) account number
                               <costPosition>009</costPosition>                             <!-- (Optional) cost center code for referencing cost center on item
                               <description>OSOS</description>                              <!-- (Mandatory) description
                               <inputVatTransactionType>2</inputVatTransactionType>         <!-- (Mandatory) input VAT transaction type
                               <isInputVatDeductible>true</isInputVatDeductible>            <!-- (Optional) settting if received document items VAT is deducated
                               <vatDeductionPercentage>100,00</vatDeductionPercentage>      <!-- (Mandatory) if abowe option is used. Percentage of VAT that is being deducated must be entered
                               <isInsideTheScopeOfVat>true</isInsideTheScopeOfVat>          <!-- (Optional) settting if received document item is inside scope of VAT. This and abowe option "isInputVatDeductible" exclude each other
                               <netAmount>689.000</netAmount>                               <!-- (Mandatory) net amount
                               <netAmountInDocumentCurrency>689.000</netAmountInDocumentCurrency>         <!-- (Optional) net amount id document currency
                               <vatPercentage>22.0</vatPercentage>                          <!-- (Optional) if this property is not present, default normal VAT rate is set
                       </Item>
                       <Item>
                               <position>2</position>                                       <!-- (Optional) item position
                               <productCode>000001</productCode>                            <!-- (Optional) if item with referenced product is added product code should be present in item definition
                               <chartAccountNumber>00000</chartAccountNumber>               <!-- (Mandatory) account number
                               <costPosition>009</costPosition>                             <!-- (Optional) cost center code for referencing cost center on item
                               <description>OSOS</description>                              <!-- (Mandatory) description
                               <inputVatTransactionType>2</inputVatTransactionType>         <!-- (Mandatory) input VAT transaction type
                               <isInputVatDeductible>true</isInputVatDeductible>            <!-- (Optional) settting if received document items VAT is deducated
                               <vatDeductionPercentage>100,00</vatDeductionPercentage>      <!-- (Mandatory) if abowe option is used. Percentage of VAT that is being deducated must be entered
                               <isInsideTheScopeOfVat>true</isInsideTheScopeOfVat>          <!-- (Optional) settting if received document item is inside scope of VAT. This and abowe option "isInputVatDeductible" exclude each other
                               <quantity>1</quantity>                                           <!-- (Mandatory) quantity
                               <price>100.00</price>                                                                    <!-- (Optional) product price, if not present, default purchase price of product is taken
                               <vatPercentage>22.0</vatPercentage>                          <!-- (Optional) if this property is not present, default normal VAT rate is set
                       </Item>
               </Items>        
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <number>055/11</number>
       <date>2021-01-29</date>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Received invoice for number: 055/11 already exists!><error/> <!-- Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named "number" must be specified., missing mandatory attributes, invalid values, no privileges, Error creating received invoice
</response>


3.20.3 ReceivedInvoiceUpdate

Update existing received invoice.

Parameters

ReceivedInvoiceReceived invoice data in xml substructure

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ReceivedInvoiceUpdate">
       <parameter name="ReceivedInvoice">
               <!--  Parameters are identical to the parameters in ReceivedInvoiceCreate api
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <number>055/11</number>
       <date>2021-01-29</date>
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/> <!-- Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named "number" is required, Can not find received invoice for number: 055/11, missing mandatory attributes, invalid values, no privileges,  
</response>


3.20.4 ReceivedInvoiceDelete

Delete received invoice.

Parameters

numberSupplier number of received invoice.
internalNumberInternal number of received invoice.
dateDocument date.
costPositionCost position.
supplierSupplier name.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ReceivedInvoiceDelete">
       <parameter name="number" value="055/11" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>   <! Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named "number" is required, Can not find received invoice for number: 055/11, Can not delete. Found 3  received invoice with number 055,
</response>


3.20.5 ReceivedInvoiceList

Get list of received invoices for specified criteria.

Parameters

numberSuppliers number
internalNumberInternal number
dateFromThe date which is used to select received invoices whose date is following it
dateToThe date which is used to select received invoices whose date is preceding it
receivalDateFromThe date which is used to select received invoices whose date of receival is following it
receivalDateToThe date which is used to select received invoices whose date of receival is preceding it
paymentDueDateFromThe date which is used to select received invoices whose date of expiration is following it
paymentDueDateToThe date which is used to select received invoices whose date of expiration is preceding it
dateOfSupplyFromThe date which is used to select received invoices whose date of supply/performance is following it
dateOfSupplyUntilThe date which is used to select received invoices whose date of supply/performance is preceding it
dateOfFullPaymentFromThe date which is used to select received invoices whose date of full payment is following it
dateOfFullPaymentToThe date which is used to select received invoices whose date of full payment is preceding it
dateOfPaymentOrderFromThe date which is used to select received invoices whose date of payment order is following it
dateOfPaymentOrderToThe date which is used to select received invoices whose date of payment order is preceding it
supplierSupplier code or name
costPositionCost position code
paymentAmountPayment amount of the document
paymentCurrencyPayment currency of document
articleProduct code, or product name

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ReceivedInvoiceList">
       <parameter name="number" value="123456" />
</method>
</request>

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ReceivedInvoiceList">
       <parameter name="dateFrom" value="2021-05-01" />
    <parameter name="dateTo" value="2021-05-26" />
</method>
</request>


Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <ReceivedInvoice>
                <!-- structure of received invoice data is the same as in ReceivedInvoiceGet
       </ReceivedInvoice>
       <ReceivedInvoice>
                <!-- structure of received invoice data is the same as in ReceivedInvoiceGet
       </ReceivedInvoice>
       ...
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Access denied. User account does not have sufficient privileges for the given request, Invalid search keys, invalid values, no privileges,  
</response>


3.20.6 ReceivedInvoicePaymentRecordAdd

Add payment record on received invoice.

Parameters

numberDocument number
dateDocument date (optional additional document identification)
costPositionCost position
businessUnitBusiness unit
paymentDatePayment date
paymentAmountPayment amount
paymentMethodForInvoicePayment method for Received invoice
  • BankTransfer 
  • BankPaymentOrder 
  • Cash 
  • CreditCard 
  • Coupon 
  • DirectDebit 
  • DebitNote 
  • CreditNote 
  • Cancellation 
  • PayPal 
  • Unknown 
  • Other 
  • Compensation 
  • Cheques 
  • Cheque 
  • Karanta 
  • BA 
  • Diners 
  • Activa 
  • EurocardMastercard 
  • Visa 
  • Amex 
  • CashOnDelivery 
  • Moneta 
  • CryptoCurrency 
  • GoCrypto 
paymentRemarkPayment remark (optional)
paymentCurrencyPayment currency (optional)

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ReceivedInvoicePaymentRecordAdd">
       <parameter name="number" value="2014-00013"/>
       <parameter name="date" type="Date" value="2014-05-15"/>
       <parameter name="paymentDate" type="Date" value="2014-05-20"/>
       <parameter name="paymentAmount" value="50"/>
       <parameter name="paymentMethodForInvoice" value="Cash"/>
       <parameter name="paymentRemark" value="Payment record on Received invoice 2014-05-15"/>
       <parameter name="paymentCurrency" value="EUR"/>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Payment method Test is not supported"><error/>      <!-- wrong payment method chosen
</response>


3.20.7 ReceivedInvoiceAttachmentAdd

Add image/attachment to received invoice.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ReceivedInvoiceAttachmentAdd">
       <parameter name="number" type="String" value="2020-00001" />
       <parameter name="attachment">
               <contents encoding="BASE64">BASE64...</contents>
               <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added attachment att.jpg to received invoice 2020-00001.</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find received invoice for number: 2020-00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>


3.20.8 ReceivedInvoiceAttachmentSetDefault

Add attachment to received invoice and set it as default.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ReceivedInvoiceAttachmentSetDefault">
       <parameter name="number" type="String" value="2020-00001" />
       <parameter name="attachment">
               <contents encoding="BASE64">BASE64...</contents>
               <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added attachment att.jpg to received invoice 2020-00001.</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find received invoice for number: 2020-00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>


3.20.9 ReceivedInvoiceAttachmentGet

Get default attachment of received invoice.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ReceivedInvoiceAttachmentGet">
       <parameter name="number" type="String" value="2020-00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <ReceivedInvoice>
               <Attachments>
                       <Attachment>
                               <fileName>att.jpg</fileName>
                               <contents encoding="BASE64">BASE64</contents>
                       </Attachment>
               </Attachments>
       </ReceivedInvoice>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find received invoice for number: 2020-00001 received invoice does not have attachemnts.
</response>


3.20.10 ReceivedInvoiceAttachmentList

Get all images/attachments of received invoice.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ReceivedInvoiceAttachmentList">
       <parameter name="number" type="String" value="2020-00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <ReceivedInvoice>
               <Attachments>
                       <Attachment>
                               <fileName>att1.jpg</fileName>
                               <contents encoding="BASE64">1BASE64</contents>
                       </Attachment>
                       <Attachment>
                               <fileName>att2.jpg</fileName>
                               <contents encoding="BASE64">2BASE64</contents>
                       </Attachment>
                       <Attachment>
                               <fileName>att3.jpg</fileName>
                               <contents encoding="BASE64">3BASE64</contents>
                       </Attachment>
               </Attachments>
       </ReceivedInvoice>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find received invoice for number: 2020-00001 received invoice does not have attachemnts.
</response>

 

3.21. Reporting API - access reports via API

Reporting API is closely connected with the reporting module of e-racuni.com. This API allows you to download data which was previously automatically generated inside the reporting module using automatic report creation with pre-scheduled reports. Due to the nature of reporting module this API can be used for bulk data exchange with other applications and is not limited by the data volume and request time restrictions of regular API calls. The data is already prepared and ready for download so API calls will not cause any delays due to large volume of data or heavy processing on the server.

Reporting API exposes two API methods:

Only scheduled reports which were previously enabled for API can be queried and downloaded via API. Contact the administrator of the organization/database to make reports available via API before using Reporting API.

3.21.1 Making reports accessible via API

To make any report available via API you first need to schedule automatic report execution on days and hours when you need the data to be refreshed. You will then be able to download the last version of the data that was generated according to report execution schedule.

  
Scheduling automatic report execution
  
  Slika 7: Scheduling automatic report execution

Once you have schedule the report go to the list of all scheduled reports under |Reports |Scheduled Reports and click on button Enable for API.

  
Enabling report for API
  
  Slika 8: Enabling report for API

After report is enabled for API you will be able to get the report API key which is the reportID that you need to provide to the API method in order to access the data generated by the report.

  
Getting report API key
  
  Slika 9: Getting report API key

As is the case with other API methods so are ReportAPI methods accessible via command line as well. This means that you can download report data using simple command line script as shown in the following example:

curl -OJ https://e-racuni.com/WebServicesSI/API-CLI/ReportDownload \
 -u APIACCOUNT:29Z1D42431C30D0091AD15AB02290BA5_2c2d8eeafd272935b2227cd3cf9cec89 \
 -d reportID='"26AD67D299C30D0091D4060408FB060DLJNIsW2r4Ly83AD67D299C30D0091D51"' \
 -d downloadFile='true'



For increased data exchange security you can limit API access to predefined IP address of the data exchanging party.

 

3.22. SalesInvoice API

Please check the API reference documentation for SalesInvoiceAPI here https://e-racuni.com/obracuni/ApiDocumentation.

SalesInvoiceAPI exposes the functionality of the invoicing GUI to developer. Most of invoice editing features are available via API methods in this category. The API user account needs to own the same privileges as the regular GUI to get access to features via the API.

Below you will find examples on how to use the invoicing API. Some examples are written using JSON request notation, some examples are written in XML and some examples use curl command line tool to illustrate multiple way on how you can use the API.

Please use the API developer panel to generate API request source in a language of your preference. JSON, XML, Linux command line and PHP request source can be automatically generated by the API developer panel tool.

API developer panel is available at:

https://e-racuni.com/obracuni/developer

3.22.1 Creating a simple invoice

Here is a simple example on how to create an invoice with two items using JSON API request. The item price is given as net price excluding VAT which will be added automatically using the general VAT rate.

POST https://e-racuni.com/WebServicesSI/API
Content-Type: application/json

{
       "username": "MICKA",
       "md5pass": "1234567890a1c85dc0c1234218acb900",
       "token": "1234562ADC3A123001234D00B0C71E0EC",
       "method": "SalesInvoiceCreate",
       "parameters": {
               "SalesInvoice": {
                       "dateOfSupplyFrom": "2022-10-13",
                       "buyerName": "Janez Novak",
                       "buyerStreet": "Glavna ulica 123",
                       "buyerPostalCode": "2000",
                       "buyerCity": "Maribor",
                       "buyerEMail": "janez.novak@gmail.com",
                       "buyerPhone": "01/1234567",
                       "Items": [
                               {
                                   "description": "Prva storitev",
                                   "quantity": 5.0,
                                   "unit": "h",
                                   "netPrice": 100.0
                               },
                               {
                                   "description": "Opis druge storitve",
                                   "quantity": 3,
                                   "unit": "h",
                                   "netPrice": 50.0
                               }
                       ]
               }
       }
}


3.22.2 Creating a fiscalized invoice

In order to issue a fiscalized invoice you need to ensure that you have previously correctly setup and activated a fiscalized business unit and the master settings of the application. Also check the list of payment methods available for invoicing.

Example below shows how to make a fiscalized invoice for a received Stripe payment. The invoice is of type Retail  which means that price is meant to be the final price paid by the customer (price including all taxes).

POST https://e-racuni.com/WebServicesSI/API
Content-Type: application/json

{
       "username": "MICKA",
       "md5pass": "1234567890a1c85dc0c1234218acb900",
       "token": "1234562ADC3A123001234D00B0C71E0EC",
       "method": "SalesInvoiceCreate",
       "parameters": {
               "SalesInvoice": {
                       "dateOfSupplyFrom": "2022-10-13",
                       "buyerName": "Tone Novak",
                       "buyerEMail": "tone.novak@gmail.com",
                       "type": "Retail",
                       "methodOfPayment": "Stripe",
                       "cashRegisterCode": "0001",
                       "Items": [
                               {
                                   "description": "Stripe purchase",
                                   "quantity": 1.0,
                                   "unit": "kom",
                                   "price": 250.0
                               }
                       ]
               }
       }
}


3.22.3 Creating a simple invoice using special vat margin scheme for selling second hand goods

Here is a simple example on how to create an invoice with two items using JSON API request when using using special vat margin scheme for selling second hand goods. First item's vat transaction type is set to 101 which means "Special vat margin calculation for used goods / Posebna ureditev za rabljeno blago", this VAT transaction type has to be used when selling second hand goods and using special VAT margin scheme.

POST https://e-racuni.com/WebServicesSI/API
Content-Type: application/json

{
       "username": "MICKA",
       "md5pass": "1234567890a1c85dc0c1234218acb900",
       "token": "1234562ADC3A123001234D00B0C71E0EC",
       "method": "SalesInvoiceCreate",
       "parameters": {
               "SalesInvoice": {
                       "dateOfSupplyFrom": "2022-10-13",
                       "buyerName": "Janez Novak",
                       "buyerStreet": "Glavna ulica 123",
                       "buyerPostalCode": "2000",
                       "buyerCity": "Maribor",
                       "buyerEMail": "janez.novak@gmail.com",
                       "buyerPhone": "01/1234567",
                       "Items": [
                               {
                                   "description": "Slika Mona Lise",
                                   "quantity": 1.0,
                                   "unit": "kos",
                                   "netPrice": 1000.0,
                                   "vatTransactionType": 101,
                                   "purchaseAmount": 266.0
                               },
                               {
                                   "description": "Stroški posredovanja",
                                   "quantity": 3,
                                   "unit": "h",
                                   "netPrice": 30.0
                               }
                       ]
               }
       }
}


Fiscalization of invoices is completely automatic and is outside of control of the user or the API. Based on tax regulations the application will automatically fiscalize and report all invoices that need fiscalization to the tax office

3.22.4 Creating an invoice for selling products

If you have defined a master list of products and pricing for the products, then you can create invoice simply by specifying product code (SKU) and quantity. See example below:

POST https://e-racuni.com/WebServicesSI/API
Content-Type: application/json

{
       "username": "MICKA",
       "md5pass": "1234567890a1c85dc0c1234218acb900",
       "token": "1234562ADC3A123001234D00B0C71E0EC",
       "method": "SalesInvoiceCreate",
       "parameters": {
               "SalesInvoice": {
                       "dateOfSupplyFrom": "2022-10-13",
                       "buyerName": "Janez Novak",
                       "buyerEMail": "janez.novak@gmail.com",
                       "Items": [
                               {
                                   "productCode": "0000100",
                                   "quantity": 1.0
                               },
                               {
                                   "productCode": "0000240",
                                   "quantity": 1.0
                               }
                       ]
               }
       }
}


Be aware that issuing of invoice might fail if the products are not on stock and company settings are set to deny negative stock quantities on the warehouse. Issuing an invoice with stock tracking item will also trigger automatic issuing of delivery note on a warehouse associated with the invoice.

3.22.5 Printing invoices/Downloading of invoice PDF

Once the invoice is issued you can get the PDF of the invoice by specifying the invoice date and number or by specifying the invoice document ID which is returned in response of the SalesInvoiceCreate API call. Example:

POST https://e-racuni.com/WebServicesSI/API
Content-Type: application/json

{
       "username": "MICKA",
       "md5pass": "1234567890a1c85dc0c1234218acb900",
       "token": "1234562ADC3A123001234D00B0C71E0EC",
       "method": "SalesInvoiceGetPDF",
       "parameters": {
               "documentID": "60:3913326"
       }
}


In the example above, the PDF of the invoice will be returned as part of the JSON response with BASE64 encoding. If you want to download PDF more efficiently then you should directly download PDF by setting the method parameter downloadFile  to true. Example of API call using curl to directly download PDF from command line:

curl -OJ https://e-racuni.com/WebServicesSI/API-CLI/SalesInvoiceGetPDF \
 -u MICKA:12345678C3A70D0012312312312312_12312312312312312312312 \
 -d documentID='"60:3913326"' \
 -d downloadFile=true


3.22.6 Notes on API invoicing context

In order to create an invoice you need to either pre-set the user account with the context of the invoice or specify the context via the API call.

Similar to application behavior in the GUI, the API invoicing context is defined by:

fiscal yearyou need to specify fiscal year if you are issuing invoices outside of the current fiscal year
business unitif multiple business units are defined, then the BU of the account will be used, or you need to specify the BU with your API call
cost center/cost positionif cost centers are used the default cost center will be set if not specified by the API call
warehouseif multiple warehouses are available the default WH of the BU/CC will be used if not specified by the API call. The warehouse determines the type of the invoice regarding pricing, either Retail (B2C) where VAT is included in the price, or Gross (B2B) with pricing excluding VAT.
currencydefault FY currency will be used as invoicing currency if not specified by the API call
cashRegisterCodecode (ID) of the cash register of the fiscalized invoice. Cash register assignment must be made for all cash invoices which are subject to fiscalization in Slovenia.
document languageInvoices will be issued in the default language or according to the settings of the cost center, or the client if document language is specified there. Set invoicing language explicitly if you need to override the default settings.
document currencyInvoices will be issued with the default currency valid for the fiscal year, or according to the settings of the cost center, or the client/buyer if document currency is specified there. Set document currency explicitly if you need to override the default settings.


3.22.7 Getting an invoice with SalesInvoiceGet (or POS invoice with POSSalesInvoiceGet)

Get sales invoice or POS sales invoice by document number, or by combination of document number and date. User can select output format which is used for generating the invoice data file. By default, internal format is used as defined by the SalesInvoice API datatype. Please see external documentation for the eSLOG electronic invoice format.


Example request and response in XML

(For internal "XML" format)

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesInvoiceGet">
       <parameter name="number" value="12/2009" />
       <parameter name="date" type="Date" value="2009-12-15" />
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2016 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
       <SalesInvoice>
               <businessYear>2016</businessYear>
               <buyerCode>123456</buyerCode>                   <!-- (Optional). If buyer code is specified, other buyer parameters bellow are not needed as the buyer data is taken from database. If any additional parameter is specified, it will override master buyer data in document
               <buyerCity>RADOVLJICA</buyerCity>
               <buyerCountry>SI</buyerCountry>
               <buyerName>5 FIVER d.o.o.</buyerName>
               <buyerPostalCode>4240</buyerPostalCode>
               <buyerStreet>ULICA 22</buyerStreet>
               <buyerTaxNumber>75882442</buyerTaxNumber>
               <buyerVatRegistration>None</buyerVatRegistration>
               <city>Maribor</city>
               <costPosition>1</costPosition>
               <cashRegisterCode>0001</cashRegisterCode>  <!-- This property must be set for fiscalization
               <businessUnit>0001</businessUnit>          <!-- This property must be set for fiscalization
              <orderReference>123</orderReference>                    <!-- (Optional)
               <vatBook>123</vatBook>
               <advanceInvoicesRef>2014-00001, 2014-00002, 2014-00003</advanceInvoicesRef> <!-- references to advance invoices
               <salesQuoteRef>2014-00001</salesQuoteRef> <!-- reference to sales quote
               <salesOrdersRef>2014-00001, 2014-00002</salesOrdersRef> <!-- references to sales orders
               <deliveryNotesRef>2014-00004, 2014-00005, 2014-00006</deliveryNotesRef> <!-- references to delivery notes
               <creditNotesRef>2014-00004</creditNotesRef> <!-- references to credit notes
               <debitNotesRef>2014-00001, 2014-00002</debitNotesRef> <!-- references to debit notes
               <cancelledDocumentRef>2016-00015</cancelledDocumentRef> <-- Reference to cancelled document
               <date>2016-02-19</date>
               <dateOfSupplyFrom>2016-02-19</dateOfSupplyFrom>
               <paymentDueDate>2016-03-06</paymentDueDate>
               <invoicePricingType>retail</invoicePricingType>
               <isReccurringInvoice>0</isReccurringInvoice>
               <number>2016-00002</number>             <!-- document number optional AUTO numbering
               <vatTransactionType>0</vatTransactionType>
               <vatOutgoingDocumentVatClause>Registered</vatOutgoingDocumentVatClause>
               <status>issuedInvoice</status>
               <totalAmount>90.00</totalAmount>
               <amountAlreadyPaid>50.00</amountAlreadyPaid>
               <amountLeftToBePaid>40.00</amountLeftToBePaid>
               <totalAmount>289.860</totalAmount>
               <totalCurrency>EUR</totalCurrency>
               <totalDiscount>0.0</totalDiscount>
               <totalNetAmount>243.87</totalNetAmount>
               <totalVatAmountFlatRate>0.00</totalVatAmountFlatRate>
               <totalVatAmountNormalRate>44.00</totalVatAmountNormalRate>
               <totalVatAmountLowerRate>1.99</totalVatAmountLowerRate>
               <totalVatAmountZeroRate>0.0</totalVatAmountZeroRate>
               <totalVatBaseAmountFlatRate>0.00</totalVatBaseAmountFlatRate>
               <totalVatBaseAmountNormalRate>200.00</totalVatBaseAmountNormalRate>
               <totalVatBaseAmountLowerRate>20.87</totalVatBaseAmountLowerRate>
               <totalVatBaseAmountZeroRate>23.00</totalVatBaseAmountZeroRate>
               <methodOfPayment>bankTransfer</methodOfPayment>
               <reference>05 11290</reference>                         <!-- generated reference number
               <referenceUPN>SI12 2012000093805</referenceUPN>         <!-- generated reference number for UPN payment order
               <eor>34facd65-622b-745d-a541-30ab1f9d3ac1</eor>  <!-- generated by FURS
               <zoi>a7e5f55e1dbb48b799268e1a6d8618a3</zoi>      <!-- generated when issuing document if it is for fiscalization    
               <fiscalNumber>1</fiscalNumber>                   <!-- fiscal sequential number for fiscal numbering of document
               <introductionText>introduction text</introductionText>
               <vatCountryIsoCode>HR</vatCountryIsoCode>
               <warehouseCode>00001</warehouseCode>
               <Address>                        <!-- (Optional) Setting delivery address on document and partner buyer if it doesn't exists              
                       <city>Celje</city>
                       <country>SI</country>
                       <postalCode>3000</postalCode>
                       <street>Ulica 10</street>
                       <type>Delivery</type>
                       <firstAddressLine>Delivery address</firstAddressLine>
               </Address>
               <Items>
                       <Item>
                               <amount>23.00</amount>
                               <amountWithoutDiscount>23.00</amountWithoutDiscount>
                               <currency>EUR</currency>
                               <description>dfhf</description>
                               <discountAmount>0.0</discountAmount>
                               <discountPercentage>0.0000</discountPercentage>
                               <netPrice>18.85246</netPrice>
                               <netPriceInDocumentCurrency>23.00000</netPriceInDocumentCurrency>
                               <position>3</position>
                               <price>23.00000</price>
                               <priceInDocumentCurrency>23.00000</priceInDocumentCurrency>
                               <quantity>1.000000</quantity>
                               <totalDiscountPercentage>0.0000</totalDiscountPercentage>
                               <vatAmount>0.00</vatAmount>
                               <vatPercentage>0.0</vatPercentage>
                               <vatTransactionType>8</vatTransactionType>
                               <costPosition>1</costPosition>
                               <chartAccountNumber>76000</chartAccountNumber>
                       </Item>
                       <Item>
                               <amount>20.87</amount>
                               <amountWithoutDiscount>20.87</amountWithoutDiscount>
                               <currency>BOB</currency>
                               <description>asdgdas</description>
                               <discountAmount>0.0</discountAmount>
                               <discountPercentage>0.0000</discountPercentage>
                               <netPrice>195.43379</netPrice>
                               <netPriceInDocumentCurrency>20.87277</netPriceInDocumentCurrency>
                               <position>2</position>
                               <price>214.00000</price>
                               <priceInDocumentCurrency>22.85568</priceInDocumentCurrency>
                               <quantity>1.000000</quantity>
                               <totalDiscountPercentage>0.0000</totalDiscountPercentage>
                               <vatAmount>1.99</vatAmount>
                               <vatPercentage>9.5</vatPercentage>
                               <costPosition>1</costPosition>
                               <chartAccountNumber>76000</chartAccountNumber>
                       </Item>
                       <Item>
                               <amount>200.00</amount>
                               <amountWithoutDiscount>200.00</amountWithoutDiscount>
                               <articleCode>0155-ART</articleCode>
                               <articleName>testni art</articleName>
                               <currency>EUR</currency>
                               <description></description>
                               <discountAmount>0.0</discountAmount>
                               <discountPercentage>0.0000</discountPercentage>
                               <netPrice>100.00000</netPrice>
                               <netPriceInDocumentCurrency>100.00000</netPriceInDocumentCurrency>
                               <position>1</position>
                               <price>122.00000</price>
                               <priceInDocumentCurrency>122.00000</priceInDocumentCurrency>
                               <productCode>0155-ART</productCode>
                               <productName>testni art</productName>
                               <quantity>2.000000</quantity>
                               <totalDiscountPercentage>0.0000</totalDiscountPercentage>
                               <vatAmount>44.00</vatAmount>
                               <vatPercentage>22.0</vatPercentage>
                               <costPosition>1</costPosition>
                               <chartAccountNumber>76000</chartAccountNumber>
                       </Item>
               </Items>
               <PaymentRecords>
                       <PaymentRecord>
                               <paymentAmount>20.000</paymentAmount>
                               <paymentCurrency>EUR</paymentCurrency>
                               <paymentDate>2016-03-09</paymentDate>
                               <paymentEntryTS>2016-03-09 15:36:33</paymentEntryTS>
                               <paymentMethodForInvoice>BankPaymentOrder</paymentMethodForInvoice>
                       </PaymentRecord>
               </PaymentRecords>
               <SalesInvoiceInstallments>
                       <Installment>
                               <installmentAmount>200.000</installmentAmount>
                               <installmentDate>2016-03-09</installmentDate>
                               <position>1</position>
                       </Installment>
                       <Installment>
                               <installmentAmount>89.000</installmentAmount>
                               <installmentDate>2016-03-23</installmentDate>
                               <position>2</position>
                       </Installment>
               </SalesInvoiceInstallments>
       </SalesInvoice>
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="document could not be found"><error/>
</response>


(For ESLOG format)

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesInvoiceGet">
       <parameter name="number" value="12/2009" />
       <parameter name="date" type="Date" value="2009-12-15" />
       <parameter name="format" value="ESLOG" />
</method>
</request>


Response
<?xml version="1.0" encoding="windows-1250"?>
<IzdaniRacunEnostavni xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.gzs.si/e-poslovanje/sheme/eSlog_1-4_PreprostiRacun.xsd">
       <Racun>
               <GlavaRacuna>
                       <VrstaRacuna>380</VrstaRacuna>
                       <StevilkaRacuna>2</StevilkaRacuna>
                       <FunkcijaRacuna>9</FunkcijaRacuna></GlavaRacuna>
               <DatumiRacuna>
                       <VrstaDatuma>137</VrstaDatuma>
                       <DatumRacuna>20160219</DatumRacuna></DatumiRacuna>
               <DatumiRacuna>
               ...
       </Racun>
</IzdaniRacunEnostavni>



3.22.8 SalesInvoiceGetUPNPDF

Get PDF for sales invoice with UPN payment order by document number, or by combination of document number and date. User can also decide if he wants UPN in top or bottom of pdf document. Response (on OK) returns binary record for PDF file coded with Base64 coding.

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesInvoiceGetUPNPDF">
       <parameter name="number" value="12/2009" />
       <parameter name="date" type="Date" value="2009-12-15" />
        <parameter name="paymentOrderPosition">top<parameter/> <!--- posible values: top, bottom
</method>
</request>


Response
<response status="ok">
       <number>2012-01293</number>
       <date>2013-01-02</date>
       <pdfFile>JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0ZpbHRlci9GbGF0ZURlY29kZT4+CnN0cmVhbQp4nJVYS4/bNh...</pdfFile>
</response>

Response (on error)
<response status="error">
       <error description="Can not find sales invoice for number: 2013-01293 and date: 2013-01-02">
       </error>
</response>


3.22.9 SalesInvoiceGetPublicURL

Get URL link for accessing the document via web or mobile browser. This link can be sent to the customer instead of PDF attachment. Upon clicking the link a document viewer for the invoice will be opened with option for downloading the PDF invoice.

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesInvoiceGetPublicURL">
       <parameter name="number" value="12/2009" />
       <parameter name="date" type="Date" value="2009-12-15" />
        <parameter name="markDocumentAsSent" />
        <parameter name="linkExpirationDate" value="2020-12-31" />
</method>
</request>


Response
<response status="ok">
       <number>2012-01293</number>
       <date>2013-01-02</date>
       <publicURL>https://racuni.com/racuni/SI-123123123489AADEFABC123</publicURL>
</response>

Response (on error)
<response status="error">
       <error description="Cannot find sales invoice for number: 2013-01293 and date: 2013-01-02">
       </error>
</response>


3.22.10 SalesInvoiceImport

Import Sales invoice which was already issued in other ERP system. Import is made for purposes of accounting. Invoices can be imported using API datatype format or in the form of a standardized eSLOG XML format (or any other supported electronic invoice format).

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesInvoiceImport">
               <parameter name="importType" value="createOrUpdate" />
               <parameter name="SalesInvoice">
                    <!-- structure of elements is the same as in SalesInvoiceCreate only tag <number> is mandatory here
                <parameter/>
       </method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <number>0001-1206-2014</number>
       <date>2013-06-12</date>
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
        <error description="Property <number> is required."><error/>  <!-- missing number  
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
                <error description="Sales invoice for number: 0001-1206-2013 already exists!"></error>  <!-- Sales Invoice for number already exists  
</response>

(Using ESLOG data format)

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesInvoiceImport">
               <parameter name="importType" value="createOrUpdate" />
               <parameter name="dataFormat" value="ESLOG" />
               <parameter name="base64data">JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0ZpbHRlci9GbGF0ZURlY29kZT4+Cn...
                    <!-- eSlog XML encoded into base64 string
                <parameter/>
       </method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <number>0001-1206-2014</number>
       <date>2021-06-12</date>
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
                <error description="Parameter <base64data>: cannot parse contents"></error>  <!-- Error when decoding XML from base64 string  
</response>

<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
                <error description="Error parsing XML file due to invalid syntax"></error>  <!-- Error when parsing XML
</response>

<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
                <error description="Document can not be overwritten because it is already posted."></error>  <!-- There are several different error messages possible.
</response>



3.22.11 SalesInvoiceUpdate

Update existing Sales invoice. Data must contain sales invoice number to be able to identify document which is to be updated.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesInvoiceUpdate">
<parameter name="SalesInvoice">
         <number>12</number>                                    <!-- document number is mandatory in UPDATE (Can use sequential document number (example: 12), or formatted number (example: 12/2011))
               <!--  Parameters are identical to the parameters in SalesInvoiceCreate api
       </parameter>
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2016 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328
<?xml version="1.0" encoding="utf-8"?>
response status="ok" >
       <number>12/2009</number>                <!-- created document ID or number
       <date>2016-01-13</date>                 <!-- date of document
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- missing mandatory attributes, invalid values, no privileges,  
</response>


3.22.12 SalesInvoiceDelete

Delete sales order. Must specify parameter/s (number, number+date) to identify document for deleting. It is possible to delete only last issued invoice.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesInvoiceDelete">
       <parameter name="number" value="12/2009" />
       <parameter name="date" type="Date" value="2016-01-13" />
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2016 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="no privileges"><error/>     <!-- document could not be found, no privileges,  
</response>



3.22.13 SalesInvoiceCancel

Cancel sales invoice (annulment of the invoice by creating a reverse invoice).

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesInvoiceCancel">
       <parameter name="number" value="2013-00014" />
       <parameter name="date" type="Date" value="2013-03-26" />
       <parameter name="status" value="draft" />
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2016 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Access denied. User account does not have sufficient privileges for the given request"><error/>     <!-- document could not be found, no privileges,  
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Can not cancel sales invoice for arguments number: 2013-00014 date: 2013-03-26"><error/>    <!-- document could not be canceled,  
</response>

Possible error messages:
Access denied. User account does not have sufficient privileges for the given request
Parameter named "number" is required
Can not find sales invoice for number
Can not cancel. Found X sales invoices
Found X sales invoices X. You can only cancel one sales invoice at a time
Can not cancel sales invoice X



3.22.14 SalesInvoiceList and POSSalesInvoiceList

Get list of sales invoices or POS sales invoices for criteria which is specified by API parameters.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesInvoiceList">
               <parameter name="status" value="issuedInvoice" />
               <parameter name="dateFrom" type="Date" value="2016-02-19" />
       </method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
<SalesInvoices>                 
       <SalesInvoice>
                <!-- structure of elements is the same as in SalesInvoiceGet
       </SalesInvoice>
       ...
</SalesInvoices>
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- no privileges,  
</response>


3.22.15 SalesInvoiceSendByEmail

Sends document by email to the recipient(s).


Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesInvoiceSendByEmail">
       <parameter name="number" value="12/2009" />
       <parameter name="date" type="Date" value="2016-01-13" />
       <parameter name="sender" value="micka@kovac.com"/>
       <parameter name="recipient" value="zoran@kovac.com,zlatko@kovac.com"/>
       <parameter name="cc" value=""/>
       <parameter name="bcc" value=""/>
       <parameter name="subject" value="TEST d.o.o.: Sales invoice nr. 0002/2016"/>
       <parameter name="message" value="Message text"/>
        <parameter name="useHtmlMessage" value="true"/>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="no privileges"><error/>     <!-- document could not be found, no privileges, mail sending failed
</response>


3.22.16 SalesInvoicePaymentRecordAdd

Record payment of the invoice.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesInvoicePaymentRecordAdd">
       <parameter name="number" value="2014-00013"/>
       <parameter name="date" type="Date" value="2014-05-15"/>
       <parameter name="paymentDate" type="Date" value="2014-05-20"/>
       <parameter name="paymentAmount" value="50"/>
       <parameter name="paymentMethodForInvoice" value="Cash"/>
       <parameter name="paymentRemark" value="Payment record on sales invoice 2014-05-15"/>
       <parameter name="paymentCurrency" value="EUR"/>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Payment method Test is not supported"><error/>      <!-- wrong payment method chosen
</response>


3.22.17 SalesInvoiceInstallmentsCreate

Define installments on sales invoice (payment of the invoice with multiple installments).

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
       <method name="SalesInvoiceInstallmentsCreate">
               <parameter name="number" value="2014-00013"/>
               <parameter name="date" type="Date" value="2014-05-15"/>
               <parameter name="SalesInvoiceInstallments">
                       <SalesInvoiceInstallments>
                               <Installment>
                                       <installmentDate>2014-06-15</installmentDate>
                                       <installmentAmount>218</installmentAmount>
                               </Installment>
                               <Installment>
                                       <installmentDate>2014-07-15</installmentDate>
                                       <installmentAmount>300</installmentAmount>
                               </Installment>
                               <Installment>
                                       <installmentDate>2014-08-15</installmentDate>
                                       <installmentAmount>300</installmentAmount>
                               </Installment>
                       </SalesInvoiceInstallments>
               </parameter>
       </method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Succesfuly added 3 installments to sales invoice.</message>
       <number>2014-00013</number>
    <date>2014-05-15</date>
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="None or only one instalment specified."><error/>    <!-- at least two installments must be specified
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="No instalments were added to sales invoice!"><error/>       <!-- no installments added to sales invoice
</response>


3.22.18 SalesInvoiceAttachmentAdd

Add image/attachment to a sales invoice.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesInvoiceAttachmentAdd">
       <parameter name="number" type="String" value="2020-00001" />
       <parameter name="attachment">
               <contents encoding="BASE64">BASE64...</contents>
               <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added attachment att.jpg to sales invoice 2020-00001.</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find sales invoice for number: 2020-00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>


3.22.19 SalesInvoiceAttachmentSetDefault

Add file attachment to a sales invoice and set is as default attachment (the first file attached).

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesInvoiceAttachmentSetDefault">
       <parameter name="number" type="String" value="2020-00001" />
       <parameter name="attachment">
               <contents encoding="BASE64">BASE64...</contents>
               <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added attachment att.jpg to sales invoice 2020-00001.</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find sales invoice for number: 2020-00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>


3.22.20 SalesInvoiceAttachmentGet

Get default attachment of a sales invoice.


Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesInvoiceAttachmentGet">
       <parameter name="number" type="String" value="2020-00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <SalesInvoice>
               <Attachments>
                       <Attachment>
                               <fileName>att.jpg</fileName>
                               <contents encoding="BASE64">BASE64</contents>
                       </Attachment>
               </Attachments>
       </SalesInvoice>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find sales invoice for number: 2020-00001 Sales invoice does not have attachemnts.
</response>


3.22.21 SalesInvoiceAttachmentList

Get all images/files attached to the invoice.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesInvoiceAttachmentList">
       <parameter name="number" type="String" value="2020-00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <SalesInvoice>
               <Attachments>
                       <Attachment>
                               <fileName>att1.jpg</fileName>
                               <contents encoding="BASE64">1BASE64</contents>
                       </Attachment>
                       <Attachment>
                               <fileName>att2.jpg</fileName>
                               <contents encoding="BASE64">2BASE64</contents>
                       </Attachment>
                       <Attachment>
                               <fileName>att3.jpg</fileName>
                               <contents encoding="BASE64">3BASE64</contents>
                       </Attachment>
               </Attachments>
       </SalesInvoice>
</response>

Response on error

<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find sales invoice for number: 2020-00001 Sales invoice does not have attachemnts.
</response>

 

3.23. SalesOrder API

SalesOrderGetGet sales orders by document number, or by combination of document number and date.
SalesOrderGetPDFGet PDF file for sales orders by document number, or by combination of document number and date.
SalesOrderCreateCreate new sales order.
SalesOrderImportImport sales orders issued in other IS.
SalesOrderUpdateUpdate existing sales order.
SalesOrderDeleteDelete sales order.
SalesOrderCancelCancel sales order.
SalesOrderListGet list of sales orders for specified criteria
SalesOrderSendByEmailSends document by email to the recipient(s).
SalesOrderPaymentRecordAddAdd payment record on sales order.
SalesOrderCreateInvoiceCreate sales invoice from sales order.
SalesOrderAttachmentAddAdd attachment to sales order.
SalesOrderAttachmentSetDefaultAdd attachment to sales order and set is as default.
SalesOrderAttachmentGetGet default attachment of sales order.
SalesOrderAttachmentListGet all attachments of sales order.

3.23.1 SalesOrderGet

Get sales orders by document number, or by combination of document number and date.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formatted number (example: 2010-00002)
dateDocument date
costPositionCost position
documentIDInternal document identificator. In case of using this parameter, no other parameter listed abowe is needed for searching by document.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesOrderGet">
       <parameter name="number" value="2" />
       <parameter name="date" type="Date" value="2010-02-22" />
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
       <SalesOrder>
               <buyerCity>MARIBOR</buyerCity>
               <buyerName>Company d.o.o. </buyerName>
               <buyerPostalCode>2000</buyerPostalCode>
               <buyerStreet>Meljska c. 37</buyerStreet>
               <buyerTaxNumber>31476546</buyerTaxNumber>
               <buyerVatRegistration>None</buyerVatRegistration>
               <costPosition>1</costPosition>
               <businessUnit>0001</businessUnit>
               <salesInvoicesRef>2014-00001, 2014-00002, 2014-00003</salesInvoicesRef> <!-- references to sales invoices
               <advanceInvoicesRef>2014-00001, 2014-00002, 2014-00003</advanceInvoicesRef> <!-- references to advance invoices
               <deliveryNotesRef>2014-00004, 2014-00005, 2014-00006</deliveryNotesRef> <!-- references to delivery notes
               <cancelledDocumentRef>2012-00015</cancelledDocumentRef> <-- Reference to cancelled document
               <customerContactPerson>John Smith of BEST BUYER Ltd.</customerContactPerson>
               <orderReference>123</orderReference>                    <!-- (Optional)
               <date>2014-02-22</date>
               <deliveryDate>2014-02-28</deliveryDate>
               <deliveryMethod>Kamionom</deliveryMethod>
               <number>2</number>
               <orderReference>111</orderReference>
               <receivedDate>2014-02-22</receivedDate>
               <remarks>Text for the bottom of the document</remarks>
               <status>Opened</status>
               <totalAmount>54.480</totalAmount>
               <totalCurrency>EUR</totalCurrency>
               <totalDiscount>0.0</totalDiscount>
               <totalNetAmount>49.66</totalNetAmount>
               <totalVatAmountFlatRate>0.00</totalVatAmountFlatRate>
               <totalVatAmountNormalRate>0.18</totalVatAmountNormalRate>
               <totalVatAmountLowerRate>4.64</totalVatAmountLowerRate>
               <totalVatAmountZeroRate>0.0</totalVatAmountZeroRate>
               <totalVatBaseAmountFlatRate>0.00</totalVatBaseAmountFlatRate>
               <totalVatBaseAmountNormalRate>0.82</totalVatBaseAmountNormalRate>
               <totalVatBaseAmountLowerRate>48.84</totalVatBaseAmountLowerRate>
               <totalVatBaseAmountZeroRate>0.00</totalVatBaseAmountZeroRate>
               <vatOutgoingDocumentVatClause>Registered</vatOutgoingDocumentVatClause>
               <type>Gross</type>
               <introductionText>introduction text</introductionText>
               <vatCountryIsoCode>HR</vatCountryIsoCode>
               <Address>                        <!-- (Optional) Setting delivery address on document and partner buyer if it doesn't exists              
                       <city>Celje</city>
                       <country>SI</country>
                       <postalCode>3000</postalCode>
                       <street>Ulica 10</street>
                       <type>Delivery</type>
                       <firstAddressLine>Delivery address</firstAddressLine>
               </Address>
               <Items>
                       <Item>
                               <amount>0.82</amount>
                               <amountWithoutDiscount>0.82</amountWithoutDiscount>
                               <currency>EUR</currency>
                               <description>asdh</description>
                               <discountAmount>0.0</discountAmount>
                               <discountPercentage>0.0000</discountPercentage>
                               <netPrice>0.81967</netPrice>
                               <netPriceInDocumentCurrency>0.81967</netPriceInDocumentCurrency>
                               <position>1</position>
                               <price>1.00000</price>
                               <priceInDocumentCurrency>1.00000</priceInDocumentCurrency>
                               <quantity>1.000000</quantity>
                               <totalDiscountPercentage>0.0000</totalDiscountPercentage>
                               <unit></unit>
                               <unit></unit>
                               <vatAmount>0.18</vatAmount>
                               <vatPercentage>22.0</vatPercentage>
                       </Item>
                       <Item>
                               <amount>48.84</amount>
                               <amountWithoutDiscount>48.84</amountWithoutDiscount>
                               <articleCode>000013</articleCode>
                               <articleName>VENTIL REDUC. 3/4" WATTS</articleName>
                               <currency>EUR</currency>
                               <description>ni bilo opisa, sedaj pa je</description>
                               <discountAmount>0.0</discountAmount>
                               <discountPercentage>0.0000</discountPercentage>
                               <netPrice>48.84018</netPrice>
                               <netPriceInDocumentCurrency>48.84018</netPriceInDocumentCurrency>
                               <position>2</position>
                               <price>53.48000</price>
                               <priceInDocumentCurrency>53.48000</priceInDocumentCurrency>
                               <productCode>000013</productCode>
                               <productName>VENTIL REDUC. 3/4" WATTS</productName>
                               <quantity>1.000000</quantity>
                               <totalDiscountPercentage>0.0000</totalDiscountPercentage>
                               <unit>kos</unit>
                               <unit>kos</unit>
                               <vatAmount>4.64</vatAmount>
                               <vatPercentage>9.5</vatPercentage>
                       </Item>
               </Items>
       </SalesOrder>
</response>



3.23.2 SalesOrderGetPDF

Get PDF for sales order by document number, or by combination of document number and date. Response (on OK) returns binary record for PDF file coded with Base64 coding.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2010-00002)
dateDocument date
costPositionCost position
documentIDInternal document identificator. In case of using this parameter, no other parameter listed abowe is needed for searching by document.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesOrderGetPDF">
       <parameter name="number" value="2" />
       <parameter name="date" type="Date" value="2010-02-22" />
</method>
</request>


Response
<response status="ok">
       <number>2</number>
       <date>2010-02-22</date>
       <pdfFile>JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0ZpbHRlci9GbGF0ZURlY29kZT4+CnN0cmVhbQp4nJVYS4/bNh...</pdfFile>
</response>

Response (on error)
<response status="error">
       <error description="Can not find sales orderfor number: 2 and date: 2010-02-22">
       </error>
</response>



3.23.3 SalesOrderCreate

Create new sales order.

Document item can be specified with: productCode, quantity, discountPercentage, or can be specified with: description, currency, quantity, price (retail price including VAT for Retail document) or netPrice (gross price without VAT for Gross document). Default document type is Gross. Additional optional item fields are: discountPercentage, unit, vatPercentage, vatTransactionType. Supported values for vatTransactionType are:
0 - Taxable domestic transactions of goods and services // Obdavčen promet blaga in storitev v Sloveniji
4 - Zero-rated transaction - supply of goods within the EU // Oproščen promet - dobava blaga znotraj EU
104 - Vat free transaction - supply of goods in EU by customs procedure 42 and 63 // Oproščen promet - dobava blaga znotraj EU po carinskih postopkih 42 in 63
6 - Zero-rated transaction - tripartite supplies of goods within the EU // Oproščen promet - tristranske dobave blaga znotraj EU
11 - Sales of services in the EU, VAT reverse charge // Oproščen promet - storitve v EU, od katerih plača DDV prejemnik
103 - Vat free transaction - supply of goods in EU by call-of-stock arrangement // Oproščen promet - dobava blaga znotraj EU po skladiščenju na odpoklic
1 - Zero-rated transaction - exports of commodity outside the EU // Oproščen promet - izvoz blaga izven EU
3 - Zero-rated transaction with the right to deduct input VAT // Oproščen promet - s pravico do odbitka vstopnega DDV
2 - Zero-rated transaction - without the right to deduct input VAT // Oproščen promet - brez pravice do odbitka vstopnega DDV
9 - Transactions exempt from VAT with the right of input VAT deduction (transactions outside SLO) // Neobdavčljiv promet s pravico do odbitka vstopnega DDV (prometi izven SLO)
7 - not subject to VAT // Neobdavčen promet - ne gre v DDV evidence
12 - Nontaxable suply - other taxes or duties other than VAT // Neobdavčen promet - ostali davki oziroma dajatve (razen DDV)
105 - Not subject to VAT – supply of goods outside EU // Neobdavčen promet - dobava blaga zunaj Unije (tretje države)
10 - Supply of goods and services in Slovenia, VAT reverse charged by the recipient // Dobava blaga in storitev v SLO, DDV obračuna prejemnik (76.a člen)
5 - Zero-rated transaction - assembly in the EU // Oproščen promet - montaža v EU (obračun tujega DDV)
8 - Distance selling in the EU surpassing annual sales threshold (foreign VAT) // Oproščen promet - prodaja blaga na daljavo (obračun tujega DDV)
101 - Special vat margin calculation for used goods // Posebna ureditev za rabljeno blago
102 - Special vat margin calculation for used goods - tax free // Posebna ureditev za rabljeno blago - oproščen promet
13 - Special vat margin calculation for travel agencies - price difference taxed // Obdavčen promet - posebni postopek obdavčitve razlike v ceni za potovalne agencije (98. člen)
14 - VAT exempt transactions for travel agencies // Oproščen promet za potovalne agencije (99. člen)
100 - Electronic services in other EU member countries (OSS) // Prodaja elektronskih storitev v drugih članicah EU (OSS)
106 - Distance sales of goods to EU consumers (OSS) // Prodaja blaga na daljavo končnim potrošnikom v EU (OSS)
107 - Supply of services to EU consumers (OSS) // Prodaja storitev končnim potrošnikom v EU (OSS)
108 - Distance sales of imported goods to EU consumers (IOSS) // Prodaja na daljavo iz tretjih držav uvoženega blaga končnim potrošnikom v EU (IOSS)
120 - Supply of services from EU to third country consumers (foreign VAT) // Izvoz storitev iz EU končnim potrošnikom v državi izven EU (obračun tujega DDV)
121 - Distance sales of goods to consumers outside EU (foreign VAT) // Prodaja blaga na daljavo končnim potrošnikom v državi izven EU (obračun tujega DDV)

Before using vat transaction types for OSS and IOSS, you must set up registration for OSS and IOSS in company settings under foreign VAT registrations.

Parameters

SalesOrderComplex parameter with data tags

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesOrderCreate">
        <parameter name="SalesOrder">
               <date>2010-01-13</date>                         <!-- document date
               <deliveryDate>2010-02-13</deliveryDate>
               <receivedDate>2010-01-13</receivedDate>         <!-- (Optional) Default document date
               <customerContactPerson></customerContactPerson> <!-- (Optional)
               <type>Retail</type>                             <!-- (Optional) Type of pricing default is Gross
               <status>Opened</status>                           <!-- (Optional) Possible values: Draft, Opened, Processing, PartialDelivery, CompletedDelivery, CompletedDeliveryPartialInvoic, CompletedDeliveryAndSettledInvoice, Cancelled, Reversed, OnHold, Shipped, ReservedStock - default is Opened
               <costPosition>120</costPosition>                <!-- (Optional)
               <deliveryMethod>Delivery method</deliveryMethod>        <!-- (Optional)
               <superDiscountPercentage>5</superDiscountPercentage>    <!-- (Optional)
               <orderReference>123</orderReference>                    <!-- (Optional)
               <remarks>Remark on Sales order</remarks>                <!-- (Optional)
               <introductionText>introduction text</introductionText>   <!-- (Optional)
               <buyerCode>123456</buyerCode>                           <!-- (Optional). If buyer code is specified, other buyer parameters bellow are not needed as the buyer data is taken from database. If any additional parameter is specified, it will override master buyer data in document
               <buyerDocumentID>60:123456</buyerDocumentID>                    <!-- (Optional). If it is specified buyer parameters bellow are not needed as the buyer data is taken from database. If any parameter bellow is sepcified it will override master buyer data in document
               <buyerName>Micka Kovac</buyerName>              
               <buyerTaxNumber>02169711</buyerTaxNumber>       <!-- (Optional)
               <buyerVatRegistration>None</buyerVatRegistration>       <!-- (Unkown, None, Registered)
               <buyerEMail>micka@kovac.com</buyerEMail>                <!-- (Optional)
               <buyerPhone>040505050</buyerPhone>                      <!-- (Optional)
               <buyerStreet>Iztokova 22</buyerStreet>                  <!-- (Optional)
               <buyerPostalCode>2000</buyerPostalCode>                 <!-- (Optional)
               <buyerCity>Maribor</buyerCity>                  <!-- (Optional)
               <buyerCountry>SI</buyerCountry>                         <!-- (Optional) ISO-2 country code
               <vatTransactionType>0</vatTransactionType> <!-- (Optional) default is 0
               <vatOutgoingDocumentVatClause>Registered</vatOutgoingDocumentVatClause> <!-- (Optional) Possible values: Registered, NotRegistered, RegisteredTourismLawPart47, RegisteredTourismLawPart31, RegisteredTourismLawPart47And31
               <methodOfPayment>bankTransfer</methodOfPayment> <!-- Possible ways of payment: Unknown, BankTransfer, Cash, Cheques, EurocardMastercard, Visa, Karanta, Amex, Diners, Activa, BA, CashOnDelivery, Moneta, CreditCard, PayPal, DirectDebit, SetOff, Coupon, Compensation, GoCrypto
               <documentLanguage>Slovene</documentLanguage> <!-- (Optional) Possible document language: Slovene, English, German, Croatian, Italian, Hungarian, Czech, Slovak, Serbian, Polish and Bulgarian
               <printingTemplate>Predloga2</printingTemplate> <!-- (Optional) Setting printing template for document, posible values is code of uploaded templates in web app
               <salesInvoiceRef>2014-00001</salesInvoiceRef> <!-- (Optional) Setting reference to sales invoice
               <salesQuoteRef>2014-00001</salesQuoteRef> <!-- (Optional) Setting reference to sales quote
               <vatCountryIsoCode>HR</vatCountryIsoCode> <!-- Mandatory if using vatTransactionTypes: 106, 107, 108, 109, 120, 100, 8 and 5 and it determines that VAT procentages for specified country has to be taken
               <Address>                        <!-- (Optional) Setting delivery address on document and partner buyer if it doesn't exists              
                       <city>Celje</city>
                       <country>SI</country>
                       <postalCode>3000</postalCode>
                       <street>Ulica 10</street>
                       <type>Delivery</type>
                       <firstAddressLine>Delivery address</firstAddressLine>
               </Address>
               <Items>
                       <Item>                                          <!-- item specified with ref to product
                               <position>1</position>      <!-- position of item
                               <productCode>020</productCode>          <!-- product code
                               <quantity>100</quantity>
                               <discountPercentage>10</discountPercentage>
                       </Item>
                       <Item>                                          <!-- Item specified for good or service
                               <position>2</position>      <!-- position of item
                               <description>Transport of goods</description>
                               <price>11.00</price>      <!-- price (retail price including VAT for retail document) or netPrice (gross price without VAT for gross document). Default document type is "gross" so use <netPrice> tag in this case or <price> tag in case of document type "retail"
                               <discountPercentage>2</discountPercentage>      <!-- (Optional)
                               <vatPercentage>10</vatPercentage>               <!-- (Optional)
                               <currency>EUR</currency>                        <!-- (Optional)
                               <quantity>10</quantity>                         <!-- (Optional) default 0
                               <unit>km</unit>                         <!-- (Optional)
                               <vatTransactionType>0</vatTransactionType>      <!-- (Optional) default is 0. Foreign VAT transaction types (100, 8 and 5) can only be set on document level.
                       </Item>
                       ...
               </Items>
       </parameter>
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328
<?xml version="1.0" encoding="utf-8"?>
response status="ok" >
       <number>2010-00012</number>             <!-- created document ID or number
       <date>2010-01-13</date>                 <!-- date of document
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- missing mandatory attributes, invalid values, no privileges,  
</response>



3.23.4 SalesOrderImport

Import Sales order issued in other IS. Parameter 'importType' can be used to specify type of import. If parameter is not specified, "createOrUpdate" is used as default. For updating Sales orders with this api call, Sales orders's data must contain code as unique identifier.

Parameters

importTypeFlag for the type of import
  • createOrUpdate Import all - create new and update existing documents
  • createOnly Skip import for existing documents
  • updateOnly  Skip import of new documents
SalesOrderSales order data in xml substructure.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesOrderImport">
               <parameter name="importType" value="createOrUpdate" />
               <parameter name="SalesOrder">
                    <!-- structure of elements is the same as in SalesOrderCreate only tag <number> is mandatory here
                <parameter/>
       </method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <number>0001-1206-2014</number>
       <date>2013-06-12</date>
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
        <error description="Property <number> is required."><error/>  <!-- missing number  
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
                <error description="Sales order for number: 0001-1206-2013 already exists!"></error>  <!-- Sales order for number already exists  
</response>



3.23.5 SalesOrderUpdate

Update existing Sales invoice.Data must contain sales invoice number to be able to identify document which is to be updated.

Parameters

SalesOrderComplex parameter with data tags

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesOrderUpdate">
        <parameter name="SalesOrder">
             <number>12</number>                                        <!-- document number is mandatory in UPDATE (Can use sequential document number (example: 12), or formatted number (example: 12/2011))
               <!--  Parameters are identical to the parameters in SalesOrderCreate api
       </parameter>
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328
<?xml version="1.0" encoding="utf-8"?>
response status="ok" >
       <number>2010-00012</number>             <!-- updated document ID or number
       <date>2010-01-13</date>                 <!-- date of document
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- missing mandatory attributes, invalid values, no privileges,  
</response>


3.23.6 SalesOrderDelete

Delete sales order. Must specify parameter/s (number, number+date) to identify document for deleting.

Parameters

numberDocument number
dateDocument date
costPositionCost position

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesOrderDelete">
       <parameter name="number" value="2010-00002" />
       <parameter name="date" type="Date" value="2010-02-22" />
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="no privileges"><error/>     <!-- document could not be found, no privileges,  
</response>


3.23.7 SalesOrderCancel

Cancel sales order. Must specify parameter/s (number, number+date) to identify document for canceling.

Parameters

numberDocument number
dateDocument date
costPositionCost position
statusStatus of cancelation document (draft, issuedInvoice). By Default status is issuedInvoice.
cancellationDocNumberNumber of cancellation document (mandatory and works only for imported documents)

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesOrderCancel">
       <parameter name="number" value="2013-00014" />
       <parameter name="cancellationDocNumber" value="2013-00014" />  <!-- Works only when canceling imported documents where this number is mandatory
       <parameter name="date" type="Date" value="2013-03-26" />
       <parameter name="status" value="draft" />
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Access denied. User account does not have sufficient privileges for the given request"><error/>     <!-- document could not be found, no privileges,  
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Can not cancel sales order for arguments number: 2013-00014 date: 2013-03-26"><error/>      <!-- document could not be canceled,  
</response>

Possible error messages:
Access denied. User account does not have sufficient privileges for the given request
Parameter named "number" is required
Can not find sales order for number
Can not cancel. Found X sales orders
Found X sales orders X. You can only cancel one sales order at a time
Can not cancel sales order X


3.23.8 SalesOrderList

Get list of sales orders for criteria which is specified by API parameters.

Parameters

numberDocument number
dateFromThe date which is used to select sales orders whose date is following it.
dateToThe date which is used to select sales orders whose date is preceding it
receivalDateFromThe date which is used to select sales orders whose date of receiva is following it.
receivalDateToThe date which is used to select sales orders whose date od receiva is preceding it
dateOfPaymentFromThe date which is used to select sales orders whose date of payment (date from payment record on document) is following it.
dateOfPaymentToThe date which is used to select sales orders whose date of payment (date from payment record on document) is preceding it.
deliveryAddressDelivery address of the buyer
buyerBuyer code, or buyer name
costPositionCost position code
totalAmountTotal amount of the sales order
totalCurrencyCurrency used in sales order
articleProduct code, or product name
statusPossible values:
  • Draft 
  • IssuedDocument 
  • Opened 
  • Processing 
  • PartialDelivery 
  • CompletedDelivery 
  • CompletedDeliveryPartialInvoic 
  • CompletedDeliveryAndSettledInvoice 
  • Cancelled 
  • Reversed 
  • OnHold 
  • Shipped 
  • CorrectionPending 
  • ReservedStock 
  • PaymentRecordExists 
  • PaidNotInvoiced 
issuerIssuer of document, search is done by username

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesOrderList">
       <parameter name="dateFrom" type="Date" value="2009-11-01" />
        <parameter name="dateTo" type="Date" value="2010-01-11" />
       <parameter name="deliveryAddress" value="Iztokova" />
       <parameter name="totalAmount" value=1000/>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
<SalesOrders>                   
       <SalesOrder>
                <!-- structure of elements is the same as in SalesOrderGet
       </SalesOrder>
       ...
</SalesOrders>
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- no privileges,  
</response>


3.23.9 SalesOrderSendByEmail

Sends document by email to the recipient(s).

Parameters

numberDocument number
dateDocument date (optional additional document identification)
senderEmail sender (Optional)
recipientComma delimited list of recipient(s) emails
ccCC email (Optional)
bccBCC email (Optional)
subjectMail subject (Optional)
messageMessage text (Optional)
useHtmlMessageSend message text as HTML (Optional)

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesOrderSendByEmail">
       <parameter name="number" value="12/2009" />
       <parameter name="date" type="Date" value="2010-01-13" />
       <parameter name="sender" value="micka@kovac.com"/>
       <parameter name="recipient" value="zoran@kovac.com,zlatko@kovac.com"/>
       <parameter name="cc" value=""/>
       <parameter name="bcc" value=""/>
       <parameter name="subject" value="TEST d.o.o.: Sales quote nr. 0002/2010"/>
       <parameter name="message" value="Message text"/>
        <parameter name="useHtmlMessage" value="true"/>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="no privileges"><error/>     <!-- document could not be found, no privileges, mail sending failed
</response>


3.23.10 SalesOrderPaymentRecordAdd

Add payment record on sales order.

Parameters

numberDocument number
dateDocument date (optional additional document identification)
costPositionCost position
businessUnitBusiness unit
paymentDatePayment date
paymentAmountPayment amount
paymentMethodForInvoicePayment method for sales order
  • BankTransfer 
  • BankPaymentOrder 
  • Cash 
  • CreditCard 
  • Coupon 
  • DirectDebit 
  • DebitNote 
  • CreditNote 
  • Cancellation 
  • PayPal 
  • Unknown 
  • Other 
  • Compensation 
  • Cheques 
  • Cheque 
  • Karanta 
  • BA 
  • Diners 
  • Activa 
  • EurocardMastercard 
  • Visa 
  • Amex 
  • CashOnDelivery 
  • Moneta 
  • CryptoCurrency 
  • GoCrypto 
paymentRemarkPayment remark (optional)
paymentCurrencyPayment currency (optional)

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesOrderPaymentRecordAdd">
       <parameter name="number" value="2014-00013"/>
       <parameter name="date" type="Date" value="2014-05-15"/>
       <parameter name="paymentDate" type="Date" value="2014-05-20"/>
       <parameter name="paymentAmount" value="50"/>
       <parameter name="paymentMethodForInvoice" value="Cash"/>
       <parameter name="paymentRemark" value="Payment record on sales order 2014-05-15"/>
       <parameter name="paymentCurrency" value="EUR"/>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Payment method Test is not supported"><error/>      <!-- wrong payment method chosen
</response>


3.23.11 SalesOrderCreateInvoice

Create sales invoice from sales order.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit
statusStatus for created invoice (issuedInvoice or draft).
warehouseCodeWarehouse that will be set on created invoice, default it is taken from sales order.
cashRegisterCodeCashbook.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
       <method name="SalesOrderCreateInvoice">
                  <parameter name="number" value="0005/2021"/>
                  <parameter name="status" value="issuedInvoice"/>
                  <parameter name="cashRegisterCode" value="001"/>
                  <parameter name="warehouseCode" value="908"/>
       </method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <number>2010-00005</number>             <!-- created document number
       <date>2010-01-13</date>                 <!-- date of document
        <documentID>123.21421</documentID>      <!-- created document ID
        <message>Succesfuly created sales invoice from sales order</message>
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="no privileges"><error/>     <!-- document could not be found, no privileges,  
</response>


3.23.12 SalesOrderAttachmentAdd

Add image/attachment to sales order.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesOrderAttachmentAdd">
       <parameter name="number" type="String" value="2020-00001" />
       <parameter name="attachment">
               <contents encoding="BASE64">BASE64...</contents>
               <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added attachment att.jpg to sales order 2020-00001.</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find sales order for number: 2020-00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>


3.23.13 SalesOrderAttachmentSetDefault

Add attachment to sales order and set is as default.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesOrderAttachmentSetDefault">
       <parameter name="number" type="String" value="2020-00001" />
       <parameter name="attachment">
               <contents encoding="BASE64">BASE64...</contents>
               <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added attachment att.jpg to sales order 2020-00001.</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find sales order for number: 2020-00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>


3.23.14 SalesOrderAttachmentGet

Get default attachment of sales order.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesOrderAttachmentGet">
       <parameter name="number" type="String" value="2020-00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <SalesOrder>
               <Attachments>
                       <Attachment>
                               <fileName>att.jpg</fileName>
                               <contents encoding="BASE64">BASE64</contents>
                       </Attachment>
               </Attachments>
       </SalesOrder>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find sales order for number: 2020-00001 Sales order does not have attachemnts.
</response>


3.23.15 SalesOrderAttachmentList

Get all images/attachments of article.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesOrderAttachmentList">
       <parameter name="number" type="String" value="2020-00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <SalesOrder>
               <Attachments>
                       <Attachment>
                               <fileName>att1.jpg</fileName>
                               <contents encoding="BASE64">1BASE64</contents>
                       </Attachment>
                       <Attachment>
                               <fileName>att2.jpg</fileName>
                               <contents encoding="BASE64">2BASE64</contents>
                       </Attachment>
                       <Attachment>
                               <fileName>att3.jpg</fileName>
                               <contents encoding="BASE64">3BASE64</contents>
                       </Attachment>
               </Attachments>
       </SalesOrder>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find sales order for number: 2020-00001 Sales order does not have attachemnts.
</response>

 

3.24. SalesQuote API

SalesQuoteGetGet sales quotes by document number, or by combination of document number and date.
SalesQuoteGetPDFGet PDF file for sales quotes by document number, or by combination of document number and date.
SalesQuoteCreateCreate new sales quote.
SalesQuoteUpdateUpdate existing Sales quote.
SalesQuoteDeleteDelete sales quote.
SalesQuoteListGet list of sales quotes for specified criteria
SalesQuoteSendByEmailSends document by email to the recipient(s).
SalesQuotePaymentRecordAddAdd payment record on sales quote.
SalesQuoteCreateInvoiceCreate invoice from sales quote.
SalesQuoteAttachmentAddAdd attachment to sales quote.
SalesQuoteAttachmentSetDefaultAdd attachment to sales quote and set is as default.
SalesQuoteAttachmentGetGet default attachment of sales quote.
SalesQuoteAttachmentListGet all attachments of sales quote.

3.24.1 SalesQuoteGet

Get sales quotes by document number, or by combination of document number and date.

Parameters

numberDocument number. Can use sequential document number (example: 5), or formatted number (example: 2010-00005)
dateDocument date
costPositionCost position
businessUnitBusiness unit
documentIDInternal document identificator. In case of using this parameter, no other parameter listed abowe is needed for searching by document.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesQuoteGet">
       <parameter name="number" value="5" />
       <parameter name="date" type="Date" value="2010-02-22" />
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
       <SalesQuote>
               <number>5</number>
               <status>draft</status>
               <date>2010-01-13</date>
               <validUntil>2010-02-13</validUntil>
               <deliveryDate>2010-02-13</deliveryDate>                  <!-- (Optional)
               <type>Retail</type>
               <costPosition>120</costPosition>                        <!-- (Optional)
               <businessUnit>0001</businessUnit>                        <!-- (Optional)
               <deliveryMethod>Delivery method</deliveryMethod>        <!-- (Optional)
               <reference>00 2010-00005</reference>                    <!-- Reference for payment
               <superDiscountPercentage>2</superDiscountPercentage>    <!-- (Optional)
               <warehouseCode>1000</warehouseCode>             <!-- (Optional)
               <orderReference>123</orderReference>                    <!-- (Optional)
               <buyerName>Micka Kovac</buyerName>              <!-- buyer name
               <buyerTaxNumber>02169711</buyerTaxNumber>       <!-- buyer tax number
               <buyerVatRegistration>None</buyerVatRegistration>       <!-- (true, false)
               <buyerEMail>micka@kovac.com</buyerEMail>                <!-- (Optional)
               <buyerStreet>Iztokova 22</buyerStreet>                  <!-- (Optional)
               <buyerPostalCode>2000</buyerPostalCode>                 <!-- (Optional)
               <buyerCity>Maribor</buyerCity>                  <!-- (Optional)
               <buyerCountry>SI</buyerCountry>                 <!-- (Optional)
               <totalAmount>319.800</totalAmount>
               <totalCurrency>EUR</totalCurrency>
               <totalDiscount>0.0</totalDiscount>
               <totalNetAmount>288.34</totalNetAmount>
               <totalVatAmountFlatRate>0.00</totalVatAmountFlatRate>
               <totalVatAmountNormalRate>22.18</totalVatAmountNormalRate>
               <totalVatAmountLowerRate>9.28</totalVatAmountLowerRate>
               <totalVatAmountZeroRate>0.0</totalVatAmountZeroRate>
               <totalVatBaseAmountFlatRate>0.00</totalVatBaseAmountFlatRate>
               <totalVatBaseAmountNormalRate>100.82</totalVatBaseAmountNormalRate>
               <totalVatBaseAmountLowerRate>97.68</totalVatBaseAmountLowerRate>
               <totalVatBaseAmountZeroRate>89.84</totalVatBaseAmountZeroRate>
               <vatTransactionType>0</vatTransactionType>
               <vatOutgoingDocumentVatClause>Registered</vatOutgoingDocumentVatClause>
               <remarks>Remark on SalesQuote</remarks>
               <salesInvoicesRef>2014-00001, 2014-00002, 2014-00003</salesInvoicesRef> <!-- references to sales invoices
               <advanceInvoicesRef>2014-00001, 2014-00002, 2014-00003</advanceInvoicesRef> <!-- references to advance invoices
               <deliveryNotesRef>2014-00004, 2014-00005, 2014-00006</deliveryNotesRef> <!-- references to delivery notes
               <salesOrdersRef>2014-00001, 2014-00002</salesOrdersRef> <!-- references to sales orders
               <introductionText>introduction text</introductionText>   
               <vatCountryIsoCode>HR</vatCountryIsoCode>
               <warehouseCode>00001</warehouseCode>
               <Address>                        <!-- (Optional) Setting delivery address on document and partner buyer if it doesn't exists              
                       <city>Celje</city>
                       <country>SI</country>
                       <postalCode>3000</postalCode>
                       <street>Ulica 10</street>
                       <type>Delivery</type>
                       <firstAddressLine>Delivery address</firstAddressLine>
               </Address>
               <Items>
                       <Item>
                               <amount>100.82</amount>
                               <amountWithoutDiscount>100.82</amountWithoutDiscount>
                               <currency>EUR</currency>
                               <description>test</description>
                               <discountAmount>0.0</discountAmount>
                               <discountPercentage>0.0000</discountPercentage>
                               <netPrice>100.81967</netPrice>
                               <netPriceInDocumentCurrency>100.81967</netPriceInDocumentCurrency>
                               <position>4</position>
                               <price>123.00000</price>
                               <priceInDocumentCurrency>123.00000</priceInDocumentCurrency>
                               <quantity>1.000000</quantity>
                               <totalDiscountPercentage>0.0000</totalDiscountPercentage>
                               <unit></unit>
                               <unit></unit>
                               <vatAmount>22.18</vatAmount>
                               <vatPercentage>22.0</vatPercentage>
                       </Item>
                       <Item>
                               <amount>89.84</amount>
                               <amountWithoutDiscount>89.84</amountWithoutDiscount>
                               <articleCode>000011</articleCode>
                               <articleName>Firma na dva</articleName>
                               <currency>EUR</currency>
                               <description>sdasd fsdf asdf asdf sdf</description>
                               <discountAmount>0.0</discountAmount>
                               <discountPercentage>0.0000</discountPercentage>
                               <netPrice>89.83500</netPrice>
                               <netPriceInDocumentCurrency>89.83500</netPriceInDocumentCurrency>
                               <position>2</position>
                               <price>89.83500</price>
                               <priceInDocumentCurrency>89.83500</priceInDocumentCurrency>
                               <productCode>000011</productCode>
                               <productName>Firma na dva</productName>
                               <quantity>1.000000</quantity>
                               <totalDiscountPercentage>0.0000</totalDiscountPercentage>
                               <unit>-</unit>
                               <unit>-</unit>
                               <vatAmount>0.00</vatAmount>
                               <vatPercentage>0.0</vatPercentage>
                       </Item>
                       <Item>
                               <amount>97.68</amount>
                               <amountWithoutDiscount>97.68</amountWithoutDiscount>
                               <articleCode>000013</articleCode>
                               <articleName>VENTIL REDUC. 3/4" WATTS</articleName>
                               <currency>EUR</currency>
                               <description>ni bilo opisa, sedaj pa je</description>
                               <discountAmount>0.0</discountAmount>
                               <discountPercentage>0.0000</discountPercentage>
                               <netPrice>48.84018</netPrice>
                               <netPriceInDocumentCurrency>48.84018</netPriceInDocumentCurrency>
                               <position>3</position>
                               <price>53.48000</price>
                               <priceInDocumentCurrency>53.48000</priceInDocumentCurrency>
                               <productCode>000013</productCode>
                               <productName>VENTIL REDUC. 3/4" WATTS</productName>
                               <quantity>2.000000</quantity>
                               <totalDiscountPercentage>0.0000</totalDiscountPercentage>
                               <unit>kos</unit>
                               <unit>kos</unit>
                               <vatAmount>9.28</vatAmount>
                               <vatPercentage>9.5</vatPercentage>
                       </Item>
               </Items>
       </SalesQuote>
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="document could not be found"><error/>
</response>



3.24.2 SalesQuoteGetPDF

Get PDF for sales quote by document number, or by combination of document number and date. Response (on OK) returns binary record for PDF file coded with Base64 coding.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2010-00002)
dateDocument date
costPositionCost position
businessUnitBusiness unit
documentIDInternal document identificator. In case of using this parameter, no other parameter listed abowe is needed for searching by document.
markDocumentAsSentMarks document as sent.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesQuoteGetPDF">
       <parameter name="number" value="2" />
       <parameter name="date" type="Date" value="2010-02-22" />
          <parameter name="markDocumentAsSent" />
</method>
</request>


Response
<response status="ok">
       <number>2</number>
       <date>2010-02-22</date>
       <pdfFile>JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0ZpbHRlci9GbGF0ZURlY29kZT4+CnN0cmVhbQp4nJVYS4/bNh...</pdfFile>
</response>

Response (on error)
<response status="error">
       <error description="Can not find sales quote for number: 2 and date: 2010-02-22">
       </error>
</response>


3.24.3 SalesQuoteCreate

Create new sales Quote.

Document item can be specified with: productCode, quantity, discountPercentage, or can be specified with: description, currency, quantity, price (retail price including VAT for Retail document) or netPrice (gross price without VAT for Gross document). Default document type is Gross. Additional optional item fields are: discountPercentage, unit, vatPercentage, vatTransactionType. Supported values for vatTransactionType are:
0 - Taxable domestic transactions of goods and services // Obdavčen promet blaga in storitev v Sloveniji
4 - Zero-rated transaction - supply of goods within the EU // Oproščen promet - dobava blaga znotraj EU
104 - Vat free transaction - supply of goods in EU by customs procedure 42 and 63 // Oproščen promet - dobava blaga znotraj EU po carinskih postopkih 42 in 63
6 - Zero-rated transaction - tripartite supplies of goods within the EU // Oproščen promet - tristranske dobave blaga znotraj EU
11 - Sales of services in the EU, VAT reverse charge // Oproščen promet - storitve v EU, od katerih plača DDV prejemnik
103 - Vat free transaction - supply of goods in EU by call-of-stock arrangement // Oproščen promet - dobava blaga znotraj EU po skladiščenju na odpoklic
1 - Zero-rated transaction - exports of commodity outside the EU // Oproščen promet - izvoz blaga izven EU
3 - Zero-rated transaction with the right to deduct input VAT // Oproščen promet - s pravico do odbitka vstopnega DDV
2 - Zero-rated transaction - without the right to deduct input VAT // Oproščen promet - brez pravice do odbitka vstopnega DDV
9 - Transactions exempt from VAT with the right of input VAT deduction (transactions outside SLO) // Neobdavčljiv promet s pravico do odbitka vstopnega DDV (prometi izven SLO)
7 - not subject to VAT // Neobdavčen promet - ne gre v DDV evidence
12 - Nontaxable suply - other taxes or duties other than VAT // Neobdavčen promet - ostali davki oziroma dajatve (razen DDV)
105 - Not subject to VAT – supply of goods outside EU // Neobdavčen promet - dobava blaga zunaj Unije (tretje države)
10 - Supply of goods and services in Slovenia, VAT reverse charged by the recipient // Dobava blaga in storitev v SLO, DDV obračuna prejemnik (76.a člen)
5 - Zero-rated transaction - assembly in the EU // Oproščen promet - montaža v EU (obračun tujega DDV)
8 - Distance selling in the EU surpassing annual sales threshold (foreign VAT) // Oproščen promet - prodaja blaga na daljavo (obračun tujega DDV)
101 - Special vat margin calculation for used goods // Posebna ureditev za rabljeno blago
102 - Special vat margin calculation for used goods - tax free // Posebna ureditev za rabljeno blago - oproščen promet
13 - Special vat margin calculation for travel agencies - price difference taxed // Obdavčen promet - posebni postopek obdavčitve razlike v ceni za potovalne agencije (98. člen)
14 - VAT exempt transactions for travel agencies // Oproščen promet za potovalne agencije (99. člen)
100 - Electronic services in other EU member countries (OSS) // Prodaja elektronskih storitev v drugih članicah EU (OSS)
106 - Distance sales of goods to EU consumers (OSS) // Prodaja blaga na daljavo končnim potrošnikom v EU (OSS)
107 - Supply of services to EU consumers (OSS) // Prodaja storitev končnim potrošnikom v EU (OSS)
108 - Distance sales of imported goods to EU consumers (IOSS) // Prodaja na daljavo iz tretjih držav uvoženega blaga končnim potrošnikom v EU (IOSS)
120 - Supply of services from EU to third country consumers (foreign VAT) // Izvoz storitev iz EU končnim potrošnikom v državi izven EU (obračun tujega DDV)
121 - Distance sales of goods to consumers outside EU (foreign VAT) // Prodaja blaga na daljavo končnim potrošnikom v državi izven EU (obračun tujega DDV)

Before using vat transaction types for OSS and IOSS, you must set up registration for OSS and IOSS in company settings under foreign VAT registrations.

Parameters

SalesQuoteComplex parameter with data tags

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesQuoteCreate">
       <parameter name="SalesQuote">
               <date>2010-01-13</date>                         <!-- document date
               <validUntil>2010-02-13</validUntil>                     <!-- document valid until
               <type>Retail</type>                                     <!-- (Optional) Type of pricing - default is "Gross"
               <status>issued</status>                           <!-- (Optional) Possible values: issued, draft - default is issued
               <costPosition>120</costPosition>                        <!-- (Optional)
               <deliveryMethod>Delivery method</deliveryMethod>        <!-- (Optional)
               <reference>00 2010-00005</reference>                    <!-- (Optional) Reference for payment
               <superDiscountPercentage>5</superDiscountPercentage> <!-- (Optional)
               <warehouseCode>1000</warehouseCode>             <!-- (Optional)
               <orderReference>123</orderReference>                    <!-- (Optional)
               <buyerCode>123456</buyerCode>                   <!-- (Optional). If buyer code is specified, other buyer parameters bellow are not needed as the buyer data is taken from database. If any additional parameter is specified, it will override master buyer data in document
               <buyerDocumentID>60:123456</buyerDocumentID>                    <!-- (Optional). If it is specified buyer parameters bellow are not needed as the buyer data is taken from database. If any parameter bellow is sepcified it will override master buyer data in document
               <buyerName>Micka Kovac</buyerName>              
               <buyerTaxNumber>02169711</buyerTaxNumber>       <!-- (Optional)
               <buyerVatRegistration>None</buyerVatRegistration>       <!-- (Unkown, None, Registered)
               <buyerEMail>micka@kovac.com</buyerEMail>                <!-- (Optional)
               <buyerStreet>Iztokova 22</buyerStreet>                  <!-- (Optional)
               <buyerPostalCode>2000</buyerPostalCode>                 <!-- (Optional)
               <buyerCity>Maribor</buyerCity>                  <!-- (Optional)
               <buyerCountry>SI</buyerCountry>                 <!-- (Optional)
               <remarks>Remark on SalesQuote</remarks>         <!-- (Optional)
               <introductionText>introduction text</introductionText>   <!-- (Optional)
               <vatTransactionType>0</vatTransactionType>              <!-- (Optional) default is 0
               <vatOutgoingDocumentVatClause>Registered</vatOutgoingDocumentVatClause> <!-- (Optional) Possible values: Registered, NotRegistered, RegisteredTourismLawPart47, RegisteredTourismLawPart31, RegisteredTourismLawPart47And31              <!-- (Optional)
               <methodOfPayment>bankTransfer</methodOfPayment> <!-- Possible ways of payment: Unknown, BankTransfer, Cash, Cheques, EurocardMastercard, Visa, Karanta, Amex, Diners, Activa, BA, CashOnDelivery, Moneta, CreditCard, PayPal, DirectDebit, SetOff, Coupon, Compensation, GoCrypto
               <documentLanguage>Slovene</documentLanguage> <!-- (Optional) Possible document language: Slovene, English, German, Croatian, Italian, Hungarian, Czech, Slovak, Serbian, Polish and Bulgarian
               <printingTemplate>Predloga2</printingTemplate> <!-- (Optional) Setting printing template for document, posible values is code of uploaded templates in web app
               <vatCountryIsoCode>HR</vatCountryIsoCode> <!-- Mandatory if using vatTransactionTypes: 106, 107, 108, 109, 120, 100, 8 and 5 and it determines that VAT procentages for specified country has to be taken
               <warehouseCode>00001</warehouseCode> <!-- Mandatory, if not set in XML default warehouse is set
               <Address>                        <!-- (Optional) Setting delivery address on document and partner buyer if it doesn't exists              
                       <city>Celje</city>
                       <country>SI</country>
                       <postalCode>3000</postalCode>
                       <street>Ulica 10</street>
                       <type>Delivery</type>
                       <firstAddressLine>Delivery address</firstAddressLine>
               </Address>
               <Items>
                       <Item>                                          <!-- item specified with ref to product
                               <position>1</position>      <!-- position of item
                               <productCode>020</productCode>                  <!-- internal product code
                               <quantity>100</quantity>
                               <discountPercentage>10</discountPercentage>
                               <vatTransactionType>0</vatTransactionType>      <!-- (Optional) default is 0. Foreign VAT transaction types (100, 8 and 5) can only be set on document level.
                       </Item>
                       <Item>                                          <!-- Item specified for good or service
                               <position>2</position>      <!-- position of item
                               <description>Transport of goods</description>
                               <price>11.00</price>      <!-- price (retail price including VAT for retail document) or netPrice (gross price without VAT for gross document). Default document type is "gross" so use <netPrice> tag in this case or <price> tag in case of document type "retail"
                               <discountPercentage>2</discountPercentage>      <!-- (Optional)
                               <vatPercentage>10</vatPercentage>               <!-- (Optional)
                               <currency>EUR</currency>                        <!-- (Optional)
                               <quantity>10</quantity>                         <!-- (Optional) default 1
                               <unit>km</unit>                         <!-- (Optional)
                               <vatTransactionType>0</vatTransactionType>      <!-- (Optional) default is 0. Foreign VAT transaction types (100, 8 and 5) can only be set on document level.
                       </Item>
                       ...
               </Items>
       </parameter>
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328
<?xml version="1.0" encoding="utf-8"?>
response status="ok" >
       <number>2010-00005</number>             <!-- created document number
       <date>2010-01-13</date>                 <!-- date of document
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- missing mandatory attributes, invalid values, no privileges,  
</response>



3.24.4 SalesQuoteUpdate

Update existing Sales quote.Data must contain sales invoice number to be able to identify document which is to be updated.

Parameters

SalesQuoteComplex parameter with data tags

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesQuoteUpdate">
        <parameter name="SalesQuote">
             <number>12</number>                                        <!-- document number is mandatory in UPDATE (Can use sequential document number (example: 12), or formatted number (example: 12/2011))
               <!--  Parameters are identical to the parameters in SalesQuoteCreate api
               ...
       </parameter>
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328
<?xml version="1.0" encoding="utf-8"?>
response status="ok" >
       <number>2010-00005</number>
       <date>2010-01-13</date>                 <!-- date of document
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- missing mandatory attributes, invalid values, no privileges,  
</response>


3.24.5 SalesQuoteDelete

Delete sales quote. Must specify parameter/s (number, number+date) to identify document for deleting.

Parameters

numberDocument number
dateDocument date
costPositionCost position
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesQuoteDelete">
       <parameter name="number" value="2010-00002" />
       <parameter name="date" type="Date" value="2010-02-22" />
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328
<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="no privileges"><error/>     <!-- document could not be found, no privileges,  
</response>


3.24.6 SalesQuoteList

Get list of sales quotes for criteria which is specified by API parameters. Mixing different types of dates in search criteria is not supported - date parameters can be combined only as follows: dateFrom/dateTo or validUntilFrom/validUntilTo.

Parameters

numberDocument number
dateFromThe date which is used to select sales orders whose date is following it
dateToThe date which is used to select sales orders whose date is preceding it
validUntilFromThe date which is used to select sales quotes whose validUntil is following it
validUntilToThe date which is used to select sales quotes whose validUntil is preceding it
dateOfPaymentFromThe date which is used to select sales orders whose date of payment (date from payment record on document) is following it.
dateOfPaymentToThe date which is used to select sales orders whose date of payment (date from payment record on document) is preceding it.
deliveryAddressDelivery address of the buyer
buyerBuyer code, or buyer name
costPositionCost position code
totalAmountTotal amount of the sales quote
totalCurrencyCurrency used in sales quote
articleProduct code, or product name
statusPossible values:
  • Draft 
  • Issued 
  • Opened 
  • IssuedInvoiceOrReceivedAdvancePayment 
  • ReceivedSalesOrder 
  • DocumentNotSentByEMail 
  • DocumentSentByEMail 
  • DocumentSentAlready 
  • DocumentNotYetSent 
  • PaymentRecordExists 
  • PaidNotInvoiced 
  • DocumentNotSentOrPrinted 
  • Expired 
issuerIssuer of document, search is done by username

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesQuoteList">
       <parameter name="number" value="000002" />
       <parameter name="dateFrom" type="Date" value="2009-11-01" />
        <parameter name="dateTo" type="Date" value="2010-01-11" />
       <parameter name="deliveryAddress" value="Iztokova" />
       <parameter name="totalAmount" type="Decimal" value="1000" />
       <parameter name="status" value="Draft" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
<SalesQuotes>                   
       <SalesQuote>
                <!-- structure of elements is the same as in SalesQuoteGet
       </SalesQuote>
       ...
</SalesQuotes>
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- no privileges,  
</response>


3.24.7 SalesQuoteSendByEmail

Sends document by email to the recipient(s).

Parameters

numberDocument number
dateDocument date (optional additional document identification)
senderEmail sender (Optional)
recipientComma delimited list of recipient(s) emails
ccCC email (Optional)
bccBCC email (Optional)
subjectMail subject (Optional)
messageMessage text (Optional)
useHtmlMessageSend message text as HTML (Optional)

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesQuoteSendByEmail">
       <parameter name="number" value="12/2009" />
       <parameter name="date" type="Date" value="2010-01-13" />
       <parameter name="sender" value="micka@kovac.com"/>
       <parameter name="recipient" value="zoran@kovac.com,zlatko@kovac.com"/>
       <parameter name="cc" value=""/>
       <parameter name="bcc" value=""/>
       <parameter name="subject" value="TEST d.o.o.: Sales quote nr. 0002/2010"/>
       <parameter name="message" value="Message text"/>
        <parameter name="useHtmlMessage" value="true"/>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="no privileges"><error/>     <!-- document could not be found, no privileges, mail sending failed
</response>


3.24.8 SalesQuotePaymentRecordAdd

Add payment record on sales quote.

Parameters

numberDocument number
dateDocument date (optional additional document identification)
costPositionCost position
businessUnitBusiness unit
paymentDatePayment date
paymentAmountPayment amount
paymentMethodForInvoicePayment method for sales quote
  • BankTransfer 
  • BankPaymentOrder 
  • Cash 
  • CreditCard 
  • Coupon 
  • DirectDebit 
  • DebitNote 
  • CreditNote 
  • Cancellation 
  • PayPal 
  • Unknown 
  • Other 
  • Compensation 
  • Cheques 
  • Cheque 
  • Karanta 
  • BA 
  • Diners 
  • Activa 
  • EurocardMastercard 
  • Visa 
  • Amex 
  • CashOnDelivery 
  • Moneta 
  • CryptoCurrency 
  • GoCrypto 
paymentRemarkPayment remark (optional)
paymentCurrencyPayment currency (optional)

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesQuotePaymentRecordAdd">
       <parameter name="number" value="2014-00013"/>
       <parameter name="date" type="Date" value="2014-05-15"/>
       <parameter name="paymentDate" type="Date" value="2014-05-20"/>
       <parameter name="paymentAmount" value="50"/>
       <parameter name="paymentMethodForInvoice" value="Cash"/>
       <parameter name="paymentRemark" value="Payment record on sales quote 2014-05-15"/>
       <parameter name="paymentCurrency" value="EUR"/>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Payment method Test is not supported"><error/>      <!-- wrong payment method chosen
</response>


3.24.9 SalesQuoteCreateInvoice

Create sales invoice from sales quote.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit
statusStatus for created invoice (issuedInvoice or draft).
warehouseCodeWarehouse that will be set on created invoice, default it is taken from sales quote.
cashRegisterCodeCashbook.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
       <method name="SalesQuoteCreateInvoice">
                  <parameter name="number" value="0005/2021"/>
                  <parameter name="status" value="issuedInvoice"/>
                  <parameter name="cashRegisterCode" value="001"/>
                  <parameter name="warehouseCode" value="908"/>
       </method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <number>2010-00005</number>             <!-- created document number
       <date>2010-01-13</date>                 <!-- date of document
        <documentID>123.21421</documentID>      <!-- created document ID
        <message>Succesfuly created sales invoice from sales order</message>
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="no privileges"><error/>     <!-- document could not be found, no privileges,  
</response>


3.24.10 SalesQuoteAttachmentAdd

Add image/attachment to sales quote.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesQuoteAttachmentAdd">
       <parameter name="number" type="String" value="2020-00001" />
       <parameter name="attachment">
               <contents encoding="BASE64">BASE64...</contents>
               <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added attachment att.jpg to sales quote 2020-00001.</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find sales quote for number: 2020-00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>


3.24.11 SalesQuoteAttachmentSetDefault

Add attachment to sales quote and set is as default.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesQuoteAttachmentSetDefault">
       <parameter name="number" type="String" value="2020-00001" />
       <parameter name="attachment">
               <contents encoding="BASE64">BASE64...</contents>
               <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added attachment att.jpg to sales quote 2020-00001.</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find sales quote for number: 2020-00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>


3.24.12 SalesQuoteAttachmentGet

Get default attachment of sales quote.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesQuoteAttachmentGet">
       <parameter name="number" type="String" value="2020-00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <SalesQuote>
               <Attachments>
                       <Attachment>
                               <fileName>att.jpg</fileName>
                               <contents encoding="BASE64">BASE64</contents>
                       </Attachment>
               </Attachments>
       </SalesQuote>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find sales quote for number: 2020-00001 Sales quote does not have attachemnts.
</response>


3.24.13 SalesQuoteAttachmentList

Get all images/attachments of article.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesQuoteAttachmentList">
       <parameter name="number" type="String" value="2020-00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <SalesQuote>
               <Attachments>
                       <Attachment>
                               <fileName>att1.jpg</fileName>
                               <contents encoding="BASE64">1BASE64</contents>
                       </Attachment>
                       <Attachment>
                               <fileName>att2.jpg</fileName>
                               <contents encoding="BASE64">2BASE64</contents>
                       </Attachment>
                       <Attachment>
                               <fileName>att3.jpg</fileName>
                               <contents encoding="BASE64">3BASE64</contents>
                       </Attachment>
               </Attachments>
       </SalesQuote>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find sales quote for number: 2020-00001 Sales quote does not have attachemnts.
</response>

 

3.25. TABooking API

API for retrieving, creating, updating and listing of reservations/bookings.

TABookingGetGet reservation by number.
TABookingCreateCreate a new reservation.
TABookingUpdateUpdate an existing reservation.
TABookingDeleteDelete a desired reservation.
TABookingListGet a list of reservations for the specified criteria.

3.25.1 TABookingGet

Get travel agency booking by document number, or by combination of document number and date.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="TABookingGet">
       <parameter name="number" value="2016-00005" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <TABooking>
               <accommodationDescription>Otok Velidhu</accommodationDescription>
               <bookingPayerCity>Ljutomer</bookingPayerCity>
               <bookingPayerCountry>SI</bookingPayerCountry>
               <bookingPayerName>HABJANI   STANKO</bookingPayerName>
               <bookingPayerPostalCode>9240</bookingPayerPostalCode>
               <bookingPayerStreet>VE    ICA 38 VE    ICA 38</bookingPayerStreet>
               <bookingPayerEMail>booking.payer@gmail.com</bookingPayerEMail>
               <bookingPayerPhone>026725352</bookingPayerPhone>
               <bookingPayerMobilePhone>070306612</bookingPayerMobilePhone>
               <businessYear>2016</businessYear>
               <cancellationRiskEnsurance>true</cancellationRiskEnsurance>
               <cancellationRiskEnsuranceAmount>250.000</cancellationRiskEnsuranceAmount>
               <commissionAmount>0.000</commissionAmount>
               <commissionPercent>2.000</commissionPercent>
               <costPosition>02</costPosition>
               <dateFrom>2016-05-23</dateFrom>
               <dateOfIssue>2016-06-06</dateOfIssue>
               <dateOfMarkedAsPersonal>2011-06-06</dateOfMarkedAsPersonal>
               <dateTo>2016-06-06</dateTo>
               <destinationDescription>Maldivi</destinationDescription>
               <documentDate>2016-04-15</documentDate>
               <firstService>DINNER</firstService>
               <lastService>BREAKFAST</lastService>
               <number>2016-00008</number>
               <numberOfDays>14</numberOfDays>
               <numberOfParticipients>2</numberOfParticipients>
               <organizer>Test e-racuni d.o.o.</organizer>
               <services>2xALL</services>
               <status>Request</status>                                   
               <totalCurrency>EUR</totalCurrency>
               <transportation>Plane</transportation>                     
               <Services>
                       <Service>
                               <amount>1689.00</amount>
                               <baseForCommission>0</baseForCommission>
                               <description>sadsd</description>
                               <discount>0.00</discount>
                               <discountAmount>0.00</discountAmount>
                               <position>1</position>
                               <quantity>4</quantity>
                               <totalAmount>6756.00</totalAmount>
                       </Service>
               </Services>
               <Participants>
                       <Participant>
                               <dateOfBirth>1989-05-12</dateOfBirth>
                               <position>2</position>
                               <surnameAndName>STANKA HABJANIC</surnameAndName>
                       </Participant>
                       <Participant>
                               <dateOfBirth>1987-04-12</dateOfBirth>
                               <position>1</position>
                               <surnameAndName>STANKO HABJANIC</surnameAndName>
                       </Participant>
               </Participants>
               <OtherCosts>
                       <OtherCost>
                               <amount>100.00</amount>
                               <amountCurrency>EUR</amountCurrency>
                               <date>2016-04-11</date>
                               <remarks>other costs</remarks>
                       </OtherCost>
               </OtherCosts>
       </TABooking>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named "number" is required, Can not find TABooking for number: 2015-000065,  
</response>



3.25.2 TABookingCreate

Create new travel agency booking.

Parameters

TABookingTravel agency bookings's data in xml substructure.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="TABookingCreate">
       <parameter name="TABooking">                      
               <accommodationDescription>Otok Velidhu</accommodationDescription>
               <bookingPayerCity>Ljutomer</bookingPayerCity>
               <bookingPayerCountry>SI</bookingPayerCountry>
               <bookingPayerName>HABJANI   STANKO</bookingPayerName>
               <bookingPayerPostalCode>9240</bookingPayerPostalCode>
               <bookingPayerStreet>VE    ICA 38 VE    ICA 38</bookingPayerStreet>
               <bookingPayerEMail>booking.payer@gmail.com</bookingPayerEMail>
               <bookingPayerPhone>026725352</bookingPayerPhone>
               <bookingPayerMobilePhone>070306612</bookingPayerMobilePhone>
               <businessYear>2016</businessYear>
               <cancellationRiskEnsurance>true</cancellationRiskEnsurance>
               <cancellationRiskEnsuranceAmount>250.000</cancellationRiskEnsuranceAmount>
               <commissionAmount>0.000</commissionAmount>
               <commissionPercent>2.000</commissionPercent>
               <costPosition>02</costPosition>
               <dateFrom>2016-05-23</dateFrom>
               <dateOfIssue>2016-06-06</dateOfIssue>
               <dateOfMarkedAsPersonal>2011-06-06</dateOfMarkedAsPersonal>
               <dateTo>2016-06-06</dateTo>
               <destinationDescription>Maldivi</destinationDescription>
               <documentDate>2016-04-15</documentDate>
               <firstService>DINNER</firstService>
               <lastService>BREAKFAST</lastService>
               <number>2016-00008</number>
               <numberOfDays>14</numberOfDays>
               <numberOfParticipients>2</numberOfParticipients>
               <organizer>Test e-racuni d.o.o.</organizer>
               <services>2xALL</services>
               <status>Request</status>                            <!-- Possible status values: Option, Request, Confirm, Personally, Cancelled, Ready, Coupon, Finished
               <totalCurrency>EUR</totalCurrency>
               <transportation>Bus</transportation>                <!-- Possible transportation values: OwnTransport, Bus, Plane, Ship
               <Services>
                       <Service>
                               <amount>1689.00</amount>
                               <baseForCommission>0</baseForCommission>
                               <description>sadsd</description>
                               <discount>0.00</discount>
                               <discountAmount>0.00</discountAmount>
                               <position>1</position>
                               <quantity>4</quantity>
                               <totalAmount>6756.00</totalAmount>
                       </Service>
               </Services>
               <Participants>
                       <Participant>
                               <dateOfBirth>1989-05-12</dateOfBirth>
                               <position>2</position>
                               <surnameAndName>STANKA HABJANIC</surnameAndName>
                       </Participant>
                       <Participant>
                               <dateOfBirth>1987-04-12</dateOfBirth>
                               <position>1</position>
                               <surnameAndName>STANKO HABJANIC</surnameAndName>
                       </Participant>
               </Participants>                                                   
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <number>PG2521U</number>
       <date>2016-05-23<<date>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/> <!-- Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named <TABooking> must be specified., missing mandatory attributes, invalid values, no privileges, Error creating TABooking  
</response>


3.25.3 TABookingUpdate

Update existing travel agency booking. Data must contain booking number to be able to identify document which is to be updated.

Parameters

numberProduct group's data in xml substructure

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="TABookingUpdate">
       <parameter name="TABooking">
               <number>2016-000010</number>                                <!-- (Mandatory and Unique)
               <!--  Parameters are identical to the parameters in TABookingCreate api                               
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <number>2016-000010</number>
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/> <!-- Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named "TABooking" needed, TABooking's property <number> is required, Can not find TABooking for number: 2016-000010, missing mandatory attributes, invalid values, no privileges,  
</response>


3.25.4 TABookingDelete

Delete travel agency booking.

Parameters

numberUnique identifier for booking.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="TABookingDelete">
       <parameter name="number" value="2016-000011" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>   <! Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named <TABooking> is required, Can not find TABooking for number: 2016-000004, Can not delete. Found 3 TABookings with number: 2016-000003,
</response>


3.25.5 TABookingList

Get list of travel agency bookings for specified criteria.

Parameters

numberDocument number
statusStatus (Option, Request, Confirm, Personally, Cancelled, Ready, Coupon, Finished)
dateFromDate of departure from.
dateToDate of departure to.
documentDateFromDate od document from.
documentDateToDate od document to.
organizerSearch by organizer.
subagentSearch by subagent.
salesServiceSearch by sales service.
bookingPayerSearch by booking payer.
participantsSearch by participients.
addressSearch by booking payer address.
subscriberSearch by subscriber.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="TABookingList">
       <parameter name="number" value="2016-0001*" />
       <parameter name="costPosition" value="0001" />
       <parameter name="status" value="Request"/>
</method>
</request>


Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <TABooking>
                <!-- structure of TABooking data is the same as in TABookingGet
       </TABooking>
       <TABooking>
                <!-- structure of TABooking data is the same as in TABookingGet
       </TABooking>
       ...
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Access denied. User account does not have sufficient privileges for the given request, Invalid search keys, invalid values, no privileges,  
</response>


 

3.26. Warehouse and inventory API

3.26.1 WarehouseGetArticleStockQuantity

Get number of items on stock.

Parameters

queryTypeType of query. Possible values are:
  • cumulativeForAllWarehouses Can be used only if parameter "warehouseCode" is not specified. In that case answer will contain total (cumulative) quantity on stock for all warehouses. Same result is achieved if parameter "queryType" is omitted.
  • perWarehouse If parameter "warehouseCode" is not specified, answer non-zero quantity on stock for each warehouse.
  • perWarehousePositiveStockOnly  Answer only positive quantity on stock. if parameter "warehouseCode" is not specified, answer quantity on stock for each warehouse.
  • perWarehouseNegativeStockOnly  Answer only negative quantity on stock. if parameter "warehouseCode" is not specified, answer quantity on stock for each warehouse.
  • perWarehousePositiveOrNegativeStockOnly  Answer only positive and negative quantity on stock. if parameter "warehouseCode" is not specified, answer quantity on stock for each warehouse.
  • perWarehouseZeroStock  Answer only zero quantity on stock. if parameter "warehouseCode" is not specified, answer quantity on stock for each warehouse.
  • perWarehouseBelowMinimalStock  Answer only products below minimum stoc with their current stock.
  • availableForAllWarehouses  Can be used only if parameter "warehouseCode" is not specified. In that case answer will contain total aveliable quantity on stock for all warehouses. Aveliable stock is quantity on stock minus reserved quantity that means the quantity on the sales orders which has not been shipped/delivered yet.
  • perWarehouseAvailableStock  Answer aveliable quantity on stock. if parameter "warehouseCode" is not specified, answer aveliable quantity on stock for each warehouse
  • reservedForAllWarehouses  Can be used only if parameter "warehouseCode" is not specified. In that case answer will contain total reserved stock quantity for all warehouses. Reserved stock is quantity on the sales orders which has not been shipped/delivered yet.
  • perWarehouseReservedStock  Answer reserved stock quantity. if parameter "warehouseCode" is not specified, answer reserved stock quantity for each warehouse.
warehouseCodeWarehouse code. If this parameter is missing, answer result depending on value of parameter "queryType". If "queryType" is missing or is "cumulativeForAllWarehouses" or "availableForAllWarehouses", return total quantity on stock for all warehouses, otherwise return quantities per warehouse.
stockDateThe date on which the stock quantity is calculated.
productCodeProduct code(-s) for items that are being queried. Multiple occurrences of this parameter are allowed. If this parameter is missing then the first 50 000 records will be reported.
productStatusProduct status, possible values: "active" or: "inactive".
allStockTrackingProductsGet results for all product that stock is and will be tracked (in case some new products are added in program but there is still no stock tracking record), possible values: "true", 1.

Example request and response


Example 1.

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="WarehouseGetArticleStockQuantity">
  <parameter name="warehouseCode" value="01" />
  <parameter name="stockDate" type="Date" value="2009-01-01" />
  <parameter name="productCode" type="String" value="123" />
  <parameter name="productCode" type="String" value="003" />
  <parameter name="productCode" type="String" value="005" />
</method>
</request>

HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 Apr 2009 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
       <StockQuantityInfo productCode="123" productDescription="Mobitel Sony Ericsson GTX10000" quantityOnStock="11.00">
       <StockQuantityInfo productCode="003" productDescription="Mobitel LG 2000" quantityOnStock="0.00">
       <StockQuantityInfo productCode="005" productDescription="USB Charger" quantityOnStock="-5.00">
</response>


Example 2. For company with two warehouses 0001 and 0002. Request is for getting quantities on stock for articles 003 and 005 from all warehouses.

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="WarehouseGetArticleStockQuantity">
  <parameter name="stockDate" type="Date" value="2009-01-01" />
  <parameter name="queryType" value="perWarehouse" />
  <parameter name="productCode" type="String" value="003" />
  <parameter name="productCode" type="String" value="005" />
</method>
</request>

HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 Apr 2009 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
       <StockQuantityInfo productCode="003" productDescription="Mobitel Sony Ericsson GTX10000" warehouse="0001" quantityOnStock="11.00">
       <StockQuantityInfo productCode="005" productDescription="USB Charger" warehouse="0001" quantityOnStock="-5.00">
       <StockQuantityInfo productCode="003" productDescription="Mobitel LG 2000" warehouse="0002" quantityOnStock="8.00">
       <StockQuantityInfo productCode="005" productDescription="USB Charger" warehouse="0002" quantityOnStock="-5.00">
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- Invalid search keys, invalid values, no privileges,  
</response>

 

3.27. WorkOrder API

WorkOrderGetGet work order by document number, or by combination of document number and date.
WorkOrderGetPDFGet PDF file for work order by document number, or by combination of document number and date.
WorkOrderCreateCreate new work order.
WorkOrderUpdateUpdate existing work order.
WorkOrderDeleteDelete work order.
WorkOrderListGet list of work orders for specified criteria.
WorkOrderAttachmentAddAdd attachment to work order.
WorkOrderAttachmentSetDefaultAdd attachment to work order and set is as default.
WorkOrderAttachmentGetGet default attachment of work order.
WorkOrderAttachmentListGet all attachments of work order.

3.27.1 WorkOrderGet

Get work order by document number, or by combination of document number and date.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2022-00002)
dateDocument date
documentIDInternal document identificator. In case of using this parameter, no other parameter listed above is needed for searching by document.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="WorkOrderGet">
       <parameter name="number" value="1/2022" />
       <parameter name="date" type="Date" value="2022-02-15" />
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<response status="ok">
       <WorkOrder>
               <businessYear>2022</businessYear>
               <buyerCity>LJUBLJANA</buyerCity>
               <buyerCode>100246</buyerCode>
               <buyerCountry>SI</buyerCountry>
               <buyerEMail></buyerEMail>
               <buyerName>TEST</buyerName>
               <buyerName1>TEST S.P.</buyerName1>
               <buyerPostalCode>1000</buyerPostalCode>
               <buyerStreet>CELOVŠKA CESTA 134</buyerStreet>
               <buyerTaxNumber>SI88888888</buyerTaxNumber>
               <buyerVatRegistration>1</buyerVatRegistration>
               <city>Maribor</city>
               <completionDate>2022-02-25</completionDate>
               <costPosition></costPosition>
               <currency>EUR</currency>
               <date>2022-02-15</date>
               <documentID>228:133</documentID>
               <number>1/2022</number>
               <operaterName>Amadej Amadej</operaterName>
               <plannedWorkBeginDate>2022-02-15</plannedWorkBeginDate>
               <remarks>testing 1 2</remarks>
               <responsibleWorker>Amadej Amadej</responsibleWorker>
               <status>InProduction</status>
               <type>Gross</type>
               <warehouseCodeForUsedMaterials>090</warehouseCodeForUsedMaterials>
               <warehouseForOrderedProductsCode>908</warehouseForOrderedProductsCode>
               <OrderedProducts>
                       <OrderedProduct>
                               <calculationCurrency>EUR</calculationCurrency>
                               <calculationQuantity>1.000000</calculationQuantity>
                               <costsDirectAmount>0.00000</costsDirectAmount>
                               <costsDirectPercentage>0.00</costsDirectPercentage>
                               <costsOfCustomsAmount>0.00000</costsOfCustomsAmount>
                               <costsOfCustomsPercentage>0.00</costsOfCustomsPercentage>
                               <costsOfTransportAmount>0.00000</costsOfTransportAmount>
                               <costsOfTransportPercentage>0.00</costsOfTransportPercentage>
                               <description>ni bilo opisa, sedaj pa je</description>
                               <grossMarginAmount>45.37705</grossMarginAmount>
                               <grossMarginPercentage>206.26</grossMarginPercentage>
                               <grossPrice>67.37705</grossPrice>
                               <inboundVatAmount>4.84000</inboundVatAmount>
                               <inboundVatPercentage>22.00</inboundVatPercentage>
                               <inventoryAmount>22.00000</inventoryAmount>
                               <inventoryPrice>22.00000</inventoryPrice>
                               <outgoingVatAmount>14.82295</outgoingVatAmount>
                               <outgoingVatPercentage>22.00</outgoingVatPercentage>
                               <position>-1</position>
                               <productBarCode></productBarCode>
                               <productCatalogueCode>1313413080</productCatalogueCode>
                               <productCode>1310</productCode>
                               <productName>krnekjasdh" WATTS</productName>
                               <remarks>PRODUCT CREATION RECORD</remarks>
                               <retailMarginAmount>45.38000</retailMarginAmount>
                               <retailMarginPercentage>206.27</retailMarginPercentage>
                               <retailPrice>67.38000</retailPrice>
                               <salesPrice>82.20000</salesPrice>
                               <salesPriceAmount>82.20000</salesPriceAmount>
                               <supplierAmountInCalculationCurrency>22.00000</supplierAmountInCalculationCurrency>
                               <supplierDiscountAmount>0.00000</supplierDiscountAmount>
                               <supplierDiscountPercentage>0.00</supplierDiscountPercentage>
                               <supplierPrice>22.00000</supplierPrice>
                               <supplierPriceAmount>22.00000</supplierPriceAmount>
                               <supplierPriceCurrency>EUR</supplierPriceCurrency>
                               <supplierPriceInCalculationCurrency>22.00000</supplierPriceInCalculationCurrency>
                       </OrderedProduct>
                       <OrderedProduct>
                               <calculationCurrency>EUR</calculationCurrency>
                               <calculationQuantity>1.000000</calculationQuantity>
                               <costsDirectAmount>0.00000</costsDirectAmount>
                               <costsDirectPercentage>0.00</costsDirectPercentage>
                               <costsOfCustomsAmount>0.00000</costsOfCustomsAmount>
                               <costsOfCustomsPercentage>0.00</costsOfCustomsPercentage>
                               <costsOfTransportAmount>0.00000</costsOfTransportAmount>
                               <costsOfTransportPercentage>0.00</costsOfTransportPercentage>
                               <description>ni bilo opisa, sedaj pa je</description>
                               <grossMarginAmount>-864.27045</grossMarginAmount>
                               <grossMarginPercentage>-94.65</grossMarginPercentage>
                               <grossPrice>48.84018</grossPrice>
                               <inboundVatAmount>86.75000</inboundVatAmount>
                               <inboundVatPercentage>9.50</inboundVatPercentage>
                               <inventoryAmount>913.11063</inventoryAmount>
                               <inventoryPrice>913.11063</inventoryPrice>
                               <outgoingVatAmount>4.63982</outgoingVatAmount>
                               <outgoingVatPercentage>9.50</outgoingVatPercentage>
                               <position>-1</position>
                               <productBarCode></productBarCode>
                               <productCatalogueCode>35253525</productCatalogueCode>
                               <productCode>000013</productCode>
                               <productName>VENTIL REDUC. 3/4" WATTS</productName>
                               <remarks>PRODUCT CREATION RECORD</remarks>
                               <retailMarginAmount>-864.27063</retailMarginAmount>
                               <retailMarginPercentage>-94.65</retailMarginPercentage>
                               <retailPrice>48.84000</retailPrice>
                               <salesPrice>53.48000</salesPrice>
                               <salesPriceAmount>53.48000</salesPriceAmount>
                               <supplierAmountInCalculationCurrency>913.11063</supplierAmountInCalculationCurrency>
                               <supplierDiscountAmount>0.00000</supplierDiscountAmount>
                               <supplierDiscountPercentage>0.00</supplierDiscountPercentage>
                               <supplierPrice>913.11063</supplierPrice>
                               <supplierPriceAmount>913.11063</supplierPriceAmount>
                               <supplierPriceCurrency>EUR</supplierPriceCurrency>
                               <supplierPriceInCalculationCurrency>913.11063</supplierPriceInCalculationCurrency>
                       </OrderedProduct>
               </OrderedProducts>
               <PurchasedMaterials>
                       <PurchasedMaterial>
                               <calculationCurrency>EUR</calculationCurrency>
                               <calculationQuantity>10.000000</calculationQuantity>
                               <costsDirectAmount>0.00000</costsDirectAmount>
                               <costsDirectPercentage>0.00</costsDirectPercentage>
                               <costsOfCustomsAmount>0.00000</costsOfCustomsAmount>
                               <costsOfCustomsPercentage>0.00</costsOfCustomsPercentage>
                               <costsOfTransportAmount>0.00000</costsOfTransportAmount>
                               <costsOfTransportPercentage>0.00</costsOfTransportPercentage>
                               <description></description>
                               <grossMarginAmount>105.88931</grossMarginAmount>
                               <grossMarginPercentage>93956.80</grossMarginPercentage>
                               <grossPrice>106.00201</grossPrice>
                               <inboundVatAmount>0.24794</inboundVatAmount>
                               <inboundVatPercentage>22.00</inboundVatPercentage>
                               <inventoryAmount>1.12700</inventoryAmount>
                               <inventoryPrice>0.11270</inventoryPrice>
                               <outgoingVatAmount>10.36758</outgoingVatAmount>
                               <outgoingVatPercentage>9.50</outgoingVatPercentage>
                               <position>1</position>
                               <productBarCode>5051678412751</productBarCode>
                               <productCode>000002</productCode>
                               <productName>artikel 2</productName>
                               <retailMarginAmount>109.01967</retailMarginAmount>
                               <retailMarginPercentage>96734.40</retailMarginPercentage>
                               <retailPrice>109.13237</retailPrice>
                               <salesPrice>119.49995</salesPrice>
                               <salesPriceAmount>1194.99950</salesPriceAmount>
                               <supplierAmountInCalculationCurrency>1.12700</supplierAmountInCalculationCurrency>
                               <supplierDiscountAmount>0.00000</supplierDiscountAmount>
                               <supplierDiscountPercentage>0.00</supplierDiscountPercentage>
                               <supplierPrice>0.10000</supplierPrice>
                               <supplierPriceAmount>1.00000</supplierPriceAmount>
                               <supplierPriceCurrency>GBP</supplierPriceCurrency>
                               <supplierPriceInCalculationCurrency>0.11270</supplierPriceInCalculationCurrency>
                               <workOrderDocNo>2021-00013</workOrderDocNo>
                       </PurchasedMaterial>
                       <PurchasedMaterial>
                               <calculationCurrency>EUR</calculationCurrency>
                               <calculationQuantity>1.000000</calculationQuantity>
                               <costsDirectAmount>0.00000</costsDirectAmount>
                               <costsDirectPercentage>0.00</costsDirectPercentage>
                               <costsOfCustomsAmount>0.00000</costsOfCustomsAmount>
                               <costsOfCustomsPercentage>0.00</costsOfCustomsPercentage>
                               <costsOfTransportAmount>0.00000</costsOfTransportAmount>
                               <costsOfTransportPercentage>0.00</costsOfTransportPercentage>
                               <description>Grafička kartica GTX670-DC2-2GD5</description>
                               <grossMarginAmount>695.00000</grossMarginAmount>
                               <grossMarginPercentage>0.00</grossMarginPercentage>
                               <grossPrice>695.00000</grossPrice>
                               <inboundVatAmount>0.00000</inboundVatAmount>
                               <inboundVatPercentage>22.00</inboundVatPercentage>
                               <inventoryAmount>0.00000</inventoryAmount>
                               <inventoryPrice>0.00000</inventoryPrice>
                               <outgoingVatAmount>66.02500</outgoingVatAmount>
                               <outgoingVatPercentage>9.50</outgoingVatPercentage>
                               <position>2</position>
                               <productBarCode></productBarCode>
                               <productCatalogueCode>977585700</productCatalogueCode>
                               <productCode>000005</productCode>
                               <productName>Grafička kartica GTX670-DC2-2GD5</productName>
                               <retailMarginAmount>695.00000</retailMarginAmount>
                               <retailMarginPercentage>0.00</retailMarginPercentage>
                               <retailPrice>695.00000</retailPrice>
                               <salesPrice>761.02500</salesPrice>
                               <salesPriceAmount>761.02500</salesPriceAmount>
                               <supplierAmountInCalculationCurrency>500.00000</supplierAmountInCalculationCurrency>
                               <supplierDiscountAmount>500.00000</supplierDiscountAmount>
                               <supplierDiscountPercentage>100.00</supplierDiscountPercentage>
                               <supplierPrice>443.65000</supplierPrice>
                               <supplierPriceAmount>443.65000</supplierPriceAmount>
                               <supplierPriceCurrency>GBP</supplierPriceCurrency>
                               <supplierPriceInCalculationCurrency>500.00000</supplierPriceInCalculationCurrency>
                               <workOrderDocNo>2021-00013</workOrderDocNo>
                       </PurchasedMaterial>
               </PurchasedMaterials>
               <UsedMaterials>
                       <UsedMaterial>
                               <calculationCurrency>EUR</calculationCurrency>
                               <calculationQuantity>0.500000</calculationQuantity>
                               <costsDirectAmount>0.00000</costsDirectAmount>
                               <costsDirectPercentage>0.00</costsDirectPercentage>
                               <costsOfCustomsAmount>0.00000</costsOfCustomsAmount>
                               <costsOfCustomsPercentage>0.00</costsOfCustomsPercentage>
                               <costsOfTransportAmount>0.00000</costsOfTransportAmount>
                               <costsOfTransportPercentage>0.00</costsOfTransportPercentage>
                               <description>Grafička kartica GTX670-DC2-2GD5</description>
                               <grossMarginAmount>58.00000</grossMarginAmount>
                               <grossMarginPercentage>1450.00</grossMarginPercentage>
                               <grossPrice>0.00000</grossPrice>
                               <inboundVatAmount>-0.44000</inboundVatAmount>
                               <inboundVatPercentage>22.00</inboundVatPercentage>
                               <inventoryAmount>-2.00000</inventoryAmount>
                               <inventoryPrice>4.00000</inventoryPrice>
                               <outgoingVatAmount>0.00000</outgoingVatAmount>
                               <outgoingVatPercentage>22.00</outgoingVatPercentage>
                               <position>1</position>
                               <productBarCode></productBarCode>
                               <productCatalogueCode>0</productCatalogueCode>
                               <productCode>000009</productCode>
                               <productName>Grafička kartica GTX670-DC2-2GD5</productName>
                               <remarks>MATERIAL USAGE RECORD</remarks>
                               <retailMarginAmount>-4.00000</retailMarginAmount>
                               <retailMarginPercentage>-100.00</retailMarginPercentage>
                               <retailPrice>0.00000</retailPrice>
                               <salesPrice>0.00000</salesPrice>
                               <salesPriceAmount>0.00000</salesPriceAmount>
                               <supplierAmountInCalculationCurrency>-2.00000</supplierAmountInCalculationCurrency>
                               <supplierDiscountAmount>0.00000</supplierDiscountAmount>
                               <supplierDiscountPercentage>0.00</supplierDiscountPercentage>
                               <supplierPrice>4.00000</supplierPrice>
                               <supplierPriceAmount>-2.00000</supplierPriceAmount>
                               <supplierPriceCurrency>EUR</supplierPriceCurrency>
                               <supplierPriceInCalculationCurrency>4.00000</supplierPriceInCalculationCurrency>
                       </UsedMaterial>
                       <UsedMaterial>
                               <calculationCurrency>EUR</calculationCurrency>
                               <calculationQuantity>1.562000</calculationQuantity>
                               <costsDirectAmount>0.00000</costsDirectAmount>
                               <costsDirectPercentage>0.00</costsDirectPercentage>
                               <costsOfCustomsAmount>0.00000</costsOfCustomsAmount>
                               <costsOfCustomsPercentage>0.00</costsOfCustomsPercentage>
                               <costsOfTransportAmount>0.00000</costsOfTransportAmount>
                               <costsOfTransportPercentage>0.00</costsOfTransportPercentage>
                               <description></description>
                               <grossMarginAmount>32.70000</grossMarginAmount>
                               <grossMarginPercentage>13.64</grossMarginPercentage>
                               <grossPrice>268.03279</grossPrice>
                               <inboundVatAmount>-82.41112</inboundVatAmount>
                               <inboundVatPercentage>22.00</inboundVatPercentage>
                               <inventoryAmount>-374.56760</inventoryAmount>
                               <inventoryPrice>239.80000</inventoryPrice>
                               <outgoingVatAmount>58.96721</outgoingVatAmount>
                               <outgoingVatPercentage>22.00</outgoingVatPercentage>
                               <position>1</position>
                               <productBarCode></productBarCode>
                               <productCatalogueCode></productCatalogueCode>
                               <productCode>1025542</productCode>
                               <productName>RADIATOR ELEKTRINI TPA 20 2000W S TERMOSTATOM</productName>
                               <remarks>MATERIAL USAGE RECORD</remarks>
                               <retailMarginAmount>28.23000</retailMarginAmount>
                               <retailMarginPercentage>11.77</retailMarginPercentage>
                               <retailPrice>268.03000</retailPrice>
                               <salesPrice>327.00000</salesPrice>
                               <salesPriceAmount>-510.77400</salesPriceAmount>
                               <supplierAmountInCalculationCurrency>-374.56760</supplierAmountInCalculationCurrency>
                               <supplierDiscountAmount>0.00000</supplierDiscountAmount>
                               <supplierDiscountPercentage>0.00</supplierDiscountPercentage>
                               <supplierPrice>239.80000</supplierPrice>
                               <supplierPriceAmount>-374.56760</supplierPriceAmount>
                               <supplierPriceCurrency>EUR</supplierPriceCurrency>
                               <supplierPriceInCalculationCurrency>239.80000</supplierPriceInCalculationCurrency>
                       </UsedMaterial>
                       <UsedMaterial>
                               <calculationCurrency>EUR</calculationCurrency>
                               <calculationQuantity>1.000000</calculationQuantity>
                               <costsDirectAmount>0.00000</costsDirectAmount>
                               <costsDirectPercentage>0.00</costsDirectPercentage>
                               <costsOfCustomsAmount>0.00000</costsOfCustomsAmount>
                               <costsOfCustomsPercentage>0.00</costsOfCustomsPercentage>
                               <costsOfTransportAmount>0.00000</costsOfTransportAmount>
                               <costsOfTransportPercentage>0.00</costsOfTransportPercentage>
                               <description></description>
                               <grossMarginAmount>0.67000</grossMarginAmount>
                               <grossMarginPercentage>20.06</grossMarginPercentage>
                               <grossPrice>3.28689</grossPrice>
                               <inboundVatAmount>-0.73000</inboundVatAmount>
                               <inboundVatPercentage>22.00</inboundVatPercentage>
                               <inventoryAmount>-3.34000</inventoryAmount>
                               <inventoryPrice>3.34000</inventoryPrice>
                               <outgoingVatAmount>0.72311</outgoingVatAmount>
                               <outgoingVatPercentage>22.00</outgoingVatPercentage>
                               <position>2</position>
                               <productBarCode></productBarCode>
                               <productCatalogueCode></productCatalogueCode>
                               <productCode>101007</productCode>
                               <productName>KOLENO POC. 2 ART. 90</productName>
                               <remarks>MATERIAL USAGE RECORD</remarks>
                               <retailMarginAmount>-0.05000</retailMarginAmount>
                               <retailMarginPercentage>-1.50</retailMarginPercentage>
                               <retailPrice>3.29000</retailPrice>
                               <salesPrice>4.01000</salesPrice>
                               <salesPriceAmount>-4.01000</salesPriceAmount>
                               <supplierAmountInCalculationCurrency>-3.34000</supplierAmountInCalculationCurrency>
                               <supplierDiscountAmount>0.00000</supplierDiscountAmount>
                               <supplierDiscountPercentage>0.00</supplierDiscountPercentage>
                               <supplierPrice>3.34000</supplierPrice>
                               <supplierPriceAmount>-3.34000</supplierPriceAmount>
                               <supplierPriceCurrency>EUR</supplierPriceCurrency>
                               <supplierPriceInCalculationCurrency>3.34000</supplierPriceInCalculationCurrency>
                       </UsedMaterial>
                       <UsedMaterial>
                               <calculationCurrency>EUR</calculationCurrency>
                               <calculationQuantity>1.000000</calculationQuantity>
                               <costsDirectAmount>0.00000</costsDirectAmount>
                               <costsDirectPercentage>0.00</costsDirectPercentage>
                               <costsOfCustomsAmount>0.00000</costsOfCustomsAmount>
                               <costsOfCustomsPercentage>0.00</costsOfCustomsPercentage>
                               <costsOfTransportAmount>0.00000</costsOfTransportAmount>
                               <costsOfTransportPercentage>0.00</costsOfTransportPercentage>
                               <description></description>
                               <grossMarginAmount>3.37000</grossMarginAmount>
                               <grossMarginPercentage>190.40</grossMarginPercentage>
                               <grossPrice>2.31967</grossPrice>
                               <inboundVatAmount>-0.39000</inboundVatAmount>
                               <inboundVatPercentage>22.00</inboundVatPercentage>
                               <inventoryAmount>-1.77000</inventoryAmount>
                               <inventoryPrice>1.77000</inventoryPrice>
                               <outgoingVatAmount>0.51033</outgoingVatAmount>
                               <outgoingVatPercentage>22.00</outgoingVatPercentage>
                               <position>3</position>
                               <productBarCode></productBarCode>
                               <productCatalogueCode></productCatalogueCode>
                               <productCode>101106</productCode>
                               <productName>T KOS POC. 6/4""""</productName>
                               <remarks>MATERIAL USAGE RECORD</remarks>
                               <retailMarginAmount>0.55000</retailMarginAmount>
                               <retailMarginPercentage>31.07</retailMarginPercentage>
                               <retailPrice>2.32000</retailPrice>
                               <salesPrice>2.83000</salesPrice>
                               <salesPriceAmount>-2.83000</salesPriceAmount>
                               <supplierAmountInCalculationCurrency>-1.77000</supplierAmountInCalculationCurrency>
                               <supplierDiscountAmount>0.00000</supplierDiscountAmount>
                               <supplierDiscountPercentage>0.00</supplierDiscountPercentage>
                               <supplierPrice>1.77000</supplierPrice>
                               <supplierPriceAmount>-1.77000</supplierPriceAmount>
                               <supplierPriceCurrency>EUR</supplierPriceCurrency>
                               <supplierPriceInCalculationCurrency>1.77000</supplierPriceInCalculationCurrency>
                       </UsedMaterial>
                       <UsedMaterial>
                               <calculationCurrency>EUR</calculationCurrency>
                               <calculationQuantity>1.000000</calculationQuantity>
                               <costsDirectAmount>0.00000</costsDirectAmount>
                               <costsDirectPercentage>0.00</costsDirectPercentage>
                               <costsOfCustomsAmount>-1.00000</costsOfCustomsAmount>
                               <costsOfCustomsPercentage>0.20</costsOfCustomsPercentage>
                               <costsOfTransportAmount>-1.00000</costsOfTransportAmount>
                               <costsOfTransportPercentage>0.20</costsOfTransportPercentage>
                               <description>Grafička kartica GTX670-DC2-2GD5</description>
                               <grossMarginAmount>193.00000</grossMarginAmount>
                               <grossMarginPercentage>38.45</grossMarginPercentage>
                               <grossPrice>695.00000</grossPrice>
                               <inboundVatAmount>-110.00000</inboundVatAmount>
                               <inboundVatPercentage>22.00</inboundVatPercentage>
                               <inventoryAmount>-502.00000</inventoryAmount>
                               <inventoryPrice>502.00000</inventoryPrice>
                               <outgoingVatAmount>66.02500</outgoingVatAmount>
                               <outgoingVatPercentage>9.50</outgoingVatPercentage>
                               <position>4</position>
                               <productBarCode></productBarCode>
                               <productCatalogueCode>977585700</productCatalogueCode>
                               <productCode>000005</productCode>
                               <productName>Grafička kartica GTX670-DC2-2GD5</productName>
                               <remarks>MATERIAL USAGE RECORD</remarks>
                               <retailMarginAmount>193.00000</retailMarginAmount>
                               <retailMarginPercentage>38.45</retailMarginPercentage>
                               <retailPrice>695.00000</retailPrice>
                               <salesPrice>761.02500</salesPrice>
                               <salesPriceAmount>-761.02500</salesPriceAmount>
                               <supplierAmountInCalculationCurrency>-500.00000</supplierAmountInCalculationCurrency>
                               <supplierDiscountAmount>0.00000</supplierDiscountAmount>
                               <supplierDiscountPercentage>0.00</supplierDiscountPercentage>
                               <supplierPrice>500.00000</supplierPrice>
                               <supplierPriceAmount>-500.00000</supplierPriceAmount>
                               <supplierPriceCurrency>EUR</supplierPriceCurrency>
                               <supplierPriceInCalculationCurrency>500.00000</supplierPriceInCalculationCurrency>
                               <vatTransactionType>101</vatTransactionType>
                       </UsedMaterial>
               </UsedMaterials>
               <DeliveredMaterials>
                       <DeliveredMaterial>
                               <calculationCurrency>EUR</calculationCurrency>
                               <calculationQuantity>7.000000</calculationQuantity>
                               <costsDirectAmount>0.00000</costsDirectAmount>
                               <costsDirectPercentage>0.00</costsDirectPercentage>
                               <costsOfCustomsAmount>0.00000</costsOfCustomsAmount>
                               <costsOfCustomsPercentage>0.00</costsOfCustomsPercentage>
                               <costsOfTransportAmount>0.00000</costsOfTransportAmount>
                               <costsOfTransportPercentage>0.00</costsOfTransportPercentage>
                               <description></description>
                               <discountPercentage>0.0000</discountPercentage>
                               <grossMarginAmount>94.56898</grossMarginAmount>
                               <grossMarginPercentage>827.16</grossMarginPercentage>
                               <grossPrice>106.00201</grossPrice>
                               <inboundVatAmount>-17.60689</inboundVatAmount>
                               <inboundVatPercentage>22.00</inboundVatPercentage>
                               <inventoryAmount>-80.03121</inventoryAmount>
                               <inventoryPrice>11.43303</inventoryPrice>
                               <outgoingVatAmount>9.50000</outgoingVatAmount>
                               <outgoingVatPercentage>9.50</outgoingVatPercentage>
                               <position>1</position>
                               <productBarCode>5051678412751</productBarCode>
                               <productCode>000002</productCode>
                               <productName>artikel 2</productName>
                               <retailMarginAmount>88.56692</retailMarginAmount>
                               <retailMarginPercentage>774.66</retailMarginPercentage>
                               <retailPrice>99.99995</retailPrice>
                               <salesPrice>116.07220</salesPrice>
                               <salesPriceAmount>-766.49965</salesPriceAmount>
                               <supplierAmountInCalculationCurrency>-94.15434</supplierAmountInCalculationCurrency>
                               <supplierDiscountAmount>-14.12313</supplierDiscountAmount>
                               <supplierDiscountPercentage>15.00</supplierDiscountPercentage>
                               <supplierPrice>100.00000</supplierPrice>
                               <supplierPriceAmount>-700.00000</supplierPriceAmount>
                               <supplierPriceCurrency>HRK</supplierPriceCurrency>
                               <supplierPriceInCalculationCurrency>13.45062</supplierPriceInCalculationCurrency>
                       </DeliveredMaterial>
                       <DeliveredMaterial>
                               <calculationCurrency>EUR</calculationCurrency>
                               <calculationQuantity>1.000000</calculationQuantity>
                               <costsDirectAmount>0.00000</costsDirectAmount>
                               <costsDirectPercentage>0.00</costsDirectPercentage>
                               <costsOfCustomsAmount>0.00000</costsOfCustomsAmount>
                               <costsOfCustomsPercentage>0.00</costsOfCustomsPercentage>
                               <costsOfTransportAmount>0.00000</costsOfTransportAmount>
                               <costsOfTransportPercentage>0.00</costsOfTransportPercentage>
                               <description></description>
                               <discountPercentage>0.0000</discountPercentage>
                               <grossMarginAmount>94.56898</grossMarginAmount>
                               <grossMarginPercentage>827.16</grossMarginPercentage>
                               <grossPrice>106.00201</grossPrice>
                               <inboundVatAmount>-2.51527</inboundVatAmount>
                               <inboundVatPercentage>22.00</inboundVatPercentage>
                               <inventoryAmount>-11.43303</inventoryAmount>
                               <inventoryPrice>11.43303</inventoryPrice>
                               <outgoingVatAmount>9.50000</outgoingVatAmount>
                               <outgoingVatPercentage>9.50</outgoingVatPercentage>
                               <position>1</position>
                               <productBarCode>5051678412751</productBarCode>
                               <productCode>000002</productCode>
                               <productName>artikel 2</productName>
                               <retailMarginAmount>88.56692</retailMarginAmount>
                               <retailMarginPercentage>774.66</retailMarginPercentage>
                               <retailPrice>99.99995</retailPrice>
                               <salesPrice>116.07220</salesPrice>
                               <salesPriceAmount>-109.49995</salesPriceAmount>
                               <supplierAmountInCalculationCurrency>-13.45062</supplierAmountInCalculationCurrency>
                               <supplierDiscountAmount>-2.01759</supplierDiscountAmount>
                               <supplierDiscountPercentage>15.00</supplierDiscountPercentage>
                               <supplierPrice>100.00000</supplierPrice>
                               <supplierPriceAmount>-100.00000</supplierPriceAmount>
                               <supplierPriceCurrency>HRK</supplierPriceCurrency>
                               <supplierPriceInCalculationCurrency>13.45062</supplierPriceInCalculationCurrency>
                       </DeliveredMaterial>
               </DeliveredMaterials>
               <WorkingHours>
                       <WorkingHour>
                               <date>2021-08-25</date>
                               <hoursSpent>0.8000</hoursSpent>
                               <remarks>Programiranje</remarks>
                               <workOrderDocNo>2021-00013</workOrderDocNo>
                               <workTaskType>consulting</workTaskType>
                       </WorkingHour>
                       <WorkingHour>
                               <date>2021-08-25</date>
                               <hoursSpent>0.2000</hoursSpent>
                               <remarks>Testiranje</remarks>
                               <workOrderDocNo>2021-00013</workOrderDocNo>
                               <workTaskType>consulting</workTaskType>
                       </WorkingHour>
                       <WorkingHour>
                               <date>2021-11-08</date>
                               <hoursSpent>4.5000</hoursSpent>
                               <remarks>VRTANJE LESENIH DELOV</remarks>
                               <worker>Roki Balboa</worker>
                               <workerCode>100155</workerCode>
                               <workOrderDocNo>2021-00013</workOrderDocNo>
                               <workTaskType>107</workTaskType>
                       </WorkingHour>
               </WorkingHours>
       </WorkOrder>
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="document could not be found"><error/>
</response>


3.27.2 WorkOrderGetPDF

Get PDF for work order by document number, or by combination of document number and date. Response (on OK) returns binary record for PDF file coded with Base64 coding.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2010-00002)
dateDocument date
documentIDInternal document identificator. In case of using this parameter, no other parameter listed above is needed for searching by document.

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="WorkOrderGetPDF">
       <parameter name="number" value="2" />
       <parameter name="date" type="Date" value="2022-02-22" />
</method>
</request>


Response
<response status="ok">
       <number>2</number>
       <date>2022-02-22</date>
       <pdfFile>JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0ZpbHRlci9GbGF0ZURlY29kZT4+CnN0cmVhbQp4nJVYS4/bNh...</pdfFile>
</response>

Response (on error)
<response status="error">
       <error description="Can not find work order for number: 2 and date: 2022-02-22">
       </error>
</response>


3.27.3 WorkOrderCreate

Create new work order for bill of materials. Number of work order which is created from this web service is automatically set if parameter status is set to "Issued".

Parameters

WorkOrderComplex parameter with data tags

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
  <method name="WorkOrderCreate">
        <parameter name="WorkOrder">
                       <businessYear>2022</businessYear>
                       <buyerCity>LJUBLJANA</buyerCity>
                       <buyerCode>100246</buyerCode>                           <!-- (Optional). If it is specified buyer parameters bellow are not needed as the buyer data is taken from database. If any parameter bellow is sepcified it will override master buyer data in document
                       <buyerDocumentID>60:123456</buyerDocumentID>                    <!-- (Optional). If it is specified buyer parameters bellow are not needed as the buyer data is taken from database. If any parameter bellow is sepcified it will override master buyer data in document
                       <buyerCountry>SI</buyerCountry>
                       <buyerName>TEST</buyerName>
                       <buyerName1>TEST S.P.</buyerName1>
                       <buyerPostalCode>1000</buyerPostalCode>
                       <buyerStreet>CELOVŠKA CESTA 134</buyerStreet>
                       <buyerTaxNumber>SI88888888</buyerTaxNumber>
                       <buyerVatRegistration>None</buyerVatRegistration>            <!-- (Unkown, None, Registered)
                       <city>Maribor</city>
                       <completionDate>2022-04-25</completionDate>
                       <costPosition>894</costPosition>
                       <currency>EUR</currency>
                       <date>2022-04-25</date>
                       <plannedWorkBeginDate>2022-04-25</plannedWorkBeginDate>
                       <remarks>ha 1</remarks>
                       <status>Issued</status>                                  <!-- (Optional) Possible values: Issued, Draft - default is Issued
                       <type>Gross</type>                                       <!-- (Optional) Type of pricing - default is "Gross"
                       <warehouseCodeForUsedMaterials>090</warehouseCodeForUsedMaterials>         <!-- Mandatory
                       <warehouseForOrderedProductsCode>908</warehouseForOrderedProductsCode>     <!-- Mandatory
                       <OrderedProducts>
                               <OrderedProduct>
                                       <calculationQuantity>1.000000</calculationQuantity>  <!-- Mandatory
                                       <productCode>1310</productCode>                      <!-- Mandatory; Product code of product which has bill of materials
                               </OrderedProduct>
                       </OrderedProducts>
        </parameter>
  </method>
</request>


Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328
<?xml version="1.0" encoding="utf-8"?>
response status="ok" >
       <number>2/2022</number>         <!-- created document ID or number
       <date>2022-01-13</date>                 <!-- date of document
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- missing mandatory attributes, invalid values, no privileges,  
</response>


3.27.4 WorkOrderUpdate

Update existing work order.Data must contain work order number to be able to identify document which is to be updated.

Parameters

WorkOrderComplex parameter with data tags

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="WorkOrderUpdate">
<parameter name="WorkOrder">
         <number>12</number>                                    <!-- document number is mandatory in UPDATE (Can use sequential document number (example: 12), or formatted number (example: 12/2011))
               <!--  Parameters are identical to the parameters in WorkOrderCreate api
       </parameter>
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328
<?xml version="1.0" encoding="utf-8"?>
response status="ok" >
       <number>2/2022</number>         <!-- updated document ID or number
       <date>2022-01-13</date>                 <!-- date of document
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- missing mandatory attributes, invalid values, no privileges,  
</response>


3.27.5 WorkOrderDelete

Delete work order. Must specify parameter/s (number, number+date) to identify document for deleting. It is possible to delete only last advance invoice.

Parameters

numberDocument number
dateDocument date

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="WorkOrderDelete">
       <parameter name="number" value="12/2022" />
       <parameter name="date" type="Date" value="2022-01-13" />
</method>
</request>

Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2016 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="no privileges"><error/>     <!-- document could not be found, no privileges,  
</response>


3.27.6 WorkOrderList

Get list of work orders for specified criteria.

Parameters

numberWork order number.
dateFromSearch by bill of materials date range.
dateToSearch by bill of materials date range.
articleSearch by products.
statusUsage status (Draft, InProduction, Completed, OnHold, WaitingForApproval, ApprovedForProduction, Settled, Cancelled)

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="WorkOrderList">
       <parameter name="number" value="123456" />
       <parameter name="status" value="Settled"/>
</method>
</request>

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="WorkOrderList">
       <parameter name="dateFrom" value="2022-02-01" />
    <parameter name="dateTo" value="2022-02-26" />
</method>
</request>


Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <WorkOrder>
                <!-- structure of bill of materials data is the same as in WorkOrderGet
       </WorkOrder>
       <WorkOrder>
                <!-- structure of bill of materials data is the same as in WorkOrderGet
       </WorkOrder>
       ...
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Access denied. User account does not have sufficient privileges for the given request, Invalid search keys, invalid values, no privileges,  
</response>


3.27.7 WorkOrderAttachmentAdd

Add image/attachment to work order.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="WorkOrderAttachmentAdd">
       <parameter name="number" type="String" value="2020-00001" />
       <parameter name="attachment">
               <contents encoding="BASE64">BASE64...</contents>
               <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added attachment att.jpg to work order 2020-00001.</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find work order for number: 2020-00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>


3.27.8 WorkOrderAttachmentSetDefault

Add attachment to work order and set is as default.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="WorkOrderAttachmentSetDefault">
       <parameter name="number" type="String" value="2020-00001" />
       <parameter name="attachment">
               <contents encoding="BASE64">BASE64...</contents>
               <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added attachment att.jpg to work order 2020-00001.</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find work order for number: 2020-00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>


3.27.9 WorkOrderAttachmentGet

Get default attachment of work order.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="WorkOrderAttachmentGet">
       <parameter name="number" type="String" value="2020-00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <WorkOrder>
               <Attachments>
                       <Attachment>
                               <fileName>att.jpg</fileName>
                               <contents encoding="BASE64">BASE64</contents>
                       </Attachment>
               </Attachments>
       </WorkOrder>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find work order for number: 2020-00001 work order does not have attachemnts.
</response>


3.27.10 WorkOrderAttachmentList

Get all images/attachments of article.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position/cost center
businessUnitBusiness unit

Example request and response

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="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="WorkOrderAttachmentList">
       <parameter name="number" type="String" value="2020-00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <WorkOrder>
               <Attachments>
                       <Attachment>
                               <fileName>att1.jpg</fileName>
                               <contents encoding="BASE64">1BASE64</contents>
                       </Attachment>
                       <Attachment>
                               <fileName>att2.jpg</fileName>
                               <contents encoding="BASE64">2BASE64</contents>
                       </Attachment>
                       <Attachment>
                               <fileName>att3.jpg</fileName>
                               <contents encoding="BASE64">3BASE64</contents>
                       </Attachment>
               </Attachments>
       </WorkOrder>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Possible errors:  Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find work order for number: 2020-00001 work order does not have attachemnts.
</response>

 

4. API Examples

 

4.1. API Examples in PHP

4.1.1 SalesInvoiceGet

For this PHP code to work you first need Curl library installed.
This example gets sales invoice by document number. Request is in XML format. This request can be replaced by any of the xml examples in API Reference.

Parameters and explanation
Server url is https://eurofaktura.com/WebServicesSI/API.
In header you put content type which is application/xml
Post field must contain the request in XML format as seen bellow.
After we execute this request we have to convert the response to XML format.
Methods curl_errno and curl_error are used for error handling.

Example request and response

<?php
<!-- request in XML format -->
       $string = '<?xml version="1.0" encoding="UTF-8"?>
       <request>
       <login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="C71FF0048D3E0D0083301B8B06309270" />
<method name="SalesInvoiceGet">
       <parameter name="number" value="100/1/171" />
</method>
       </request>';

<!-- Executing request with curl -->
       $serverUrl = "https://eurofaktura.com/WebServicesSI/API";
       $ch = curl_init($serverUrl);
       curl_setopt($ch, CURLOPT_HEADER, ("Content-Type: application/xml"));
       curl_setopt($ch, CURLOPT_POSTFIELDS, $string);
       curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
       $data = htmlentities(curl_exec($ch));
       
       $curl_errno = curl_errno($ch);
       $curl_error = curl_error($ch);

       curl_close($ch);
       if ($curl_errno > 0) {
               echo ('cURL Error ($curl_errno): $curl_error\n');
               exit;
       } else {
               echo ($data);
       }
       exit;
?>

RESPONSE
<?xml version="1.0" encoding="utf-8"?>

<!--
       Generated by www.e-racuni.com

       Release number: 717.2
       Release date: 06.10.2017
       Request URL: /WebServicesSI/API
-->

<response status="ok">
       <SalesInvoice>
               <advanceInvoicesRef></advanceInvoicesRef>
               <amountAlreadyPaid>0</amountAlreadyPaid>
               <amountLeftToBePaid>610</amountLeftToBePaid>
               <bankAccountNumber>SI56 0451 5000 0115 162</bankAccountNumber>
               <businessUnit>0001</businessUnit>
               <businessYear>2016</businessYear>
               <buyerCity>Ljubljana</buyerCity>
               <buyerCountry>SI</buyerCountry>
               <buyerEMail></buyerEMail>
               <buyerName>PARTNER D.O.O.</buyerName>
               <buyerPostalCode>1000</buyerPostalCode>
               <buyerStreet>Test 300</buyerStreet>
               <buyerVatRegistration>Unknown</buyerVatRegistration>
               <city>Maribor</city>
               <costPosition></costPosition>
               <creditNotesRef></creditNotesRef>
               <date>2017-03-07</date>
               <dateOfSupplyFrom>2017-03-07</dateOfSupplyFrom>
               <debitNotesRef></debitNotesRef>
               <deliveryNotesRef></deliveryNotesRef>
               <expirationDate>2017-03-08</expirationDate>
               <fiscalNumber>100/1/171</fiscalNumber>
               <isReccurringInvoice>false</isReccurringInvoice>
               <issuedTimestamp>9:26</issuedTimestamp>
               <issuedTimestampDate>2017-03-07</issuedTimestampDate>
               <methodOfPayment>BankTransfer</methodOfPayment>
               <number>100/1/171</number>
               <paymentDueDate>2017-03-08</paymentDueDate>
               <reference>99</reference>
               <referenceUPN>SI12 0010011713801</referenceUPN>
               <salesOrdersRef></salesOrdersRef>
               <status>IssuedInvoice</status>
               <totalAmount>610</totalAmount>
               <totalCurrency>EUR</totalCurrency>
               <totalDiscount>0</totalDiscount>
               <totalNetAmount>500</totalNetAmount>
               <totalVatAmountFlatRate>0</totalVatAmountFlatRate>
               <totalVatAmountLowerRate>0</totalVatAmountLowerRate>
               <totalVatAmountNormalRate>110</totalVatAmountNormalRate>
               <totalVatAmountZeroRate>0</totalVatAmountZeroRate>
               <totalVatBaseAmountFlatRate>0</totalVatBaseAmountFlatRate>
               <totalVatBaseAmountLowerRate>0</totalVatBaseAmountLowerRate>
               <totalVatBaseAmountNormalRate>500</totalVatBaseAmountNormalRate>
               <totalVatBaseAmountZeroRate>0</totalVatBaseAmountZeroRate>
               <type>Gross</type>
               <vatTransactionType>0</vatTransactionType>
               <warehouseCode>0000</warehouseCode>
               <wayOfPayment>BankTransfer</wayOfPayment>
               <Items>
                       <Item>
                               <amount>500</amount>
                               <amountWithoutDiscount>500</amountWithoutDiscount>
                               <costPosition></costPosition>
                               <currency>EUR</currency>
                               <description>test</description>
                               <discountAmount>0</discountAmount>
                               <discountPercentage>0</discountPercentage>
                               <netPrice>500</netPrice>
                               <netPriceInDocumentCurrency>500</netPriceInDocumentCurrency>
                               <position>1</position>
                               <price>610</price>
                               <priceInDocumentCurrency>610</priceInDocumentCurrency>
                               <quantity>1</quantity>
                               <totalDiscountPercentage>0</totalDiscountPercentage>
                               <unit></unit>
                               <vatAmount>110</vatAmount>
                               <vatPercentage>22</vatPercentage>
                       </Item>
               </Items>
       </SalesInvoice>
</response>



PHP_Examples.zip
Velikost: 9,89 kB

 

---
© E-RAČUNI d.o.o. 2003-2024