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

BillOfMaterials API

BillOfMaterialsGetGet bill of materials by number.
BillOfMaterialsCreateCreate new bill of materials.
BillOfMaterialsUpdateUpdate existing bill of materials.
BillOfMaterialsDeleteDelete bill of materials.
BillOfMaterialsListGet list of bills of materials for specified criteria.

BillOfMaterialsGet

Get bill of materials by number.

Parameters

numberNumber of bill of materials.

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="BillOfMaterialsGet">
       <parameter name="number" value="055/11" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <BillOfMaterials>
               <date>2015-05-06</date>
               <number>055/11</number>
               <productCode>055</productCode>
               <productQuantity>10.000000</productQuantity>
               <status>Active</status>
               <MaterialItems>
                       <MaterialItem>
                               <itemProductCode>000011</itemProductCode>
                               <position>1</position>
                               <quantity>5.000000</quantity>
                       </MaterialItem>
                       <MaterialItem>
                               <itemProductCode>000001</itemProductCode>
                               <position>2</position>
                               <quantity>1.000000</quantity>
                       </MaterialItem>
               </MaterialItems>
               <WorkingHours>
                       <WorkingHour>
                               <description>consulting</description>
                               <hoursPlanned>6.0000</hoursPlanned>
                               <position>1</position>
                               <workTask>consulting</workTask>
                       </WorkingHour>
                       <WorkingHour>
                               <description>Programiranje</description>
                               <hoursPlanned>8.0000</hoursPlanned>
                               <position>2</position>
                               <workTask>consulting</workTask>
                       </WorkingHour>
                       <WorkingHour>
                               <description>Testiranje</description>
                               <hoursPlanned>2.0000</hoursPlanned>
                               <position>3</position>
                               <workTask>consulting</workTask>
                       </WorkingHour>
               </WorkingHours>
       </BillOfMaterials>
</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 bill of materials number: 055/11, …
</response>


BillOfMaterialsCreate

Create new bill of materials.

Parameters

BillOfMaterialsBill of materials'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="BillOfMaterialsCreate">
       <parameter name="BillOfMaterials">
               <date>2015-05-06</date>                          <!-- Mandatory
               <productCode>055</productCode>                   <!-- Mandatory
               <productQuantity>10.000000</productQuantity>     <!-- Mandatory
               <status>Active</status>                          <!-- Mandatory possible values: Draft, Active, Inactive
               <MaterialItems>
                       <MaterialItem>
                               <itemProductCode>000011</itemProductCode>    <!-- Mandatory
                               <position>1</position>                       <!-- Optional
                               <quantity>5.000000</quantity>                <!-- Mandatory
                       </MaterialItem>
               </MaterialItems>
               <WorkingHours>
                       <WorkingHour>
                               <description>test working hour</description> <!-- Mandatory
                               <hoursPlanned>6.0000</hoursPlanned>          <!-- Mandatory
                               <position>1</position>                       <!-- Optional
                               <workTask>consulting</workTask>              <!-- Mandatory
                       </WorkingHour>
               </WorkingHours>
       </parameter>
</method>
</request>

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


BillOfMaterialsUpdate

Update existing bill of materials.

Parameters

BillOfMaterialsProduct'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="BillOfMaterialsUpdate">
       <parameter name="BillOfMaterials">
               <date>2015-05-06</date>                          <!-- Mandatory
               <number>055/11</number>                          <!-- Mandatory
               <productCode>055</productCode>                   <!-- Mandatory
               <productQuantity>10.000000</productQuantity>     <!-- Mandatory
               <status>Active</status>                          <!-- Mandatory possible values: Draft, Active, Inactive
               <MaterialItems>
                       <MaterialItem>
                               <itemProductCode>000011</itemProductCode>    <!-- Mandatory
                               <position>1</position>                       <!-- Optional
                               <quantity>9.000000</quantity>                <!-- Mandatory
                       </MaterialItem>
               </MaterialItems>
               <WorkingHours>
                       <WorkingHour>
                               <description>test working hour</description> <!-- Mandatory
                               <hoursPlanned>7.0000</hoursPlanned>          <!-- Mandatory
                               <position>1</position>                       <!-- Optional
                               <workTask>consulting</workTask>              <!-- Mandatory
                       </WorkingHour>
               </WorkingHours>
       </parameter>
       </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 "number" is required, Can not find bill of materials for number: 055/11, missing mandatory attributes, invalid values, no privileges, …
</response>


BillOfMaterialsDelete

Delete bill of materials.

Parameters

numberUnique identifier for bill of materials.

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="BillOfMaterialsDelete">
       <parameter name="number" value="055/11" />
</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 "number" is required, Can not find bill of materials for number: 055/11, Can not delete. Found 3  bill of materials with number 055,
</response>


BillOfMaterialsList

Get list of bills of materials for specified criteria.

Parameters

numberBillOfMaterials number.
dateFromSearch by bill of materials date range.
dateToSearch by bill of materials date range.
articleSearch by material.
statusUsage status (Active, Inactive, Draft)

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="BillOfMaterialsList">
       <parameter name="number" value="123456" />
       <parameter name="status" value="active"/>
</method>
</request>

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="BillOfMaterialsList">
       <parameter name="dateFrom" value="2015-05-01" />
    <parameter name="dateTo" value="2015-05-26" />
</method>
</request>


Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <BillOfMaterials>
                <!-- structure of bill of materials data is the same as in BillOfMaterialsGet
       </BillOfMaterials>
       <BillOfMaterials>
                <!-- structure of bill of materials data is the same as in BillOfMaterialsGet
       </BillOfMaterials>
       ...
</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 12.09.2016 15:47:05
© E-RAČUNI d.o.o. 2003-2018