Internetske usluge (web services), automatizacija postupaka i integracija programa s programima drugih ponuđača


Program e-računi je moguće povezati s drugim internetskim i uobičajenim poslovnim programima uporabom internetskih usluga. Putem internetskih usluga program omogućuje pristup podacima koje korisnik vodi u programu te automatsku izvedbu određenih funkcionalnosti programa. Primjeri uporabe internetskih usluga su:

Za uporabu internetskih usluga potrebna je programska komponenta, koja omogućuje povezivanje putem protokola HTTPS (SSL + HTTP).

Poglavlje o internetskih uslugama namjenjeno je programerima. Specifikacije internetskih usluga su napisane na engleskom jeziku.

 

1. Using web services, authentication and message representation format

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

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

# echo -n "IVANnovak" | md5sum


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

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

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



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

 

2. Introduction to web services API

The e-racuni.com web services API is an interface for accessing user's account data using secure HTTPS connection and XML. The API makes it easy to integrate 3rd party web and desktop applications with user's account.

Some potential application ideas:

To enable API access to subscriber's account, login as company administrator and follow these steps:

  1. Select My Profile from the main menu.
  2. Select Web services in the pull-down menu
  3. Generate web services token which you will need to access web services API. See figure below:

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


After the web services token is generated you can use any active user account to access web services API. Depending on user account privileges only limited functionality may be available to a particular user.

To later disable web services just repeat the steps above and click on the button to disable web services for the selected subscriber/company database. See figure below:

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


Web services can not be used when no token is available or if web services are disabled.


2.1 Web services URL

The e-racuni.com API for Croatian localization uses the following service URL for communication over HTTP:

https://eurofaktura.com/WebServicesHR/API


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

 

3. API Reference

 

3.1. 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.1.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.1.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.1.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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>
       </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.1.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.1.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.2. 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.2.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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>   
               <buyerCity>Zagreb</buyerCity>
               <buyerCountry>HR</buyerCountry>
               <buyerName>5 FIVER d.o.o.</buyerName>
               <buyerPostalCode>4240</buyerPostalCode>
               <buyerStreet>ULICA 22</buyerStreet>
               <buyerTaxNumber>75882442</buyerTaxNumber>
               <buyerVatRegistration>None</buyerVatRegistration>
               <city>Zagreb</city>
               <costPosition>1</costPosition>
                <businessUnit>0001</businessUnit>
                <methodOfPayment>bankTransfer</methodOfPayment>
               <date>2010-02-19</date>
               <dateOfSupplyFrom>2010-02-19</dateOfSupplyFrom>
               <paymentDueDate>2010-03-06</paymentDueDate>
               <invoicePricingType>retail</invoicePricingType>
               <number>2010-00002</number>             
               <vatTransactionType>0</vatTransactionType>
                <vatOutgoingDocumentVatClause>Registered</vatOutgoingDocumentVatClause>
               <status>issuedInvoice</status>
               <totalAmount>90.000</totalAmount>
               <totalCurrency>EUR</totalCurrency>
               <totalDiscount>8.33</totalDiscount>
               <totalNetAmount>75.00</totalNetAmount>
               <totalVatAmountLowerRate2>0.00</totalVatAmountLowerRate2>
               <totalVatAmountNormalRate>0.00</totalVatAmountNormalRate>
               <totalVatAmountLowerRate>0.00</totalVatAmountLowerRate>
               <totalVatAmountZeroRate>0.0</totalVatAmountZeroRate>
               <totalVatBaseAmountLowerRate2>0.00</totalVatBaseAmountLowerRate2>
               <totalVatBaseAmountNormalRate>0.00</totalVatBaseAmountNormalRate>
               <totalVatBaseAmountLowerRate>0.00</totalVatBaseAmountLowerRate>
               <totalVatBaseAmountZeroRate>1.55</totalVatBaseAmountZeroRate>
               <reference>05 11290</reference>                         
                <cancelledDocumentRef>2012-00015</cancelledDocumentRef>
                <introductionText>introduction text</introductionText>  
                <vatCountryIsoCode>SI</vatCountryIsoCode>
               <Address>                                 
                       <city>Zagreb</city>
                       <country>HR</country>
                       <postalCode>10000</postalCode>
                       <street>Ilica 10</street>
                       <type>Delivery</type>
               </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>
                       </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.2.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
markDocumentAsSentMarks document as sent.
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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.2.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 transactions of goods and services in Croatia,
1 - Zero-rated transaction - with the right to deduct input VAT,
2 - Zero-rated transaction - without the right to deduct input VAT (domestic),
3 - Transactions excluded from VAT - Other,
4 - Exempt supplies relating to international transport,
7 - Transactions exempt from VAT - not for VAT records,
10 - Transitory item - tourist residence tax,
11 - Transitory item - tourist travel insurance,
12 - Transitory item - other,
13 - Transitory item - return fee for packaging,
14 - Deliveries of goods and services in the Republic of Croatia for which VAT is charged to recipient,
15 - Transactions excluded from VAT - supplies of goods at distance,
16 - Transactions excluded from VAT - services performed in EU,
17 - Transactions excluded from VAT - services performed for tax payers without seat in RH,
18 - Transactions excluded from VAT - deliveries of new means of transport in EU,
19 - Transactions excluded from VAT - supplies of goods in EU,
20 - Transactions excluded from VAT - assembly and installation of goods in EU,
21 - Transactions excluded from VAT - trilateral delivery in EU,
22 - Transactions excluded from VAT - export of goods outside of EU,
23 - Transactions excluded from VAT - supplies of goods in EU customs procedures.
25 - Transactions excluded from VAT - sold goods to tax payers without seat in RH,

Number of credit note which is created from this web service is automatically set if parameter status is set to "issuedInvoice".

Parameters

CreditNoteComplex parameter with data tags

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="CreditNoteCreate">
<parameter name="CreditNote">           
               <date>2010-01-13</date>                         <!-- document date
               <dateOfSupplyFrom>2010-02-19</dateOfSupplyFrom>
               <paymentDueDate>2010-03-06</paymentDueDate>             
               <city>Zagreb</city>
               <customerContactPerson></customerContactPerson> <!-- (Optional)
               <type>retail</type>                                     <!-- (Optional) Type of pricing - default is "gross"
               <isReccurringInvoice>false</isReccurringInvoice>
               <vatTransactionType>0</vatTransactionType>              <!-- (Optional) default is 0
               <vatOutgoingDocumentVatClause>Registered</vatOutgoingDocumentVatClause> <!-- (Optional) Possible values: Registered, NotRegistered, RegisteredVATr2
               <costPosition>120</costPosition>                        <!-- (Optional)
               <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</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 specified it will override master buyer data in document
               <buyerName>ivan novak</buyerName>               
               <buyerTaxNumber>02169711</buyerTaxNumber>       <!-- (Optional)
               <buyerVatRegistration>None</buyerVatRegistration>       <!-- (None, Unknown, RegisteredR1, RegisteredR2)
               <buyerEMail>ivan@novak.com</buyerEMail>                 <!-- (Optional)
               <buyerStreet>Iztokova 22</buyerStreet>                  <!-- (Optional)
               <buyerPostalCode>20000</buyerPostalCode>                <!-- (Optional)
               <buyerCity>Zagreb</buyerCity>                   <!-- (Optional)
               <buyerCountry>SI</buyerCountry>                         <!-- (Optional) ISO-2 country code
               <documentLanguage>Croatian</documentLanguage> <!-- (Optional) Possible document language: Slovene, English, German and Croatian
               <printingTemplate>template</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
               <methodOfPayment>bankTransfer</methodOfPayment> <!-- Possible ways of payment: Unknown, BankTransfer, Cash, Cheques, EurocardMastercard, Visa, Amex, Diners, ConsumerLoanAneks, ConsumerLoanDiners, InGoods, CashOnDelivery, CashOnDeliveryCourierService, CreditCard, PayPal, Maestro, DirectDebit, Compensation, Other
               <vatCountryIsoCode>SI</vatCountryIsoCode> <!-- Mandatory if using vatTransactionTypes: 15 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>Zagreb</city>
                       <country>HR</country>
                       <postalCode>10000</postalCode>
                       <street>Ilica 10</street>
                       <type>Delivery</type>
               </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
                       </Item>
                       <Item>                                          <!-- Item specified for good or service
                               <position>2</position>      <!-- position of item
                               <description>Transport of goods</description>
                               <price>11.00</price>
                               <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
                       </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.2.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 "UBL". If this parameter is not included in XML, import from default data format is used.
base64dataThis parameter is mandatory in case using dataFormat "UBL". Content of this parameter should be UBL XML encoded into base64 string.

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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 UBL data format)

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="CreditNoteImport">
               <parameter name="importType" value="createOrUpdate" />
               <parameter name="dataFormat" value="UBL" />
               <parameter name="base64data">JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0ZpbHRlci9GbGF0ZURlY29kZT4+Cn...
                    <!-- UBL 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.2.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" /><login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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 CreditNoteCreate 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.2.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.2.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.2.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, MarkedAsVerified, UnmarkedAsVerified
issuerIssuer of document, search is done by username

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.2.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="CreditNoteSendByEmail">
       <parameter name="number" value="12/2009" />
       <parameter name="date" type="Date" value="2010-01-13" />
       <parameter name="sender" value="ivan@novak.com"/>
       <parameter name="recipient" value="zoran@novak.com,zlatko@novak.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.2.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.2.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.2.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.2.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.3. 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.3.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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>                   
               <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>Zagreb</city>
               <costPosition>1</costPosition>
               <businessUnit>0001</businessUnit>
               <date>2010-02-19</date>
               <dateOfSupplyFrom>2010-02-19</dateOfSupplyFrom>
               <paymentDueDate>2010-03-06</paymentDueDate>
               <invoicePricingType>retail</invoicePricingType>
               <number>2010-00002</number>             
               <vatTransactionType>0</vatTransactionType>
               <vatOutgoingDocumentVatClause>Registered</vatOutgoingDocumentVatClause>
               <status>issuedInvoice</status>
               <totalAmount>90.000</totalAmount>
               <totalCurrency>EUR</totalCurrency>
               <totalDiscount>8.33</totalDiscount>
               <totalNetAmount>75.00</totalNetAmount>
               <totalVatAmountLowerRate2>0.00</totalVatAmountLowerRate2>
               <totalVatAmountNormalRate>0.00</totalVatAmountNormalRate>
               <totalVatAmountLowerRate>0.00</totalVatAmountLowerRate>
               <totalVatAmountZeroRate>0.0</totalVatAmountZeroRate>
               <totalVatBaseAmountLowerRate2>0.00</totalVatBaseAmountLowerRate2>
               <totalVatBaseAmountNormalRate>0.00</totalVatBaseAmountNormalRate>
               <totalVatBaseAmountLowerRate>0.00</totalVatBaseAmountLowerRate>
               <totalVatBaseAmountZeroRate>1.55</totalVatBaseAmountZeroRate>
               <reference>05 11290</reference>                         
               <cancelledDocumentRef>2012-00015</cancelledDocumentRef>
               <introductionText>introduction text</introductionText>   
               <vatCountryIsoCode>SI</vatCountryIsoCode>
               <Address>                                   
                       <city>Zagreb</city>
                       <country>HR</country>
                       <postalCode>10000</postalCode>
                       <street>Ilica 10</street>
                       <type>Delivery</type>
               </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>
                       </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.3.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
markDocumentAsSentMarks document as sent.
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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.3.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 Croatia,
1 - Zero-rated transaction - with the right to deduct input VAT,
2 - Zero-rated transaction - without the right to deduct input VAT (domestic),
3 - Transactions excluded from VAT - Other,
4 - Exempt supplies relating to international transport,
7 - Transactions exempt from VAT - not for VAT records,
10 - Transitory item - tourist residence tax,
11 - Transitory item - tourist travel insurance,
12 - Transitory item - other,
13 - Transitory item - return fee for packaging,
14 - Deliveries of goods and services in the Republic of Croatia for which VAT is charged to recipient,
15 - Transactions excluded from VAT - supplies of goods at distance,
16 - Transactions excluded from VAT - services performed in EU,
17 - Transactions excluded from VAT - services performed for tax payers without seat in RH,
18 - Transactions excluded from VAT - deliveries of new means of transport in EU,
19 - Transactions excluded from VAT - supplies of goods in EU,
20 - Transactions excluded from VAT - assembly and installation of goods in EU,
21 - Transactions excluded from VAT - trilateral delivery in EU,
22 - Transactions excluded from VAT - export of goods outside of EU,
23 - Transactions excluded from VAT - supplies of goods in EU customs procedures.
25 - Transactions excluded from VAT - sold goods to tax payers without seat in RH,

Number of debit note which is created from this web service is automatically set if parameter status is set to "issuedInvoice".

Parameters

DebitNoteComplex parameter with data tags

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="DebitNoteCreate">
<parameter name="DebitNote">            
               <date>2010-01-13</date>                         <!-- document date
               <dateOfSupplyFrom>2010-02-19</dateOfSupplyFrom>
               <paymentDueDate>2010-03-06</paymentDueDate>             
               <city>Zagreb</city>
               <customerContactPerson></customerContactPerson> <!-- (Optional)
               <type>retail</type>                                     <!-- (Optional) Type of pricing - default is "gross"
               <isReccurringInvoice>false</isReccurringInvoice>
               <vatTransactionType>0</vatTransactionType>              <!-- (Optional) default is 0
               <vatOutgoingDocumentVatClause>Registered</vatOutgoingDocumentVatClause> <!-- (Optional) Possible values: Registered, NotRegistered, RegisteredVATr2
               <costPosition>120</costPosition>                        <!-- (Optional)
               <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</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 specified it will override master buyer data in document
               <buyerName>ivan novak</buyerName>               
               <buyerTaxNumber>02169711</buyerTaxNumber>       <!-- (Optional)
               <buyerVatRegistration>None</buyerVatRegistration>       <!-- (None, Unknown, RegisteredR1, RegisteredR2)
               <buyerEMail>ivan@novak.com</buyerEMail>                 <!-- (Optional)
               <buyerStreet>Iztokova 22</buyerStreet>                  <!-- (Optional)
               <buyerPostalCode>20000</buyerPostalCode>                <!-- (Optional)
               <buyerCity>Zagreb</buyerCity>                   <!-- (Optional)
               <buyerCountry>HR</buyerCountry>                         <!-- (Optional) ISO-2 country code
               <documentLanguage>Croatian</documentLanguage> <!-- (Optional) Possible document language: Slovene, English, German and Croatian
               <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>SI</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>Zagreb</city>
                       <country>HR</country>
                       <postalCode>10000</postalCode>
                       <street>Ilica 10</street>
                       <type>Delivery</type>
               </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
                       </Item>
                       <Item>                                          <!-- Item specified for good or service
                               <position>2</position>      <!-- position of item
                               <description>Transport of goods</description>
                               <price>11.00</price>
                               <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
                       </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 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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.3.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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 DebitNoteCreate 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 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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="DebitNoteDelete">
<parameter name="DebitNote">
       <parameter name="number" value="12/2009" />
       <parameter name="date" type="Date" value="2016-01-13" />
</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">
</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 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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.3.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, MarkedAsVerified, UnmarkedAsVerified
issuerIssuer of document, search is done by username

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.3.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="DebitNoteSendByEmail">
       <parameter name="number" value="12/2009" />
       <parameter name="date" type="Date" value="2010-01-13" />
       <parameter name="sender" value="ivan@novak.com"/>
       <parameter name="recipient" value="zoran@novak.com,zlatko@novak.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"/>
</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 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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.3.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.3.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.3.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.4. 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.4.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
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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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>Zagreb</buyerCity>
               <buyerCode>123456</buyerCode>    
               <buyerCountry>HR</buyerCountry>
               <buyerEMail>test@hotmail.com</buyerEMail>
               <buyerName>Company, d.o.o.</buyerName>
               <buyerPostalCode>6257</buyerPostalCode>
               <buyerStreet>Precna ulica 1</buyerStreet>
               <buyerVatRegistration>None</buyerVatRegistration>
               <cancelledDocumentRef>2012-00015</cancelledDocumentRef>
               <city>Zagreb</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>
               <Address>                                  
                       <city>Zagreb</city>
                       <country>HR</country>
                       <postalCode>10000</postalCode>
                       <street>Ilica 10</street>
                       <type>Delivery</type>
               </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>
                       </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>
                       </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.4.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
markDocumentAsSentMarks document as sent.
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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.4.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 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.

Parameters

DeliveryNoteComplex parameter with data tags like:

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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>Issued</status>                                 <!-- (Optional)
               <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</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 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>
               <vatOutgoingDocumentVatClause>Registered</vatOutgoingDocumentVatClause> <!-- (Optional) Possible values: Registered, NotRegistered, RegisteredVATr2
               <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
               <Address>                        <!-- (Optional) Setting delivery address on document and partner buyer if it doesn't exists             
                       <city>Zagreb</city>
                       <country>HR</country>
                       <postalCode>10000</postalCode>
                       <street>Ilica 10</street>
                       <type>Delivery</type>
               </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.4.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.4.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.4.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.4.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
supplierSupplier code, or supplier name
costPositionCost position code
productProduct code, or product name
statusProduct code, or product name

status Possible values: Draft, IssuedInvoice, NotBooked, Booked, WithSalesInvoiceReference, WithoutSalesInvoiceReference, Opened, Closed, DocumentSentAlready, DocumentNotYetSent, DocumentSentByEMail, DocumentNotSentByEMail, WithWorkOrderReference, WithoutWorkOrderReference, CancellationDocument, CancelledDocument, DocumentNotSentOrPrinted, NotCancellationOrCancelledDocument, MarkedAsVerified, UnmarkedAsVerified

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.4.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)

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="DeliveryNoteSendByEmail">
       <parameter name="number" value="2012-00014" />
       <parameter name="date" type="Date" value="2012-09-26" />
       <parameter name="sender" value="ivan@novak.com"/>
       <parameter name="recipient" value="zoran@novak.com,zlatko@novak.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"/>
</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.4.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.4.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.4.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.4.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.5. 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.5.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 (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 ISO SEPA XML or UBL
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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.5.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.5.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 attachment 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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.6. E-Banking API

BankStatementImportImport bank statement file.

3.6.1 BankStatementImport

Import bank statement file.

Parameters

IBANBank account number (used when importing bank statements of type "IsoSepaXml", "ZabaXml", "EtnaXml" (RBA), "PbzXml")
payPalAccountPayPal email (used when importing bank statements of type "PayPalCsv")
statementNumberBank statement number (optional, because it can be in the statement)
typeType of bank statement ("IsoSepaXml", "PayPalCsv", "eracuniSpreadsheet", "EtnaXml", "PbzXml", "ZabaXml", "Fina")
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)

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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="BankStatementImport">
       <parameter name="IBAN" value="HR56 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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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>

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.7. FINA EInvoice API

API for sending document in public procurement to FINA.

GetFinaReceiverListGet possible receivers from FINA for e-invoice in public procurement. This data is needed to send a document to a desired receiver.
SendDocumentToFinaSend an existing invoice in public procurement to FINA. You will need companyID and partyIdentificationID from the receiver registry in order to send the invoice.
GetDocumentStatusFromFinaRetrieve the status of an already sent document to FINA.

3.7.1 GetFinaReceiverList

Get possible receivers from FINA for invoice in public procurement. You can filter all by not sending any parameters or single out a desired receiver. Invoices can be sent only to buyers that exist in this registry.

Request parameters

statusFilter ACTIVE or INACTIVE receivers. Parameter is optional.
companyIDcompanyID of the receiver (OIB in HR). Parameter is optional.
partyIdentificationIDReceiver unique identifier which includes also the business unit code. This is like an electronic receiver address that will be needed for sending a document to FINA. For filtering receivers this parameter is optional.
registrationNameRegistration name of the company. Parameter is optional.

Example request and response

POST /WebServicesHR/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="admin" md5pass="d2cc342653e944df15923698c6bdd1ac" token="A73A6E565E0842B8AE67B6D52BE8F2A0" />
       <method name="GetFinaReceiverList">
               <parameter name="status" value="ACTIVE"/>                       <!-- Optional -->
               <parameter name="companyID" value="28921383001"/>       <!-- Optional -->
               <!-- <parameter name="partyIdentificationID" value="9934:28921383001::HR99:06"/> -->                                    <!-- Optional -->
               <!-- <parameter name="registrationName" value="HRVATSKE VODE, PRAVNA OSOBA ZA UPRAVLJANJE VODAMA"/> --> <!-- Optional -->
       </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">
       <GetFinaReceiverListMsg>
               <Receiver>
                       <addressLine>MEĐIMURSKA ULICA 26B, 42000, VARAŽDIN</addressLine>
                       <businessBranchName>VODNOGOSPODARSKI ODJEL ZA MURU I GOPRNJU DRAVU</businessBranchName>
                       <cityName>VARAŽDIN</cityName>
                       <companyID>28921383001</companyID>
                       <country>REPUBLIKA HRVATSKA</country>
                       <endpointID>28921383001</endpointID>
                       <endpointIDSchemeID>9934</endpointIDSchemeID>
                       <isoCode>HR</isoCode>
                       <partyIdentificationID>9934:28921383001::HR99:06</partyIdentificationID>
                       <postalCode>42000</postalCode>
                       <registrationName>HRVATSKE VODE, PRAVNA OSOBA ZA UPRAVLJANJE VODAMA</registrationName>
                       <status>active</status>
                       <streetName>MEĐIMURSKA ULICA 26B</streetName>
               </Receiver>
               <Receiver>
                       <addressLine>VUKOVARSKA 35, 21000, SPLIT</addressLine>
                       <businessBranchName>VODNOGOSPODARSKI ODJEL ZA SLIVOVE JUŽNOG JADRANA</businessBranchName>
                       <cityName>SPLIT</cityName>
                       <companyID>28921383001</companyID>
                       <country>REPUBLIKA HRVATSKA</country>
                       <endpointID>28921383001</endpointID>
                       <endpointIDSchemeID>9934</endpointIDSchemeID>
                       <isoCode>HR</isoCode>
                       <partyIdentificationID>9934:28921383001::HR99:04</partyIdentificationID>
                       <postalCode>21000</postalCode>
                       <registrationName>HRVATSKE VODE, PRAVNA OSOBA ZA UPRAVLJANJE VODAMA</registrationName>
                       <status>active</status>
                       <streetName>VUKOVARSKA 35</streetName>
               </Receiver>
               <Receiver>
                       <addressLine>ĐURE ŠPORERA 3, 51000, RIJEKA</addressLine>
                       <businessBranchName>VODNOGOSPODARSKI ODJEL ZA SLIVOVE SJEVERNOG JADRANA</businessBranchName>
                       <cityName>RIJEKA</cityName>
                       <companyID>28921383001</companyID>
                       <country>REPUBLIKA HRVATSKA</country>
                       <endpointID>28921383001</endpointID>
                       <endpointIDSchemeID>9934</endpointIDSchemeID>
                       <isoCode>HR</isoCode>
                       <partyIdentificationID>9934:28921383001::HR99:03</partyIdentificationID>
                       <postalCode>51000</postalCode>
                       <registrationName>HRVATSKE VODE, PRAVNA OSOBA ZA UPRAVLJANJE VODAMA</registrationName>
                       <status>active</status>
                       <streetName>ĐURE ŠPORERA 3</streetName>
               </Receiver>
               <Receiver>
                       <addressLine>SPLAVARSKA 2A, 31000, OSIJEK</addressLine>
                       <businessBranchName>VODNOGOSPODARSKI ODJEL ZA DUNAV I DONJU DRAVU</businessBranchName>
                       <cityName>OSIJEK</cityName>
                       <companyID>28921383001</companyID>
                       <country>REPUBLIKA HRVATSKA</country>
                       <endpointID>28921383001</endpointID>
                       <endpointIDSchemeID>9934</endpointIDSchemeID>
                       <isoCode>HR</isoCode>
                       <partyIdentificationID>9934:28921383001::HR99:02</partyIdentificationID>
                       <postalCode>31000</postalCode>
                       <registrationName>HRVATSKE VODE, PRAVNA OSOBA ZA UPRAVLJANJE VODAMA</registrationName>
                       <status>active</status>
                       <streetName>SPLAVARSKA 2A</streetName>
               </Receiver>
               <Receiver>
                       <addressLine>ŠETALIŠTE BRAĆE RADIĆA 22, 35000, SLAVONSKI BROD</addressLine>
                       <businessBranchName>VODNOGOSPODARSKI ODJEL ZA SREDNJU I DONJU SAVU</businessBranchName>
                       <cityName>SLAVONSKI BROD</cityName>
                       <companyID>28921383001</companyID>
                       <country>REPUBLIKA HRVATSKA</country>
                       <endpointID>28921383001</endpointID>
                       <endpointIDSchemeID>9934</endpointIDSchemeID>
                       <isoCode>HR</isoCode>
                       <partyIdentificationID>9934:28921383001::HR99:01</partyIdentificationID>
                       <postalCode>35000</postalCode>
                       <registrationName>HRVATSKE VODE, PRAVNA OSOBA ZA UPRAVLJANJE VODAMA</registrationName>
                       <status>active</status>
                       <streetName>ŠETALIŠTE BRAĆE RADIĆA 22</streetName>
               </Receiver>
               <Receiver>
                       <addressLine>ULICA GRADA VUKOVARA 220, 10000, ZAGREB</addressLine>
                       <businessBranchName>DIREKCIJA</businessBranchName>
                       <cityName>ZAGREB</cityName>
                       <companyID>28921383001</companyID>
                       <country>REPUBLIKA HRVATSKA</country>
                       <endpointID>28921383001</endpointID>
                       <endpointIDSchemeID>9934</endpointIDSchemeID>
                       <isoCode>HR</isoCode>
                       <partyIdentificationID>9934:28921383001::HR99:00</partyIdentificationID>
                       <postalCode>10000</postalCode>
                       <registrationName>HRVATSKE VODE, PRAVNA OSOBA ZA UPRAVLJANJE VODAMA</registrationName>
                       <status>active</status>
                       <streetName>ULICA GRADA VUKOVARA 220</streetName>
               </Receiver>
               <Receiver>
                       <addressLine>ULICA GRADA VUKOVARA 271, 10000, ZAGREB</addressLine>
                       <businessBranchName>VODNOGOSPODARSKI ODJEL ZA GORNJU SAVU</businessBranchName>
                       <cityName>ZAGREB</cityName>
                       <companyID>28921383001</companyID>
                       <country>REPUBLIKA HRVATSKA</country>
                       <endpointID>28921383001</endpointID>
                       <endpointIDSchemeID>9934</endpointIDSchemeID>
                       <isoCode>HR</isoCode>
                       <partyIdentificationID>9934:28921383001::HR99:05</partyIdentificationID>
                       <postalCode>10000</postalCode>
                       <registrationName>HRVATSKE VODE, PRAVNA OSOBA ZA UPRAVLJANJE VODAMA</registrationName>
                       <status>active</status>
                       <streetName>ULICA GRADA VUKOVARA 271</streetName>
               </Receiver>
       </GetFinaReceiverListMsg>
</response>


3.7.2 SendDocumentToFina

Send an existing invoice in public procurement to FINA.

To be able to send a document, you will need receiver data that you can retrieve by using GetFinaReceiverList method.

Request Parameters

documentParameter that holds document data. Mandatory data.
sendWithAttachmentsPossible values are "true" or "false". If set to true all user added attachments will be sent with the document. Optional data.
companyIDcompanyID of the receiver. Mandatory data.
partyIdentificationIDpartyIdentificationID of the receiver. Mandatory data.

Parameter document holds mandatory data:

typeDocument type. Supported values are SalesInvoice, AdvanceInvoice, CreditNote.
numberFull number of the document.
yearYear of the document.

Response values

StatusCode values are:

documentSentDocument was sent to FINA.
documentDeliveryFailedDocument was not sent due to problems.
documentDeliveryConfirmedDocument delivery was confirmed.
documentReceivalConfirmedDocument receival was confirmed.
documentRejectedByReceiverDocument was rejected by receiver.
documentRejectedByGatewayDocument was rejected by gateway.

SendingTransactionID > is a unique identifier of the sent document that was assigned and returned by FINA upon receival.
SendingResultMessage > is an additional message that holds an description. For instance if an error occurs its description will be added to this message.


Example request and response

POST /WebServicesHR/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="admin" md5pass="d2cc342653e944df15923698c6bdd1ac" token="A73A6E565E0842B8AE67B6D52BE8F2A0" />
       <method name="SendDocumentToFina">
               <parameter name="document">                     <!-- Mandatory -->
                       <type>SalesInvoice</type>               <!-- Mandatory -->
                       <number>141/0001/191</number>   <!-- Mandatory -->
                       <year>2019</year>                               <!-- Mandatory -->
               </parameter>
               <parameter name="sendWithAttachments" value="true"/>                            <!-- Optional -->
               <parameter name="companyID" value="87311810356"/>                                       <!-- Mandatory -->
               <parameter name="partyIdentificationID" value="9934:87311810356"/>      <!-- Mandatory -->
       </method>
</request>
____________________________________________________________________________

Response

<response status="ok">
       <SendDocumentToFinaMsg>
               <MsgTimestamp>2019-08-28T10:10:40</MsgTimestamp>
               <MsgText>Document was sent.</MsgText>
               <DocumentSendingLog>
                       <StatusCode>documentSent</StatusCode>
                       <SentTS>2019-08-27T13:27:44</SentTS>
                       <DeliveryConfirmedTS>2019-08-27T13:27:47</DeliveryConfirmedTS>
                       <SendingTransactionID>68991</SendingTransactionID>
               </DocumentSendingLog>
       </SendDocumentToFinaMsg>
</response>

In case the document was already sent to FINA:

<response status="ok">
       <SendDocumentToFinaMsg>
               <MsgTimestamp>2019-08-28T12:14:46</MsgTimestamp>
               <MsgText>Document was already sent to FINA.</MsgText>
               <DocumentSendingLog>
                       <StatusCode>documentDeliveryConfirmed</StatusCode>
                       <SentTS>2019-08-28T12:11:43</SentTS>
                       <DeliveryConfirmedTS>2019-08-27T13:27:50</DeliveryConfirmedTS>
                       <SendingTransactionID>68991</SendingTransactionID>
                       <SendingResultMessage>Zaprimljen</SendingResultMessage>
               </DocumentSendingLog>
       </SendDocumentToFinaMsg>
</response>

In case of an error:

<response status="ok">
       <SendDocumentToFinaMsg>
               <MsgTimestamp>2019-08-28T12:02:26</MsgTimestamp>
               <MsgText>Document delivery failed.</MsgText>
               <DocumentSendingLog>
                       <StatusCode>documentDeliveryFailed</StatusCode>
                       <SentTS>2019-07-29T08:58:47</SentTS>
                       <SendingResultMessage>eFINA - Sistemska greška na strani web servisa!</SendingResultMessage>
               </DocumentSendingLog>
       </SendDocumentToFinaMsg>
</response>

<response status="error">
       <error description="Document with requested parameters does not exist."></error>
</response>



3.7.3 GetDocumentStatusFromFina

Retrieves the status of an already sent document.

Request Parameters

documentParameter that holds document data. Mandatory data.

Parameter document holds mandatory data:

typeDocument type. Supported values are SalesInvoice, AdvanceInvoice, CreditNote.
numberFull number of the document.
yearYear of the document.

Example request and response

POST /WebServicesHR/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="admin" md5pass="d2cc342653e944df15923698c6bdd1ac" token="A73A6E565E0842B8AE67B6D52BE8F2A0" />
       <method name="GetDocumentStatusFromFina">
               <parameter name="document">                     <!-- Mandatory -->
                       <type>SalesInvoice</type>               <!-- Mandatory -->
                       <number>141/0001/191</number>   <!-- Mandatory -->
                       <year>2019</year>                               <!-- Mandatory -->
               </parameter>
       </method>
</request>
____________________________________________________________________________

Response

<response status="ok">
       <GetDocumentStatusFromFinaMsg>
               <MsgTimestamp>2019-08-28T10:10:40</MsgTimestamp>
               <MsgText>Document was sent.</MsgText>
               <DocumentSendingLog>
                       <StatusCode>documentSent</StatusCode>
                       <SentTS>2019-08-27T13:27:44</SentTS>
                       <DeliveryConfirmedTS>2019-08-27T13:27:47</DeliveryConfirmedTS>
                       <SendingTransactionID>68991</SendingTransactionID>
               </DocumentSendingLog>
       </GetDocumentStatusFromFinaMsg>
</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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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. 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.9.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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>Zagreb</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>89133749</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>HRK</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>HRK</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.9.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.9.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.

Example request and response

POST /WebServicesHR/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
               <city>Zagreb</city>                                             <!-- (Optional)
               <businessYear>2012</businessYear>                               <!-- (Optional)
               <purchaseOrder>13</purchaseOrder>                       <!-- (Optional)
               <warehouseCode>8956</warehouseCode>                     <!-- (Mandatory)
               <status>Issued</status>                                 <!-- (Optional)
               <costPosition>120</costPosition>                                <!-- (Optional)
               <deliveryMethod>Delivery method</deliveryMethod>        <!-- (Optional)
               <superDiscountPercentage>5</superDiscountPercentage>    <!-- (Optional)
               <supplierCode>123456</supplierCode>                     <!-- (Mandatory)
               <supplierDeliveryNote>11</supplierDeliveryNote>         <!-- (Optional)
               <supplierDeliveryNoteDate>2012-09-26</supplierDeliveryNoteDate>
               <remarks>Remark on goods receipt</remarks>              <!-- (Optional)
               <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.9.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.9.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.9.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.9.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 code, or supplier 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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.9.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)

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="GoodsReceiptSendByEmail">
       <parameter name="number" value="2012-00014" />
       <parameter name="date" type="Date" value="2012-09-26" />
       <parameter name="sender" value="ivan@novak.com"/>
       <parameter name="recipient" value="zoran@novak.com,zlatko@novak.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"/>
</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.9.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.9.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.9.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.9.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.10. 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.10.1 InternalMovementGet

Get internal movements by number.

Parameters

numberNumber of 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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.10.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
       <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.10.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.10.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.11. Partner API

PartnerGetByIDGet partner by partner ID.
PartnerGetByCodeGet partner by partner's code.
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.
PartnerGetByDocumentIDGet document from partner by document ID.
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.11.1 PartnerGetByID

Get partner by partner ID.

Parameters

IDPartner ID (personalID accepted too)

Example request and response for a natural person


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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="PartnerGetByID">
       <parameter name="ID" value="59318506371" />
</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>
               <personalID>12710048305</personalID>    <!-- Partner OIB
               <ID>0108988710054</ID>                                  <!-- Partner ID
               <partnerCode>666009</partnerCode>               <!-- Partner code.
               <companyType></companyType>             <!-- Type of company. (Contractor, Ltd, Plc, Co, Organization, Subsidiary, Association, Direction, Unit, Division, Edu, Gov, Charity, Cooperative)
               <vatRegistration>None</vatRegistration>         <!-- VAT reg type (Unknown, None, RegisteredR1, RegisteredR2)
               <dateOfRegistration></ dateOfRegistration>              <!-- Company establishment date
               <branchClassification></branchClassification>           <!-- For legal person - Branch classification
               <municipalityCode>037</municipalityCode>
               <municipalityName>BRINJE</municipalityName>
               <firstName>Tester</firstName>                           <!-- For legal person this is the first name of contact person
               <lastName>7 PartnerEmployee</lastName>                          <!-- For legal person is the last name of contact person
               <gender>male</gender>                                           <!-- Type of person sex. (male, female, unknown)
               <maritalStatus>concubinance</maritalStatus>                     <!-- For natural person   (single, married, widowed, concubinance)
               <mobilePhone>555-454123</mobilePhone>
               <fax></fax>
               <dateOfBirth>1945-08-07</dateOfBirth>                           <!-- For natural person only   birth date
               <eMail>milan@kovac.com,zlatko@kovac.com</eMail>         <!-- comma delimited list of emails
               <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>
                       <amountOfBusTicket>20.00</amountOfBusTicket>
                       <costPosition></costPosition>
                       <distanceFromHomeKm>12.00</distanceFromHomeKm>
                       <ownVehicleModel>audi</ownVehicleModel>
                       <ownVehicleRegNr>mb es-123</ownVehicleRegNr>
                       <status>active</status>
                       <transportRelationToWork>mb-sb</transportRelationToWork>
                       <Employments>
                               <Employment>
                                       <beginDate>2000-02-01</beginDate>
                                       <employmentContractEndDate>2024-02-01</employmentContractEndDate>
                                       <employmentType>craftsman</employmentType>
                                       <grossSalary>8123.0000</grossSalary>
                                       <grossSalaryCalculationFactor>1.020000</grossSalaryCalculationFactor>
                                       <grossSalaryCurrency>HRK</grossSalaryCurrency>
                                       <isHandicappedPerson>0</isHandicappedPerson>
                                       <jobTitle>delavec</jobTitle>
                                       <previousWorkExperienceDays>1</previousWorkExperienceDays>
                                       <previousWorkExperienceMonths>2</previousWorkExperienceMonths>
                                       <previousWorkExperienceYears>3</previousWorkExperienceYears>
                                       <primaryEmployment>0</primaryEmployment>
                                       <sickLeaveOver42hourPrice>2.0000</sickLeaveOver42hourPrice>
                                       <sickLeaveOver42hourPriceCurrency>EUR</sickLeaveOver42hourPriceCurrency>
                                       <workingHoursPerWeek>40.00</workingHoursPerWeek>
                               </Employment>
                       </Employments>
               </EmployeeData>
               <BankAccounts>
                       <BankAccount>
                               <accountNumber>2340009-1110423406</accountNumber>
                               <accountReference>99</accountReference>
                               <bank>NLB</bank>
                               <currency>HRK</currency>
                               <description>Testni racun za partner create 2</description>
                               <IBAN>HR56340001001808119</IBAN>
                               <status>Active</status>
                               <SWIFT>LJBASI2X</SWIFT>
                       </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.11.2 PartnerGetByCode

Get partner by partner code.

Parameters

partnerCodePartner code.

Example request and response for a legal person

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="PartnerGetByCode">
       <parameter name="partnerCode" value="666000" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
       <Partner>
               <personalID>12710048305</personalID>
               <partnerCode>666000</partnerCode>
               <vatRegistration>RegisteredR1</vatRegistration>
               <branchClassification>G47.762</branchClassification>
               <companyName>6 Partner Buyer Supplier</companyName>
               <companyType>Organization</companyType>
               <eMail>info@neupra.de,micka@kovac.com,zlatko@kovac.com</eMail>
               <firstName>Micka</firstName>
               <lastName>Kovac</lastName>
               <mobilePhone>0511 3423-0</mobilePhone>
               <Addresses>
                       <Address>
                               <city>Oslo</city>
                               <country>NO</country>
                               <postalCode>0182</postalCode>
                               <street>Brennerivn.11</street>
                               <type>Invoicing</type>
                       </Address>
                       <Address>
                               <city>Hannover</city>
                               <country>DE</country>
                               <fax>0511 3423-200</fax>
                               <postalCode>30169</postalCode>
                               <street>Bleichstra e 12</street>
                               <telephone>0511 3423-0</telephone>
                               <type>Delivery</type>
                       </Address>
                       <Address>
                               <city>Oslo</city>
                               <country>NO</country>
                               <fax>(47) 22 11 30 33</fax>
                               <postalCode>0182</postalCode>
                               <street>Brennerivn.11</street>
                               <telephone>(47) 22 11 30 30</telephone>
                               <type>Primary</type>
                       </Address>
               </Addresses>
               <BuyerData>
                       <buyerCode>444000</buyerCode>
                       <costPosition></costPosition>
                       <discountPercentage>5.000</discountPercentage>
                       <numberOfDaysForPayment>20</numberOfDaysForPayment>
                       <numberOfDaysForPaymentBaseDate>fromDocumentDate</numberOfDaysForPaymentBaseDate>
                       <status>trustworthyBuyer</status>
               </BuyerData>
               <SupplierData>
                       <acceptsOrdersReceivedAtLeastDaysInAdvance>30</acceptsOrdersReceivedAtLeastDaysInAdvance>
                       <costPosition></costPosition>
                       <numberOfDaysForPayment>20</numberOfDaysForPayment>
                       <numberOfDaysForPaymentBaseDate>fromDocumentDate</numberOfDaysForPaymentBaseDate>
                       <status>supplierOnBlackList</status>
                       <supplierCode>555000</supplierCode>
               </SupplierData>
               <BankAccounts>
                       <BankAccount>
                               <accountNumber>2340009-1110423406</accountNumber>
                               <accountReference>99</accountReference>
                               <bank>NLB</bank>
                               <currency>HRK</currency>
                               <description>Testni racun za partner create 2</description>
                               <IBAN>HR56340001001808119</IBAN>
                               <status>Active</status>
                               <SWIFT>253</SWIFT>
                       </BankAccount>
               </BankAccounts>
       </Partner>

</response>


3.11.3 PartnerCreate

Create a new partner (for details about partner data structure see API for PartnerGetByID)

Parameters

partnerPartner's data in xml substructure.

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="PartnerCreate">
       <parameter name="Partner">
        <companyName>Tvrtka d.o.o </companyName>
               <personalID>59318506371</personalID>
               <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>
                       <BankAccount></BankAccount>
               </BankAccounts>
                <ContactPersons>     <!-- Contact persons where structure is the same as displayed in abowe example on 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.11.4 PartnerUpdate

Update existing partner.

Parameters

partnerPartner's data in xml substructure.

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="PartnerUpdate">
       <parameter partner>
                <partnerCode>666009</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.11.5 PartnerDelete

Delete partner.

Parameters

IDPartner's ID or partner code or oib.

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="PartnerDelete">
        <parameter name="ID" value="7369" />
</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.11.6 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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.11.7 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 (default value is 'all'). Possible types are:
  • supplier 
  • buyer 
  • 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
personalIDPersonal ID - OIB
taxNumberTax number
streetStreet
postalCodeOrCityPostal code or City
eMailEmail
mobileOrPhoneNumberMobile or phone number

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="PartnerList">
       <parameter name="searchKey" type="String" value="Tvrtka D O O" />
       <parameter name="postalCodeOrCity" type="String" value="Zagreb" />
        <parameter name="street" type="String" value="Vladanova" />
       <parameter name="partnerCode" type="String" value="666009" />
       <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.11.8 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
personalIDPersonal ID - OIB
streetStreet
postalCodeOrCityPostal code or City
statusStatus of the buyers to be answered. It is optional and possible types are:
  • defaultBuyer 
  • buyerOnBlackList 
  • trustworthyBuyer 
  • buyerDoesNotExistAnymore 

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="PartnerListBuyer">
       <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.11.9 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
personalIDPersonal ID - OIB
streetStreet
postalCodeOrCityPostal code or City
statusStatus of the suppliers to be answered. It is optional and possible types are:
  • defaultSupplier 
  • supplierOnBlackList 
  • trustworthySupplier 
  • supplierDoesNotExistAnymore 

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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 PartnerGetByCode
       </Partner>
       <Partner>
       </Partner>
       ...
</response>


3.11.10 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
personalIDPersonal ID - OIB
statusStatus of the employees. Possible types are:
  • active 
  • inactive 

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="PartnerListEmployees">
       <parameter name="partnerCode" type="String" value="666009" />
</method>
</request>

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


3.11.11 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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="PartnerBuyerCreditLimitGet">
       <parameter name="partnerCode" value="100011" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <buyerCreditLimit>EUR 20,00</buyerCreditLimit>
       <unpaidInvoicesAmount>EUR 16.278,76</unpaidInvoicesAmount>
       <postedDebt>EUR 5.167,96</postedDebt>
</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.11.12 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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="PartnerGetByDocumentID">
       <parameter name="documentID" value="34:1234" />
</method>
</request>


3.11.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.11.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.11.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.11.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.11.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.11.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.11.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.12. 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.12.1 ProductGetByCode

Get product by productCode.

Parameters

productCodeProduct code.

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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 - 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)
               <nameEnglish></nameEnglish>                             <!-- (Optional)
               <descriptionEnglish></descriptionEnglish>               <!-- (Optional)
               <nameGerman></nameGerman>                               <!-- (Optional)
               <descriptionGerman></descriptionGerman>                 <!-- (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)
       </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.12.2 ProductCreate

Create new product. (for product's data structure look in API for ProductGetByCode). Parameter productCode is optional (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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="ProductCreate">
       <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>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)
               <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.12.3 ProductUpdate

Update existing product.

Parameters

productProduct's data in xml substructure

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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)
               <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>                        <!-- (Mandatory)
               <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.12.4 ProductPriceCalculationUpdate

Update product's price calculation.

Parameters

productCodeUnique identifier for product.
applyPricesToArticleDecide if inventory, gross and sales prices are applyed 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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
       <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.12.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 applyed 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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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">
       <36457559>Product for code 36457559 successfully imported.</36457559>
</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.12.6 ProductDelete

Delete product.

Parameters

productCodeUnique identifier for product.

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.12.7 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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.12.8 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 partners
  • createOnly  Skip import for existing partners
  • updateOnly  Skip import of new partners
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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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">
       <36457559>Product for code 36457559 successfully imported.</36457559>
</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.12.9 ProductList

Get list of products for specified criteria.

Parameters

productCodeProduct's code.
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)

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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>

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.12.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.12.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.12.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
       <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.12.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.12.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.12.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.12.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.13. 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.13.1 ProductGroupGetByCode

Get product group by product group code.

Parameters

ProductGroupCodeProduct group code.

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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>
       </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.13.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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
               <parentProductGroupCode>PG2521A</parentProductGroupCode>                    <!-- 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="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.13.3 ProductGroupUpdate

Update existing ProductGroup.

Parameters

ProductGroupProduct group's data in xml substructure

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.13.4 ProductGroupDelete

Delete ProductGroup.

Parameters

ProductGroupCodeUnique identifier for ProductGroup.

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.13.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.14. 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.14.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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>Rijeka</city>
               <costPosition>120</costPosition>
               <remarks>Remark on Purchase order</remarks>
               <salesQuoteReference>SQ2010-000001</salesQuoteReference>
               <status>Opened</status>
               <superDiscountPercentage>5.0000</superDiscountPercentage>
               <supplierCity>Split</supplierCity>
               <supplierCountry>HR</supplierCountry>
               <supplierName>Test supplier</supplierName>
               <supplierPostalCode>1234</supplierPostalCode>
               <supplierStreet>Test ul. 22</supplierStreet>
               <supplierTaxNumber>95985352</supplierTaxNumber>
               <supplierVatRegistration>Registered</supplierVatRegistration>
               <totalAmount>22.430</totalAmount>
               <totalCurrency>EUR</totalCurrency>
               <totalDiscount>1.52</totalDiscount>
               <totalNetAmount>20.48</totalNetAmount>
               <totalVatAmountLowerRate2>0.00</totalVatAmountLowerRate2>
               <totalVatAmountNormalRate>0.00</totalVatAmountNormalRate>
               <totalVatAmountLowerRate>1.95</totalVatAmountLowerRate>
               <totalVatAmountZeroRate>0.0</totalVatAmountZeroRate>
               <totalVatBaseAmountLowerRate2>0.00</totalVatBaseAmountLowerRate2>
               <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.14.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.14.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-DD
unit String Optional
vatTransactionType Enum 0-23 (0 is default) Optional

Supported values for vatTransactionType are:

0 - Taxable transactions of goods and services in Croatia,
1 - Zero-rated transaction - with the right to deduct input VAT,
2 - Zero-rated transaction - without the right to deduct input VAT (domestic),
3 - Transactions excluded from VAT - Other,
4 - Exempt supplies relating to international transport,
7 - Transactions exempt from VAT - not for VAT records,
10 - Transitory item - tourist residence tax,
11 - Transitory item - tourist travel insurance,
12 - Transitory item - other,
13 - Transitory item - return fee for packaging,
14 - Deliveries of goods and services in the Republic of Croatia for which VAT is charged to recipient,
15 - Transactions excluded from VAT - supplies of goods at distance,
16 - Transactions excluded from VAT - services performed in EU,
17 - Transactions excluded from VAT - services performed for tax payers without seat in RH,
18 - Transactions excluded from VAT - deliveries of new means of transport in EU,
19 - Transactions excluded from VAT - supplies of goods in EU,
20 - Transactions excluded from VAT - assembly and installation of goods in EU,
21 - Transactions excluded from VAT - trilateral delivery in EU,
22 - Transactions excluded from VAT - export of goods outside of EU,
23 - Transactions excluded from VAT - supplies of goods in EU customs procedures.
25 - Transactions excluded from VAT - sold goods to tax payers without seat in RH,

Parameters

PurchaseOrderComplex parameter with data tags

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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)
               <remarks>Remark on Purchase order</remarks>             <!-- (Optional)
               <orderedByContactPerson>name and surname</orderedByContactPerson>       <!-- (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
               <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>Ivan Novak</supplierName>         <!-- (Optional)
               <supplierTaxNumber>02169711</supplierTaxNumber> <!-- (Optional)
               <supplierVatRegistration>true</supplierVatRegistration> <!-- (true, false)
               <supplierEMail>ivan@novak.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 and Croatian
               <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.14.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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>Zagreb</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>Ivan novak</supplierName>         <!-- (Optional)
               <supplierTaxNumber>02169711</supplierTaxNumber> <!-- (Optional)
               <supplierVatRegistration>true</supplierVatRegistration> <!-- (true, false)
               <supplierEMail>ivan@novak.com</supplierEMail>   <!-- (Optional)
               <supplierStreet>Iztokova 22</supplierStreet>            <!-- (Optional)
               <supplierPostalCode>20000</supplierPostalCode>  <!-- (Optional)
               <supplierCity>Split</supplierCity>                      <!-- (Optional)
               <supplierCountry>HR</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.14.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.14.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.14.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 code, or supplier 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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.14.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)

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="PurchaseOrderSendByEmail">
       <parameter name="number" value="8/2011" />
       <parameter name="date" type="Date" value="2011-01-13" />
       <parameter name="sender" value="ivan@novak.com"/>
       <parameter name="recipient" value="zoran@novak.com,zlatko@novak.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"/>
</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.14.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.14.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.14.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.14.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.15. SalesInvoice API

Please check API reference documentation for the SalesInvoiceAPI here https://e-racuni.hr/rhr/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.

3.15.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/WebServicesHR/API
Content-Type: application/json

{
       "username": "IVAN",
       "md5pass": "1234567890a1c85dc0c1234218acb900",
       "token": "1234562ADC3A123001234D00B0C71E0EC",
       "method": "SalesInvoiceCreate",
       "parameters": {
               "SalesInvoice": {
                       "dateOfSupplyFrom": "2022-10-13",
                       "buyerName": "Ivan Novak",
                       "buyerStreet": "Ilica 123",
                       "buyerPostalCode": "10000",
                       "buyerCity": "Zagreb",
                       "buyerEMail": "ivan.novak@gmail.com",
                       "buyerPhone": "01/1234567",
                       "Items": [
                               {
                                   "description": "Usluga jedan",
                                   "quantity": 5.0,
                                   "unit": "sat",
                                   "netPrice": 100.0
                               },
                               {
                                   "description": "Usluga dva",
                                   "quantity": 3,
                                   "unit": "sat",
                                   "netPrice": 50.0
                               }
                       ]
               }
       }
}


3.15.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/WebServicesHR/API
Content-Type: application/json

{
       "username": "IVAN",
       "md5pass": "1234567890a1c85dc0c1234218acb900",
       "token": "1234562ADC3A123001234D00B0C71E0EC",
       "method": "SalesInvoiceCreate",
       "parameters": {
               "SalesInvoice": {
                       "dateOfSupplyFrom": "2022-10-13",
                       "buyerName": "Ivan Novak",
                       "buyerEMail": "ivan.novak@gmail.com",
                       "type": "Retail",
                       "methodOfPayment": "Stripe",
                       "businessUnit": "0000",
                       "Items": [
                               {
                                       "description": "Test item for purchase, general VAT rate",
                                       "quantity": 1.0,
                                       "unit": "kom",
                                       "price": 100.0
                               },
                               {
                                       "description": "Test item for purchase, lower VAT rate",
                                       "quantity": 1.0,
                                       "unit": "kom",
                                       "price": 250.0,
                                       "vatPercentage": 13
                               },
                               {
                                       "description": "Test item for zero rated services to EU (VAT reverse charge)",
                                       "quantity": 1.0,
                                       "unit": "kom",
                                       "price": 100.0,
                                       "vatTransactionType": "16"
                               }
                       ]
               }
       }
}


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.15.3 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/WebServicesHR/API
Content-Type: application/json

{
       "username": "IVAN",
       "md5pass": "1234567890a1c85dc0c1234218acb900",
       "token": "1234562ADC3A123001234D00B0C71E0EC",
       "method": "SalesInvoiceCreate",
       "parameters": {
               "SalesInvoice": {
                       "dateOfSupplyFrom": "2022-10-13",
                       "buyerName": "Ivan Novak",
                       "buyerEMail": "ivan.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.15.4 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/WebServicesHR/API
Content-Type: application/json

{
       "username": "IVAN",
       "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/WebServicesHR/API-CLI/SalesInvoiceGetPDF \
 -u IVAN:12345678C3A70D0012312312312312_12312312312312312312312 \
 -d documentID='"60:3913326"' \
 -d downloadFile=true


3.15.5 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.

The 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

 

3.16. 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 invoice 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.16.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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>Zagreb</buyerCity>
               <buyerName>Company d.o.o. </buyerName>
               <buyerPostalCode>2000</buyerPostalCode>
               <buyerStreet>Testna c. 37</buyerStreet>
               <buyerTaxNumber>HR31476546</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>
               <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>
               <totalVatAmountLowerRate2>0.00</totalVatAmountLowerRate2>
               <totalVatAmountNormalRate>0.18</totalVatAmountNormalRate>
               <totalVatAmountLowerRate>4.64</totalVatAmountLowerRate>
               <totalVatAmountZeroRate>0.0</totalVatAmountZeroRate>
               <totalVatBaseAmountLowerRate2>0.00</totalVatBaseAmountLowerRate2>
               <totalVatBaseAmountNormalRate>0.82</totalVatBaseAmountNormalRate>
               <totalVatBaseAmountLowerRate>48.84</totalVatBaseAmountLowerRate>
               <totalVatBaseAmountZeroRate>0.00</totalVatBaseAmountZeroRate>
               <vatOutgoingDocumentVatClause>Registered</vatOutgoingDocumentVatClause>
               <type>Gross</type>
               <introductionText>introduction text</introductionText>
               <vatCountryIsoCode>SI</vatCountryIsoCode>
               <Address>                                  
                       <city>Zagreb</city>
                       <country>HR</country>
                       <postalCode>10000</postalCode>
                       <street>Ilica 10</street>
                       <type>Delivery</type>
               </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.16.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.16.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 transactions of goods and services in Croatia,
1 - Zero-rated transaction - with the right to deduct input VAT,
2 - Zero-rated transaction - without the right to deduct input VAT (domestic),
3 - Transactions excluded from VAT - Other,
4 - Exempt supplies relating to international transport,
7 - Transactions exempt from VAT - not for VAT records,
10 - Transitory item - tourist residence tax,
11 - Transitory item - tourist travel insurance,
12 - Transitory item - other,
13 - Transitory item - return fee for packaging,
14 - Deliveries of goods and services in the Republic of Croatia for which VAT is charged to recipient,
15 - Transactions excluded from VAT - supplies of goods at distance,
16 - Transactions excluded from VAT - services performed in EU,
17 - Transactions excluded from VAT - services performed for tax payers without seat in RH,
18 - Transactions excluded from VAT - deliveries of new means of transport in EU,
19 - Transactions excluded from VAT - supplies of goods in EU,
20 - Transactions excluded from VAT - assembly and installation of goods in EU,
21 - Transactions excluded from VAT - trilateral delivery in EU,
22 - Transactions excluded from VAT - export of goods outside of EU,
23 - Transactions excluded from VAT - supplies of goods in EU customs procedures.
25 - Transactions excluded from VAT - sold goods to tax payers without seat in RH,

Parameters

SalesOrderComplex parameter with data tags

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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
               <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</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 specified it will override master buyer data in document
               <buyerName>ivan novak</buyerName>               
               <buyerTaxNumber>02169711</buyerTaxNumber>       <!-- (Optional)
               <buyerVatRegistration>None</buyerVatRegistration>       <!-- (None, Unknown, RegisteredR1, RegisteredR2)
               <buyerEMail>ivan@novak.com</buyerEMail>                 <!-- (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: Possible values: Registered, NotRegistered, RegisteredVATr2
               <methodOfPayment>bankTransfer</methodOfPayment> <!-- Possible ways of payment: Unknown, BankTransfer, Cash, Cheques, EurocardMastercard, Visa, Amex, Diners, ConsumerLoanAneks, ConsumerLoanDiners, InGoods, CashOnDelivery, CashOnDeliveryCourierService, CreditCard, PayPal, Maestro, DirectDebit, Compensation, Other
               <documentLanguage>Slovene</documentLanguage> <!-- (Optional) Possible document language: Slovene, English, German and Croatian
               <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: 15 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>Zagreb</city>
                       <country>HR</country>
                       <postalCode>10000</postalCode>
                       <street>Ilica 10</street>
                       <type>Delivery</type>
               </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>
                               <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 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>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.16.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.16.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.16.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.16.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.16.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
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 
  • Opened 
  • Processing 
  • PartialDelivery 
  • CompletedDelivery 
  • CompletedDeliveryPartialInvoice 
  • CompletedDeliveryAndSettledInvoice 
  • Cancelled 
  • Reversed 
  • OnHold 
  • Shipped 
  • CorrectionPending 
  • ReservedStock 

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.16.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)

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="SalesOrderSendByEmail">
       <parameter name="number" value="12/2009" />
       <parameter name="date" type="Date" value="2010-01-13" />
       <parameter name="sender" value="ivan@novak.com"/>
       <parameter name="recipient" value="zoran@novak.com,zlatko@novak.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"/>
</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.16.10 SalesOrderPaymentRecordAdd

Add payment record on sales order.

Parameters

numberDocument number
dateDocument date (optional additional document identification)
paymentDatePayment date
paymentAmountPayment amount
paymentMethodForInvoicePayment method for sales order
  • BankPaymentOrder 
  • Cash 
  • CreditCard 
  • Cheque 
  • DebitNote 
  • CreditNote 
  • Cancellation 
  • PayPal 
  • InGoods 
  • Compensation 
  • Other 
paymentRemarkPayment remark (optional)
paymentCurrencyPayment currency (optional)

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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="paymentAmoutn" value="50"/>
       <parameter name="paymentMethodForInvoice" value="Cash"/>
       <parameter name="paymentRemark" value="PAyment record on sales invoice 2014-05-15"/>
       <parameter name="paymentCurrency" value="HRK"/>
</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.16.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
       <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.16.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.16.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.16.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.16.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.17. 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
SalesQuoteCopyCopy existing Sales quote
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.17.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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>
               <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>ivan novak</buyerName>               <!-- buyer name
               <buyerTaxNumber>02169711</buyerTaxNumber>       <!-- buyer tax number
               <buyerVatRegistration>true</buyerVatRegistration>       <!-- (true, false)
               <buyerEMail>ivan@novak.com</buyerEMail>                 <!-- (Optional)
               <buyerStreet>Cesta 22</buyerStreet>                     <!-- (Optional)
               <buyerPostalCode>20000</buyerPostalCode>                <!-- (Optional)
               <buyerCity>Zagreb</buyerCity>                   <!-- (Optional)
               <buyerCountry>SI</buyerCountry>                 <!-- (Optional)
               <totalAmount>319.800</totalAmount>
               <totalCurrency>EUR</totalCurrency>
               <totalDiscount>0.0</totalDiscount>
               <totalNetAmount>288.34</totalNetAmount>
               <totalVatAmountLowerRate2>0.00</totalVatAmountLowerRate2>
               <totalVatAmountNormalRate>22.18</totalVatAmountNormalRate>
               <totalVatAmountLowerRate>9.28</totalVatAmountLowerRate>
               <totalVatAmountZeroRate>0.0</totalVatAmountZeroRate>
               <totalVatBaseAmountLowerRate2>0.00</totalVatBaseAmountLowerRate2>
               <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>SI</vatCountryIsoCode>
               <warehouseCode>00001</warehouseCode>
               <Address>                                  
                       <city>Zagreb</city>
                       <country>HR</country>
                       <postalCode>10000</postalCode>
                       <street>Ilica 10</street>
                       <type>Delivery</type>
               </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>testna</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.17.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
markDocumentAsSentMarks document as sent.
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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.17.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 transactions of goods and services in Croatia,
1 - Zero-rated transaction - with the right to deduct input VAT,
2 - Zero-rated transaction - without the right to deduct input VAT (domestic),
3 - Transactions excluded from VAT - Other,
4 - Exempt supplies relating to international transport,
7 - Transactions exempt from VAT - not for VAT records,
10 - Transitory item - tourist residence tax,
11 - Transitory item - tourist travel insurance,
12 - Transitory item - other,
13 - Transitory item - return fee for packaging,
14 - Deliveries of goods and services in the Republic of Croatia for which VAT is charged to recipient,
15 - Transactions excluded from VAT - supplies of goods at distance,
16 - Transactions excluded from VAT - services performed in EU,
17 - Transactions excluded from VAT - services performed for tax payers without seat in RH,
18 - Transactions excluded from VAT - deliveries of new means of transport in EU,
19 - Transactions excluded from VAT - supplies of goods in EU,
20 - Transactions excluded from VAT - assembly and installation of goods in EU,
21 - Transactions excluded from VAT - trilateral delivery in EU,
22 - Transactions excluded from VAT - export of goods outside of EU,
23 - Transactions excluded from VAT - supplies of goods in EU customs procedures.
25 - Transactions excluded from VAT - sold goods to tax payers without seat in RH,

Parameters

SalesQuoteComplex parameter with data tags

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="SalesQuoteCreate">
       <parameter name="SalesQuote">
               <date>2010-01-13</date>                         <!-- document date
               <validUntil>2010-02-13</validUntil>                     <!-- document valid until
               <type>Retail</type>                                     <!-- type of pricing optional (default gross)
               <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</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 specified it will override master buyer data in document
               <buyerName>ivan novak</buyerName>               
               <buyerTaxNumber>02169711</buyerTaxNumber>       <!-- (Optional)
               <buyerVatRegistration>true</buyerVatRegistration>       <!-- (true, false)
               <buyerEMail>ivan@novak.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>
               <vatTransactionType>0</vatTransactionType>              <!-- (Optional) default is 0
               <vatOutgoingDocumentVatClause>Registered</vatOutgoingDocumentVatClause> <!-- (Optional) Possible values: Registered, NotRegistered, RegisteredVATr2              <!-- (Optional)
               <methodOfPayment>bankTransfer</methodOfPayment> <!-- Possible ways of payment: Unknown, BankTransfer, Cash, Cheques, EurocardMastercard, Visa, Amex, Diners, ConsumerLoanAneks, ConsumerLoanDiners, InGoods, CashOnDelivery, CashOnDeliveryCourierService, CreditCard, PayPal, Maestro, DirectDebit, Compensation, Other
               <documentLanguage>Slovene</documentLanguage> <!-- (Optional) Possible document language: Slovene, English, German and Croatian
               <printingTemplate>Predloga2</printingTemplate> <!-- (Optional) Setting printing template for document, posible values is code of uploaded templates in web app
               <vatCountryIsoCode>SI</vatCountryIsoCode> <!-- Mandatory if using vatTransactionTypes: 15 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>Zagreb</city>
                       <country>HR</country>
                       <postalCode>10000</postalCode>
                       <street>Ilica 10</street>
                       <type>Delivery</type>
               </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) 0 is default
                       </Item>
                       <Item>                                          <!-- Item specified for good or service
                               <position>2</position>      <!-- position of item
                               <description>Transport of goods</description>
                               <price>11.00</price>
                               <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>
                       </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 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.17.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.17.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.17.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
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 

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.17.7 SalesQuoteCopy

Copy existing Sales quote. Parameter number, documentID or documentIdBarCode must be contained to be able to identify document which is to be copied.

Parameters

apiTransactionIdThe ID of the document create/update transaction. Transaction ID is used to ensure that the operation will be executed only once. If calling the method with the same transaction ID twice, the server will answer the same result as the first time without repeating the transaction/operation. By assigning a transaction ID you will ensure that the document associated with a certain transaction originating from the outside system will be created/updated once and only once.
SalesQuoteSales quote data for document being created. See complex type description. Define only properties that you want to be different then on original document. This parameter is mandatory, sou you need at least one attribute of this object (for example attribute status)
numberDocument number of original document being copied. You can use either sequential document number (example: 2), or full formatted document number (example: 2016-00002)
dateDocument date of original document being copied
costPositionCost position / cost center of original document being copied
businessUnitBusiness unit ID of original document being copied
documentIDUnique ID of the document of original document being copied. If this parameter is specified then only one document will be returned and this parameter takes precedence of all other parameters (any additional parameters are ignored)
documentIdBarCodeBar code ID of the document of original document being copied. This parameter can be used by a 3rd party application to fetch document data via API using a bar code scanner on printed documents. If this parameter is specified then only one document will be returned and this parameter takes precedence of all other parameters except documentID (any additional parameters are ignored)
itemsOperationIf items are included in parameter SalesQuote then this parameter tells what to do with these items. Items can be either added to the copy, or the copied items will be removed and replaced by the specified list of items. By default items are replaced. Possible values:
  • addItems - add new items to document 
  • replaceItems - remove existing items and add new items to document 

Example request and response

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

{
        "username": "IVAN",
        "md5pass": "8b29582ce0a1c85dc0c574d218acb900",
        "token": "5CB4C65D76CC0D00925FB99F0BD03081",
        "method": "SalesQuoteCopy",
        "parameters": {
                "SalesQuote": {
                       "status": "issued"
               },
                "number": "2024-00016"
        }
}

Response
{
       "response":
       {
               "status": "ok",
               "result":
                       {
                               "date": "2024-03-29",
                               "documentID": "42:530544",
                               "number": "2024-00017",
                               "paymentReference": "01 224170"
                       }
       }
}





3.17.8 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)

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="SalesQuoteSendByEmail">
       <parameter name="number" value="12/2009" />
       <parameter name="date" type="Date" value="2010-01-13" />
       <parameter name="sender" value="ivan@novak.com"/>
       <parameter name="recipient" value="zoran@novak.com,zlatko@novak.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"/>
</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 SalesQuotePaymentRecordAdd

Add payment record on sales quote.

Parameters

numberDocument number
dateDocument date (optional additional document identification)
paymentDatePayment date
paymentAmountPayment amount
paymentMethodForInvoicePayment method for sales quote
  • BankPaymentOrder 
  • Cash 
  • CreditCard 
  • Cheque 
  • DebitNote 
  • CreditNote 
  • Cancellation 
  • PayPal 
  • InGoods 
  • Compensation 
  • Other 
paymentRemarkPayment remark (optional)
paymentCurrencyPayment currency (optional)

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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="paymentAmoutn" value="50"/>
       <parameter name="paymentMethodForInvoice" value="Cash"/>
       <parameter name="paymentRemark" value="PAyment record on sales invoice 2014-05-15"/>
       <parameter name="paymentCurrency" value="HRK"/>
</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.17.10 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 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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
       <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.17.11 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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.17.12 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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.17.13 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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.17.14 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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.18. 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.18.1 TABookingGet

Get a travel agency reservation/booking by document number or by a combination the document number and date.

Parameters

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

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="TABookingGet">
       <parameter name="number" value="2016-00001" />
       <parameter name="date" type="Date" value="2016-12-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">
       <TABooking>
               <accommodationDescription>Hotel Arena</accommodationDescription>
               <bookingPayerCity>Zagreb</bookingPayerCity>
               <bookingPayerCountry>HR</bookingPayerCountry>
               <bookingPayerName>Ivan Novak</bookingPayerName>
               <bookingPayerPostalCode>10000</bookingPayerPostalCode>
               <bookingPayerStreet>Ilica 9</bookingPayerStreet>
               <bookingPayerPassportNumber>123456789</bookingPayerPassportNumber>
               <bookingPayerTaxNumber>87311810356</bookingPayerTaxNumber>
               <businessYear>2016</businessYear>
               <cancellationRiskEnsurance>true</cancellationRiskEnsurance>
               <cancellationRiskEnsuranceAmount>250.000</cancellationRiskEnsuranceAmount>
               <commissionAbsoluteAmount>0.00</commissionAbsoluteAmount>
               <commissionAmount>0.00</commissionAmount>
               <commissionPercent>0.000</commissionPercent>
               <costPosition>100</costPosition>
               <dateFrom>2016-12-18</dateFrom>
               <dateTo>2017-01-03</dateTo>
               <dateOfIssue>2016-12-15</dateOfIssue>
               <destinationDescription>Dubrovnik</destinationDescription>
               <documentDate>2016-12-15</documentDate>
               <firstService>DINNER</firstService>
               <lastService>BREAKFAST</lastService>
               <number>2016-00001</number>
               <numberOfDays>16</numberOfDays>
               <organizer>OrganizerNameString</organizer>
               <salesService>Prodajna služba</salesService>
               <services>2xALL</services>
               <status>Confirm</status>
               <subscriber>Naručitelj</subscriber>
               <totalCurrency>HRK</totalCurrency>
               <Services>
                       <Service>
                               <amount>200.00</amount>
                               <baseForCommission>false</baseForCommission>
                               <dateFrom>2017-01-01</dateFrom>
                               <dateTo>2017-01-05</dateTo>
                               <description>PPO</description>
                               <numberOfDays>16</numberOfDays>
                               <numberOfPerson>1</numberOfPerson>
                               <position>1</position>
                               <quantity>1</quantity>
                               <totalAmount>200.00</totalAmount>
                               <vatPercentage>25</vatPercentage>
                               <vatTransactionType>26</vatTransactionType>
                       </Service>
                       <Service>
                               <amount>2.00</amount>
                               <baseForCommission>false</baseForCommission>
                               <dateFrom>2017-01-01</dateFrom>
                               <dateTo>2017-01-05</dateTo>
                               <description>Boravišna pristojba</description>
                               <numberOfDays>16</numberOfDays>
                               <numberOfPerson>1</numberOfPerson>
                               <position>2</position>
                               <quantity>1</quantity>
                               <totalAmount>2.00</totalAmount>
                               <vatPercentage>0</vatPercentage>
                               <vatTransactionType>10</vatTransactionType>
                       </Service>
               </Services>
               <Participants>
                       <Participant>
                               <dateOfBirth>1981-10-08</dateOfBirth>
                               <position>1</position>
                               <surnameAndName>Zrinski Nikola</surnameAndName>
                       </Participant>
               </Participants>
       </TABooking>
</response>

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


3.18.2 TABookingCreate

Create a new travel agency reservation/booking.

Supported values for vatTransactionType are:

0 - Taxable transactions of goods and services in Croatia,
7 - Transactions exempt from VAT - not for VAT records,
3 - Transactions excluded from VAT - Other,
10 - Transitory item - tourist residence tax,
11 - Transitory item - tourist travel insurance,
12 - Transitory item - other,
26 - Special VAT margin calculation for travel agencies,
27 - Special VAT margin calculation for travel agencies - Excluded from vat,

Possible status values: Option, Request, Confirm, Personally, Cancelled, Ready, Coupon, Finished
Possible transportation values: OwnTransport, Bus, Plane, Ship

Parameters

TABookingTravel agencies reservation/booking data in xml substructure.

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="TABookingCreate">
       <parameter name="TABooking">
               <accommodationDescription>Hotel Arena</accommodationDescription>
               <bookingPayerCity>Zagreb</bookingPayerCity>
               <bookingPayerCountry>HR</bookingPayerCountry>
               <bookingPayerName>Ivan Novak</bookingPayerName>
               <bookingPayerPostalCode>10000</bookingPayerPostalCode>
               <bookingPayerStreet>Ilica 9</bookingPayerStreet>
               <bookingPayerPassportNumber>123456789</bookingPayerPassportNumber>
               <bookingPayerTaxNumber>87311810356</bookingPayerTaxNumber>
               <businessYear>2016</businessYear>
               <cancellationRiskEnsurance>true</cancellationRiskEnsurance>
               <cancellationRiskEnsuranceAmount>250.000</cancellationRiskEnsuranceAmount>
               <commissionAbsoluteAmount>0.00</commissionAbsoluteAmount>
               <commissionAmount>0.00</commissionAmount>
               <commissionPercent>0.000</commissionPercent>
               <costPosition>100</costPosition>
               <dateFrom>2016-12-18</dateFrom>
               <dateTo>2017-01-03</dateTo>
               <dateOfIssue>2016-12-15</dateOfIssue>
               <destinationDescription>Dubrovnik</destinationDescription>
               <documentDate>2016-12-15</documentDate>
               <firstService>DINNER</firstService>
               <lastService>BREAKFAST</lastService>
               <number>2016-00001</number>
               <numberOfDays>16</numberOfDays>
               <organizer>OrganizerNameString</organizer>
               <salesService>Prodajna služba</salesService>
               <services>2xALL</services>
               <status>Confirm</status>
               <subscriber>Naručitelj</subscriber>
               <totalCurrency>HRK</totalCurrency>
               <Services>
                       <Service>
                               <amount>200.00</amount>
                               <baseForCommission>false</baseForCommission>
                               <dateFrom>2017-01-01</dateFrom>
                               <dateTo>2017-01-05</dateTo>
                               <description>PPO</description>
                               <numberOfDays>16</numberOfDays>
                               <numberOfPerson>1</numberOfPerson>
                               <position>1</position>
                               <quantity>1</quantity>
                               <totalAmount>200.00</totalAmount>
                               <vatPercentage>25</vatPercentage>
                               <vatTransactionType>26</vatTransactionType>
                       </Service>
                       <Service>
                               <amount>2.00</amount>
                               <baseForCommission>false</baseForCommission>
                               <dateFrom>2017-01-01</dateFrom>
                               <dateTo>2017-01-05</dateTo>
                               <description>Boravišna pristojba</description>
                               <numberOfDays>16</numberOfDays>
                               <numberOfPerson>1</numberOfPerson>
                               <position>2</position>
                               <quantity>1</quantity>
                               <totalAmount>2.00</totalAmount>
                               <vatPercentage>0</vatPercentage>
                               <vatTransactionType>10</vatTransactionType>
                       </Service>
               </Services>
               <Participants>
                       <Participant>
                               <dateOfBirth>1981-10-08</dateOfBirth>
                               <position>1</position>
                               <surnameAndName>Zrinski Nikola</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.18.3 TABookingUpdate

Update an existing travel agency reservation/booking. Data must contain the reservation/booking number to be able to identify the document which is to be updated.

Parameters

numberMandatory data. The number of the reservation/booking which is going to be updated.

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.18.4 TABookingDelete

Delete a desired travel agency reservation/booking.

Parameters

numberMandatory data. The number of the reservation/booking which is going to be updated.

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.18.5 TABookingList

Get a list of travel agency reservations/bookings for specified criteria.

Parameters

numberDocument number.
statusStatus (Option, Request, Confirm, Personally, Cancelled, Ready, Coupon, Finished)
dateFrom Date from.
dateTo Date to.
documentDateFromDocument date from.
documentDateToDocument date 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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.19. Warehouse and inventory API

3.19.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", 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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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="10.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 products 003 and 005 from all warehouses.

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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 Sony Ericsson GTX10000" warehouse="0002" quantityOnStock="10.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.20. 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.20.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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>Zagreb</city>
               <costPosition>1</costPosition>
               <businessUnit>0001</businessUnit>
               <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>
               <totalVatAmountLowerRate2>0.00</totalVatAmountLowerRate2>
               <totalVatAmountNormalRate>0.00</totalVatAmountNormalRate>
               <totalVatAmountLowerRate>0.00</totalVatAmountLowerRate>
               <totalVatAmountZeroRate>0.0</totalVatAmountZeroRate>
               <totalVatBaseAmountLowerRate2>0.00</totalVatBaseAmountLowerRate2>
               <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
               <introductionText>introduction text</introductionText>
               <Address>
                       <city>Zagreb</city>
                       <country>HR</country>
                       <postalCode>10000</postalCode>
                       <street>Ilica 10</street>
                       <type>Delivery</type>
               </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>
                       </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.20.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
markDocumentAsSentMarks document as sent.
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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.20.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 transactions of goods and services in Croatia,
1 - Zero-rated transaction - with the right to deduct input VAT,
2 - Zero-rated transaction - without the right to deduct input VAT (domestic),
3 - Transactions excluded from VAT - Other,
4 - Exempt supplies relating to international transport,
7 - Transactions exempt from VAT - not for VAT records,
10 - Transitory item - tourist residence tax,
11 - Transitory item - tourist travel insurance,
12 - Transitory item - other,
13 - Transitory item - return fee for packaging,
14 - Deliveries of goods and services in the Republic of Croatia for which VAT is charged to recipient,
15 - Transactions excluded from VAT - supplies of goods at distance,
16 - Transactions excluded from VAT - services performed in EU,
17 - Transactions excluded from VAT - services performed for tax payers without seat in RH,
18 - Transactions excluded from VAT - deliveries of new means of transport in EU,
19 - Transactions excluded from VAT - supplies of goods in EU,
20 - Transactions excluded from VAT - assembly and installation of goods in EU,
21 - Transactions excluded from VAT - trilateral delivery in EU,
22 - Transactions excluded from VAT - export of goods outside of EU,
23 - Transactions excluded from VAT - supplies of goods in EU customs procedures.
25 - Transactions excluded from VAT - sold goods to tax payers without seat in RH,

Number of advance invoice which is created from this web service is automatically set if parameter status is set to "issuedInvoice".

Parameters

AdvanceInvoiceComplex parameter with data tags

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="AdvanceInvoiceCreate">
<parameter name="AdvanceInvoice">               
               <date>2010-01-13</date>                         <!-- document date
               <dateOfSupplyFrom>2010-02-19</dateOfSupplyFrom>
               <prepaymentDate>2010-03-06</prepaymentDate>             
               <city>Zagreb</city>
               <customerContactPerson></customerContactPerson> <!-- (Optional)
               <type>retail</type>                                     <!-- (Optional) Type of pricing - default is "gross"
               <isReccurringInvoice>false</isReccurringInvoice>
               <vatTransactionType>0</vatTransactionType>              <!-- (Optional) default is 0
               <vatOutgoingDocumentVatClause>Registered</vatOutgoingDocumentVatClause> <!-- (Optional) Possible values: Registered, NotRegistered, RegisteredVATr2
               <costPosition>120</costPosition>                        <!-- (Optional)
               <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</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 specified it will override master buyer data in document
               <buyerName>ivan novak</buyerName>               
               <buyerTaxNumber>02169711</buyerTaxNumber>       <!-- (Optional)
               <buyerVatRegistration>None</buyerVatRegistration>       <!-- (None, Unknown, RegisteredR1, RegisteredR2)
               <buyerEMail>ivan@novak.com</buyerEMail>                 <!-- (Optional)
               <buyerStreet>Cesta 22</buyerStreet>                     <!-- (Optional)
               <buyerPostalCode>20000</buyerPostalCode>                <!-- (Optional)
               <buyerCity>Zagreb</buyerCity>                   <!-- (Optional)
               <buyerCountry>HR</buyerCountry>                         <!-- (Optional) ISO-2 country code
               <methodOfPayment>bankTransfer</methodOfPayment> <!-- Possible ways of payment: Unknown, BankTransfer, Cash, Cheques, EurocardMastercard, Visa, Amex, Diners, ConsumerLoanAneks, ConsumerLoanDiners, InGoods, CashOnDelivery, CashOnDeliveryCourierService, CreditCard, PayPal, Maestro, DirectDebit, Compensation, Other
               <documentLanguage>Croatian</documentLanguage> <!-- (Optional) Possible document language: Slovene, English, German and Croatian
               <printingTemplate>template1</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
               <Address>                        <!-- (Optional) Setting delivery address on document and partner buyer if it doesn't exists             
                       <city>Zagreb</city>
                       <country>HR</country>
                       <postalCode>10000</postalCode>
                       <street>Ilica 10</street>
                       <type>Delivery</type>
               </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
                       </Item>
                       <Item>                                          <!-- Item specified for good or service
                               <position>2</position>      <!-- position of item
                               <description>Transport of goods</description>
                               <price>11.00</price>
                               <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
                       </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.20.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 "UBL". If this parameter is not included in XML, import from default data format is used.
base64dataThis parameter is mandatory in case using dataFormat "UBL". Content of this parameter should be UBL XML encoded into base64 string.

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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>
       </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 UBL data format)

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="AdvanceInvoiceImport">
               <parameter name="importType" value="createOrUpdate" />
               <parameter name="dataFormat" value="UBL" />
               <parameter name="base64data">JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0ZpbHRlci9GbGF0ZURlY29kZT4+Cn...
                    <!-- UBL 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.20.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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 AdvanceInvoiceCreate 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.20.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.20.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.20.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, documentSentAlready, documentNotYetSent

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.20.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)

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="AdvanceInvoiceSendByEmail">
       <parameter name="number" value="12/2009" />
       <parameter name="date" type="Date" value="2010-01-13" />
       <parameter name="sender" value="ivan@novak.com"/>
       <parameter name="recipient" value="zoran@novak.com,zlatko@novak.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"/>
</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.20.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.20.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.20.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.20.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.21. 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.22. 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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
       <method name="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>IVAN NOVAK</createdBy>
               <currency>HRK</currency>
               <dateOfPosting>2016-09-29</dateOfPosting>
               <dateOfTransaction>2016-09-29</dateOfTransaction>
               <number>3</number>
               <numberAsString>00003</numberAsString>
               <postedBy>IVAN NOVAK</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>Partner 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>Partner 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 partner d.d.</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 partner d.d.</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.23. 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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
       <method name="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.23.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
       <method name="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, calculationOfSeverancePay
               <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>Partner 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>Partner 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.23.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.23.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.23.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.23.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 /WebServicesHR/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="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.24. 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.
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.24.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.24.2 ReceivedInvoiceCreate

Create new received invoice.

Parameters

ReceivedInvoiceReceived invoice'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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.24.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.24.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.24.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="ReceivedInvoiceList">
       <parameter name="number" value="123456" />
</method>
</request>

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.24.6 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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.24.7 ReceivedInvoiceAttachmentSetDefault

Add attachment to received 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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.24.8 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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.24.9 ReceivedInvoiceAttachmentList

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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.25. 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 invoice.
ReceivedCreditNoteAttachmentSetDefaultAdd attachment to received credit note invoice and set is as default.
ReceivedCreditNoteAttachmentGetGet default attachment of received credit note invoice.
ReceivedCreditNoteAttachmentListGet all attachments of received credit note invoice.

3.25.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.25.2 ReceivedCreditNoteCreate

Create new received credit note.

Parameters

ReceivedCreditNoteReceived credit note'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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.25.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.25.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.25.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="ReceivedCreditNoteList">
       <parameter name="number" value="123456" />
</method>
</request>

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.25.6 ReceivedCreditNoteInvoiceAttachmentAdd

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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="ReceivedCreditNoteInvoiceAttachmentAdd">
       <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.25.7 ReceivedCreditNoteInvoiceAttachmentSetDefault

Add attachment to received 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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="ReceivedCreditNoteInvoiceAttachmentSetDefault">
       <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.25.8 ReceivedCreditNoteInvoiceAttachmentGet

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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="ReceivedCreditNoteInvoiceAttachmentGet">
       <parameter name="number" type="String" value="2020-00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <ReceivedCreditNoteInvoice>
               <Attachments>
                       <Attachment>
                               <fileName>att.jpg</fileName>
                               <contents encoding="BASE64">BASE64</contents>
                       </Attachment>
               </Attachments>
       </ReceivedCreditNoteInvoice>
</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.25.9 ReceivedCreditNoteInvoiceAttachmentList

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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="ReceivedCreditNoteInvoiceAttachmentList">
       <parameter name="number" type="String" value="2020-00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <ReceivedCreditNoteInvoice>
               <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>
       </ReceivedCreditNoteInvoice>
</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.26. 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.26.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.26.2 ReceivedAdvanceInvoiceCreate

Create new received advance invoice.

Parameters

ReceivedAdvanceInvoicereceived advance invoice'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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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)
               <supplierDocumentID>55:666</supplierDocumentID>     <!-- (Mandatory) If supplier code not specified, use this supplier identificator for referencing supplier on received document
               <supplierCode>666000</supplierCode>     <!-- (Mandatory) If supplier documentID 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.26.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.26.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.26.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<method name="ReceivedAdvanceInvoiceList">
       <parameter name="number" value="123456" />
</method>
</request>

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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.26.6 ReceivedAdvanceInvoiceAttachmentAdd

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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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 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.26.7 ReceivedAdvanceInvoiceAttachmentSetDefault

Add attachment to received 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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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 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.26.8 ReceivedAdvanceInvoiceAttachmentGet

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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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 invoice for number: 2020-00001 received invoice does not have attachemnts.
</response>


3.26.9 ReceivedAdvanceInvoiceAttachmentList

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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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 invoice for number: 2020-00001 received invoice does not have attachemnts.
</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 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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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 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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
  <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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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>

 

3.28. 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.28.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 3: 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 4: 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 5: 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 can download report data using simple command line script as shown in the following example:

curl -OJ https://e-racuni.com/obracuni/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.

 

4. API Reference

 

4.1. 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.

4.1.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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>


4.1.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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>


4.1.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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>
       </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>


4.1.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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>


4.1.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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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="ivan" md5pass="8b29582ce0a1c85dc0c574d218acb900" token="649026C063054A139549200F3C9D01C6" />
<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>


 

5. API Examples

...

 

5.1. API Examples in PHP

5.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/WebServicesHR/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/WebServicesHR/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: /WebServicesHR/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
Veličina: 9,89 kB
.

 

---
© E-RAČUNI d.o.o. 2003-2024