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

GoodsReceipt API

GoodsReceiptGetGet goods receipts by document number, or by combination of document number and date.
GoodsReceiptGetPDFGet PDF file for goods receipt by document number, or by combination of document number and date.
GoodsReceiptCreateCreate new goods receipt.
GoodsReceiptUpdateUpdate existing goods receipt.
GoodsReceiptDeleteDelete goods receipt.
GoodsReceiptCancelCancel goods receipt.
GoodsReceiptListGet list of goods receipts for specified criteria
GoodsReceiptSendByEmailSends document by email to the recipient(s).

GoodsReceiptGet

Get goods receipt by document number, or by combination of document number and date.

Parameters

numberDocument number. Can use sequential document number (example: 2), or formated number (example: 2010-00002)
dateDocument date
costPositionCost position

Example request and response

POST /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="GoodsReceiptGet">
       <parameter name="number" value="2012-00014" />
       <parameter name="date" type="Date" value="2012-09-26" />
</method>
</request>

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

<?xml version="1.0" encoding="utf-8"?>
<response status="ok">
       <GoodsReceipt>
               <number>2012-00014</number>
               <date>2012-09-26</date>
               <dateOfReceival>2012-09-26</dateOfReceival>
               <businessYear>2012</businessYear>
               <city>Ljubljana</city>
               <costPosition>12</costPosition>
               <purchaseOrder>13</purchaseOrder>
               <warehouseCode>8956</warehouseCode>
               <status>Issued</status>
               <remarks>my remarks on: #(10. oktobar 2012 15:26:28)</remarks>
               <supplierCity>Oslo</supplierCity>
               <supplierCode>666000</supplierCode>
               <supplierDeliveryNote>11</supplierDeliveryNote>
               <supplierDeliveryNoteDate>2012-09-26</supplierDeliveryNoteDate>
               <supplierName>6 Partner Buyer Supplier</supplierName>
               <supplierPostalCode>0182</supplierPostalCode>
               <supplierStreet>Brennerivn.11</supplierStreet>
               <supplierTaxNumber>SI89133749</supplierTaxNumber>
               <cancelledDocumentRef>2012-00015</cancelledDocumentRef> <-- Reference to cancelled document
               <Items>
                       <Item>
                               <position>1</position>
                               <productCode>666666</productCode>
                               <calculationQuantity>2.000</calculationQuantity>
                               <associatedSerialNumbers> 222, 111</associatedSerialNumbers>
                               <supplierPrice>10.00000</supplierPrice>
                               <supplierPriceAmount>20.00000</supplierPriceAmount>
                               <supplierPriceCurrency>EUR</supplierPriceCurrency>
                               <supplierPriceInCalculationCurrency>10.00000</supplierPriceInCalculationCurrency>
                               <supplierAmountInCalculationCurrency>20.00000</supplierAmountInCalculationCurrency>
                               <supplierDiscountPercentage>10.00</supplierDiscountPercentage>
                               <supplierDiscountAmount>2.00000</supplierDiscountAmount>
                               <costsOfTransportPercentage>5.00</costsOfTransportPercentage>
                               <costsOfTransportAmount>0.90000</costsOfTransportAmount>
                               <costsOfCustomsPercentage>2.00</costsOfCustomsPercentage>
                               <costsOfCustomsAmount>0.36000</costsOfCustomsAmount>
                               <inboundVatPercentage>20.00</inboundVatPercentage>
                               <inboundVatAmount>3.60000</inboundVatAmount>
                               <costsDirectPercentage>1.00</costsDirectPercentage>
                               <costsDirectAmount>0.18000</costsDirectAmount>
                               <inventoryPrice>9.72000</inventoryPrice>
                               <inventoryAmount>19.44000</inventoryAmount>
                               <grossMarginPercentage>10.00</grossMarginPercentage>
                               <grossMarginAmount>0.97200</grossMarginAmount>
                               <grossPrice>10.69200</grossPrice>
                               <outgoingVatPercentage>20.00</outgoingVatPercentage>
                               <outgoingVatAmount>2.33280</outgoingVatAmount>
                               <retailMarginAmount>1.94400</retailMarginAmount>
                               <retailMarginPercentage>20.00</retailMarginPercentage>
                               <retailPrice>11.66400</retailPrice>
                               <salesPrice>13.99680</salesPrice>
                               <salesPriceAmount>27.99360</salesPriceAmount>
                               <calculationCurrency>EUR</calculationCurrency>  
                       </Item>
               </Items>
       </GoodsReceipt>
</response>

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Can not find goods receipt for number: XXX and date: XXX"><error/>
</response>

Error messages:
Parameter named "number" is required.
Can not find goods receipt for number: XXX and date: XXX



GoodsReceiptGetPDF

Get PDF for goods receipt by document number, or by combination of document number and date. Response (on OK) returns binary record for PDF file coded with Base64 coding.

Parameters

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

Example request and response

POST /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="GoodsReceiptGetPDF">
       <parameter name="number" value="12/2009" />
       <parameter name="date" type="Date" value="2009-12-15" />
</method>
</request>


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

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



GoodsReceiptCreate

Create new goods receipt.

Mandatory document attributes are: supplierCode, warehouseCode.Mandatory document item attribute is productCode. Other attributes are optional and web service will use default values and those from specified product. Default amount is 1, default date is day of execution. Amounts in item calculations can be specified by prices, amounts or percantages, where related values will be automaticly recalculated.
Additional optional item fields are: calculationQuantity, associatedSerialNumbers, supplierPrice, supplierPriceAmount, supplierPriceCurrency, supplierPriceInCalculationCurrency, supplierAmountInCalculationCurrency, supplierDiscountPercentage, supplierDiscountAmount, costsOfTransportPercentage, costsOfTransportAmount, costsOfCustomsPercentage, costsOfCustomsAmount, inboundVatPercentage, inboundVatAmount, costsDirectPercentage, costsDirectAmount, inventoryPrice, inventoryAmount, grossMarginPercentage, grossMarginAmount, grossPrice, outgoingVatPercentage, outgoingVatAmount, retailMarginAmount, retailMarginPercentage, retailPrice, salesPrice, salesPriceAmount.

Attribute associatedSerialNumbers is mandatory for products which are declared to use serial numbers (numbers delimited by comma).
Status of document is automatically set to "issued" if parameter number is specified in parameter list, or if it's status is explicitelly set to issued.

Parameters

GoodsReceiptComplex parameter with data tags like:
statusPossible values:
  • Draft 
  • Issued 

Special purpose documen item attributes are: inventoryPriceChangeApplyToArticle, grossPriceChangeApplyToArticle, salesPriceChangeApplyToArticle. If some is set to true, related price in product will be modified acording to the price in good receipt item.

Example request and response

POST /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="GoodsReceiptCreate">
<parameter name="GoodsReceipt">
               <date>2012-09-26</date>                                 <!-- document date
               <dateOfReceival>2012-09-26</dateOfReceival>             <!-- date of receival
               <businessYear>2012</businessYear>                               <!-- (Optional)
               <purchaseOrder>13</purchaseOrder>                       <!-- (Optional)
               <warehouseCode>8956</warehouseCode>                     <!-- (Mandatory)
               <status>Issued</status>                                 <!-- (Optional) Issued, Draft, default: Issued
               <costPosition>120</costPosition>                                <!-- (Optional)
               <supplierCode>123456</supplierCode>                     <!-- (Mandatory)
               <supplierDeliveryNote>11</supplierDeliveryNote>         <!-- (Optional)
               <supplierDeliveryNoteDate>2012-09-26</supplierDeliveryNoteDate>
               <remarks>Remark on goods receipt</remarks>              <!-- (Optional)
               <documentLanguage>Slovene</documentLanguage> <!-- (Optional) Possible document language: Slovene, English, German, Italian and Croatian
               <Items>
                       <Item>                                                          <!-- item specified with ref to product
                               <position>1</position>      <!-- position of item
                               <productCode>666666</productCode>                               <!-- product code
                               <calculationQuantity>2</calculationQuantity>                    <!-- quantity (default is 1)
                               <associatedSerialNumbers> 222, 111</associatedSerialNumbers>    <!-- serial numbers (a number per calculationQuantity of products)
                               <discountPercentage>10</discountPercentage>                     <!-- discount percentage
                       </Item>
                       <Item>
                               <position>2</position>      <!-- position of item
                               <calculationQuantity>2.000</calculationQuantity>
                               <productCode>666666</productCode>
                               <salesPriceAmount>30</salesPriceAmount>                         <!-- sales amount (sales price * calculationQuantity)
                               <associatedSerialNumbers>111, 222</associatedSerialNumbers>
                       </Item>
                       <Item>
                               <position>3</position>
                               <productCode>666666</productCode>
                               <calculationQuantity>2.000</calculationQuantity>
                               <supplierPriceAmount>60</supplierPriceAmount>                   <!-- sales amount (sales amount / calculationQuantity)
                               <associatedSerialNumbers>111, 222</associatedSerialNumbers>
                       </Item>
                       <Item>   <!-- (default quantity is 1)
                               <position>4</position>
                               <productCode>666666</productCode>
                               <associatedSerialNumbers>123</associatedSerialNumbers>
                               <supplierPrice>30.00</supplierPrice>
                       </Item>
                       <Item>
                               <position>5</position>
                               <productCode>666666</productCode>
                               <calculationQuantity>2.000</calculationQuantity>
                               <supplierPrice>10</supplierPrice>
                               <costsOfCustomsPercentage>5.00</costsOfCustomsPercentage>               <!-- customs cost percantage
                               <salesPrice>30</salesPrice>                                                     <!-- sales price
                               <associatedSerialNumbers>111, 222</associatedSerialNumbers>
                               <inventoryPriceChangeApplyToArticle>true</inventoryPriceChangeApplyToArticle>   <!-- special atribute for create and update function
                               <grossPriceChangeApplyToArticle>true</grossPriceChangeApplyToArticle>           <!-- special atribute for create and update function
                               <salesPriceChangeApplyToArticle>true</salesPriceChangeApplyToArticle>           <!-- special atribute for create and update function
                       </Item>
                       ...
               </Items>
       </parameter>
</method>
</request>

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

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

Generic error messages (not related to concrete property):
Access denied. User account does not have sufficient privileges for the given request
Parameter named GoodsReceipt needed.
Error creating Goods receipt (descrition)
Goods receipt for number: X already exists!

Error messages which are related to properties are formated in a a way: "Error nr: N #propertyName - error description"
supplierCode - Missing supplier code
supplierCode - Can not find supplier for code:
warehouseCode - Missing warehouse code
warehouseCode - Warehouse does not exist
supplierTaxNumber - Tax number invalid
supplierTaxNumber - ID nr. for VAT invalid
supplierName - Entry is mandatory
city - Entry is mandatory
date - Entry is mandatory
date - Document cannot be issued retroactively because document with later date was already issued.
dateOfReceival - Entry is mandatory

Errors for document items data are formated like shown bellow (X is item sequence number)
ItemX_associatedSerialNumbers - Serial number entry is required for each piece of product.
ItemX_productCode - Entry is mandatory
ItemX_productCode - Can not find product for code:
ItemX_inboundVatPercentage - Entry is mandatory



GoodsReceiptUpdate

Update existing goods receipt.Data must contain goods receipt number to be able to identify document which is to be updated.

Parameters

GoodsReceipt Complex parameter with data tags

Example request and response

POST /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="GoodsReceiptUpdate">
<parameter name="GoodsReceipt">
               <!--  Parameters are identical to the parameters in GoodsReceiptCreate api
       </parameter>
</method>
</request>

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

Response (on error)
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>          <!-- Error messages are returned in format as described in GoodsReceiptCreate api
</response>




GoodsReceiptDelete

Delete sales order. Must specify parameter/s (number, number+date) to identify document for deleting.

Parameters

numberDocument number
dateDocument date

Example request and response

POST /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="GoodsReceiptDelete">
       <parameter name="number" value="2012-00014" />
       <parameter name="date" type="Date" value="2012-09-26" />
</method>
</request>

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

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

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

Possible error messages:
Access denied. User account does not have sufficient privileges for the given request
Parameter named "number" is required
Can not find goods receipt for number
Can not delete. Found X goods receipts
Data cannot be deleted because they are needed or referenced by other documents or data.


GoodsReceiptCancel

Cancel goods receipt. Must specify parameter/s (number, number+date) to identify document for canceling.

Parameters

numberDocument number
dateDocument date
costPositionCost position
statusStatus of cancelation document (draft, issuedInvoice). By Default status is issuedInvoice.

Example request and response

POST /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="GoodsReceiptCancel">
       <parameter name="number" value="2013-00014" />
       <parameter name="date" type="Date" value="2013-03-26" />
       <parameter name="status" value="draft" />
</method>
</request>

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

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

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

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

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


GoodsReceiptList

Get list of goods receipts for criteria which is specified by API parameters.

Parameters

numberDocument number
dateFromThe date which is used to select goods receipts whose date is following it
dateToThe date which is used to select goods receipts whose date is preceding it
warehouseWarehouse code
dateOfReceivalThe date of receival
supplierDeliveryNoteDelivery Note number
purchaseOrderPurchase number
serialNumberProduct serial number
supplierSupplier name
costPositionCost position code
productProduct code, or product name
remarksDocument remarks
statusPossible values:
  • Draft 
  • Issued 
  • Booked 
  • NotBooked 

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="GoodsReceiptList">
               <parameter name="status" value="Issued" />
               <parameter name="dateFrom" type="Date" value="2012-09-26" />
       </method>
</request>

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


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


Possible error messages:Access denied. User account does not have sufficient privileges for the given request.Invalid search key!Invalid search value: X

GoodsReceiptSendByEmail

Sends document by email to the recipient(s).

Parameters

numberDocument number
dateDocument date (optional additional document identification)
senderEmail sender (Optional)
recipientComma delimited list of recipient(s) emails
ccCC email (Optional)
bccBCC email (Optional)
subjectMail subject (Optional)
messageMessage text (Optional)

Example request and response

POST /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="GoodsReceiptSendByEmail">
       <parameter name="number" value="2012-00014" />
       <parameter name="date" type="Date" value="2012-09-26" />
       <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.: Goods receipts nr. 0002/2010"/>
       <parameter name="message" value="Message text"/>
</method>
</request>

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


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

Error messages
Access denied. User account does not have sufficient privileges for the given request.
number – asp.error.MandatoryEntry
stDok - Document does not exist
stDok - More then one document matches criteria !



Reference na stran

---
Zadnja sprememba 22.05.2018 14:06:09
© E-RAČUNI d.o.o. 2003-2018