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

Product API

ProductGetByCodeGet product by product's code.
ProductCreateCreate new product
ProductUpdateUpdate existing product
ProductImportImport product by creating new and/or updating existing one.
ProductDeleteDelete product.
ProductListGet list of products for specified criteria
ProductListPriceListGetGet price list for product if used for specified product

ProductGetByCode

Get product by productCode.

Parameters

productCodeProduct code.

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="ProductGetByCode">
       <parameter name="productCode" value="PA2521U-2AC3" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <Product>
               <productCode>PA2521U-2AC3</productCode>                 <!-- (Mandatory and Unique)
               <barCode></barCode>                                     <!-- (Optional but must be unique)
               <catalogueCode>V000061280</catalogueCode>               <!-- (Optional)
               <status>active</status>                                 <!-- (Optional – if not specified default is used – true=active, false=inactive = product can not be put on the document
               <type>goodsWithoutStockManagement</type>                <!-- (Optional – if not specified default is used - goodsWithStockManagement). Possible types: services, goodsWithStockManagement, goodsWithoutStockManagement, rawMaterial, intermediateProduct, product, license.
               <trackItemsBySerialNumbers>true</trackItemsBySerialNumbers>             <!-- (Optional – default false)
               <name>TOSHIBA charger 15V/ 6A 90 W</name>                               <!-- (one of properties: "name" or "description" is mandatory)
               <description>Toshiba charger for 15V, 6A, 90W, 3-pin</description>                                      <!-- (one of properties: "name" or "description" is mandatory)
               <englishName></englishName>                             <!-- (Optional)
               <englishDescription></englishDescription>               <!-- (Optional)
               <germanName></germanName>                               <!-- (Optional)
               <germanDescription></germanDescription>                 <!-- (Optional)
               <productGroupPrimary>01125</productGroupPrimary>        <!-- (Optional)
               <productGroupSecondary>00106</productGroupSecondary>    <!-- (Optional)
               <customProperty1>true</customProperty1>                 <!-- (Optional)
               <customProperty2>leather</customProperty2>              <!-- (Optional)
               <customProperty3>shine</customProperty3>                <!-- (Optional)
               <customProperty4>XL</customProperty4>                   <!-- (Optional)
               <brand>Minoti</brand>                                   <!-- (Optional)
               <costPosition>0001</costPosition>                       <!-- (Optional). This property can be used as product selection criteria for several reports.
               <unit>piece</unit>                                      <!-- (Optional)
               <packingQuantity>5.000</packingQuantity>                <!-- (Optional)
               <minimalStockQuantity>100.0000</minimalStockQuantity>   <!-- (Optional)
               <warrantyPeriod>24</warrantyPeriod>                     <!-- (Optional)
               <weight>0.500000</weight>                               <!-- (Optional)
               <useOfPriceList>false</useOfPriceList>  <!-- (Optional – default false) true=use price list for the product, false=do not use price list for product.
               <vatPercentage>20.0</vatPercentage>     <!-- (Mandatory. Values: 0, 8.5, 20)
               <currency>EUR</currency>                <!-- (Optional)
               <exchangeRate>SlovenianBankMiddleRate</exchangeRate>    <!-- (Optional. Values: SlovenianBankMiddleRate , NLBSellingRate. Default: SlovenianBankMiddleRate)
               <purchasePrice>20.49</purchasePrice>    <!-- (Optional)
               <retailPrice>30.00</retailPrice>        <!-- for types of products other then: "rawMaterial" and "intermediateProduct", one of product properties: retailPrice or grossPrice must be specified.
               <grossPrice>25.00</grossPrice>          <!-- for types of product: "rawMaterial" or "intermediateProduct", one of product properties: retailPrice or grossPrice must be specified
               <procurementTransactionAccount>760200</procurementTransactionAccount>                           <!-- (Optional)
               <domesticSalesTransactionAccount>760100</domesticSalesTransactionAccount>                       <!-- (Optional)
               <foreignSalesTransactionAccount>760100</foreignSalesTransactionAccount>                         <!-- (Optional)
               <allowChangeOfProductDescriptionOnTheInvoice>false</allowChangeOfProductDescriptionOnTheInvoice> <!-- (Optional – default false)
               <allowChangeOfPriceOnTheInvoice>false</allowChangeOfPriceOnTheInvoice>                          <!-- (Optional – default false)
               <allowChangeOfVatRateOnTheInvoice>false</allowChangeOfVatRateOnTheInvoice>                      <!-- (Optional – default false)
               <invoicingRemarks>Technical documentation for the bottom of the document</invoicingRemarks>     <!-- (Optional)
       </Product>
</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 <productCode> is required, Can not find product for code: PA2521U-2AC3, …
</response>

ProductCreate

Create new product. (for product's data structure look in API for ProductGetByCode). Property productCode is not obligatory (if not specified, it will be automatically generated), but if product with such code already exists, error response will be returned.

Parameters

productProduct's 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="ProductCreate">
       <parameter name="product">
               <productCode>PA2521U-2AC3</productCode>                         <!-- (Mandatory and Unique)
               <catalogueCode>V000061280</catalogueCode>                       <!-- (Optional)
               <status>active</status>                                         <!-- (Optional – if not specified default is used – true=active, false=inactive = product can not be put on the document
               <type>goodsWithStockManagement</type>                           <!-- (Optional – if not specified default is used - goodsWithoutStockManagement). Possible types: services, goodsWithStockManagement, goodsWithoutStockManagement, rawMaterial, intermediateProduct, product, license.
               <trackItemsBySerialNumbers>true</trackItemsBySerialNumbers>     <!-- (Optional – default false)
               <name>TOSHIBA charger 15V/ 6A 90 W</name>                       <!-- (one of properties: "name" or "description" is mandatory)
               <description>Toshiba charger for 15V, 6A, 90W, 3-pin</description>      <!-- (one of properties: "name" or "description" is mandatory)
               <englishName></englishName>                             <!-- (Optional)
               <englishDescription></englishDescription>               <!-- (Optional)
               <germanName></germanName>                               <!-- (Optional)
               <germanDescription></germanDescription>                 <!-- (Optional)
               <productGroupPrimary>01125</productGroupPrimary>                <!-- (Optional)
               <brand>TOSHIBA</brand>                                          <!-- (Optional)
               <unit>piece</unit>                                              <!-- (Optional)
               <packingQuantity>1.000</packingQuantity>                        <!-- (Optional)
               <minimalStockQuantity>10</minimalStockQuantity>                 <!-- (Optional)
               <warrantyPeriod>24</warrantyPeriod>     <!-- (Optional)
               <useOfPriceList>false</useOfPriceList>  <!-- (Optional – default false) true=use price list for the product, false=do not use price list for product.
               <vatPercentage>20.0</vatPercentage>     <!-- (Mandatory. Values: 0, 8.5, 20)
               <currency>EUR</currency>                <!-- (Optional)
               <exchangeRate>SlovenianBankMiddleRate</exchangeRate>            <!-- (Optional. Values: SlovenianBankMiddleRate , NLBSellingRate. Default: SlovenianBankMiddleRate)
               <purchasePrice>20.49</purchasePrice>    <!-- (Optional)
               <retailPrice>30.00</retailPrice>        <!-- for types of products other then: "rawMaterial" and "intermediateProduct", one of product properties: retailPrice or grossPrice must be specified.
               <grossPrice>25.00</grossPrice>          <!-- for types of product: "rawMaterial" or "intermediateProduct", one of product properties: retailPrice or grossPrice must be specified
               <procurementTransactionAccount>760200</procurementTransactionAccount>                   <!-- (Optional)
               <domesticSalesTransactionAccount>760100</domesticSalesTransactionAccount>               <!-- (Optional)
               <foreignSalesTransactionAccount>760100</foreignSalesTransactionAccount>                 <!-- (Optional)
               <allowChangeOfProductDescriptionOnTheInvoice>true</allowChangeOfProductDescriptionOnTheInvoice>         <!-- (Optional – default false)
               <allowChangeOfPriceOnTheInvoice>true</allowChangeOfPriceOnTheInvoice>                   <!-- (Optional – default false)
               <allowChangeOfVatRateOnTheInvoice>false</allowChangeOfVatRateOnTheInvoice>              <!-- (Optional – default false)
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <productCode>PA2521U-2AC3</productCode>
</response>
Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Product for productCode: PA2521U-2AC3 already exists!><error/> <!-- Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named <product> must be specified., missing mandatory attributes, invalid values, no privileges, Error creating product …
</response>

ProductUpdate

Update existing product.

Parameters

productProduct's 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="ProductUpdate">
       <parameter name="product">
               <productCode>PA2521U-2AC3</productCode>                         <!-- (Mandatory and Unique)
               <catalogueCode>V000061280</catalogueCode>                       <!-- (Optional)
               <status>active</status>                                         <!-- (Optional – if not specified default is used – true=active, false=inactive = product can not be put on the document
               <type>product</type>                                            <!-- (Optional – if not specified default is used - goodsWithoutStockManagement). Possible types: services, goodsWithStockManagement, goodsWithoutStockManagement, rawMaterial, intermediateProduct, product, license.
               <trackItemsBySerialNumbers>true</trackItemsBySerialNumbers>     <!-- (Optional – default false)
               <name>TOSHIBA charger 15V/ 6A 90 W </name>                      <!-- (one of properties: "name" or "description" is mandatory)
               <description>Toshiba charger for 15V, 6A, 90W, 3-pin</description>                                      <!-- (one of properties: "name" or "description" is mandatory)
               <englishName></englishName>                             <!-- (Optional)
               <englishDescription></englishDescription>               <!-- (Optional)
               <germanName></germanName>                               <!-- (Optional)
               <germanDescription></germanDescription>                 <!-- (Optional)
               <unit>piece</unit>                                                      <!-- (Optional)
               <packingQuantity>1.000</packingQuantity>                                <!-- (Optional)
               <minimalStockQuantity>20</minimalStockQuantity>                         <!-- (Optional)
               <warrantyPeriod>36</warrantyPeriod>     <!-- (Optional)
               <vatPercentage>20.0</vatPercentage>     <!-- (Mandatory. Values: 0, 8.5, 20)
               <currency>EUR</currency>                        <!-- (Optional)
               <purchasePrice>20.49</purchasePrice>    <!-- (Optional)
               <retailPrice>30.00</retailPrice>                <!-- for types of products other then: "rawMaterial" and "intermediateProduct", one of product properties: retailPrice or grossPrice must be specified.
               <grossPrice>25.00</grossPrice>          <!-- for types of product: "rawMaterial" or "intermediateProduct", one of product properties: retailPrice or grossPrice must be specified
               <allowChangeOfProductDescriptionOnTheInvoice>true</allowChangeOfProductDescriptionOnTheInvoice>                 <!-- (Optional – default false)
               <allowChangeOfPriceOnTheInvoice>false</allowChangeOfPriceOnTheInvoice>          <!-- (Optional – default false)
               <allowChangeOfVatRateOnTheInvoice>true</allowChangeOfVatRateOnTheInvoice>       <!-- (Optional – default false)
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <productCode>PA2521U-2AC3</productCode>
</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 <product> needed, Product's property <productCode> is required, Can not find product for productCode: PA2521U-2AC3, missing mandatory attributes, invalid values, no privileges, …
</response>

ProductDelete

Delete product.

Parameters

productCodeUnique identifier for product.

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="ProductDelete">
       <parameter name="productCode" value="PA2521U-2AC3" />
</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=""><error/>   <! Possible errors: Access denied. User account does not have sufficient privileges for the given request, Parameter named <productCode> is required, Can not find product for productCode: PA2521U-2AC3, Can not delete. Found 3  product with productCode: PA2521U-2AC3,
</response>

ProductImport

Import product by creating new and/or updating existing ones. Parameter 'importType' can be used to specify type of import. If parameter is not specified, "createOrUpdate" is used as default. For updating product with this api call, product's data must contain code as unique identifier.

Parameters

importTypeFlag for the type of import
  • createOrUpdate Import all - create new and update existing partners
  • createOnly  Skip import for existing partners
  • updateOnly  Skip import of new partners
productProduct's 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="ProductImport">
       <parameter name="importType" value="createOrUpdate" />
       <parameter name="product">              <!-- parameter here is the same as for ProductUpdate or ProductCreate depending on importType
               <productCode>PA2521U-2AC3</productCode>                         <!-- (Mandatory and Unique)
               <catalogueCode>V000061280</catalogueCode>                       <!-- (Optional)
               <status>active</status>                                         <!-- (Optional – if not specified default is used – true=active, false=inactive = product can not be put on the document
               <type>product</type>                                            <!-- (Optional – if not specified default is used - goodsWithoutStockManagement). Possible types: services, goodsWithStockManagement, goodsWithoutStockManagement, rawMaterial, intermediateProduct, product, license.
               <trackItemsBySerialNumbers>true</trackItemsBySerialNumbers>     <!-- (Optional – default false)
               <name>TOSHIBA charger 15V/ 6A 90 W </name>                      <!-- (one of properties: "name" or "description" is mandatory)
               <description>Toshiba charger for 15V, 6A, 90W, 3-pin</description>                                      <!-- (one of properties: "name" or "description" is mandatory)
               <unit>piece</unit>                                                      <!-- (Optional)
               <packingQuantity>1.000</packingQuantity>                                <!-- (Optional)
               <minimalStockQuantity>20</minimalStockQuantity>                         <!-- (Optional)
               <warrantyPeriod>36</warrantyPeriod>     <!-- (Optional)
               <vatPercentage>20.0</vatPercentage>     <!-- (Mandatory. Values: 0, 8.5, 20)
               <currency>EUR</currency>                        <!-- (Optional)
               <purchasePrice>20.49</purchasePrice>    <!-- (Optional)
               <retailPrice>30.00</retailPrice>                <!-- for types of products other then: "rawMaterial" and "intermediateProduct", one of product properties: retailPrice or grossPrice must be specified.
               <grossPrice>25.00</grossPrice>          <!-- for types of product: "rawMaterial" or "intermediateProduct", one of product properties: retailPrice or grossPrice must be specified
               <allowChangeOfProductDescriptionOnTheInvoice>true</allowChangeOfProductDescriptionOnTheInvoice>                 <!-- (Optional – default false)
               <allowChangeOfPriceOnTheInvoice>false</allowChangeOfPriceOnTheInvoice>          <!-- (Optional – default false)
               <allowChangeOfVatRateOnTheInvoice>true</allowChangeOfVatRateOnTheInvoice>       <!-- (Optional – default false)
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <parameter name="productCode" value="PA2521U-2AC3" />
</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, missing mandatory attributes, invalid
</response>

ProductList

Get list of products for specified criteria.

Parameters

productCodeProduct's code.
productCodeFromSearch by product code range.
productCodeToSearch by product code range.
searchKeySearch key. The value from this property is used for searching for values in fields: "name", "description" and "brand"
supplierCodeSupplier code
barCodeBar code
brandName of the product's brand
productGroupCode of product group (primary or secondary)
statusUsage status (active, inactive)

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="ProductList">
       <parameter name="searchKey" type="String" value="" />
       <parameter name="productCode" value="123456" />
       <parameter name="barCode" value="" />
       <parameter name="brand" type="String" value="Samsung" />
       <parameter name="status" value="active"/>
</method>
</request>

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="ProductList">
       <parameter name="productCodeFrom" value="ART-1*" />
        <parameter name="productCodeTo" value="ART-3*" />
</method>
</request>


Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <Product>
                <!-- structure of product data is the same as in ProductGetByCode
       </Product>
       <Product>
                <!-- structure of product data is the same as in ProductGetByCode
       </Product>
       ...
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Access denied. User account does not have sufficient privileges for the given request, Invalid search keys, invalid values, no privileges, …
</response>


ProductPriceListGet

Get price list for product if used for specified product.

Parameters

productCodeProduct's code.
priceListCurrencyPrice list currency
priceListDatePrice list 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="ProductList">
       <parameter name="productCode" value="123456" />
       <parameter name="priceListCurrency" value="EUR" />
       <parameter name="priceListDate" value="2014-11-13" />
</method>
</request>


Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <PriceListItem>
               <grossPrice>160.00000</grossPrice>
               <productPriceListCurrency>EUR</productPriceListCurrency>
               <purchasePrice>101.00000</purchasePrice>
               <retailPrice>300.00000</retailPrice>
               <validFrom>2014-11-11</validFrom>
               <validTo>2014-11-13</validTo>
       </PriceListItem>
               <PriceListItem>
               <grossPrice>170.00000</grossPrice>
               <productPriceListCurrency>EUR</productPriceListCurrency>
               <purchasePrice>106.00000</purchasePrice>
               <retailPrice>366.00000</retailPrice>
               <validFrom>2014-12-11</validFrom>
               <validTo>2015-01-13</validTo>
       </PriceListItem>
       ...
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description=""><error/>  <!-- Access denied. User account does not have sufficient privileges for the given request, Invalid search keys, invalid values, no privileges, …
</response>

<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Use of price list for this product is disabled."><error/>
</response>



Reference na stran

---
Zadnja sprememba 16.08.2018 9:03:14
© E-RAΘUNI d.o.o. 2003-2018