Prva stranica 
Natrag 
Naprijed 
Novosti 
 Kopiraj URL stranice 
 
Natisni stranNatisni stran  
e-računi upute za uporabu  >  Internetske usluge i in...  >  API Reference  >  AdvanceInvoice API

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.

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>


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>


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>


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>



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>


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>



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



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>


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>



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>


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>


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>


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>


Reference na stran

---
Zadnja sprememba 16.11.2021 12:50:44
© E-RAČUNI d.o.o. 2003-2024