Prva stran 
Nazaj 
Naprej 
Novosti 
 Kopiraj povezavo na to stran 
 
Natisni stranNatisni stran  
e-računi navodila za up...  >  Spletne storitve in int...  >  API Reference  >  ProductGroup API

ProductGroup API

ProductGroupGetByCodeGet product group by product group's code.
ProductGroupCreateCreate new product group
ProductGroupUpdateUpdate existing product group
ProductGroupDeleteDelete product group.
ProductGroupListGet list of product groups for specified criteria

ProductGroupGetByCode

Get product group by product group code.

Parameters

ProductGroupCodeProduct group 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="ProductGroupGetByCode">
       <parameter name="productGroupCode" value="PG2521U" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <ProductGroup>
               <productGroupCode>PG2521U</productGroupCode>
               <productGroupDescription>api test product group</productGroupDescription>
               <purchasingGLAccountNumber>2300</purchasingGLAccountNumber>
               <salesGLAccountNumber>1200</salesGLAccountNumber>
               <status>active</status>
               <warrantyText>This is warranty text</warrantyText>
               <onlineShopVisibility>visibleOnline</onlineShopVisibility>
       </ProductGroup>
</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 <productGroupCode> is required, Can not find ProductGroup for code: PG2521U,  
</response>

ProductGroupCreate

Create new product group. (for product group's data structure look in API for ProductGroupGetByCode).

Parameters

ProductGroupProduct group'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="ProductGroupCreate">
       <parameter name="productGroup">                      
               <productGroupCode>PG2521U</productGroupCode>                                <!-- (Mandatory and Unique)
               <productGroupDescription>api test product group</productGroupDescription>   <!-- Mandatory
               <purchasingGLAccountNumber>2300</purchasingGLAccountNumber>                 <!-- Optional
               <salesGLAccountNumber>1200</salesGLAccountNumber>                           <!-- Optional
               <parentArticleGroupCode>PG2521A</parentArticleGroupCode>                    <!-- Optional
               <status>active</status>                                                     <!-- Mandatory
               <warrantyText>This is warranty text</warrantyText>                          <!-- Optional
               <onlineShopVisibility>visibleOnline</onlineShopVisibility>                  <!-- Optional, this attribute is used to tell if article group is visible in online web shop, possible values are: visibleOnline, notVisibleOnline.
       </parameter>
</method>
</request>

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

ProductGroupUpdate

Update existing ProductGroup.

Parameters

ProductGroupProduct group'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="ProductGroupUpdate">
       <parameter name="productGroup">
               <productGroupCode>PG2521U</productGroupCode>                                <!-- (Mandatory and Unique)
               <productGroupDescription>api test product group</productGroupDescription>   <!-- Mandatory
               <purchasingGLAccountNumber>2300</purchasingGLAccountNumber>                 <!-- Optional
               <salesGLAccountNumber>1200</salesGLAccountNumber>                           <!-- Optional
               <parentArticleGroupCode>PG2521A</parentArticleGroupCode>                    <!-- Optional
               <status>active</status>                                                     <!-- Mandatory
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <productGroupCode>PG2521U</ProductGroupCode>
</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 <ProductGroup> needed, ProductGroup's property <productGroupCode> is required, Can not find ProductGroup for ProductGroupCode: PG2521U, missing mandatory attributes, invalid values, no privileges,  
</response>

ProductGroupDelete

Delete ProductGroup.

Parameters

ProductGroupCodeUnique identifier for ProductGroup.

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="ProductGroupDelete">
       <parameter name="productGroupCode" value="PG2521U" />
</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 <productGroupCode> is required, Can not find ProductGroup for ProductGroupCode: PG2521U, Can not delete. Found 3  ProductGroup with ProductGroupCode: PG2521U,
</response>


ProductGroupList

Get list of Product groups for specified criteria.

Parameters

ProductGroupCodeProductGroup's code.
productGroupDescriptionSearch key. The value from this property is used for searching for values in fields: "name", "description" and "brand"
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="ProductGroupList">
       <parameter name="productGroupDescription" type="String" value="" />
       <parameter name="productGroupCode" value="123456" />
       <parameter name="status" value="active"/>
</method>
</request>


Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <ProductGroup>
                <!-- structure of ProductGroup data is the same as in ProductGroupGetByCode
       </ProductGroup>
       <ProductGroup>
                <!-- structure of ProductGroup data is the same as in ProductGroupGetByCode
       </ProductGroup>
       ...
</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>



Reference na stran

---
Zadnja sprememba 24.03.2020 14:49:59
© E-RAČUNI d.o.o. 2003-2024