Web Services - Accounting
1 Module Overview
General information about the NetBaron-Web Services interface is provided in a separate document, available from NetBaron support upon request. This document describes only the Accounting Web Services module, which enables the use of NetBaron® Sales Order from external services.
The module allows retrieving accounting data based on various search criteria. The interface does not support multiple currencies; only the EUR currency is supported.
Error handling must be integrated into the interfaces in case of connection interruptions.
1.1 Usage Examples
Retrieve accounting periods
Retrieve receipts for an accounting period
Retrieve the active chart of accounts
Retrieve account-specific balance information
Retrieve cost center information
Retrieve project/work number information
Retrieve company site/location information
1.2 Other information
The available methods of the module are defined in the WSDL description. The data transferred via the interface is validated using the XSD file referenced in the WSDL.
The XSD is available at: https://server/ws/accounting?xsd={version} Currently supported versions: 1.0, 1.1, and 1.2.
The XSD file contains detailed descriptions of each element. Starting from version 1.2, the XSD is available at: https://server/ws/accounting/{version}/api
2 Technical information
2.1 Service information
Address: | https://server/ws/accounting?version={version} The currently available versions are 1.0, 1.1, and 1.2. Starting from version 1.2, the XSD is available at: |
Authentication: | Organization and the organization-specific Web Services password |
Character set: | UTF-8 |
Available methods: | Defined in the WSDL description. |
Type of request: | Method call |
Type of response: | Object |
Notes: | Other possible notes related to the respective WS module. |
2.2 Method Overview
2.2.1 Available Methods
Element | Use | Definition |
GetCostCenterDetails | Retrieving cost center details | |
| Retrieving multi-level cost center details | Deprecated method from WSDL version 1.3 onwards |
GetWorkNumberDetails | Retrieving work number details | |
GetDimensionRegisters | Retrieving dimension registers | |
GetDimensionItems | Retrieving dimension items | |
GetAccountSheet | Retrieving account chart information | |
GetAccountSumDetails | Retrieving accounting period summary details | |
GetAccountSumDetails | Retrieving account balance details | Available either at monthly level or accounting period level |
GetBudgetDetails | Retrieving account budgeting details | Available either at monthly level or accounting period level |
GetReceiptDetails | Retrieving receipt (voucher) details | |
GetCompanyDetails | Retrieving company branch details | |
GetReceiptTypeDetails | Retrieving receipt types | Retrieves receipt types defined for the accounting period |
CreateAccountingReceipts | Adding new accounting receipts |
2.2.2 GetCostCenterDetails- end GetMultiDimensionalCostCenterDetails-methods
These methods retrieve information about cost centers or multi-level cost centers. You can call the methods without any parameters—in that case, all available cost centers or multi-level cost centers are retrieved depending on which method is used. The results can be filtered using the search criteria listed below.
Note: In WSDL version 1.3, the GetMultiDimensionalCostCenterDetails method and its related additional fields in cost center retrieval have been removed. The replacement methods are GetDimensionRegisters and GetDimensionItems, which are described later in this document.
Parameters for GetCostCenterDetails and GetMultiDimensionalCostCenterDetails method calls:
Element | Type | Definition |
Id | NumberRangeParamType | Cost center ID |
Number | NumberRangeParamType | Cost center number |
| StringParamType | Identifier/number of the multi-dimensional cost center |
Description | StringParamType | Description of the cost center |
Active | Boolean | Cost center activity status |
| ReturnTypeType | Specifies the structure of the return data |
Number and | The Number and Identifier elements are mutually exclusive. The Number element is used when querying traditional cost centers, while the Identifier element is used when querying multi-dimensional cost centers. |
| The ReturnType parameter defines how the returned data is structured. Possible values are Tree or List. With the Tree type, the data is structured hierarchically, whereas the List type returns the data as a flat list. When using the GetCostCenterDetails method, the data is always returned in list format, regardless of the selected return type. |
2.2.2.1 Response to method calls
The response includes all cost centers that match the search criteria. Each individual cost center is represented as a separate CostCenter object in the XML file. The structure of this object is defined in the XSD schema used by the WSDL.
Response to GetCostCenterDetails and GetMultiDimensionalCostCenterDetails method calls:
Element | Type | Definition |
CostCenterDetailsResponse | object | Contains 0 .. n CostCenter objects |
2.2.2.2 Contents of the CostCenter object
Element | Type | Definition |
Id | int | Cost center ID |
Number/ | int/token | Cost center number/ |
Description | token | Description of the cost center |
Active | boolean | Cost center activity status (i.e., whether it has been deleted or not) |
| object | The sub-cost centers of a multi-level cost center (0..n CostCenter objects). |
Number and | The Number and Identifier elements are mutually exclusive. The Number element is returned when retrieving traditional cost centers, and the Identifier element is returned when retrieving multi-level cost centers. |
2.2.3 GetWorkNumberDetails-method
Retrieves work number details. The method can be called without parameters, in which case all work numbers are retrieved. The search results can be filtered using the criteria listed below.
Element | Type | Definition |
Id | NumberRangeParamType | Work number ID |
Number | StringParamType | Work number |
Description | StringParamType | Description of the work number |
Active | boolean | Work number activity status (whether the current date is within the start and end dates) |
2.2.3.1 Method Call Response
The response contains all work numbers that match the search criteria. Each individual work number is always represented as a separate WorkNumber object in the file. Its structure is defined in the XSD file used by the WSDL.
Element | Type | Definition |
WorkNumberDetailsResponse | object | Contains 0 .. n WorkNumber objects. |
2.2.3.2 Content of the WorkNumber-object
Element | Type | Definition |
Id | int | Work number ID |
Number | token | Work number |
Description | token | Description of the work number |
StartDate | date | Start date of the work number validity period |
EndDate | date | End date of the work number validity period |
Active | boolean | Work number activity status (i.e., not deleted) |
2.2.4 GetDimensionRegisters-method
Retrieves information about dimension registers. The method can be called without parameters, in which case all registers are returned. Results can be filtered using the search criteria below.
Element | Type | Definition |
Id | NumberRangeParamType | Dimension register ID |
Description | StringParamType | Description of the dimension register |
Active | boolean | Dimension register activity status |
2.2.4.1 Method call Response
Element | Type | Definition |
DimensionRegistersResponse | object | Contains 0 .. n DimensionRegister objects |
2.2.4.2 Content of the DimensionRegister-object
Element | Type | Definition |
Id | int | ID of the dimension register |
Description | string | Description of the dimension register |
Active | boolean | Dimension register activity status |
2.2.5 GetDimensionItems-method
Retrieves the details of dimension items. The method requires a mandatory parameter specifying the register name, “Register”.
The method can be called without any other parameters. In that case, all dimension items are retrieved. The results can be filtered using the criteria listed below.
Element | Type | Definition |
RegisterId | int | ID of the dimension register (Mandatory) |
Id | NumberRangeParamType | Dimension item ID |
Number | StringParamType | Dimension item number |
Description | StringParamType | Description of the dimension item |
Active | boolean | Dimension item activity status |
2.2.5.1 Method call Response
The response contains all dimension item details that match the search criteria. A single dimension item is always represented by an individual DimensionItem object in the file. Its structure is defined in the XSD file used by the WSDL.
Element | Type | Definition |
DimensionItemsResponse | object | Contains 0 .. n DimensionItem objects |
2.2.5.2 Content of the DimensionItem-object
Element | Type | Definition |
Id | int | Dimension item ID |
Number | string | Dimension item number |
Description | string | Description of the dimension item |
Active | boolean | Dimension item activity status |
2.2.6 GetAccountSheet-method
The method can be called without parameters. In that case, the entire chart of accounts is retrieved. The results can be filtered using the following search criteria.
Parameters for the GetAccountSheet method call:
Element | Type | Definition |
AccountingPeriodId | NumberRangeParamType | Accounting period ID * |
AccountNumber | NumberRangeParamType | Account number |
AccountType | AccountTypeType | Account type |
VatPercent | NumberRangeParamType | VAT percentage |
ReturnType | ReturnTypeType | Type of the return value |
AccountingPeriodId | * If an accounting period ID is provided, retrieves all accounts with transactions for that accounting period. |
2.2.6.1 Method call Response
The response contains all chart of accounts accounts that match the search criteria. Without any search criteria, the entire chart of accounts is returned. Each account in the file is represented by a single Account object. Its structure is defined in the XSD file used by the WSDL. The returned AccountSheet object contains 0..n Account objects.
Element | Type | Definition |
AccountSheet | object | Contains 0 .. n Account objects |
2.2.6.2 Content of the AccountSheet-object
Element | Type | Definition |
Account | object | A single account |
2.2.6.3 Content of the Account-object
Element | Type | Definition |
AccountNumber | int | Account number |
AccountDescription | token | Description of the account |
AccountType | AccountTypeType | Account type |
AccountSpecifier | object | Account specifier |
CalculationCode | token | Calculation code |
ControlCodeDetails | object | Account control details |
VatDetails | object | Account VAT details |
TaxCodeDetails | object | Account tax form details |
SubAccounts | object | Account subaccounts |
SubAccounts | The SubAccounts object contains the subaccounts belonging to the account. It is returned in the response when the return type is a tree structure. The SubAccounts object consists of 0...n Account objects. |
AccountSpecifier | The AccountSpecifier object contains the account specifier in an attribute named AccountGroupSpecifier. This attribute is included only if the account has a specifier assigned. Currently, the only supported value is R (revenue). |
2.2.6.3.1 Content of the ControlCodeDetails-object
The ControlCodeDetails object contains account control information. These details are described in the table below.
Element | Type | Definition |
Formal | bool | Indicates whether the account is shown in the official balance sheet/income statement. |
InAnalysis | bool | The account’s transactions are by default assigned to the journal entry. |
SaldoInAnalysis | bool | On the detailed report, only the total amount for the account is shown. |
AdditionsInAnalysis | bool | Selection used for balance analysis. Displayed in the chart of accounts as a checkbox on the right-hand side of the accounts. |
InOwnCapitalAnalysis | bool | The account is displayed in the Own capital breakdown report. |
AdditionsInOwnCapitalAnalysis | bool | When this option is active, a breakdown is created as separate rows from journal entries. |
CalculatePercentage | bool | This option can be used to calculate, for example, the percentage distribution of revenue across different accounts (the option is then set on the revenue row). |
CostCenterRequired | bool | Makes the selection of a cost center mandatory in accounting journal entries. |
WorkNumberRequired | bool | Makes the selection of a work number mandatory in accounting journal entries. |
2.2.6.3.2 Content of the VatDetails-object
The VatDetails object contains VAT control information for the account. The contents of the object are described in the table below.
Element | Type | Definition |
VatPercent | double | The VAT percentage of the account |
VatAccount | int | The VAT account number associated with the account |
VatCode | int | The VAT code associated with the account |
VatCodeDescription | string | Description of the VAT code |
2.2.6.3.3 TaxCodeDetails-object
TaxCodeDetails object contains the tax form codes used for the account as TaxCode objects, which can be 0 to n in number. The details of an individual tax form code are inside the TaxCode object. The content of the object is described in the following table.
Element | Type | Definition |
Form | string | The name of the form to which the account transactions are directed |
Code | int | The form code to which the account transactions are directed |
2.2.7 GetAccountingPeriodDetails-method
When called without parameters, all accounting periods are retrieved. The results can be filtered using the parameters listed below.
Available parameters for the GetAccountingPeriodDetails method call:
Element | Type | Definition |
Id | int | Accounting period identifier |
Date | date | Search date. Retrieves accounting periods whose start and end dates include the specified date. |
2.2.7.1 Method call Response
The method call response returns 0 to n AccountingPeriod objects containing the details of all accounting periods matching the search criteria. The AccountingPeriod object structure is described in the table below.
Element | Type | Definition |
Id | int | Accounting period identifier |
StartDate | date | Accounting period start date |
EndDate | date | Accounting period end date |
FixedStartDate | date | Adjusted / fixed start date of the accounting period |
Description | string | Description of the accounting period |
2.2.8 GetAccountSumDetails- and GetBudgetDetails-methods
The GetAccountSumDetails method allows retrieving account balances from the accounting system grouped by year, month, and account.
The GetBudgetDetails method allows retrieving budgeted account amounts from the accounting system grouped by year, month, and account.
Both method calls require at minimum the accounting period identifier as a mandatory parameter to specify the period for which data is fetched. The available parameters are described in the table below.
Element | Type | Definition |
AccountinPeriodId | int | Accounting period identifier |
Month | MonthRangeParamType | Accounting period start date |
Account | NumberRangeParamType | Accounting period end date |
AccountType | AccountTypeType | Adjusted / fixed start date of the accounting period |
ResultsAsPerioidSummary | bool |
ResultsAsPerioidSummary | The parameter specifies whether the results are returned as an accounting period summary. If the value is true, the results are summarized by accounting period. If the value is false, the data is returned as a monthly summary. If the parameter is not provided, the data defaults to a monthly summary. |
2.2.8.1 Method call Responses
The response to the GetAccountSumDetails method call returns an AccountSumDetails object, and the response to the GetBudgetDetails method call returns a BudgetDetails object. The object contains either a MonthlySumDetails object or a PeriodSumDetails object, depending on whether the results are requested as a monthly summary or an accounting period summary. Both objects contain 0 to n SumDetails objects, whose contents are described in the table below.
Element | Type | Definition |
Year | int | Year |
Month | int | Month |
Account | object | Account |
Content of the Account-object
Element | Type | Definition |
Number | int-attribute | Account number |
AccountSumDetails | array(objekti) 0-n | Account sum/budget details grouped by cost center and work number |
Content of the AccountSumDetails-object
Element | Type | Definition |
CostCenter | int-attribute | Cost center |
WorkNumber | int-attribute | Work number |
OpeningAmount | double | Opening balance |
ChangeAmount | double | Change |
ClosingAmount | double | Closing balance |
2.2.9 GetReceiptDetails-method
This method allows retrieving receipt details from the accounting system. The method call requires as a mandatory parameter either the accounting period ID, the receipt ID, or the receipt number. The available parameters are listed in the table below.
Element | Type | Definition |
Required | object | Mandatory parameter |
Active | bool | Activity status of the receipts to be retrieved (whether they are deleted or not). By default, all are retrieved if not specified. |
ReceiptType | ReceiptTypeParamType | Type of the receipt |
ActionDate | DateParamType | Date of entry of the receipt |
Account | NumberRangeParamType | Account of the receipt |
CostCenter | NumberRangeParamType | The cost center of the receipt |
WorkNumber | StringParamType | The work number of the receipt |
GetDimensionDetails | bool | Determines whether to return the receipt's dimensioning details. By default, these details are not returned. |
GetAttachments | string | Determines whether to return the receipt's attachments. By default, attachments are not returned |
GetAttachments | The parameter is not mandatory, but if provided, only the following values are allowed: Selected or All. |
Description of the Required object
Element | Type | Definition |
AccountingPeriodId | NumberRangeParamType | Accounting period identifier |
ReceiptId | NumberRangeParamType | Receipt identifier |
ReceiptNumber | StringParamType | Receipt number |
2.2.9.1 ReceiptTypeParamType-object
ReceiptTypeParamType is an alternative-type parameter that requires only one of the elements to be provided. When this parameter is given, receipts with the specified receipt type are retrieved. The contents of the object are described in the table below.
Element | Type | Definition |
PreDefined | string | Predefined receipt type |
Custom | string | Receipt identifier |
Predefined | The element allows only the following values: SalesInvoice, PurchaseInvoice, SalesInvoicePayment, PurchaseInvoicePayment, BankStatement, Salary, SalaryPayment, TaxStatement, and ManualReceipt. |
Custom | This parameter can be used to retrieve receipts with manually added receipt types. |
2.2.9.2 Methoc call Response
The method call response returns a list of all receipts that match the given search criteria. The receipts are returned as Receipt objects, with zero or more instances. Below is a table describing the structure of the Receipt object.
Element | Type | Definition |
Id | string | Receipt identifier |
NumberSerie | string | Receipt number series |
Number | string | Receipt number |
Type | string | Receipt type |
ActionDate | date | Date of entry of the receipt |
Description | string | Description of the receipt |
TotalNetSum | double | Total net sum of the receipt |
TotalVatSum | double | Total VAT amount of the receipt |
TotalSum | double | Total amount of the receipt |
Debet | double | Total debit amount of the receipt |
Kredit | double | Total credit amount of the receipt |
ReceiptRow | array(object) 0-n | Receipt rows — 0 to n items in the array |
| object | Receipt dimension details. This property is deprecated and has been disabled. |
Attachments | object | Attachments of the receipt |
ReceiptRow-object description
Element | Type | Definition |
Id | int | Identifier of the receipt row |
ActionDate | date | Date of entry for the receipt row |
Account | int | Account of the receipt row |
VatAccount | int | VAT account of the receipt row |
VatPercent | double | VAT percentage of the receipt row |
NetSum | double | Net amount of the receipt row |
VatSum | double | VAT amount of the receipt row |
TotalSum | double | Total amount of the receipt row |
Description | string | Description of the receipt row |
CostCenter | int | Cost center of the receipt row |
WorkNumber | string | Work number of the receipt row |
DimensionRow | array | Dimension rows of the receipt row (from version 1.3 onwards) |
InBalanceAnalysis | bool | Indicates whether the row appears in the balance analysis |
BalanceAnalysisDescription | string | Description for the balance analysis |
DimensionRow-object description
Element | Type | Definition |
RegisterId | int | Dimension register ID |
RegisterItemId | int | Dimension item ID |
Register | string | Description of the dimension register |
Number | string | Number of the dimension item |
Description | string | Description of the dimension item |
Percent | double | Dimension allocation percentage |
Amount | double | Dimension amount |
DimensionDetails-object description
Element | Type | Definition |
DimensionRow | array(object) 0-n | Dimension rows, 0 to n items in the array |
DimensionRowSum | array(object) 0-n | Summary data of dimension rows, 0 to n items in the array |
DimensionRow-object description
Element | Type | Definition |
CostCenter | string | Cost center of the dimension row |
Portion | double | Allocation share of the dimension row |
Sum | double | Allocation amount of the dimension row |
DimensionRowSum-object description
Element | Type | Definition |
Account | int | Account of the summary row |
NetSum | double | Net sum of the summary row |
CostCenter | string | Cost center of the summary row |
WorkNumber | string | Work number of the summary row |
Attachments-object description
Element | Type | Definition |
Attachment | array(object) 0-n | Attached files of the receipt in an array |
Attachment-object description
Element | Type | Definition |
Id | int | Attachment file identifier |
Name | string | Attachment file name |
MimeType | string | Attachment file MIME type |
Size | string | Attachment file size |
Content | base64binary | Attachment file content (base64 encoded) |
2.2.10 GetCompanyDetails-method
This method retrieves the details of the main office of the organization to which the user has logged in, using the username and password specified during the client initialization.
The method does not take any parameters. The method call returns a Company object, the contents of which are described below.
Element | Type | Definition |
Id | int | Company identifier |
PartyIdentifier | string | Company business ID |
Name | string | Company name |
Name2 | string | Company name 2 |
StreetAddress | string | Company address |
StreetAddress2 | string | Company address 2 |
PostCodeIdentifier | string | Company postal code |
TownName | string | Company town / city name |
2.2.11 GetReceiptTypeDetails-method
This method retrieves a list of receipt types used during an accounting period. The mandatory parameter is the accounting period identifier. The parameter description is shown in the table below.
Element | Type | Definition |
AccountingPeriodId | NumberRangeParamType | The accounting periods from which the receipt type list is retrieved |
2.2.11.1 Method call Response
The method call returns a list of ReceiptType objects. The description of the object is shown in the table below.
ReceiptType-object description
Element | Type | Definition |
AccountingPeriod | int-attribute | Identifier of the accounting period |
Type | string | Receipt type |
Description | string | Description of the receipt type |
2.2.12 CreateAccountingReceipts
This method call is used to add new accounting receipts. Note: A single API call can create up to 50 receipts. During import, the accounting period is determined based on the creation date of the incoming receipt. Import is available starting from WSDL version 1.2.
AccountingReceipt-object description
Element | Type | Definition |
ActionDate | xsd:int | Receipt ID, if known |
ActionDate | xsd:date | Receipt creation date. The accounting period is selected based on this date (Format: YYYY-MM-DD) |
ReceiptNumber | xsd:token | Receipt number |
NumberSerie | xsd:token | Receipt number series |
Description | xsd:token | Receipt description |
Rows | AccountingReceiptRow | Receipt rows, between 1 and 500 items |
Attachments | Attachments | Receipt attachments, between 0 and 50 items. |
AccountingReceiptRow-object description
Element | Type | Definition |
ActionDate | xsd:date | Date of entry (YYYY-MM-DD) |
Account | xsd:int | Accounting account number in the chart of accounts |
VatAccount | xsd:int | VAT account number in the chart of accounts |
VatPercent | xsd:decimal | VAT percentage |
VatCode | xsd:int | VAT code in the register |
NetSum | xsd:decimal | Entry amount excluding VAT |
TotalSum | xsd:decimal | Entry amount including VAT |
VatSum | xsd:decimal | VAT amount |
VatSumToProcess | xsd:decimal | VAT amount to be reported in VAT returns |
CostCenter | xsd:int | Cost center in the register |
WorkNumber | xsd:token | Work number in the register |
Description | xsd:token | Entry description |
InBalanceAnalysis | xsd:boolean | Entry row included in the balance analysis |
AlwaysAnalyze | xsd:boolean | Entry row is always broken down in the balance analysis |
AnalysisDescription | xsd:token | Description for the balance analysis report |
AnalysisDestination | xsd:token | Allocation information for the analysis |
AnalysisDestinationNumber | xsd:int | Allocation information number for the analysis |
AnalysisGroup | xsd:int | Allocation group for the balance analysis report |
Attachment-object description
Element | Type | Mandatory | Example | Definition |
Name | xsd:token | Mandatory | receipt.jpg | Attachment file name |
Content | xsd:base64binary | Mandatory | Attachment data (Base64 encoded) | |
Id | xsd:int | Optional | Unique identifier for the attachment | |
MimeType | xsd:token | Optional | image/jpeg | Attachment MIME type |
Size | xsd:int | Optional | Attachment file size |
The response to the call contains one Response object for each added receipt. The response includes the identifier with which the receipt was added, as well as the status code and messages indicating success or any errors that occurred during the addition.
Response-object description
Element | Type | Definition |
Id | xsd:int | Identifier with which the receipt was added |
StatusCode | xsd:int | 0 = addition succeeded, 1 = errors occurred during addition |
Messages | xsd:complexType | Object containing the messages |
Message | xsd:string | Single message |
Error messages
Error situation | Error message |
Accounting period is invalid | Accounting period is missing |
Receipt number is missing | Receipt number is missing |
Number series already exists | NumberSerie already in us |
Invalid time period | Booking date is missing |
Account is missing | Account is missing |
Account is invalid | Account is invalid |
VAT account is missing | Vat Account is invalid |
VAT code is invalid | Vat code is invalid |
Cost center is missing | Costcenter is invalid |
Project number is missing | Worknumber is invalid |
Balance analysis specification target is invalid | AnalysisDestination is invalid |
Balance amalysis specification group is invalid | AnalysisGroup is invalid |
Amount is invalid | Vat sum is missing |
VAT and reported VAT do not match | VatSumToProcess is invalid |
Gross amount does not match net amount and VAT | TotalSum is invalid |
Tax amount based on VAT percentage does not match VAT amount and total amount | VatSum is invalid |
2.3 Parameter types
Below are the types used in the tables above.
2.3.1 NumberRangeParamType-type
The NumberRangeParamType type is an alternative-type parameter. This means that only one of the elements presented in the table below can be used at a time.
Element | Type | Definition |
Single | int | Single number |
Range | object | Number range |
In | array(int) | Set of numbers |
Range object of the NumberRangeParamType-type
Element | Type | Definition |
Start | int | First number of the number range |
End | int | Last number of the number range |
2.3.2 MonthRangeParamType
The MonthRangeParamType is a choice-type parameter. This means that only one of the elements presented in the table below can be used at a time. The parameter only accepts values that are numbers in the range 1–12.
Element | Type | Definition |
Single | int | Single month |
Range | object | Month range |
In | array(int) | Set of months |
Range object of the MonthRangeParamType-type
Element | Type | Definition |
Start | int | First month of the range |
End | int | Last month of the range |
2.3.3 DateParamType-type
The DateParamType is a choice-type parameter. This means that only one of the elements presented in the table below can be used at a time.
Element | Type | Definition |
Single | int | Single date |
Range | object | Date range |
TargetField | string-attribute | Specifies the date field to which the search is targeted |
Range object of the DateParamType-type
Element | Type | Definition |
Start | date | First date of the date range |
End | date | Last date of the date range |
2.3.4 TargetField-attribute
Specifies the field to which the date search is applied. Defaults to the value PaymentDate.
Possible values of the TargetField-attribute
Element | Type | Definition |
PaymentDate | string | Search targets the payment date field. Default |
RegistrationDate | string | Search targets the entry (booking) date field |
DueDate | string | Search targets the due date field |
2.3.5 StringParamType-type
Value | Type | Definition |
Exact | string | Searches for values that exactly match the search term |
Like | StringLikeParamType | Searches for values that contain the search term |
In | array(string) | Searches for values that match any of the given search terms |
2.3.6 StringLikeParamType and IntLikeParamType
This parameter type includes a search criterion and an optional attribute called WildCardPattern. The attribute defines how the search is performed. Allowed values for WildCardPattern are %s, %s% and s%.
Value | Definition |
%s | The searched data ends with the search criterion |
%s% | The searched data contains the search criterion anywhere |
s% | The searched data starts with the search criterion |
2.3.7 AccountTypeType-type
Parameter type that defines the allowed account types. The allowed values are listed in the table below.
Value | Definition |
Asset | Debit side |
Equity/Liabilit | Credit side |
Profit/Loss | Income statement account |
2.3.8 ReturnTypeType-type
Specifies in what format the returned data is organized. Possible values are Tree or List. With Tree, the data is organized in a hierarchical tree structure. With List, the returned data is presented as a simple list.
3 Code samples
It should be noted that the code samples presented in the documents are examples of how the interface can be used. Implementation of the codes requires PHP knowledge from the www-service provider. NetBaron Solutions Oy is not responsible for any direct or indirect damage and costs related to the sample codes when a third party does the implementation and further development.
Please note: The code created by your software developer must not cause server overload situations. We reserve the right to bill the creator of the software code or the end customer for system failure in the server environment. If necessary, please get the software code checked by sending it to tuki@netbaron.fi and adding the mention: "WS-Accounting interface software code to product development for review and possible feedback".
3.1 PHP
3.1.1 Initializing the client
<?php
/**
* Client
*/
try {
$client = new SoapClient(
"https://<server_url>/ws/accounting?wsdl=<wsdl_version>",
array(
'uri' => "urn:NBWS",
'style' => SOAP_DOCUMENT,
'use' => SOAP_LITERAL,
'soap_version' => SOAP_1_2,
'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | 5,
'cache_wsdl' => WSDL_CACHE_NONE
));
} catch (Exception $ex) {
var_dump($ex);
}
/**
* UsernameToken
*/
$ns = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd';
$UsernameToken = new stdClass();
$UsernameToken->Username = new SoapVar(utf8_encode('username'), XSD_STRING, null, null, null, $ns);
$UsernameToken->Password = new SoapVar(utf8_encode('password'), XSD_STRING, null, null, null, $ns);
$Security = new stdClass();
$Security->UsernameToken = new SoapVar($UsernameToken, SOAP_ENC_OBJECT, null, null, null, $ns);
$Header = new SoapVar($Security, SOAP_ENC_OBJECT, null, null, null, $ns);
$Headers = array(
new SoapHeader($ns, 'Security', $Header)
);
$client->__setSoapHeaders($Headers);
?>
3.1.2 GetCostCenterDetails
<?php
try {
// Gets the cost centers which have an id in the range of from 1 to 10
$parameters = array (
'Id' => array (
'Range' => array (
'Start' => 1
'End' => 20)));
$response = $client->getCostCenterDetails($parameters);
//handle response
} catch (SoapFault $fault) {
// handle exception
}
?>
3.1.2 GetWorkNumberDetails
<?php
try {
// Gets the work numbers with specified ids
$parameters = array (
'Id' => array (
'In' => array (4101, 2891, 2961)
)
);
$response = $client->getWorkNumberDetails($parameters);
//handle response
} catch (SoapFault $fault) {
// handle exception
}
?>
3.1.4 GetAccountSheet
<?php
try {
// Gets the accounts which have an account number in the range of from 3000 to 3005
$parameters = array (
'ReturnType' => array (
'Value' => 'Tree'
),
'AccountNumber' => array(
'Range' => array(
'Start' => 3000,
'End' => 3005
)
);
$response = $client->getAccountSheet($parameters);
//handle response
} catch (SoapFault $fault) {
// handle exception
}
?>
3.1.5 GetAccountingPeriodDetails
<?php
try {
// Gets the accounting period by id
$parameters = array (
'Id' => 73
);
$response = $client->getAccountingPeriodDetails($parameters);
//handle response
} catch (SoapFault $fault) {
// handle exception
}
?>
3.1.6 GetAccountSumDetails
<?php
try {
// Gets the the sum details for accounts 3000 and 4000
// for the first month in accounting period with id 73
$parameters = array (
'AccountingPeriodId' => array('Single' => 73),
'Month' => array('Single' => 1),
'Account' => array('In' => array(3000, 4000))
);
$response = $client->getAccountSumDetails($parameters);
//handle response
} catch (SoapFault $fault) {
// handle exception
}
?>
3.1.7 GetBudgetDetails
<?php
try {
// Gets the the budget details for accounts 3000 and 4000
// for the first and the second month in accounting period with id 73
$parameters = array (
'AccountingPeriodId' => array('Single' => 73),
'Month' => array('Range' => array('Start' => 1, 'End' => 2),
'Account' => array('In' => array(3000, 4000))
);
$response = $client->getBudgetDetails($parameters);
//handle response
} catch (SoapFault $fault) {
// handle exception
}
?>
3.1.8 GetReceiptDetails
<?php
try {
// get the receipt by id
// get also the selected attachments of the receipt
$parameters = array (
'Required' => array('ReceiptId' => 26236),
'GetAttachments' => 'Selected'
);
$response = $client->getReceiptDetails($parameters);
//handle response
} catch (SoapFault $fault) {
// handle exception
}
?>
3.1.9 GetCompanyDetails
<?php
try {
// Gets the company details
$response = $client->getCompanyDetails();
//handle response
} catch (SoapFault $fault) {
// handle exception
}
?>
3.1.10 GetReceiptTypeDetails
<?php
try {
// Gets the receipt types from accounting period with id 73
$parameters = array (
'AccountingPeriodId' => array('Single' => 73)
);
$response = $client->getReceiptTypeDetails($parameters);
//handle response
} catch (SoapFault $fault) {
// handle exception
}
?>
3.2 XML
3.2.1 GetCostCenterDetails
3.2.1.1 Request
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:accounting:v1.0" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<env:Header>
<wsse:Security>
<wsse:UsernameToken>
<wsse:Username>username</wsse:Username>
<wsse:Password>password</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</env:Header>
<env:Body>
<ns1:CostCenterParameters>
<ns1:Id>
<ns1:Range>
<ns1:Start>1</ns1:Start>
<ns1:End>10</ns1:End>
</ns1:Range>
</ns1:Id>
</ns1:CostCenterParameters>
</env:Body>
</env:Envelope>
3.2.1.2 Response
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:accounting:v1.0">
<env:Body>
<ns1:CostCenterDetailsResponse>
<ns1:CostCenter>
<ns1:Id>1</ns1:Id>
<ns1:Number>100</ns1:Number>
<ns1:Description>100</ns1:Description>
<ns1:Active>true</ns1:Active>
</ns1:CostCenter>
<ns1:CostCenter>
<ns1:Id>11</ns1:Id>
<ns1:Number>101</ns1:Number>
<ns1:Description>101</ns1:Description>
<ns1:Active>true</ns1:Active>
</ns1:CostCenter>
</ns1:CostCenterDetailsResponse>
</env:Body>
</env:Envelope>
3.2.2 GetWorkNumberDetails
3.2.2.1 Request
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:accounting:v1.0" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<env:Header>
<wsse:Security>
<wsse:UsernameToken>
<wsse:Username>username</wsse:Username>
<wsse:Password>password</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</env:Header>
<env:Body>
<ns1:WorkNumberParameters>
<ns1:Id>
<ns1:In>4101</ns1:In>
<ns1:In>2891</ns1:In>
<ns1:In>2961</ns1:In>
</ns1:Id>
</ns1:WorkNumberParameters>
</env:Body>
</env:Envelope>
3.2.2.2 Response
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:accounting:v1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Body>
<ns1:GetWorkNumberDetailsResponse>
<ns1:WorkNumber>
<ns1:Id>4101</ns1:Id>
<ns1:Number>0</ns1:Number>
<ns1:Description>Testiprojekti</ns1:Description>
<ns1:StartDate xsi:nil="true"/>
<ns1:EndDate xsi:nil="true"/>
<ns1:Active>true</ns1:Active>
</ns1:WorkNumber>
<ns1:WorkNumber>
<ns1:Id>2891</ns1:Id>
<ns1:Number>0</ns1:Number>
<ns1:Description>otsikko 1</ns1:Description>
<ns1:StartDate>2010-06-20</ns1:StartDate>
<ns1:EndDate xsi:nil="true"/>
<ns1:Active>true</ns1:Active>
</ns1:WorkNumber>
<ns1:WorkNumber>
<ns1:Id>2961</ns1:Id>
<ns1:Number>0</ns1:Number>
<ns1:Description>adfadf</ns1:Description>
<ns1:StartDate>2010-10-15</ns1:StartDate>
<ns1:EndDate>2010-10-25</ns1:EndDate>
<ns1:Active>true</ns1:Active>
</ns1:WorkNumber>
</ns1:GetWorkNumberDetailsResponse>
</env:Body>
</env:Envelope>
3.2.3 GetAccountSheet
3.2.3.1 Request
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:accounting:v1.0" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<env:Header>
<wsse:Security>
<wsse:UsernameToken>
<wsse:Username>username</wsse:Username>
<wsse:Password>password</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</env:Header>
<env:Body>
<ns1:AccountSheetParameters>
<ns1:AccountNumber>
<ns1:Range>
<ns1:Start>3000</ns1:Start>
<ns1:End>3005</ns1:End>
</ns1:Range>
</ns1:AccountNumber>
<ns1:ReturnType Value="Tree"/>
</ns1:AccountSheetParameters>
</env:Body>
</env:Envelope>
3.2.3.2 Response
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:accounting:v1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Body>
<ns1:GetAccountSheetResponse>
<ns1:AccountSheet>
<ns1:Account>
<ns1:AccountNumber>3</ns1:AccountNumber>
<ns1:AccountDescription>TULOSLASKELMA</ns1:AccountDescription>
<ns1:AccountType>Profit/Loss</ns1:AccountType>
<ns1:AccountSpecifier/>
<ns1:CalculationCode>
</ns1:CalculationCode>
<ns1:ControlCodeDetails>
<ns1:Formal>false</ns1:Formal>
<ns1:InAnalysis>true</ns1:InAnalysis>
<ns1:SaldoInAnalysis>false</ns1:SaldoInAnalysis>
<ns1:AdditionsInAnalysis>false</ns1:AdditionsInAnalysis>
<ns1:InOwnCapitalAnalysis>false</ns1:InOwnCapitalAnalysis>
<ns1:AdditionsInOwnCapitalAnalysis>false</ns1:AdditionsInOwnCapitalAnalysis>
<ns1:CalculatePercentage>false</ns1:CalculatePercentage>
<ns1:CostCenterRequired>false</ns1:CostCenterRequired>
<ns1:WorkNumberRequired>false</ns1:WorkNumberRequired>
</ns1:ControlCodeDetails>
<ns1:VatDetails>
<ns1:VatPercent>0</ns1:VatPercent>
<ns1:VatAccount xsi:nil="true"/>
<ns1:VatCode xsi:nil="true"/>
<ns1:VatCodeDescription xsi:nil="true"/>
</ns1:VatDetails>
<ns1:SubAccounts>
<ns1:Account>
<ns1:AccountNumber>300</ns1:AccountNumber>
<ns1:AccountDescription>Sales revenue</ns1:AccountDescription>
<ns1:AccountType>Profit/Loss</ns1:AccountType>
<ns1:AccountSpecifier/>
<ns1:CalculationCode>
</ns1:CalculationCode>
<ns1:ControlCodeDetails>
<ns1:Formal>false</ns1:Formal>
<ns1:InAnalysis>true</ns1:InAnalysis>
<ns1:SaldoInAnalysis>false</ns1:SaldoInAnalysis>
<ns1:AdditionsInAnalysis>false</ns1:AdditionsInAnalysis>
<ns1:InOwnCapitalAnalysis>false</ns1:InOwnCapitalAnalysis>
<ns1:AdditionsInOwnCapitalAnalysis>false</ns1:AdditionsInOwnCapitalAnalysis>
<ns1:CalculatePercentage>false</ns1:CalculatePercentage>
<ns1:CostCenterRequired>true</ns1:CostCenterRequired>
<ns1:WorkNumberRequired>true</ns1:WorkNumberRequired>
</ns1:ControlCodeDetails>
<ns1:VatDetails>
<ns1:VatPercent>0</ns1:VatPercent>
<ns1:VatAccount xsi:nil="true"/>
<ns1:VatCode xsi:nil="true"/>
<ns1:VatCodeDescription xsi:nil="true"/>
</ns1:VatDetails>
<ns1:SubAccounts>
<ns1:Account>
<ns1:AccountNumber>300</ns1:AccountNumber>
<ns1:AccountDescription>Yleiset myyntitilit</ns1:AccountDescription>
<ns1:AccountType>Profit/Loss</ns1:AccountType>
<ns1:AccountSpecifier/>
<ns1:CalculationCode>
</ns1:CalculationCode>
<ns1:ControlCodeDetails>
<ns1:Formal>false</ns1:Formal>
<ns1:InAnalysis>true</ns1:InAnalysis>
<ns1:SaldoInAnalysis>false</ns1:SaldoInAnalysis>
<ns1:AdditionsInAnalysis>false</ns1:AdditionsInAnalysis>
<ns1:InOwnCapitalAnalysis>false</ns1:InOwnCapitalAnalysis>
<ns1:AdditionsInOwnCapitalAnalysis>false</ns1:AdditionsInOwnCapitalAnalysis>
<ns1:CalculatePercentage>false</ns1:CalculatePercentage>
<ns1:CostCenterRequired>true</ns1:CostCenterRequired>
<ns1:WorkNumberRequired>true</ns1:WorkNumberRequired>
</ns1:ControlCodeDetails>
<ns1:VatDetails>
<ns1:VatPercent>0</ns1:VatPercent>
<ns1:VatAccount xsi:nil="true"/>
<ns1:VatCode xsi:nil="true"/>
<ns1:VatCodeDescription xsi:nil="true"/>
</ns1:VatDetails>
<ns1:SubAccounts>
<ns1:Account>
<ns1:AccountNumber>3000</ns1:AccountNumber>
<ns1:AccountDescription>Myynti 24%</ns1:AccountDescription>
<ns1:AccountType>Profit/Loss</ns1:AccountType>
<ns1:AccountSpecifier/>
<ns1:CalculationCode>
</ns1:CalculationCode>
<ns1:ControlCodeDetails>
<ns1:Formal>false</ns1:Formal>
<ns1:InAnalysis>true</ns1:InAnalysis>
<ns1:SaldoInAnalysis>false</ns1:SaldoInAnalysis>
<ns1:AdditionsInAnalysis>false</ns1:AdditionsInAnalysis>
<ns1:InOwnCapitalAnalysis>false</ns1:InOwnCapitalAnalysis>
<ns1:AdditionsInOwnCapitalAnalysis>false</ns1:AdditionsInOwnCapitalAnalysis>
<ns1:CalculatePercentage>false</ns1:CalculatePercentage>
<ns1:CostCenterRequired>false</ns1:CostCenterRequired>
<ns1:WorkNumberRequired>false</ns1:WorkNumberRequired>
</ns1:ControlCodeDetails>
<ns1:VatDetails>
<ns1:VatPercent>24</ns1:VatPercent>
<ns1:VatAccount>29392</ns1:VatAccount>
<ns1:VatCode>20</ns1:VatCode>
<ns1:VatCodeDescription>Verollinen myynti kotimaa</ns1:VatCodeDescription>
</ns1:VatDetails>
</ns1:Account>
<ns1:Account>
<ns1:AccountNumber>3001</ns1:AccountNumber>
<ns1:AccountDescription>Myynti 14%</ns1:AccountDescription>
<ns1:AccountType>Profit/Loss</ns1:AccountType>
<ns1:AccountSpecifier/>
<ns1:CalculationCode>
</ns1:CalculationCode>
<ns1:ControlCodeDetails>
<ns1:Formal>false</ns1:Formal>
<ns1:InAnalysis>true</ns1:InAnalysis>
<ns1:SaldoInAnalysis>false</ns1:SaldoInAnalysis>
<ns1:AdditionsInAnalysis>false</ns1:AdditionsInAnalysis>
<ns1:InOwnCapitalAnalysis>false</ns1:InOwnCapitalAnalysis>
<ns1:AdditionsInOwnCapitalAnalysis>false</ns1:AdditionsInOwnCapitalAnalysis>
<ns1:CalculatePercentage>false</ns1:CalculatePercentage>
<ns1:CostCenterRequired>false</ns1:CostCenterRequired>
<ns1:WorkNumberRequired>false</ns1:WorkNumberRequired>
</ns1:ControlCodeDetails>
<ns1:VatDetails>
<ns1:VatPercent>14</ns1:VatPercent>
<ns1:VatAccount>29392</ns1:VatAccount>
<ns1:VatCode>20</ns1:VatCode>
<ns1:VatCodeDescription>Verollinen myynti kotimaa</ns1:VatCodeDescription>
</ns1:VatDetails>
</ns1:Account>
<ns1:Account>
<ns1:AccountNumber>3002</ns1:AccountNumber>
<ns1:AccountDescription>Myynti 10%</ns1:AccountDescription>
<ns1:AccountType>Profit/Loss</ns1:AccountType>
<ns1:AccountSpecifier/>
<ns1:CalculationCode>
</ns1:CalculationCode>
<ns1:ControlCodeDetails>
<ns1:Formal>false</ns1:Formal>
<ns1:InAnalysis>true</ns1:InAnalysis>
<ns1:SaldoInAnalysis>false</ns1:SaldoInAnalysis>
<ns1:AdditionsInAnalysis>false</ns1:AdditionsInAnalysis>
<ns1:InOwnCapitalAnalysis>false</ns1:InOwnCapitalAnalysis>
<ns1:AdditionsInOwnCapitalAnalysis>false</ns1:AdditionsInOwnCapitalAnalysis>
<ns1:CalculatePercentage>false</ns1:CalculatePercentage>
<ns1:CostCenterRequired>false</ns1:CostCenterRequired>
<ns1:WorkNumberRequired>false</ns1:WorkNumberRequired>
</ns1:ControlCodeDetails>
<ns1:VatDetails>
<ns1:VatPercent>10</ns1:VatPercent>
<ns1:VatAccount>29392</ns1:VatAccount>
<ns1:VatCode>20</ns1:VatCode>
<ns1:VatCodeDescription>Verollinen myynti kotimaa</ns1:VatCodeDescription>
</ns1:VatDetails>
</ns1:Account>
<ns1:Account>
<ns1:AccountNumber>3003</ns1:AccountNumber>
<ns1:AccountDescription>Myynti 0%</ns1:AccountDescription>
<ns1:AccountType>Profit/Loss</ns1:AccountType>
<ns1:AccountSpecifier/>
<ns1:CalculationCode>
</ns1:CalculationCode>
<ns1:ControlCodeDetails>
<ns1:Formal>false</ns1:Formal>
<ns1:InAnalysis>true</ns1:InAnalysis>
<ns1:SaldoInAnalysis>false</ns1:SaldoInAnalysis>
<ns1:AdditionsInAnalysis>false</ns1:AdditionsInAnalysis>
<ns1:InOwnCapitalAnalysis>false</ns1:InOwnCapitalAnalysis>
<ns1:AdditionsInOwnCapitalAnalysis>false</ns1:AdditionsInOwnCapitalAnalysis>
<ns1:CalculatePercentage>false</ns1:CalculatePercentage>
<ns1:CostCenterRequired>false</ns1:CostCenterRequired>
<ns1:WorkNumberRequired>false</ns1:WorkNumberRequired>
</ns1:ControlCodeDetails>
<ns1:VatDetails>
<ns1:VatPercent>0</ns1:VatPercent>
<ns1:VatAccount xsi:nil="true"/>
<ns1:VatCode>10</ns1:VatCode>
<ns1:VatCodeDescription>0-verokannan alainen liikevaihto</ns1:VatCodeDescription>
</ns1:VatDetails>
</ns1:Account>
<ns1:Account>
<ns1:AccountNumber>3004</ns1:AccountNumber>
<ns1:AccountDescription>Myynti</ns1:AccountDescription>
<ns1:AccountType>Profit/Loss</ns1:AccountType>
<ns1:AccountSpecifier/>
<ns1:CalculationCode>
</ns1:CalculationCode>
<ns1:ControlCodeDetails>
<ns1:Formal>false</ns1:Formal>
<ns1:InAnalysis>true</ns1:InAnalysis>
<ns1:SaldoInAnalysis>false</ns1:SaldoInAnalysis>
<ns1:AdditionsInAnalysis>false</ns1:AdditionsInAnalysis>
<ns1:InOwnCapitalAnalysis>false</ns1:InOwnCapitalAnalysis>
<ns1:AdditionsInOwnCapitalAnalysis>false</ns1:AdditionsInOwnCapitalAnalysis>
<ns1:CalculatePercentage>false</ns1:CalculatePercentage>
<ns1:CostCenterRequired>false</ns1:CostCenterRequired>
<ns1:WorkNumberRequired>false</ns1:WorkNumberRequired>
</ns1:ControlCodeDetails>
<ns1:VatDetails>
<ns1:VatPercent>0</ns1:VatPercent>
<ns1:VatAccount xsi:nil="true"/>
<ns1:VatCode>19</ns1:VatCode>
<ns1:VatCodeDescription xsi:nil="true"/>
</ns1:VatDetails>
</ns1:Account>
</ns1:SubAccounts>
</ns1:Account>
</ns1:SubAccounts>
</ns1:Account>
</ns1:SubAccounts>
</ns1:Account>
</ns1:AccountSheet>
</ns1:GetAccountSheetResponse>
</env:Body>
</env:Envelope>
3.2.4 GetAccountingPeriodDetails
3.2.4.1 Request
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:accounting:v1.0" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<env:Header>
<wsse:Security>
<wsse:UsernameToken>
<wsse:Username>username</wsse:Username>
<wsse:Password>password</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</env:Header>
<env:Body>
<ns1:AccountingPeriodParameters>
<ns1:Id>73</ns1:Id>
</ns1:AccountingPeriodParameters>
</env:Body>
</env:Envelope>
3.2.4.2 Response
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:accounting:v1.0">
<env:Body>
<ns1:GetAccountingPeriodDetailsResponse>
<ns1:AccountingPeriod>
<ns1:Id>73</ns1:Id>
<ns1:StartDate>2016-01-01</ns1:StartDate>
<ns1:EndDate>2016-12-31</ns1:EndDate>
<ns1:FixedStartDate>2016-01-01</ns1:FixedStartDate>
<ns1:Description>2016</ns1:Description>
</ns1:AccountingPeriod>
</ns1:GetAccountingPeriodDetailsResponse>
</env:Body>
</env:Envelope>
3.2.5 GetAccountSumDetails
3.2.5.1 Request
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:accounting:v1.0" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<env:Header>
<wsse:Security>
<wsse:UsernameToken>
<wsse:Username>username</wsse:Username>
<wsse:Password>password</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</env:Header>
<env:Body>
<ns1:AccountSumDetailParameters>
<ns1:AccountingPeriodId>
<ns1:Single>73</ns1:Single>
</ns1:AccountingPeriodId>
<ns1:Month>
<ns1:Single>1</ns1:Single>
</ns1:Month>
<ns1:Account>
<ns1:In>3000</ns1:In>
<ns1:In>4000</ns1:In>
</ns1:Account>
</ns1:AccountSumDetailParameters>
</env:Body>
</env:Envelope>
3.2.5.2 Response
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:accounting:v1.0">
<env:Body>
<ns1:GetAccountSumDetailsResponse>
<ns1:AccountSumDetails>
<ns1:MonthlySumDetails>
<ns1:SumDetails Year="2016" Month="1">
<ns1:Account Number="3000">
<ns1:AccountSumDetails CostCenter="10">
<ns1:OpeningAmount>0</ns1:OpeningAmount>
<ns1:ChangeAmount>-444.04</ns1:ChangeAmount>
<ns1:ClosingAmount>-444.04</ns1:ClosingAmount>
</ns1:AccountSumDetails>
</ns1:Account>
<ns1:Account Number="4000">
<ns1:AccountSumDetails CostCenter="200">
<ns1:OpeningAmount>0</ns1:OpeningAmount>
<ns1:ChangeAmount>52.6</ns1:ChangeAmount>
<ns1:ClosingAmount>52.6</ns1:ClosingAmount>
</ns1:AccountSumDetails>
</ns1:Account>
</ns1:SumDetails>
</ns1:MonthlySumDetails>
</ns1:AccountSumDetails>
</ns1:GetAccountSumDetailsResponse>
</env:Body>
</env:Envelope>
3.2.6 GetBudgetDetails
3.2.6.1 Request
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:accounting:v1.0" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<env:Header>
<wsse:Security>
<wsse:UsernameToken>
<wsse:Username>username</wsse:Username>
<wsse:Password>password</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</env:Header>
<env:Body>
<ns1:GetBudgetDetails>
<ns1:AccountingPeriodId>
<ns1:Single>73</ns1:Single>
</ns1:AccountingPeriodId>
<ns1:Month>
<ns1:Range>
<ns1:Start>1</ns1:Start>
<ns1:End>2</ns1:End>
</ns1:Range>
</ns1:Month>
<ns1:Account>
<ns1:In>3000</ns1:In>
<ns1:In>4000</ns1:In>
</ns1:Account>
</ns1:GetBudgetDetails>
</env:Body>
</env:Envelope>
3.2.6.2 Response
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:accounting:v1.0">
<env:Body>
<ns1:GetBudgetDetailsResponse>
<ns1:BudgetDetails>
<ns1:MonthlySumDetails>
<ns1:SumDetails Year="2016" Month="1">
<ns1:Account Number="3000">
<ns1:AccountSumDetails CostCenter="10">
<ns1:OpeningAmount>0</ns1:OpeningAmount>
<ns1:ChangeAmount>0</ns1:ChangeAmount>
<ns1:ClosingAmount>0</ns1:ClosingAmount>
</ns1:AccountSumDetails>
</ns1:Account>
<ns1:Account Number="4000">
<ns1:AccountSumDetails CostCenter="200">
<ns1:OpeningAmount>0</ns1:OpeningAmount>
<ns1:ChangeAmount>0</ns1:ChangeAmount>
<ns1:ClosingAmount>0</ns1:ClosingAmount>
</ns1:AccountSumDetails>
</ns1:Account>
</ns1:SumDetails>
<ns1:SumDetails Year="2016" Month="2">
<ns1:Account Number="3000">
<ns1:AccountSumDetails CostCenter="10">
<ns1:OpeningAmount>0</ns1:OpeningAmount>
<ns1:ChangeAmount>0</ns1:ChangeAmount>
<ns1:ClosingAmount>0</ns1:ClosingAmount>
</ns1:AccountSumDetails>
</ns1:Account>
<ns1:Account Number="4000">
<ns1:AccountSumDetails CostCenter="200">
<ns1:OpeningAmount>0</ns1:OpeningAmount>
<ns1:ChangeAmount>0</ns1:ChangeAmount>
<ns1:ClosingAmount>0</ns1:ClosingAmount>
</ns1:AccountSumDetails>
</ns1:Account>
</ns1:SumDetails>
</ns1:MonthlySumDetails>
</ns1:BudgetDetails>
</ns1:GetBudgetDetailsResponse>
</env:Body>
</env:Envelope>
3.2.7 GetReceiptDetails
3.2.7.1 Request
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:accounting:v1.0" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<env:Header>
<wsse:Security>
<wsse:UsernameToken>
<wsse:Username>username</wsse:Username>
<wsse:Password>password</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</env:Header>
<env:Body>
<ns1:GetReceiptDetails>
<ns1:Required>
<ns1:ReceiptId>
<ns1:Single>26236</ns1:Single>
</ns1:ReceiptId>
</ns1:Required>
<ns1:GetAttachments>Selected</ns1:GetAttachments>
</ns1:GetReceiptDetails>
</env:Body>
</env:Envelope>
3.2.7.2 Response
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:accounting:v1.0">
<env:Body>
<ns1:GetReceiptDetailsResponse>
<ns1:Receipt>
<ns1:Id>26236</ns1:Id>
<ns1:NumberSerie>2010</ns1:NumberSerie>
<ns1:Number>2010132</ns1:Number>
<ns1:Type>PurchaseInvoice</ns1:Type>
<ns1:ActionDate>2015-03-13</ns1:ActionDate>
<ns1:Description>Purchase invoice ABB Oy</ns1:Description>
<ns1:TotalNetSum>-39.87</ns1:TotalNetSum>
<ns1:TotalVatSum>39.87</ns1:TotalVatSum>
<ns1:TotalSum>0</ns1:TotalSum>
<ns1:Debet>206</ns1:Debet>
<ns1:Kredit>206</ns1:Kredit>
<ns1:ReceiptRow>
<ns1:Id>54752</ns1:Id>
<ns1:ActionDate>2015-03-13</ns1:ActionDate>
<ns1:Account>4000</ns1:Account>
<ns1:VatAccount>29391</ns1:VatAccount>
<ns1:VatPercent>24</ns1:VatPercent>
<ns1:NetSum>96.77</ns1:NetSum>
<ns1:VatSum>23.23</ns1:VatSum>
<ns1:TotalSum>120</ns1:TotalSum>
<ns1:Description>kkk</ns1:Description>
<ns1:InBalanceAnalysis>true</ns1:InBalanceAnalysis>
<ns1:BalanceAnalysisDescription>
</ns1:BalanceAnalysisDescription>
</ns1:ReceiptRow>
<ns1:ReceiptRow>
<ns1:Id>54753</ns1:Id>
<ns1:ActionDate>2015-03-13</ns1:ActionDate>
<ns1:Account>4000</ns1:Account>
<ns1:VatAccount>29391</ns1:VatAccount>
<ns1:VatPercent>24</ns1:VatPercent>
<ns1:NetSum>16.13</ns1:NetSum>
<ns1:VatSum>3.87</ns1:VatSum>
<ns1:TotalSum>20</ns1:TotalSum>
<ns1:Description>yg</ns1:Description>
<ns1:InBalanceAnalysis>true</ns1:InBalanceAnalysis>
<ns1:BalanceAnalysisDescription>
</ns1:BalanceAnalysisDescription>
</ns1:ReceiptRow>
<ns1:ReceiptRow>
<ns1:Id>54754</ns1:Id>
<ns1:ActionDate>2015-03-13</ns1:ActionDate>
<ns1:Account>2871</ns1:Account>
<ns1:VatAccount>0</ns1:VatAccount>
<ns1:VatPercent>0</ns1:VatPercent>
<ns1:NetSum>-206</ns1:NetSum>
<ns1:VatSum>0</ns1:VatSum>
<ns1:TotalSum>-206</ns1:TotalSum>
<ns1:Description>ABB Oy</ns1:Description>
<ns1:InBalanceAnalysis>true</ns1:InBalanceAnalysis>
<ns1:BalanceAnalysisDescription>ABB Oy</ns1:BalanceAnalysisDescription>
</ns1:ReceiptRow>
<ns1:ReceiptRow>
<ns1:Id>54787</ns1:Id>
<ns1:ActionDate>2015-03-13</ns1:ActionDate>
<ns1:Account>4000</ns1:Account>
<ns1:VatAccount>29391</ns1:VatAccount>
<ns1:VatPercent>24</ns1:VatPercent>
<ns1:NetSum>53.23</ns1:NetSum>
<ns1:VatSum>12.77</ns1:VatSum>
<ns1:TotalSum>66</ns1:TotalSum>
<ns1:Description>66</ns1:Description>
<ns1:InBalanceAnalysis>true</ns1:InBalanceAnalysis>
<ns1:BalanceAnalysisDescription>
</ns1:BalanceAnalysisDescription>
</ns1:ReceiptRow>
</ns1:Receipt>
</ns1:GetReceiptDetailsResponse>
</env:Body>
</env:Envelope>
3.2.8 GetCompanyDetails
3.2.8.1 Request
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:accounting:v1.0" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<env:Header>
<wsse:Security>
<wsse:UsernameToken>
<wsse:Username>username</wsse:Username>
<wsse:Password>password</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</env:Header>
<env:Body>
<ns1:CompanyDetails/>
</env:Body>
</env:Envelope>
3.2.8.2 Response
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:accounting:v1.0">
<env:Body>
<ns1:GetCompanyDetailsResponse>
<ns1:Company>
<ns1:Id>1</ns1:Id>
<ns1:PartyIdentifier>1234567-1</ns1:PartyIdentifier>
<ns1:Name>Admin Oy</ns1:Name>
<ns1:Name2>fasd</ns1:Name2>
<ns1:StreetAddress>Admintie 3</ns1:StreetAddress>
<ns1:StreetAddress2>Osoite 2</ns1:StreetAddress2>
<ns1:PostCodeIdentifier>04480</ns1:PostCodeIdentifier>
<ns1:TownName>Admin</ns1:TownName>
</ns1:Company>
</ns1:GetCompanyDetailsResponse>
</env:Body>
</env:Envelope>
3.2.9 GetReceiptTypeDetails
3.2.9.1 Request
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:accounting:v1.0" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<env:Header>
<wsse:Security>
<wsse:UsernameToken>
<wsse:Username>username</wsse:Username>
<wsse:Password>password</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</env:Header>
<env:Body>
<ns1:ReceiptTypeDetailsParameters>
<ns1:AccountingPeriodId>
<ns1:Single>73</ns1:Single>
</ns1:AccountingPeriodId>
</ns1:ReceiptTypeDetailsParameters>
</env:Body>
</env:Envelope>
3.2.9.2 Response
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:accounting:v1.0">
<env:Body>
<ns1:ReceiptTypeDetailsResponse>
<ns1:ReceiptType AccountingPeriodId="73">
<ns1:Type>10</ns1:Type>
<ns1:Description>Tapahtumatositteet</ns1:Description>
</ns1:ReceiptType>
<ns1:ReceiptType AccountingPeriodId="73">
<ns1:Type>15</ns1:Type>
<ns1:Description>Tilinpäätöstositteet</ns1:Description>
</ns1:ReceiptType>
<ns1:ReceiptType AccountingPeriodId="73">
<ns1:Type>20</ns1:Type>
<ns1:Description>Pankkitositteet</ns1:Description>
</ns1:ReceiptType>
<ns1:ReceiptType AccountingPeriodId="73">
<ns1:Type>30</ns1:Type>
<ns1:Description>Myyntitositteet</ns1:Description>
</ns1:ReceiptType>
<ns1:ReceiptType AccountingPeriodId="73">
<ns1:Type>40</ns1:Type>
<ns1:Description>Ostotositteet</ns1:Description>
</ns1:ReceiptType>
<ns1:ReceiptType AccountingPeriodId="73">
<ns1:Type>50</ns1:Type>
<ns1:Description>Palkkatositteet</ns1:Description>
</ns1:ReceiptType>
<ns1:ReceiptType AccountingPeriodId="73">
<ns1:Type>60</ns1:Type>
<ns1:Description>Verotositteet</ns1:Description>
</ns1:ReceiptType>
<ns1:ReceiptType AccountingPeriodId="73">
<ns1:Type>99</ns1:Type>
<ns1:Description>Testi</ns1:Description>
</ns1:ReceiptType>
<ns1:ReceiptType AccountingPeriodId="73">
<ns1:Type>asdf</ns1:Type>
<ns1:Description>adf</ns1:Description>
</ns1:ReceiptType>
</ns1:ReceiptTypeDetailsResponse>
</env:Body>
</env:Envelope>