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  >  Partner API

Partner API

Please check the API reference documentation for PartnerAPI here https://e-racuni.com/obracuni/ApiDocumentation https://e-racuni.com/obracuni/ApiDocumentation.

PartnerAPI exposes the functionality of the partner list GUI to developer. Most of partner editing features are available via API methods in this category. The API user account needs to own the same privileges as the regular GUI to get access to features via the API.

Below you will find examples on how to use the partner API. Some examples are written using JSON request notation, some examples are written in XML and some examples use curl command line tool to illustrate multiple way on how you can use the API.

Please use the API developer panel to generate API request source in a language of your preference. JSON, XML, Linux command line and PHP request source can be automatically generated by the API developer panel tool.

API developer panel is available at:

https://e-racuni.com/obracuni/developer https://e-racuni.com/obracuni/developer

Creating B2B customer

Here is a simple example on how to create a B2B customerusing JSON API request.


POST https://e-racuni.com/WebServicesSI/API
Content-Type: application/json

{
       "username": "MICKA",
       "md5pass": "1234567890a1c85dc0c1234218acb900",
       "token": "1234562ADC3A123001234D00B0C71E0EC",
       "method": "SalesInvoiceCreate",
       "parameters": {
               "partner": {
                       "companyType": "Ltd",
                       "companyName": "Pravna oseba",
                       "eMail": "pravna.oseba@oseba.si",
                       "Addresses": [
                               {
                                       "type": "Primary",
                                       "country": "SI",
                                       "postalCode": "2000",
                                       "street": "Mariborska 1"
                               }
                       ],
                       "BuyerData": {
                               "buyerCode": "testBuyer0202"
                       }
               }
       }
}

Creating B2C customer

Here is a simple example on how to create a B2C customerusing JSON API request.


POST https://e-racuni.com/WebServicesSI/API
Content-Type: application/json

{
       "username": "MICKA",
       "md5pass": "1234567890a1c85dc0c1234218acb900",
       "token": "1234562ADC3A123001234D00B0C71E0EC",
       "method": "SalesInvoiceCreate",
       "parameters": {
               "partner": {
                       "gender": "female",
                       "lastName": "Fizična",
                       "firstName": "Oseba",
                       "eMail": "fizicna.oseba@oseba.si",
                       "Addresses": [
                               {
                                       "type": "Primary",
                                       "country": "SI",
                                       "postalCode": "2000",
                                       "street": "Mariborska 1"
                               }
                       ],
                       "BuyerData": {
                               "buyerCode": "testBuyer0202"
                       }
               }
       }
}

Partner API methods

PartnerGetByIDGet partner by partner ID.
PartnerGetByCodeGet partner by partner's code.
PartnerGetByDocumentIDGet partner by partner's documentID (internal identificator from program).
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.
PartnerBuyerCreditLimitGetGet partner buyer credit limit with unpaid amount by invoices and posted debt.
PartnerAttachmentAddAdd attachment to partner.
PartnerAttachmentSetDefaultAdd attachment to partner and set is as default.
PartnerAttachmentGetGet default attachment of partner.
PartnerAttachmentListGet all attachments of partner.
PartnerAvatarAddAdd partner's avatar.
PartnerAvatarGetGet partner's avatar.
PartnerAvatarRemoveRemove partner's avatar.

PartnerGetByID

Get partner by partner ID.

Parameters

IDPartner ID (partner taxNumber accepted too). Partner ID is external number (matična številka) in case of legal person and in case of natural person it is registration number (EMŠO)

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, Registered)
               <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>
                               <eMail>test@gmail.com<eMail>
                       </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.
                       <buyerCreditLimit>900.00</buyerCreditLimit> <!-- buyer credit limit
                       <buyerCreditLimitCurrency>EUR</buyerCreditLimitCurrency>
                       <invoicingCurrency>EUR</invoicingCurrency> <!-- invoicing currency, this property is usssed for creating invoices for this buyer
                       <invoicingLanguage>EUR</invoicingLanguage> <!-- allowed values:  'Slovene' 'English' 'German' 'Croatian' 'Italian' 'Hungarian' 'Czech' 'Slovak' 'Serbian' 'Polish' 'Bulgarian'
                       <invoicingTemplateName>templateTestBuyer</invoicingTemplateName> <!-- name of template used for printing invoices for this buyer                   
               </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>
               <ContactPersons>
                       <ContactPerson>
                               <contactPersonFullName>Contact person 1</contactPersonFullName>
                               <contactPersonFunction>Programmer</contactPersonFunction>
                               <eMail>test@gmail.com</eMail>
                               <mobilePhoneNumber>030 999 666</mobilePhoneNumber>
                       </ContactPerson>
                       <ContactPerson>
                               <contactPersonFullName>Contact person 1</contactPersonFullName>
                               <contactPersonFunction>Support</contactPersonFunction>
                               <eMail>test@gmail.com</eMail>
                               <phone>03 746 4362</phone>
                               <remarks>Leed programmer</remarks>
                       </ContactPerson>
               </ContactPersons>
       </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


PartnerGetByDocumentID

Get partner by partner documentID.

Parameters

documentIDPartner documentID (internal id from program).

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="PartnerGetByDocumentID">
       <parameter name="documentID" value="34: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>       <!-- Bank accounts where structure is the same as displayed in abowe example og Get by ID API call
                       <BankAccount></BankAccount>
               </BankAccounts>
               <ContactPersons>     <!-- Contact persons where structure is the same as displayed in abowe example og Get by ID API call
                       <ContactPerson></ContactPerson>
                </ContactPersons>
        </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. Possible types are:
  • buyer 
  • supplier 
  • user 
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
eMailEmail
mobileOrPhoneNumberMobile or phone number
companyTypeCompany type where parameter value is the same as possible values of tag companyType described abowe

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
eMailEmail
mobileOrPhoneNumberMobile or phone number
buyerCountryBuyer country iso code
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
eMailEmail
mobileOrPhoneNumberMobile or phone number
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>


PartnerBuyerCreditLimitGet

Get partner buyer credit limit with unpaid amount by invoices and posted debt.

Parameters

IDPartner's ID.
taxNumberPartner's tax number.
partnerCodePartner's code.
creditLimitDateDate on which credit limit is calculated, if parameter is empty or not present, todays date is taken.
currencyCurreny of results, if not specified default currency is taken

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="PartnerBuyerCreditLimitGet">
       <parameter name="partnerCode" value="100011" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <buyerCreditLimit>20,00</buyerCreditLimit>
       <unpaidInvoicesAmount>16.278,76</unpaidInvoicesAmount>
       <postedDebt>5.167,96</postedDebt>
       <currency>EUR</currency>
</response>

Response on error
<?xml version="1.0" encoding="utf-8"?>
<response status="error" >
       <error description="Partner not found, Partner xyz is not defined as buyer!, Buyer kyz does not have defined credit limit or it is below minimum required amount! "><error/>    
</response>


PartnerAttachmentAdd

Add image/attachment to partner.

Parameters

partnerCodePartner code.
documentIDPartner's document ID.

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="PartnerAttachmentAdd">
       <parameter name="partnerCode" type="String" value="00001" />
       <parameter name="attachment">
               <contents encoding="BASE64">BASE64...</contents>
               <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added attachment att.jpg to partner 00001.</message>
</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 "partnerCode" or "documentID" is required, Can not find partner for code: 00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>


PartnerAttachmentSetDefault

Add attachment to partner and set it as default.

Parameters

partnerCodePartner code.
documentIDPartner's document ID.

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="PartnerAttachmentSetDefault">
       <parameter name="partnerCode" type="String" value="2020-00001" />
       <parameter name="attachment">
               <contents encoding="BASE64">BASE64...</contents>
               <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added attachment att.jpg to partner 2020-00001.</message>
</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 "partnerCode" or "documentID" is required., Can not find partner for code: 00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>


PartnerAttachmentGet

Get default attachment of partner.

Parameters

partnerCodePartner code.
documentIDPartner's document ID.

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="PartnerAttachmentGet">
       <parameter name="partnerCode" type="String" value="00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <Partner>
               <Attachments>
                       <Attachment>
                               <fileName>att.jpg</fileName>
                               <contents encoding="BASE64">BASE64</contents>
                       </Attachment>
               </Attachments>
       </Partner>
</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 "partnerCode" or "documentID" is required., Can not find partner for code: 00001, partner does not have attachemnts.
</response>


PartnerAttachmentList

Get all images/attachments of article.

Parameters

partnerCodePartner code.
documentIDPartner's document ID.

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="PartnerAttachmentList">
       <parameter name="partnerCode" type="String" value="2020-00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <Partner>
               <Attachments>
                       <Attachment>
                               <fileName>att1.jpg</fileName>
                               <contents encoding="BASE64">1BASE64</contents>
                       </Attachment>
                       <Attachment>
                               <fileName>att2.jpg</fileName>
                               <contents encoding="BASE64">2BASE64</contents>
                       </Attachment>
                       <Attachment>
                               <fileName>att3.jpg</fileName>
                               <contents encoding="BASE64">3BASE64</contents>
                       </Attachment>
               </Attachments>
       </Partner>
</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 "partnerCode" or "documentID" is required., Can not find partner for code: 00001, partner does not have attachemnts.
</response>


PartnerAvatarAdd

Add avatar to partner. If partner already has avatar, old one is removed and new one set.

Parameters

partnerCodePartner code.
documentIDPartner's document ID.

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="PartnerAvatarAdd">
       <parameter name="partnerCode" type="String" value="00001" />
       <parameter name="attachment">
               <contents encoding="BASE64">BASE64...</contents>
               <fileName>att.jpg</fileName>
       </parameter>
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully added avatar att.jpg to partner 00001.</message>
</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 "partnerCode" or "documentID" is required, Can not find partner for code: 00001, Parameter <attachment> is missing, Parameter <attachment> cannot parse contents
</response>


PartnerAvatarGet

Get partner's avatar.

Parameters

partnerCodePartner code.
documentIDPartner's document ID.

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="PartnerAvatarGet">
       <parameter name="partnerCode" type="String" value="00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <Partner>
               <Attachments>
                       <Attachment>
                               <fileName>att.jpg</fileName>
                               <contents encoding="BASE64">BASE64</contents>
                       </Attachment>
               </Attachments>
       </Partner>
</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 "partnerCode" or "documentID" is required., Can not find partner for code: 00001, partner does not have avatar.
</response>


PartnerAvatarRemove

Remove partner's avatar.

Parameters

partnerCodePartner code.
documentIDPartner's document ID.

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="PartnerAvatarRemove">
       <parameter name="partnerCode" type="String" value="00001" />
</method>
</request>

Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" >
       <message>Successfully removed avatar att.jpg to partner 00001.</message>
</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 "partnerCode" or "documentID" is required., Can not find partner for code: 00001, partner does not have avatar.
</response>

Reference na stran

---
Zadnja sprememba 19.04.2024 9:19:53
© E-RAČUNI d.o.o. 2003-2024