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

Partner API

PartnerGetByIDGet partner by partner ID.
PartnerGetByCodeGet partner by partner's code.
PartnerCreateCreate new partner
PartnerUpdateUpdate existing partner
PartnerImportImport partner by creating new and/or updating existing ones.
PartnerDeleteDelete partner.
PartnerListGet list of partners for specified criteria
PartnerListBuyersGet list of buyers for specified criteria
PartnerListSuppliersGet list of suppliers for specified criteria
PartnerListEmployeesGet list of employees for specified criteria

PartnerGetByID

Get partner by partner ID.

Parameters

IDPartner ID (partner taxNumber accepted too)

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="PartnerGetByID">
       <parameter name="ID" value="73691234" />
</method>
</request>

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">
       <Partner>
               <ID>02169711</ID>                                       <!-- Partner ID.
               <partnerCode>111</partnerCode>                  <!-- Partner code.
               <taxNumber>02169711</taxNumber>                 <!-- Tax number
               <vatID>1587277000</vatID>                               <!-- VAT number
               <companyName>Micka d.o.o </companyName>         <!-- Company name
               <companyType>Organization</ companyType>                <!-- Type of company. (Contractor, Ltd, Plc, Co, Organization, Subsidiary, Association, Direction, Unit, Division, Edu, Gov, Charity, Cooperative)
               <vatRegistration>Unknown</vatRegistration>              <!-- VAT reg type (Unknown, None, R1, R2)
               <dateOfRegistration></ dateOfRegistration>              <!-- Company establishment date
               <branchClassification></branchClassification>           <!-- Branch classification
               <firstName>Micka</firstName>                            <!-- For legal person is first name of contact person
               <lastName>Kovac</lastName>                              <!-- For legal person is last name of contact person
               <gender>female</ gender>                                <!-- Type of person sex. (male, female, unknown)
               <dateOfBirth></dateOfBirth>                             <!-- For natural person only – birth date
               <maritalStatus></maritalStatus>                         <!-- For natural person – (single, married, widowed, concubinance)
               <mobilePhone>064/123456</mobilePhone>
               <fax>05/625 94 40</fax>
               <eMail>micka@kovac.com,zlatko@kovac.com</eMail>         <!-- comma delimited list of emails
               <remarks>test partner for testing web services</remarks><!-- remarks for partner
               <homepage>www.testWS.com</homepage>                     <!-- homapege of partner
               <Addresses>
                       <Address>                               
                               <type>Primary</type>                            <!--Primary address (possible address types are: Invoicing, Primary, Delivery)
                               <street>Iztokova 22</street>
                               <city>Maribor</city>
                               <postalCode>2000</postalCode>
                               <country>SI</country>
                               <telephone>05/625 94 39</telephone>
                               <fax>05/625 94 39</fax>
                       </Address>
                       <Address >
                               <type>Invoicing</type>                          <!--Invoicing address, can include tags "firstAddressLine" and "additionalLine" for additional data for invoicing
                               <additionalLine>Test Company</additionalLine>
                               <firstAddressLine>Iztok Kladnik</firstAddressLine>
                               <street>Iztokova 22</street>
                               <city>Maribor</city>
                               <postalCode>2000</postalCode>
                               <country>SI</country>
                               <telephone>05/625 94 39</telephone>
                       </Address>
                       <Address >
                               <type>Delivery</type>                           <!--Delivery address, can include tag "additionalLine" for name of recipient
                               <addressCode>PE0001</addressCode>
                               <additionalLine>Test Company</additionalLine>
                               <street>Iztokova 22</street>
                               <city>Maribor</city>
                               <postalCode>2000</postalCode>
                               <country>SI</country>
                               <telephone>05/625 94 39</telephone>
                       </Address>
               </Addresses>
               <EmployeeData>
                       <status>active</status>                         <!-- Employee status (active, inactive)
                       <distanceFromHomeKm>12</distanceFromHomeKm>     <!-- Distance from home in kilometers
                       <transportRelationToWork>mb-sb</transportRelationToWork>        <!-- Route to the place of work
                       <amountOfBusTicket>20</amountOfBusTicket>       <!-- Buss transportation ticket price
                       <ownVehicleModel>audi</ownVehicleModel>         <!-- Own vehicle model
                       <ownVehicleRegNr>mb es-123</ownVehicleRegNr>    <!-- Registration number of the own vehicle
                       <Employments>
                               <Employment>
                                       <jobTitle></jobTitle>                           <!-- Employee job title
                                       <employmentType></employmentType>               <!-- Type of employment. (groupContract, individualContract, craftsman, entrepreneurshipHolder, companyOwner, lumpWorker)
                                       <payClass></payClass>                           <!-- Payment class
                                       <isHandicappedPerson>handicappedNot</isHandicappedPerson> <!-- Is handicapped person (handicapedNot, handicappedToQuota, handicappedOverQuota, handicappedHalfOverQuotaAndHalfWork)
                                       <beginDate>2000-02-01</beginDate>                       <!-- Start date of employment contract
                                       <employmentContractEndDate></employmentContractEndDate> <!-- Optional - End date of employment contract
                                       <primaryEmployment>true</primaryEmployment>                     <!-- Is primary employment (true, false)
                                       <previousWorkExperienceYears></previousWorkExperienceYears>     <!-- Years of previous work experience
                                       <previousWorkExperienceMonths></previousWorkExperienceMonths>   <!-- Months of previous work experience
                                       <previousWorkExperienceDays></previousWorkExperienceDays>               <!-- Days of previous work experience
                                       <workingAgeAllowancePercentage></workingAgeAllowancePercentage> <!-- percentage of working age allowance  
                                       <grossSalary></grossSalary>                                             <!-- Gross salary
                                       <grossSalaryCurrency></grossSalaryCurrency>                             <!-- Currency
                                       <grossSalaryCalculationFactor></grossSalaryCalculationFactor>           <!-- Numeric factor for gross salary calculation
                                       <workingHoursPerWeek></workingHoursPerWeek>                     <!-- Number of working hours per week
                                       <taxRelief></taxRelief>                                                 <!-- Tax relief
                                       <specialTaxRelief></specialTaxRelief>                                   <!-- Special tax relief
                                       <hasLowSalaryTaxRelief>false</hasLowSalaryTaxRelief>            <!-- Has Tax relief for low salary (true,false)
                                       <sickLeaveOver30hourPrice></sickLeaveOver30hourPrice>           <!-- Price for hour for sick leave over 30 days
                                       <sickLeaveOver30hourPriceCurrency>EUR</sickLeaveOver30hourPriceCurrency> <!-- Price currency for sick leave over 30 days
                                       <addPensionInsuranceAmount></>                          <!-- Additional pension insurance amount (employee cost)
                                       <addPensionInsurancePercent></>                         <!-- Additional pension insurance percent (employee cost)
                                       <addPensionInsuranceAccountNumber></>                   <!-- Additional pension insurance account number (employee cost)
                                       <addPensionInsuranceAccountReference></>                        <!-- Additional pension insurance account ref. (employee cost)
                                       <addPensionInsuranceEmployerCostAmount></>                      <!-- Additional pension insurance amount (employer cost)
                                       <addPensionInsuranceEmployerCostPercent></>                     <!-- Additional pension insurance percentage (employer cost)
                                       <addPensionInsuranceEmployerCostAccountNumber></>               <!-- Additional pension insurance account number (employer cost)
                                       <addPensionInsuranceEmployerCostAccountReference></>    <!-- Additional pension insurance account ref. (employer cost)
                               </Employment>
                       </Employments>
               </EmployeeData>
               <BuyerData>
                       <buyerCode>00000105</buyerCode>
                       <buyerGroupCode>01</buyerGroupCode>
                       <costPosition>1</costPosition>
                       <discountPercentage>5.000</discountPercentage>
                       <numberOfDaysForPayment>15</numberOfDaysForPayment>
                       <numberOfDaysForPaymentBaseDate>fromDocumentDate</numberOfDaysForPaymentBaseDate>       <!-- allowed values: fromDocumentDate, fromServiceOrDeliveryDate
                       <serialNumberForCollectionCenter></serialNumberForCollectionCenter>
                       <status>trustworthyBuyer</status>  <!-- allowed values: defaultBuyer, buyerOnBlackList, trustworthyBuyer, buyerDoesNotExistAnymore.
               </BuyerData>
               <SupplierData>
<acceptsOrdersReceivedAtLeastDaysInAdvance>30</acceptsOrdersReceivedAtLeastDaysInAdvance>
                       <costPosition>1</costPosition>
                       <defaultExpensesAccount>120</defaultExpensesAccount>
                       <numberOfDaysForPayment>14</numberOfDaysForPayment>
                       <numberOfDaysForPaymentBaseDate>fromDocumentDate</numberOfDaysForPaymentBaseDate>       <!-- allowed values: fromDocumentDate, fromServiceOrDeliveryDate, fromDocumentReceivedDate
                       <status>defaultSupplier</status>        <!-- defaultSupplier, supplierOnBlackList, trustworthySupplier, supplierDoesNotExistAnymore
                       <supplierCode>1122</supplierCode>
               </SupplierData>
               <BankAccounts>
                       <BankAccount>
                               <bank>SKB</bank>
                               <accountNumber>02343-0254045370</accountNumber>
                               <accountReference>99</accountReference>
                               <IBAN></IBAN>
                               <SWIFT>253</SWIFT>
                               <description></description>
                       </BankAccount>
                       <BankAccount>
                               <bank>Nova KBM d.d.</bank>
                               <accountNumber>04430-0000256970</accountNumber>
                               <accountReference>99</accountReference>
                               <IBAN></IBAN>
                               <SWIFT></SWIFT>
                               <currency></currency>
                               <status>Active</status>
                               <description></description>
                       </BankAccount>
               </BankAccounts>
       </Partner>
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Partner not found, …"><error/>      
</response>



PartnerGetByCode

Get partner by partner code.

Parameters

partnerCodePartner 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="PartnerGetByCode">
       <parameter name="partnerCode" value="1234" />
</method>
</request>

Response
Response structure is identical to the structure of response in PartnerGetByID


PartnerCreate

Create new partner. (for more detailed partner's data structure look in API for PartnerGetByID)

Parameters

partnerPartner'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="PartnerCreate">
       <parameter name="partner">
                <companyType>Organization</companyType>   <!-- Mandatory when creating info about company
                <companyName>Micka d.o.o </companyName>   <!-- Mandatory when creating info about company
               <taxNumber>02169711</taxNumber>   <!-- optional data
               <mobilePhone>064/123456</mobilePhone>
               <fax>05/625 94 40</fax>
               <eMail>micka@kovac.com,zlatko@kovac.com</eMail>
               ...
               <!--  optional data in sub elements (see properties in PartnerGetByID)
               <Addresses>
                       <Address>
                               <type></type>   <!--(possible address types are: Invoicing, Primary, Delivery)
                               ...
                       </Address>
               </Addresses>
               <BuyerData></BuyerData>
               <SupplierData></SupplierData>
               <EmployeeData></EmployeeData>
               <BankAccounts>
                       <BankAccount></BankAccount>
               </BankAccounts>
        </parameter>
</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/>          <!-- missing mandatory attributes, invalid values, no privileges, …
</response>


PartnerUpdate

Update existing partner.

Parameters

partnerPartner'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="PartnerUpdate">
       <parameter name="partner">
                <partnerCode>7369</partnerCode>
               <!--other params as in PartnerCreate
        </parameter>
</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/>          <!-- missing mandatory attributes, invalid values, no privileges, …
</response>


PartnerDelete

Delete partner.

Parameters

IDPartner's ID.
taxNumberPartner's tax number.
partnerCodePartner's 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="PartnerDelete">
        <parameter name="ID" value="7369" />
</method>
</request>

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PartnerDelete">
        <parameter name="taxNumber" value="SI12345678" />
</method>
</request>

<?xml version="1.0" encoding="utf-8"?>
<request>
<login username="micka" md5pass="ddb43e9f119c6805f4770ecc4f6466ba" token="E7DF3E6E94FB4579BBA8F54979010B5C" />
<method name="PartnerDelete">
        <parameter name="partnerCode" value="PA7369" />
</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/>
</response>


PartnerImport

Import partner 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 partner with this api call, partner'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
partnerPartner'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="PartnerImport">
       <parameter name="importType" value="createOrUpdate" />
       <parameter name="partner">              <!-- parameter here is the same as for PartnerUpdate or PartnerCreate depending on importType
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <ID></ID>
</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>


PartnerList

Get list of partners for specified criteria.

Parameters

partnerTypeType of partners to be answered. If this parameter is missing, answer all types of partners (default value is 'all'). Possible types are:
  • all 
  • employee 
  • agent 
  • productsProvider 
  • organizationUnit 
searchKeySearch key. The value from this field is used for searching for: ( company name for partners as legal person, given name and name for partners as physical person)
partnerCodePartner's code
taxNumberTax number
streetStreet
postalCodeOrCityPostal code or City

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="PartnerList">
       <parameter name="searchKey" type="String" value="MICKA D O O" />
       <parameter name="postalCodeOrCity" type="String" value="Maribor" />
        <parameter name="street" type="String" value="Iztokova" />
       <parameter name="partnerCode" type="String" value="111" />
       <parameter name="partnerType" value="buyer"/>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <Partner>
                <!-- structure of each partner is the same as in PartnerGetByID
       </Partner>
       <Partner>
       </Partner>
       ...
</response>


PartnerListBuyers

Get list of buyers for specified criteria. Response structure is identical to API "PartnerList"

Parameters

searchKeySearch key. The value from this field is used for searching for: (company name for partners as legal person, given name and name for partners as physical person)
partnerCodePartner's code
buyerCodeBuyer's code
taxNumberTax number
streetStreet
postalCodeOrCityPostal code or City
statusStatus of the buyers to be answered. It is optional and possible types are:
  • defaultBuyer 
  • buyerOnBlackList 
  • trustworthyBuyer 
  • buyerDoesNotExistAnymore 

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="PartnerListBuyers">
       <parameter name="buyerCode" type="String" value="111" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <Partner>
                <!-- structure of each partner is the same as in PartnerGetByID
       </Partner>
       <Partner>
       </Partner>
       ...
</response>


PartnerListSuppliers

Get list of suppliers for specified criteria. Response structure is identical to API "PartnerList"

Parameters

searchKeySearch key. The value from this field is used for searching for: (company name for partners as legal person, given name and name for partners as physical person)
partnerCodePartner's code
supplierCodeSupplier's code
taxNumberTax number
streetStreet
postalCodeOrCityPostal code or City
statusStatus of the suppliers to be answered. It is optional and possible types are:
  • defaultSupplier 
  • supplierOnBlackList 
  • trustworthySupplier 
  • supplierDoesNotExistAnymore 

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="PartnerListSupplier">
       <parameter name="supplierCode" type="String" value="111" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <Partner>
                <!-- structure of each partner is the same as in PartnerGetByID
       </Partner>
       <Partner>
       </Partner>
       ...
</response>


PartnerListEmployees

Get list of employees for specified criteria. Response structure is identical to API "PartnerList"

Parameters

searchKeySearch key. The value from this field is used for searching for: (company name for partners as legal person, given name and name for partners as physical person)
partnerCodePartner's code
taxNumberTax number
statusStatus of the employees. Possible types are:
  • 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="PartnerListEmployees">
       <parameter name="partnerCode" type="String" value="111" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <Partner>
                <!-- structure of each partner is the same as in PartnerGetByID
       </Partner>
       <Partner>
       </Partner>
       ...
</response>

Reference na stran

---
Zadnja sprememba 27.09.2018 12:35:44
© E-RAČUNI d.o.o. 2003-2018