SalesOrderGet | Get sales orders by document number, or by combination of document number and date. |
SalesOrderGetPDF | Get PDF file for sales orders by document number, or by combination of document number and date. |
SalesOrderCreate | Create new sales order. |
SalesOrderImport | Import sales orders issued in other IS. |
SalesOrderUpdate | Update existing sales order. |
SalesOrderDelete | Delete sales order. |
SalesOrderCancel | Cancel sales order. |
SalesOrderList | Get list of sales orders for specified criteria |
SalesOrderSendByEmail | Sends document by email to the recipient(s). |
SalesOrderPaymentRecordAdd | Add payment record on sales order. |
SalesOrderCreateInvoice | Create sales invoice from sales order. |
SalesOrderAttachmentAdd | Add attachment to sales order. |
SalesOrderAttachmentSetDefault | Add attachment to sales order and set is as default. |
SalesOrderAttachmentGet | Get default attachment of sales order. |
SalesOrderAttachmentList | Get all attachments of sales order. |
Get sales orders by document number, or by combination of document number and date.
Parameters
number | Document number. Can use sequential document number (example: 2), or formatted number (example: 2010-00002) |
date | Document date |
costPosition | Cost position |
documentID | Internal document identificator. In case of using this parameter, no other parameter listed abowe is needed for searching by document. |
Example request and response
POST /WebServicesSI/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream
<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesOrderGet">
<parameter name="number" value="2" />
<parameter name="date" type="Date" value="2010-02-22" />
</method>
</request>
Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328
<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
<SalesOrder>
<buyerCity>MARIBOR</buyerCity>
<buyerName>Company d.o.o. </buyerName>
<buyerPostalCode>2000</buyerPostalCode>
<buyerStreet>Meljska c. 37</buyerStreet>
<buyerTaxNumber>31476546</buyerTaxNumber>
<buyerVatRegistration>None</buyerVatRegistration>
<costPosition>1</costPosition>
<businessUnit>0001</businessUnit>
<salesInvoicesRef>2014-00001, 2014-00002, 2014-00003</salesInvoicesRef> <!-- references to sales invoices
<advanceInvoicesRef>2014-00001, 2014-00002, 2014-00003</advanceInvoicesRef> <!-- references to advance invoices
<deliveryNotesRef>2014-00004, 2014-00005, 2014-00006</deliveryNotesRef> <!-- references to delivery notes
<cancelledDocumentRef>2012-00015</cancelledDocumentRef> <-- Reference to cancelled document
<customerContactPerson>John Smith of BEST BUYER Ltd.</customerContactPerson>
<orderReference>123</orderReference> <!-- (Optional)
<date>2014-02-22</date>
<deliveryDate>2014-02-28</deliveryDate>
<deliveryMethod>Kamionom</deliveryMethod>
<number>2</number>
<orderReference>111</orderReference>
<receivedDate>2014-02-22</receivedDate>
<remarks>Text for the bottom of the document</remarks>
<status>Opened</status>
<totalAmount>54.480</totalAmount>
<totalCurrency>EUR</totalCurrency>
<totalDiscount>0.0</totalDiscount>
<totalNetAmount>49.66</totalNetAmount>
<totalVatAmountFlatRate>0.00</totalVatAmountFlatRate>
<totalVatAmountNormalRate>0.18</totalVatAmountNormalRate>
<totalVatAmountLowerRate>4.64</totalVatAmountLowerRate>
<totalVatAmountZeroRate>0.0</totalVatAmountZeroRate>
<totalVatBaseAmountFlatRate>0.00</totalVatBaseAmountFlatRate>
<totalVatBaseAmountNormalRate>0.82</totalVatBaseAmountNormalRate>
<totalVatBaseAmountLowerRate>48.84</totalVatBaseAmountLowerRate>
<totalVatBaseAmountZeroRate>0.00</totalVatBaseAmountZeroRate>
<vatOutgoingDocumentVatClause>Registered</vatOutgoingDocumentVatClause>
<type>Gross</type>
<introductionText>introduction text</introductionText>
<vatCountryIsoCode>HR</vatCountryIsoCode>
<Address> <!-- (Optional) Setting delivery address on document and partner buyer if it doesn't exists
<city>Celje</city>
<country>SI</country>
<postalCode>3000</postalCode>
<street>Ulica 10</street>
<type>Delivery</type>
<firstAddressLine>Delivery address</firstAddressLine>
</Address>
<Items>
<Item>
<amount>0.82</amount>
<amountWithoutDiscount>0.82</amountWithoutDiscount>
<currency>EUR</currency>
<description>asdh</description>
<discountAmount>0.0</discountAmount>
<discountPercentage>0.0000</discountPercentage>
<netPrice>0.81967</netPrice>
<netPriceInDocumentCurrency>0.81967</netPriceInDocumentCurrency>
<position>1</position>
<price>1.00000</price>
<priceInDocumentCurrency>1.00000</priceInDocumentCurrency>
<quantity>1.000000</quantity>
<totalDiscountPercentage>0.0000</totalDiscountPercentage>
<unit></unit>
<unit></unit>
<vatAmount>0.18</vatAmount>
<vatPercentage>22.0</vatPercentage>
</Item>
<Item>
<amount>48.84</amount>
<amountWithoutDiscount>48.84</amountWithoutDiscount>
<articleCode>000013</articleCode>
<articleName>VENTIL REDUC. 3/4" WATTS</articleName>
<currency>EUR</currency>
<description>ni bilo opisa, sedaj pa je</description>
<discountAmount>0.0</discountAmount>
<discountPercentage>0.0000</discountPercentage>
<netPrice>48.84018</netPrice>
<netPriceInDocumentCurrency>48.84018</netPriceInDocumentCurrency>
<position>2</position>
<price>53.48000</price>
<priceInDocumentCurrency>53.48000</priceInDocumentCurrency>
<productCode>000013</productCode>
<productName>VENTIL REDUC. 3/4" WATTS</productName>
<quantity>1.000000</quantity>
<totalDiscountPercentage>0.0000</totalDiscountPercentage>
<unit>kos</unit>
<unit>kos</unit>
<vatAmount>4.64</vatAmount>
<vatPercentage>9.5</vatPercentage>
</Item>
</Items>
</SalesOrder>
</response>
Get PDF for sales order by document number, or by combination of document number and date. Response (on OK) returns binary record for PDF file coded with Base64 coding.
Parameters
number | Document number. Can use sequential document number (example: 2), or formated number (example: 2010-00002) |
date | Document date |
costPosition | Cost position |
documentID | Internal document identificator. In case of using this parameter, no other parameter listed abowe is needed for searching by document. |
Example request and response
POST /WebServicesSI/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream
<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesOrderGetPDF">
<parameter name="number" value="2" />
<parameter name="date" type="Date" value="2010-02-22" />
</method>
</request>
Response
<response status="ok">
<number>2</number>
<date>2010-02-22</date>
<pdfFile>JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0ZpbHRlci9GbGF0ZURlY29kZT4+CnN0cmVhbQp4nJVYS4/bNh...</pdfFile>
</response>
Response (on error)
<response status="error">
<error description="Can not find sales orderfor number: 2 and date: 2010-02-22">
</error>
</response>
Create new sales order.
Document item can be specified with: productCode, quantity, discountPercentage, or can be specified with: description, currency, quantity, price (retail price including VAT for Retail document) or netPrice (gross price without VAT for Gross document). Default document type is Gross. Additional optional item fields are: discountPercentage, unit, vatPercentage, vatTransactionType. Supported values for vatTransactionType are:
0 - Taxable domestic transactions of goods and services // Obdavčen promet blaga in storitev v Sloveniji
4 - Zero-rated transaction - supply of goods within the EU // Oproščen promet - dobava blaga znotraj EU
104 - Vat free transaction - supply of goods in EU by customs procedure 42 and 63 // Oproščen promet - dobava blaga znotraj EU po carinskih postopkih 42 in 63
6 - Zero-rated transaction - tripartite supplies of goods within the EU // Oproščen promet - tristranske dobave blaga znotraj EU
11 - Sales of services in the EU, VAT reverse charge // Oproščen promet - storitve v EU, od katerih plača DDV prejemnik
103 - Vat free transaction - supply of goods in EU by call-of-stock arrangement // Oproščen promet - dobava blaga znotraj EU po skladiščenju na odpoklic
1 - Zero-rated transaction - exports of commodity outside the EU // Oproščen promet - izvoz blaga izven EU
3 - Zero-rated transaction with the right to deduct input VAT // Oproščen promet - s pravico do odbitka vstopnega DDV
2 - Zero-rated transaction - without the right to deduct input VAT // Oproščen promet - brez pravice do odbitka vstopnega DDV
9 - Transactions exempt from VAT with the right of input VAT deduction (transactions outside SLO) // Neobdavčljiv promet s pravico do odbitka vstopnega DDV (prometi izven SLO)
7 - not subject to VAT // Neobdavčen promet - ne gre v DDV evidence
12 - Nontaxable suply - other taxes or duties other than VAT // Neobdavčen promet - ostali davki oziroma dajatve (razen DDV)
105 - Not subject to VAT – supply of goods outside EU // Neobdavčen promet - dobava blaga zunaj Unije (tretje države)
10 - Supply of goods and services in Slovenia, VAT reverse charged by the recipient // Dobava blaga in storitev v SLO, DDV obračuna prejemnik (76.a člen)
5 - Zero-rated transaction - assembly in the EU // Oproščen promet - montaža v EU (obračun tujega DDV)
8 - Distance selling in the EU surpassing annual sales threshold (foreign VAT) // Oproščen promet - prodaja blaga na daljavo (obračun tujega DDV)
101 - Special vat margin calculation for used goods // Posebna ureditev za rabljeno blago
102 - Special vat margin calculation for used goods - tax free // Posebna ureditev za rabljeno blago - oproščen promet
13 - Special vat margin calculation for travel agencies - price difference taxed // Obdavčen promet - posebni postopek obdavčitve razlike v ceni za potovalne agencije (98. člen)
14 - VAT exempt transactions for travel agencies // Oproščen promet za potovalne agencije (99. člen)
100 - Electronic services in other EU member countries (OSS) // Prodaja elektronskih storitev v drugih članicah EU (OSS)
106 - Distance sales of goods to EU consumers (OSS) // Prodaja blaga na daljavo končnim potrošnikom v EU (OSS)
107 - Supply of services to EU consumers (OSS) // Prodaja storitev končnim potrošnikom v EU (OSS)
108 - Distance sales of imported goods to EU consumers (IOSS) // Prodaja na daljavo iz tretjih držav uvoženega blaga končnim potrošnikom v EU (IOSS)
120 - Supply of services from EU to third country consumers (foreign VAT) // Izvoz storitev iz EU končnim potrošnikom v državi izven EU (obračun tujega DDV)
121 - Distance sales of goods to consumers outside EU (foreign VAT) // Prodaja blaga na daljavo končnim potrošnikom v državi izven EU (obračun tujega DDV)
Before using vat transaction types for OSS and IOSS, you must set up registration for OSS and IOSS in company settings under foreign VAT registrations. |
Parameters
SalesOrder | Complex parameter with data tags |
Example request and response
POST /WebServicesSI/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream
<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesOrderCreate">
<parameter name="SalesOrder">
<date>2010-01-13</date> <!-- document date
<deliveryDate>2010-02-13</deliveryDate>
<receivedDate>2010-01-13</receivedDate> <!-- (Optional) Default document date
<customerContactPerson></customerContactPerson> <!-- (Optional)
<type>Retail</type> <!-- (Optional) Type of pricing default is Gross
<status>Opened</status> <!-- (Optional) Possible values: Draft, Opened, Processing, PartialDelivery, CompletedDelivery, CompletedDeliveryPartialInvoic, CompletedDeliveryAndSettledInvoice, Cancelled, Reversed, OnHold, Shipped, ReservedStock - default is Opened
<costPosition>120</costPosition> <!-- (Optional)
<deliveryMethod>Delivery method</deliveryMethod> <!-- (Optional)
<superDiscountPercentage>5</superDiscountPercentage> <!-- (Optional)
<orderReference>123</orderReference> <!-- (Optional)
<remarks>Remark on Sales order</remarks> <!-- (Optional)
<introductionText>introduction text</introductionText> <!-- (Optional)
<buyerCode>123456</buyerCode> <!-- (Optional). If buyer code is specified, other buyer parameters bellow are not needed as the buyer data is taken from database. If any additional parameter is specified, it will override master buyer data in document
<buyerDocumentID>60:123456</buyerDocumentID> <!-- (Optional). If it is specified buyer parameters bellow are not needed as the buyer data is taken from database. If any parameter bellow is sepcified it will override master buyer data in document
<buyerName>Micka Kovac</buyerName>
<buyerTaxNumber>02169711</buyerTaxNumber> <!-- (Optional)
<buyerVatRegistration>None</buyerVatRegistration> <!-- (Unkown, None, Registered)
<buyerEMail>micka@kovac.com</buyerEMail> <!-- (Optional)
<buyerPhone>040505050</buyerPhone> <!-- (Optional)
<buyerStreet>Iztokova 22</buyerStreet> <!-- (Optional)
<buyerPostalCode>2000</buyerPostalCode> <!-- (Optional)
<buyerCity>Maribor</buyerCity> <!-- (Optional)
<buyerCountry>SI</buyerCountry> <!-- (Optional) ISO-2 country code
<vatTransactionType>0</vatTransactionType> <!-- (Optional) default is 0
<vatOutgoingDocumentVatClause>Registered</vatOutgoingDocumentVatClause> <!-- (Optional) Possible values: Registered, NotRegistered, RegisteredTourismLawPart47, RegisteredTourismLawPart31, RegisteredTourismLawPart47And31
<methodOfPayment>bankTransfer</methodOfPayment> <!-- Possible ways of payment: Unknown, BankTransfer, Cash, Cheques, EurocardMastercard, Visa, Karanta, Amex, Diners, Activa, BA, CashOnDelivery, Moneta, CreditCard, PayPal, DirectDebit, SetOff, Coupon, Compensation, GoCrypto
<documentLanguage>Slovene</documentLanguage> <!-- (Optional) Possible document language: Slovene, English, German, Croatian, Italian, Hungarian, Czech, Slovak, Serbian, Polish and Bulgarian
<printingTemplate>Predloga2</printingTemplate> <!-- (Optional) Setting printing template for document, posible values is code of uploaded templates in web app
<salesInvoiceRef>2014-00001</salesInvoiceRef> <!-- (Optional) Setting reference to sales invoice
<salesQuoteRef>2014-00001</salesQuoteRef> <!-- (Optional) Setting reference to sales quote
<vatCountryIsoCode>HR</vatCountryIsoCode> <!-- Mandatory if using vatTransactionTypes: 106, 107, 108, 109, 120, 100, 8 and 5 and it determines that VAT procentages for specified country has to be taken
<Address> <!-- (Optional) Setting delivery address on document and partner buyer if it doesn't exists
<city>Celje</city>
<country>SI</country>
<postalCode>3000</postalCode>
<street>Ulica 10</street>
<type>Delivery</type>
<firstAddressLine>Delivery address</firstAddressLine>
</Address>
<Items>
<Item> <!-- item specified with ref to product
<position>1</position> <!-- position of item
<productCode>020</productCode> <!-- product code
<quantity>100</quantity>
<discountPercentage>10</discountPercentage>
</Item>
<Item> <!-- Item specified for good or service
<position>2</position> <!-- position of item
<description>Transport of goods</description>
<price>11.00</price> <!-- price (retail price including VAT for retail document) or netPrice (gross price without VAT for gross document). Default document type is "gross" so use <netPrice> tag in this case or <price> tag in case of document type "retail"
<discountPercentage>2</discountPercentage> <!-- (Optional)
<vatPercentage>10</vatPercentage> <!-- (Optional)
<currency>EUR</currency> <!-- (Optional)
<quantity>10</quantity> <!-- (Optional) default 0
<unit>km</unit> <!-- (Optional)
<vatTransactionType>0</vatTransactionType> <!-- (Optional) default is 0. Foreign VAT transaction types (100, 8 and 5) can only be set on document level.
</Item>
...
</Items>
</parameter>
</method>
</request>
Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328
<?xml version="1.0" encoding="utf-8"?>
response status="ok" >
<number>2010-00012</number> <!-- created document ID or number
<date>2010-01-13</date> <!-- date of document
</response>
Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
<error description=""><error/> <!-- missing mandatory attributes, invalid values, no privileges,
</response>
Import Sales order issued in other IS. Parameter 'importType' can be used to specify type of import. If parameter is not specified, "createOrUpdate" is used as default. For updating Sales orders with this api call, Sales orders's data must contain code as unique identifier.
Parameters
importType | Flag for the type of import
|
SalesOrder | Sales order data in xml substructure. |
Example request and response
POST /WebServicesSI/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream
<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesOrderImport">
<parameter name="importType" value="createOrUpdate" />
<parameter name="SalesOrder">
<!-- structure of elements is the same as in SalesOrderCreate only tag <number> is mandatory here
<parameter/>
</method>
</request>
Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
<number>0001-1206-2014</number>
<date>2013-06-12</date>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
<error description="Property <number> is required."><error/> <!-- missing number
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
<error description="Sales order for number: 0001-1206-2013 already exists!"></error> <!-- Sales order for number already exists
</response>
Update existing Sales invoice.Data must contain sales invoice number to be able to identify document which is to be updated.
Parameters
SalesOrder | Complex parameter with data tags |
Example request and response
POST /WebServicesSI/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream
<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesOrderUpdate">
<parameter name="SalesOrder">
<number>12</number> <!-- document number is mandatory in UPDATE (Can use sequential document number (example: 12), or formatted number (example: 12/2011))
<!-- Parameters are identical to the parameters in SalesOrderCreate api
</parameter>
</method>
</request>
Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328
<?xml version="1.0" encoding="utf-8"?>
response status="ok" >
<number>2010-00012</number> <!-- updated document ID or number
<date>2010-01-13</date> <!-- date of document
</response>
Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
<error description=""><error/> <!-- missing mandatory attributes, invalid values, no privileges,
</response>
Delete sales order. Must specify parameter/s (number, number+date) to identify document for deleting.
Parameters
number | Document number |
date | Document date |
costPosition | Cost position |
Example request and response
POST /WebServicesSI/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream
<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesOrderDelete">
<parameter name="number" value="2010-00002" />
<parameter name="date" type="Date" value="2010-02-22" />
</method>
</request>
Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328
<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
</response>
Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
<error description="no privileges"><error/> <!-- document could not be found, no privileges,
</response>
Cancel sales order. Must specify parameter/s (number, number+date) to identify document for canceling.
Parameters
number | Document number |
date | Document date |
costPosition | Cost position |
status | Status of cancelation document (draft, issuedInvoice). By Default status is issuedInvoice. |
cancellationDocNumber | Number of cancellation document (mandatory and works only for imported documents) |
Example request and response
POST /WebServicesSI/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream
<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesOrderCancel">
<parameter name="number" value="2013-00014" />
<parameter name="cancellationDocNumber" value="2013-00014" /> <!-- Works only when canceling imported documents where this number is mandatory
<parameter name="date" type="Date" value="2013-03-26" />
<parameter name="status" value="draft" />
</method>
</request>
Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328
<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
</response>
Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
<error description="Access denied. User account does not have sufficient privileges for the given request"><error/> <!-- document could not be found, no privileges,
</response>
Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
<error description="Can not cancel sales order for arguments number: 2013-00014 date: 2013-03-26"><error/> <!-- document could not be canceled,
</response>
Possible error messages:
Access denied. User account does not have sufficient privileges for the given request
Parameter named "number" is required
Can not find sales order for number
Can not cancel. Found X sales orders
Found X sales orders X. You can only cancel one sales order at a time
Can not cancel sales order X
Get list of sales orders for criteria which is specified by API parameters.
Parameters
number | Document number |
dateFrom | The date which is used to select sales orders whose date is following it. |
dateTo | The date which is used to select sales orders whose date is preceding it |
receivalDateFrom | The date which is used to select sales orders whose date of receiva is following it. |
receivalDateTo | The date which is used to select sales orders whose date od receiva is preceding it |
dateOfPaymentFrom | The date which is used to select sales orders whose date of payment (date from payment record on document) is following it. |
dateOfPaymentTo | The date which is used to select sales orders whose date of payment (date from payment record on document) is preceding it. |
deliveryAddress | Delivery address of the buyer |
buyer | Buyer code, or buyer name |
costPosition | Cost position code |
totalAmount | Total amount of the sales order |
totalCurrency | Currency used in sales order |
article | Product code, or product name |
status | Possible values:
|
issuer | Issuer of document, search is done by username |
Example request and response
POST /WebServicesSI/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream
<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesOrderList">
<parameter name="dateFrom" type="Date" value="2009-11-01" />
<parameter name="dateTo" type="Date" value="2010-01-11" />
<parameter name="deliveryAddress" value="Iztokova" />
<parameter name="totalAmount" value=1000/>
</method>
</request>
Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
<SalesOrders>
<SalesOrder>
<!-- structure of elements is the same as in SalesOrderGet
</SalesOrder>
...
</SalesOrders>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
<error description=""><error/> <!-- no privileges,
</response>
Sends document by email to the recipient(s).
Parameters
number | Document number |
date | Document date (optional additional document identification) |
sender | Email sender (Optional) |
recipient | Comma delimited list of recipient(s) emails |
cc | CC email (Optional) |
bcc | BCC email (Optional) |
subject | Mail subject (Optional) |
message | Message text (Optional) |
useHtmlMessage | Send message text as HTML (Optional) |
Example request and response
POST /WebServicesSI/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream
<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesOrderSendByEmail">
<parameter name="number" value="12/2009" />
<parameter name="date" type="Date" value="2010-01-13" />
<parameter name="sender" value="micka@kovac.com"/>
<parameter name="recipient" value="zoran@kovac.com,zlatko@kovac.com"/>
<parameter name="cc" value=""/>
<parameter name="bcc" value=""/>
<parameter name="subject" value="TEST d.o.o.: Sales quote nr. 0002/2010"/>
<parameter name="message" value="Message text"/>
<parameter name="useHtmlMessage" value="true"/>
</method>
</request>
Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
<error description="no privileges"><error/> <!-- document could not be found, no privileges, mail sending failed
</response>
Add payment record on sales order.
Parameters
number | Document number |
date | Document date (optional additional document identification) |
costPosition | Cost position |
businessUnit | Business unit |
paymentDate | Payment date |
paymentAmount | Payment amount |
paymentMethodForInvoice | Payment method for sales order
|
paymentRemark | Payment remark (optional) |
paymentCurrency | Payment currency (optional) |
Example request and response
POST /WebServicesSI/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream
<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesOrderPaymentRecordAdd">
<parameter name="number" value="2014-00013"/>
<parameter name="date" type="Date" value="2014-05-15"/>
<parameter name="paymentDate" type="Date" value="2014-05-20"/>
<parameter name="paymentAmount" value="50"/>
<parameter name="paymentMethodForInvoice" value="Cash"/>
<parameter name="paymentRemark" value="Payment record on sales order 2014-05-15"/>
<parameter name="paymentCurrency" value="EUR"/>
</method>
</request>
Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
<error description="Payment method Test is not supported"><error/> <!-- wrong payment method chosen
</response>
Create sales invoice from sales order.
Parameters
number | Document number. Can use sequential document number (example: 2), or formated number (example: 2016-00002) |
date | Document date |
costPosition | Cost position/cost center |
businessUnit | Business unit |
status | Status for created invoice (issuedInvoice or draft). |
warehouseCode | Warehouse that will be set on created invoice, default it is taken from sales order. |
cashRegisterCode | Cashbook. |
Example request and response
POST /WebServicesSI/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream
<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesOrderCreateInvoice">
<parameter name="number" value="0005/2021"/>
<parameter name="status" value="issuedInvoice"/>
<parameter name="cashRegisterCode" value="001"/>
<parameter name="warehouseCode" value="908"/>
</method>
</request>
Response
HTTP/1.1 200 OK
Server: e-racuni.com web server
Date: Tue, 1 March 2010 11:00:05 GMT
Content-Type: text/xml
Content-Length: 328
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
<number>2010-00005</number> <!-- created document number
<date>2010-01-13</date> <!-- date of document
<documentID>123.21421</documentID> <!-- created document ID
<message>Succesfuly created sales invoice from sales order</message>
</response>
Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
<error description="no privileges"><error/> <!-- document could not be found, no privileges,
</response>
Add image/attachment to sales order.
Parameters
number | Document number. Can use sequential document number (example: 2), or formated number (example: 2016-00002) |
date | Document date |
costPosition | Cost position/cost center |
businessUnit | Business unit |
Example request and response
POST /WebServicesSI/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream
<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesOrderAttachmentAdd">
<parameter name="number" type="String" value="2020-00001" />
<parameter name="attachment">
<contents encoding="BASE64">BASE64...</contents>
<fileName>att.jpg</fileName>
</parameter>
</method>
</request>
Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
<message>Successfully added attachment att.jpg to sales order 2020-00001.</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
<error description=""><error/> <!-- Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find sales order for number: 2020-00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>
Add attachment to sales order and set is as default.
Parameters
number | Document number. Can use sequential document number (example: 2), or formated number (example: 2016-00002) |
date | Document date |
costPosition | Cost position/cost center |
businessUnit | Business unit |
Example request and response
POST /WebServicesSI/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream
<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesOrderAttachmentSetDefault">
<parameter name="number" type="String" value="2020-00001" />
<parameter name="attachment">
<contents encoding="BASE64">BASE64...</contents>
<fileName>att.jpg</fileName>
</parameter>
</method>
</request>
Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
<message>Successfully added attachment att.jpg to sales order 2020-00001.</message>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
<error description=""><error/> <!-- Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find sales order for number: 2020-00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>
Get default attachment of sales order.
Parameters
number | Document number. Can use sequential document number (example: 2), or formated number (example: 2016-00002) |
date | Document date |
costPosition | Cost position/cost center |
businessUnit | Business unit |
Example request and response
POST /WebServicesSI/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream
<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesOrderAttachmentGet">
<parameter name="number" type="String" value="2020-00001" />
</method>
</request>
Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
<SalesOrder>
<Attachments>
<Attachment>
<fileName>att.jpg</fileName>
<contents encoding="BASE64">BASE64</contents>
</Attachment>
</Attachments>
</SalesOrder>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
<error description=""><error/> <!-- Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find sales order for number: 2020-00001 Sales order does not have attachemnts.
</response>
Get all images/attachments of article.
Parameters
number | Document number. Can use sequential document number (example: 2), or formated number (example: 2016-00002) |
date | Document date |
costPosition | Cost position/cost center |
businessUnit | Business unit |
Example request and response
POST /WebServicesSI/API HTTP/1.1
Host: eurofaktura.com
User-Agent: Mozilla/4.0
Content-Length: 410
Content-Type: application/octet-stream
<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="SalesOrderAttachmentList">
<parameter name="number" type="String" value="2020-00001" />
</method>
</request>
Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
<SalesOrder>
<Attachments>
<Attachment>
<fileName>att1.jpg</fileName>
<contents encoding="BASE64">1BASE64</contents>
</Attachment>
<Attachment>
<fileName>att2.jpg</fileName>
<contents encoding="BASE64">2BASE64</contents>
</Attachment>
<Attachment>
<fileName>att3.jpg</fileName>
<contents encoding="BASE64">3BASE64</contents>
</Attachment>
</Attachments>
</SalesOrder>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
<error description=""><error/> <!-- Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named <number> is required, Can not find sales order for number: 2020-00001 Sales order does not have attachemnts.
</response>