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

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.


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>



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>




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>



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>


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>


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>



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"
                       }
       }
}





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>


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>


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>



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>


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>


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>


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>

Reference na stran

---
Zadnja sprememba 29.03.2024 14:12:31
© E-RAČUNI d.o.o. 2003-2024