Prva stran 
Nazaj 
Naprej 
Novosti 
 
Natisni stranNatisni stran  
e-računi navodila za up...  >  Spletne storitve in int...  >  API Reference  >  SalesInvoice API

SalesInvoice API

SalesInvoiceGetGet sales invoice by document number, or by combination of document number and date.
SalesInvoiceGetPDFGet PDF for sales invoice by document number, or by combination of document number and date.
SalesInvoiceGetUPNPDFGet PDF for sales invoice with UPN payment order by document number, or by combination of document number and date.
SalesInvoiceCreateCreate new sales invoice.
SalesInvoiceImportImport sales invoice issued in other IS.
SalesInvoiceUpdateUpdate existing Sales invoice.
SalesInvoiceDeleteDelete sales invoice.
SalesInvoiceCancelCancel sales invoice.
SalesInvoiceListGet list of sales invoices for specified criteria
SalesInvoiceSendByEmailSends document by email to the recipient(s).
SalesInvoicePaymentRecordAddAdd payment record on sales invoice.
SalesInvoiceInstallmentsCreateAdd installments to sales invoice.

SalesInvoiceGet

Get sales invoice by document number, or by combination of document number and date. User can select xml format which is used for constructing response file. By default, internal format is used. Please see external documentation for eSLOG format.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
costPositionCost position
businessUnitBusiness unit
vatBookVat book
formatFormat
  • XML 
  • ESLOG 

XML (internal) is used as default if format is not specified. (If ESLOG format is used, structure of the Response stream has different encoding and structure – see example bellow)

Example request and response

(For internal "XML" format)

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

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

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

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

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


(For ESLOG format)

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

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


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


SalesInvoiceGetPDF

Get PDF for sales invoice 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: 2016-00002)
dateDocument date
costPositionCost position
businessUnitBusiness unit
vatBookVat book
markDocumentAsSentMarks document as sent.

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesInvoiceGetPDF">
       <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 sales invoice for number: 2013-01293 and date: 2013-01-02">
       </error>
</response>


SalesInvoiceGetUPNPDF

Get PDF for sales invoice with UPN payment order by document number, or by combination of document number and date. User can also decide if he wants UPN in top or bottom of pdf document. Response (on OK) returns binary record for PDF file coded with Base64 coding.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2016-00002)
dateDocument date
paymentOrderPositionPosition of UPN payment order (optional, default it will be set to bottom).
upnPaymentOrderTypeType of UPN payment order (optional, default the old UPN will be generated). Possible value is "UPNQR".

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesInvoiceGetUPNPDF">
       <parameter name="number" value="12/2009" />
       <parameter name="date" type="Date" value="2009-12-15" />
        <parameter name="paymentOrderPosition">top<parameter/> <!--- posible values: top, bottom
</method>
</request>


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

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


SalesInvoiceCreate

Create new sales 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 Slovenia,
1 - Zero-rated transaction - exports of goods outside the EU,
2 - Zero-rated transaction - without the right to deduct input VAT,
3 - Zero-rated transaction - with the right to deduct input VAT,
4 - Zero-rated transaction - supply of goods within the EU,
5 - Zero-rated transaction - assembly in the EU,
6 - Zero-rated transaction - tripartite supplies of goods within the EU,
7 - Transactions exempt from VAT - not for VAT records,
8 - Zero-rated transaction - remote sales of goods,
9 - Transactions exempt from VAT with the right of input VAT deduction (transactions outside SLO),
10- Supply of goods and services in SLO, VAT charged by the recipient,
11- Sales of services in the EU, VAT paid by the recipient.
100- Sales of electronic services taxed in other EU country.
Status of invoice which is created from this web service is automatically set to "issuedInvoice" if parameter number is specified in parameter list, or if it's status is explicitelly set to issuedInvoice. For such cases (if invoice is created as issued), service will automatically generate delivery note for contained products to reduce their quantity on stock.

Parameters

SalesInvoiceComplex parameter with data tags

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesInvoiceCreate">
<parameter name="SalesInvoice">         
               <date>2016-01-13</date>                         <!-- document date
               <dateOfSupplyFrom>2016-02-19</dateOfSupplyFrom>
               <paymentDueDate>2016-03-06</paymentDueDate>             
               <city>Beograd</city>
               <customerContactPerson></customerContactPerson> <!-- (Optional)
               <type>retail</type>                                     <!-- (Optional) Type of pricing - default is "gross"
               <status>issuedInvoice</status>                           <!-- (Optional) Possible values: issuedInvoice, draft - default is issuedInvoice
               <isReccurringInvoice>false</isReccurringInvoice>
               <vatTransactionType>0</vatTransactionType>              <!-- (Optional) default is 0
               <vatOutgoingDocumentVatClause>Registered</vatOutgoingDocumentVatClause> <!-- (Optional) Possible values: Registered, NotRegistered, RegisteredTourismLawPart47, RegisteredTourismLawPart31, RegisteredTourismLawPart47And31
               <costPosition>120</costPosition>                        <!-- (Optional)
               <cashRegisterCode>0001</cashRegisterCode>                <!-- Mandatory for fiscalization
               <businessUnit>0001</businessUnit>                        <!-- Mandatory for fiscalization
               <deliveryMethod>Delivery method</deliveryMethod>        <!-- (Optional)
               <superDiscountPercentage>5</superDiscountPercentage> <!-- (Optional)
              <remarks>Remark on Sales invoice</remarks>               <!-- (Optional)
               <introductionText>introduction text</introductionText>   <!-- (Optional)
               <buyerCode>123456</buyerCode>                   <!-- (Optional). If it is specified buyer parameters bellow are not needed as the buyer data is taken from database. If any parameter bellow is sepcified it will override master buyer data in document
               <buyerName>Micka Kovac</buyerName>              
               <buyerTaxNumber>02169711</buyerTaxNumber>       <!-- (Optional)
               <buyerVatRegistration>None</buyerVatRegistration>       <!-- (Unkown, None, Registered)
               <buyerEMail>micka@kovac.com</buyerEMail>                <!-- (Optional)
               <buyerPhone>040505050</buyerPhone>                      <!-- (Optional)
               <buyerStreet>Iztokova 22</buyerStreet>                  <!-- (Optional)
               <buyerPostalCode>2000</buyerPostalCode>                 <!-- (Optional)
               <buyerCity>Maribor</buyerCity>                  <!-- (Optional)
               <buyerCountry>SI</buyerCountry>                         <!-- (Optional) ISO-2 country code
               <methodOfPayment>bankTransfer</methodOfPayment> <!-- Possible ways of payment: unknown, bankTransfer, cash, cheques, eurocardMastercard, visa, karanta, amex, diners, activa, ba, cashOnDelivery, moneta, directDebit, PayPal
               <receivablesAccountNumber>1200</receivablesAccountNumber>               <!-- (Optional) specify general ledger receivables account number for this sales invoice if the default account should not be used
               <documentLanguage>Slovene</documentLanguage> <!-- (Optional) Possible document language: Slovene, English, German, Italian and Croatian
               <printingTemplate>Predloga2</printingTemplate> <!-- (Optional) Setting printing template for document, posible values is code of uploaded templates in web app
               <advanceInvoiceRef>2014-00001</advanceInvoiceRef> <!-- (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
               <vatCountryIsoCode>HR</vatCountryIsoCode> <!-- Mandatory if using vatTransactionTypes: 100, 8 and 5 and it determines that VAT procentages for specified country has to be taken
               <warehouseCode>00001</warehouseCode> <!-- Mandatory, if not set in XML default warehouse is set
               <Address>                        <!-- (Optional) Setting delivery address on document and partner buyer if it doesn't exists              
                       <city>Celje</city>
                       <country>SI</country>
                       <postalCode>3000</postalCode>
                       <street>Ulica 10</street>
                       <type>Delivery</type>
               </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>
                               <costPosition>1</costPosition>
                               <chartAccountNumber>76000</chartAccountNumber> <!-- (Optional) general ledger account number for seperate posting of item amount
                               <vatTransactionType>0</vatTransactionType> <!-- (Optional) default is 0. Foreign VAT transaction types (100, 8 and 5) can only be set on document level.
                       </Item>
                       <Item>                                          <!-- Item specified for good or service
                               <position>2</position>      <!-- position of item
                               <description>Transport of goods</description>
                               <price>11.00</price>
                               <discountPercentage>2</discountPercentage>      <!-- (Optional)
                               <vatPercentage>10</vatPercentage>               <!-- (Optional)
                               <currency>EUR</currency>                        <!-- (Optional)
                               <quantity>10</quantity>                         <!-- (Optional) default 0
                               <unit>km</unit>                         <!-- (Optional)
                               <costPosition>1</costPosition>
                               <vatTransactionType>0</vatTransactionType>      <!-- (Optional) default is 0. Foreign VAT transaction types (100, 8 and 5) can only be set on document level.
                       </Item>
                       ...
               </Items>
       </parameter>
</method>
</request>

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

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



SalesInvoiceImport

Import Sales 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 sales invoices with this api call, sales invoices'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
SalesInvoiceSales invoice data in xml substructure.

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesInvoiceImport">
               <parameter name="importType" value="createOrUpdate" />
               <parameter name="SalesInvoice">
                    <!-- structure of elements is the same as in SalesInvoiceCreate only tag <number> is mandatory here
                <parameter/>
       </method>
</request>

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


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


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



SalesInvoiceUpdate

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

Parameters

SalesInvoiceComplex parameter with data tags

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesInvoiceUpdate">
<parameter name="SalesInvoice">
         <number>12</number>                                    <!-- document number is mandatory in UPDATE (Can use sequential document number (example: 12), or formatted number (example: 12/2011))
               <!--  Parameters are identical to the parameters in SalesInvoiceCreate api
       </parameter>
</method>
</request>

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

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


SalesInvoiceDelete

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

Parameters

numberDocument number
dateDocument date
costPositionCost position
businessUnitBusiness unit
vatBookVat book

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesInvoiceDelete">
       <parameter name="number" value="12/2009" />
       <parameter name="date" type="Date" value="2016-01-13" />
</method>
</request>

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

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

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



SalesInvoiceCancel

Cancel sales 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.

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesInvoiceCancel">
       <parameter name="number" value="2013-00014" />
       <parameter name="date" type="Date" value="2013-03-26" />
       <parameter name="status" value="draft" />
</method>
</request>

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

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

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

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

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



SalesInvoiceList

Get list of sales 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, paymentDueDate/paymentDueDate or dateOfSupplyFrom/dateOfSupplyUntil.

Parameters

numberDocument number
dateFromThe date which is used to select sales invoices whose date is following it
dateToThe date which is used to select sales invoices whose date is preceding it
paymentDueDateFromThe date which is used to select sales invoices whose date of expiration is following it
paymentDueDateToThe date which is used to select sales invoices whose date of expiration is preceding it
dateOfSupplyFromThe date which is used to select sales invoices whose date of supply/performance is following it
dateOfSupplyUntilThe date which is used to select sales 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 sales invoice
totalCurrencyCurrency used in sales invoice
articleProduct code, or product name
statusPossible values:
  • draft 
  • issuedInvoice 
  • notBooked 
  • booked 
  • canceledCreditInvoice 
  • openedClaim 
  • closedClaim 
  • openedDueClaim 

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesInvoiceList">
               <parameter name="status" value="issuedInvoice" />
               <parameter name="dateFrom" type="Date" value="2016-02-19" />
       </method>
</request>

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


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


SalesInvoiceSendByEmail

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesInvoiceSendByEmail">
       <parameter name="number" value="12/2009" />
       <parameter name="date" type="Date" value="2016-01-13" />
       <parameter name="sender" value="micka@kovac.com"/>
       <parameter name="recipient" value="zoran@kovac.com,zlatko@kovac.com"/>
       <parameter name="cc" value=""/>
       <parameter name="bcc" value=""/>
       <parameter name="subject" value="TEST d.o.o.: Sales invoice nr. 0002/2016"/>
       <parameter name="message" value="Message text"/>
</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>


SalesInvoicePaymentRecordAdd

Add payment record on sales invoice.

Parameters

numberDocument number
dateDocument date (optional additional document identification)
costPositionCost position
businessUnitBusiness unit
vatBookVat book
paymentDatePayment date
paymentAmountPayment amount
paymentMethodForInvoicePayment method for sales invoice
  • BankPaymentOrder 
  • Cash 
  • CreditCard 
  • Cheque 
  • DebitNote 
  • CreditNote 
  • Other 
paymentRemarkPayment remark (optional)
paymentCurrencyPayment currency (optional)

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesInvoicePaymentRecordAdd">
       <parameter name="number" value="2014-00013"/>
       <parameter name="date" type="Date" value="2014-05-15"/>
       <parameter name="paymentDate" type="Date" value="2014-05-20"/>
       <parameter name="paymentAmoutn" value="50"/>
       <parameter name="paymentMethodForInvoice" value="Cash"/>
       <parameter name="paymentRemark" value="PAyment record on sales invoice 2014-05-15"/>
       <parameter name="paymentCurrency" value="EUR"/>
</method>
</request>

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


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


SalesInvoiceInstallmentsCreate

Add installments on sales invoice.

Parameters

numberDocument number
dateDocument date (optional additional document identification)
costPositionCost position
businessUnitBusiness unit
vatBookVat book

Example request and response

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

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
       <method name="SalesInvoiceInstallmentsCreate">
               <parameter name="number" value="2014-00013"/>
               <parameter name="date" type="Date" value="2014-05-15"/>
               <parameter name="SalesInvoiceInstallments">
                       <SalesInvoiceInstallments>
                               <Installment>
                                       <installmentDate>2014-06-15</installmentDate>
                                       <installmentAmount>218</installmentAmount>
                               </Installment>
                               <Installment>
                                       <installmentDate>2014-07-15</installmentDate>
                                       <installmentAmount>300</installmentAmount>
                               </Installment>
                               <Installment>
                                       <installmentDate>2014-08-15</installmentDate>
                                       <installmentAmount>300</installmentAmount>
                               </Installment>
                       </SalesInvoiceInstallments>
               </parameter>
       </method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Succesfuly added 3 installments to sales invoice.</message>
       <number>2014-00013</number>
    <date>2014-05-15</date>
</response>


Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="None or only one instalment specified."><error/>    <!-- at least two installments must be specified
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="No instalments were added to sales invoice!"><error/>       <!-- no installments added to sales invoice
</response>

Reference na stran

---
Zadnja sprememba 03.04.2018 11:37:55
© E-RAČUNI d.o.o. 2003-2018