Web Services - Invoicing
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 Invoicing Web Services module, which enables the use of NetBaron® invoicing from external services.
The module allows retrieving invoice data and creating invoices. 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
Retrieving invoices using a given identifier
Creating new invoices
2. Technical information
2.1 Service information
Address: | https://server/ws/invoice or https://server/ws/invoice?wsdl=versio, if using WSDL. When using WSDL, the available methods are described within the WSDL file itself. If an alternative parallel interface has been enabled, the interface number must be included in the address in order to call the correct endpoint. Otherwise, authentication will fail. Example: |
Authentication: | Organization and the organization-specific Web Services password |
Character set: | UTF-8 |
Available methods: | GET / PUT |
Type of request: | Object |
Type of response: | Object |
Notes: | In PUT requests, the Finvoice InvoiceTypeCode must have the value INV01. |
2.2 Request content (GET)
Element | Type | Use | Default | Definition | Mandatory |
GetSellerPartyDetails | boolean | Control message | FALSE | Seller details | |
GetInvoiceRecipientPartyDetails | boolean | Control message | FALSE | Payer details | |
GetBuyerPartyDetails | boolean | Control message | FALSE | Buyer details | |
GetDeliveryPartyDetails | boolean | Control message | FALSE | Delivery address details | |
GetDeliveryDetails | boolean | Control message | FALSE | Delivery details | |
GetInvoiceDetails | boolean | Control message | FALSE | Invoice details | |
GetInvoiceFreeText | boolean | Control message | FALSE | Invoice free text | |
GetInvoicePDF | boolean | Control message | FALSE | If TRUE, returns the invoice in PDF format in the PDF field. | |
GetInvoiceRow | boolean | Control message | FALSE | Invoice rows | |
GetDimensionDetails | boolean | Control message | FALSE | Dimension rows | |
GetMessageTransmissionDetails | boolean | Control message | FALSE | Recipient’s electronic invoice details | |
InvoiceIdentifierIds | object | Search criteria | Invoices to be retrieved | X |
InvoiceIdentifierIds-object
Element | Type | Use | Definition | Mandatory |
Inv(x) | object | Search criteria | InvoiceIdentifierId counter. For example: Inv1, Inv2 jne. | X |
Inv(x)-object
Element | Type | Use | Definition | Mandatory |
InvoiceIdentifierId | int(11) | Search criteria | Identifier of the invoice to be retrieved | X |
2.3 Response content (GET)
Element | Type | Use | Default | Definition |
ResponseStatus | int (0/1) | 0=error, 1=OK | 0=Error 1=Operation completed successfully | |
ResponseMessage | string | Additional description of events, errors, etc. | ||
NumberOfInvoices | int | The number of invoices found. | ||
Invoices | array | Found invoices |
Invoices-table
Element | Type | Definition |
InvoiceIdentifierId | int(11) | Identifier of a single invoice |
MessageTransmissionDetails | object | Recipient’s electronic invoice details |
SellerPartyDetails | object | Seller details |
SellerOrganisationUnitNumber | string | OVT code |
SellerContactPersonName | string | Contact person |
SellerCommunicationDetails | object | Contact details |
SellerInformationDetails | object | Seller information |
InvoiceRecipientPartyDetails | object | Payer details |
InvoiceRecipientOrganisationUnitNumber | string | OVT code |
InvoiceRecipientContactPersonName | string | Contact person |
InvoiceRecipientCommunicationDetails | object | Contact details |
BuyerPartyDetails | object | Buyer’s details |
BuyerOrganisationUnitNumber | string | OVT code |
BuyerContactPersonName | string | Contact person |
BuyerCommunicationDetails | object | Contact details |
DeliveryPartyDetails | object | Delivery address details |
DeliveryOrganisationUnitNumber | string | OVT code |
DeliveryContactPersonName | string | Contact person |
DeliveryCommunicationDetails | object | Contact details |
DeliveryDetails | object | Delivery details |
InvoiceDetails | object | Invoice details |
InvoiceRow | object | Invoice rows |
PaymentStatusDetails | object | Invoice status |
base64binary | The PDF file encoded in Base64 format | |
VirtualBankBarcode | string | Virtual barcode |
MessageTransmissionDetails-object
Element | Type | Definition |
MessageReceiverDetails | object | An object containing the elements ToIdentifier and ToIntermediator |
MessageReceiverDetails -object
Element | Type | Definition |
ToIdentifier | string | Recipient of the e-invoice |
ToIntermediator | string | E-invoice recipient’s operator ID |
SellerPartyDetails-object
Element | Type | Definition |
SellerPartyIdentifier | string | Business ID |
SellerOrganisationName | array(1-2) | Seller |
SellerOrganisationTaxCode | string | VAT code |
SellerPostalAddressDetails | object | Address details |
SellerOrganisationName-table
Element | Type | Definition |
SellerOrganisationName | string | Customer’s name |
SellerPostalAddressDetails-object
Element | Type | Definition |
SellerStreetName | array(0...2) | Street addresses |
SellerTownName | string | Town / post office |
SellerPostCodeIdentifier | string | Postal code |
SellerCountrySubdivision | string | Country subdivision Area / unit |
CountryCode | string(2) | Country code |
CountryName | string | Country |
SellerPostOfficeBoxIdentifier | string | Empty (no value) |
SellerStreetName-table
Element | Type | Definition |
SellerStreetName | string | Street address |
SellerCommunicationDetails-object
Element | Type | Definition |
SellerPhoneNumberIdentifier | string | Phone number |
SellerEmailaddressIdentifier | string | E-mail address |
SellerInformationDetails-object
Element | Type | Definition |
SellerHomeTownName | string | Home town |
SellerPhoneNumber | string | Phone number |
SellerCommonEmailaddressIdentifier | string | E-mail address |
SellerWebaddressIdentifier | string | Home page (website) |
SellerAccountDetails | array(0-6) | Bank accounts |
SellerAccountDetails-table
Element | Type | Definition |
SellerAccountID | array(0...2) | IBAN |
SellerBic | string | BIC |
InvoiceRecipientPartyDetails-object
Element | Type | Definition |
InvoiceRecipientPartyIdentifierId | int | Identifier for the invoice recipient party |
InvoiceRecipientPartyIdentifier | string | Business ID |
InvoiceRecipientOrganisationName | array(1-2) | Seller |
InvoiceRecipientOrganisationTaxCode | string | VAT code |
InvoiceRecipientPostalAddressDetails | object | Adrress details |
InvoiceRecipientRoleId | int | Customer type ID |
InvoiceRecipientInvoiceHandle | string | Invoice processing method |
InvoiceRecipientOrganisationName-table
Element | Type | Definition |
InvoiceRecipientOrganisationName | string | Customer’s name |
InvoiceRecipientPostalAddressDetails-object
Element | Type | Definition |
InvoiceRecipientStreetName | array(0...2) | Street addresses |
InvoiceRecipientTownName | string | Town / post office |
InvoiceRecipientPostCodeIdentifier | string | Postal code |
InvoiceRecipientCountrySubdivision | string | Country subdivision Area / unit |
CountryCode | string(2) | Country code |
CountryName | string | Country |
InvoiceRecipientPostOfficeBoxIdentifier | string | Empty (no value) |
InvoiceRecipientStreetName-table
Element | Type | Definition |
InvoiceRecipientStreetName | string | Street address |
InvoiceRecipientCommunicationDetails-object
Element | Type | Definition |
InvoiceRecipientPhoneNumberIdentifier | string | Phone number |
InvoiceRecipientEmailaddressIdentifier | string | E-mail address |
BuyerPartyDetails-object
Element | Type | Definition |
BuyerPartyIdentifierId | int | Identifier for the buyer party |
BuyerPartyIdentifier | string | Business ID |
BuyerOrganisationName | array(1-2) | Seller |
BuyerOrganisationTaxCode | string | VAT code |
BuyerPostalAddressDetails | object | Address details |
BuyerRoleId | int | Customer type ID |
BuyerInvoiceHandle | string | Invoice processing method |
BuyerOrganisationName-table
Element | Type | Definition |
BuyerOrganisationName | string | Customer’s name |
BuyerPostalAddressDetails-object
Element | Type | Definition |
BuyerStreetName | array(0...2) | Street addresses |
BuyerTownName | string | Town / post office |
BuyerPostCodeIdentifier | string | Postal code |
BuyerCountrySubdivision | string | Country subdivision Area / unit |
CountryCode | string(2) | Country code |
CountryName | string | Country |
BuyerPostOfficeBoxIdentifier | string | Empty (no value) |
BuyerStreetName-table
Element | Type | Definition |
BuyerStreetName | string | Street address |
BuyerCommunicationDetails-object
Element | Type | Definition |
BuyerPhoneNumberIdentifier | string | Phone number |
BuyerEmailaddressIdentifier | string | E-mail address |
DeliveryPartyDetails-object
Element | Type | Definition |
DeliveryPartyIdentifierId | int | Identifier for the delivery party |
DeliveryPartyIdentifier | string | Business ID |
DeliveryOrganisationName | array(1-2) | Seller |
DeliveryOrganisationTaxCode | string | VAT code |
DeliveryPostalAddressDetails | object | Address details |
DeliveryRoleId | int | Customer type ID |
DeliveryInvoiceHandle | string | Invoice processing method |
DeliveryOrganisationName-table
Element | Type | Definition |
DeliveryOrganisationName | string | Customer’s name |
DeliveryPostalAddressDetails-object
Element | Type | Definition |
DeliveryStreetName | array(0...2) | Street addresses |
DeliveryTownName | string | Town / post office |
DeliveryPostCodeIdentifier | string | Postal code |
DeliveryCountrySubdivision | string | Country subdivision Area / unit |
CountryCode | string(2) | Country code |
CountryName | string | Country |
DeliveryPostOfficeBoxIdentifier | string | Empty (no value) |
DeliveryStreetName-table
Element | Type | Definition |
DeliveryStreetName | string | Street address |
DeliveryCommunicationDetails-object
Element | Type | Definition |
DeliveryPhoneNumberIdentifier | string | Phone number |
DeliveryEmailaddressIdentifier | string | E-mail address |
DeliveryDetails-object
Element | Type | Definition |
DeliveryDate | date(YYYY-mm-dd) | Delivery date |
DeliveryMethodText | string | Delivery method |
DeliveryTermsText | string | Delivery terms |
InvoiceDetails-object
Element | Type | Definition |
InvoiceTypeCode | string | Invoice type code |
InvoiceTypeCodeUN | string | Semantic invoice type (untdid1001) |
InvoiceTypeText | string | Invoice type |
OriginCode | string | Original, Copy or Cancel |
InvoiceNumber | string | Invoice number |
InvoiceDate | date(YYYY-mm-dd) | Invoice date |
OriginalInvoiceNumber | string | Original invoice number |
SellerReferenceIdentifier | string | Seller’s reference |
OrderIdentifier | string | Buyer’s reference |
AgreementIdentifier | string | Contract number |
BuyerReferenceIdentifier | string | Site number |
ProjectReferenceIdentifier | string | Project number |
InvoiceTotalVatExcludedAmount | double(####,##) | Total VAT free amount |
InvoiceTotalVatAmount | double(####,##) | VAT amount |
InvoiceTotalVatIncludedAmount | double(####,##) | Total amount including tax |
AmountCurrencyIdentifier | string(3) | Currency |
InvoiceFreeText | array | Free text |
PaymentTermsDetails | object | Payment terms |
TenderReference | string | Tender reference |
InvoiceFreeText-table
Element | Type | Definition |
InvoiceFreeTextTitle | string | Title of free text fields in NetBaron
|
InvoiceFreeText | string | Content of the free text fields |
PaymentTermsDetails-object
Element | Type | Definition |
PaymentTermsFreeText | string | Payment terms |
InvoiceDueDate | date(YYYY-mm-dd) | Due date |
CashDiscountDate | date(YYYY-mm-dd) | Cash discount date |
CashDiscountBaseAmount | double(####,##) | Cash discount base amount |
CashDiscountPercent | double(####,##) | Cash discount percentage |
CashDiscountAmount | double(####,##) | Cash discount amount |
PaymentOverDueFineDetails | object | Late payment details |
If both the invoicing date (InvoiceDetails > InvoiceDate) and due date (PaymentTermsDetails > InvoiceDueDate) are defined in the invoice data, the payment term is retrieved from the settings, provided that the number of days in the payment term matches the difference between the invoicing date and due date.
The invoice will use the payment term defined in the PaymentTermsFreeText field if a suitable payment term is not found in the settings. However, the payment term specified in the field must exist in the settings. Otherwise, the payment term will not be included on the invoice.
PaymentOverDueFineDetails-object
Element | Type | Definition |
PaymentOverDueFineFreeText | string | Late payment free text |
PaymentOverDueFinePercent | double(####,##) | Interest |
PaymentOverDueFixedAmount | double(####,##) | Amount |
PaymentStatusDetails-object
Element | Type | Definition |
PaymentStatusCode | string | Invoice status
|
InvoiceRow-table
Element | Type | Definition |
RowIdentifier | string | Row identifier |
ArticleIdentifier | string | Product number |
ArticleGroupIdentifier | string | Product group |
ArticleName | string | Product name |
EanCode | string | EAN code |
SerialNumberIdentifier | string | Serial number |
ArticleInfoUrlText | array | Product extra info |
DeliveredQuantity | double(####) | Delivered quantity |
QuantityUnitCode | string | Unit |
UnitPriceAmount | double(####,#####) | VAT free unit price |
UnitPurchaseAPriceAmount | double(####,#####) | VAT free unit a-price |
UnitAMarginAmount | double(####,#####) | Unit a-margin |
UnitAMarginPercent | double(####,##) | Unit a-margin percentage |
UnitPurchaseBPriceAmount | double(####,#####) | VAT free unit b-purchase price |
UnitBMarginAmount | double(####,#####) | Unit b-margin |
UnitBMarginPercent | double(####,##) | Unit b-margin percentage |
RowProjectReferenceIdentifier | string | Project number |
RowNormalProposedAccountIdentifier | string | Customer’s account |
RowAccountDimensionText | string | Customer cost center |
RowAccount | string | Invoice row account |
RowCostcenter | string | Invoice row cost center |
DimensionRow | array | Dimension row |
RowDiscountPercent | double(####) | Discount percentage |
RowVatRatePercent | double(####) | VAT percentage |
RowVatCode | string | VAT code (untdid5305) |
RowVatAmount | double(####,##) | VAT amount |
RowVatExcludedAmount | double(####,##) | VAT free amount |
RowAmount | double(####,##) | Total amount including tax |
AmountCurrencyIdentifier | string(3) | Currency |
SubInvoiceRow | array |
ArticleInfoUrlText-table
Element | Type | Definition |
ArticleInfoUrlText | string | Product extra info |
SubInvoiceRow-table
Element | Type | Definition |
RowIdentifier | string | Row identifier |
SubArticleName | string | Product name |
SubDeliveredQuantity | double(####) | Delivered quantity |
SubRowIdentifier | string | Row identifier |
SubRowVatAmount | double(####,##) | VAT amount |
SubRowVatExcludedAmount | double(####,##) | VAT free amount |
SubRowAmount | double(####,##) | Total amount including tax |
AmountCurrencyIdentifier | string(3) | Currency |
DimensionRow-object
Element | Type | Definition |
RegisterId | int | Dimension register ID |
RegisterItemId | int | Dimension target ID |
Register | string | Dimension register description |
Number | string | Dimension target number |
Description | string | Dimension target description |
Percent | double | Dimension allocation percentage |
Amount | double | Dimension amount |
2.4 Request content (GetInvoiceStatusList)
When retrieving the list of statuses used by invoices, the request does not require any parameters.
2.5 Response content (GetInvoiceStatusList)
The response to the GetInvoiceStatusList function call returns an array containing 0 to n statuses, depending on which statuses are in use for the invoices.
Response content of the GetInvoiceStatusList function call
Element | Type | Definition |
Status | array(0..n) | Statuses currently in use, listed in an array
|
Content of a single element in the Status array
Element | Type | Definition |
Id | int | Status ID |
Description | string | Status description |
2.6 Request content (GetInvoicesByStatus)
Note: In WSDL version 1.3, the GetInvoicesByStatus method has been removed. The replacement method is GetInvoices, which is described later in this document.
Parameters of the GetInvoicesByStatus function call
Element | Type | Definition | Mandatory |
StatusId | object | Search criteria | X |
The contents of the StatusId object are described in the table. Only one of the elements listed in the table can be included in the StatusId object.
Element | Type | Definition | Mandatory |
Single | int | Search criterion to retrieve data based on a single number. | Only one of these can be provided. |
Range | object | Search criterion to retrieve data within a number range. | Only one of these can be provided. |
In | array | Search criterion to retrieve data based on the given numbers. Each number to be searched for is one value in the array. | Only one of these can be provided. |
StartDate | date(YYYY-MM-DD) | Limits the invoice search to invoices from the specified date onward. The filter uses the invoicing date field. | No |
EndDate | date(YYYY-MM-DD) | Limits the invoice search up to the specified date. The filter uses the invoicing date field. | No |
Contents of the Range object
Element | Type | Use | Definition | Mandatory |
Start | int | Search criteria | The starting value of the number range | X |
End | int | Search criteria | The ending value of the number range | X |
2.7 Response content (GetInvoicesByStatus)
The response returns an array similar to the content described in section 2.3 GET response content. The Invoices array will contain only the InvoiceIdentifierId, InvoiceDetails, PaymentStatusDetails, and InvoiceRow elements.
Starting from WSDL version 1.2, the InvoiceIdentifierId element returns the internal numbers of the added invoices, separated by commas. In earlier versions, it returns the internal number of the most recently added invoice.
2.8 Request content (GetInvoices)
Available from WSDL version 1.3 onwards.
Parameters of the GetInvoices function call
Element | Type | Definition |
InvoiceNumber | StringParamType | Search by invoice number |
StatusId | NumberRangeParamType | Search by invoice status code |
InvoiceDate | DateParamType | Search by invoice date |
BuyerPartyIdentifierId | NumberRangeParamType | Search by customer number |
2.9 Response content (GetInvoices)
The response returns an array similar to the content described in section 2.3 GET response content. The Invoices array will contain only the InvoiceIdentifierId, InvoiceDetails, PaymentStatusDetails, and InvoiceRow elements.
Starting from WSDL version 1.2, the InvoiceIdentifierId element returns the internal numbers of the added invoices, separated by commas. In earlier versions, it returns the internal number of the most recently added invoice.
2.10 Parameter types
The types used in the above tables are described below.
2.10.1 NumberRangeParamType-type
The NumberRangeParamType is a choice-type parameter. This means that only one of the elements presented in the table below can be used at a time.
NumberRangeParamType
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 | The first number in the number range |
End | int | The last number in the number range |
2.10.2 StringParamType-type
Element | Type | Definition |
Exact | string | Retrieves values that exactly match the search criteria |
Like | StringLikeParamType | Retrieves values that contain the search term |
In | array(string) | Retrieves values that match any of the given search termsHakee arvoja, jotka vastaavat johonkin annetuista hakusanoista |
2.10.3 StringLikeParamType and IntLikeParamType
This parameter type includes a search criterion and an optional attribute WildCardPattern. The attribute defines how the search is performed. Allowed values are %s, %s% and s%.
Allowed values for the WildCardPattern attribute
Element | Definition |
%s | The searched information ends with the search criterion |
%s% | The searched information contains the search criterion |
s% | The searched information starts with the search criterion |
2.10.4 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.
DateParamType
Element | Type | Definition |
Single | date(YYYY-MM-DD) | Single date |
Range | object | Date range |
Range object of the DateParamType type.
Element | Type | Definition |
Start | date(YYYY-MM-DD) | The start date of the date range |
End | date(YYYY-MM-DD) | The end date of the date range |
2.11 Request content (GetCustomerRoleList)
Retrieves a list of customer types. The request does not require any parameters.
2.12 Response content (GetCustomerRoleList)
The response to the GetCustomerRoleList function call returns an array containing 0 to n customer types.
The response to the GetCustomerRoleList function call
Element | Type | Definition |
CustomerRole | array(0..n) | Customer types listed in an array |
Content of a single element in the CustomerRole array
Element | Type | Definition |
Id | int | Type ID |
Description | string | Type description |
2.13 Request content (GetPaymentTermList)
Available from WSDL version 1.2 onwards. Retrieves a list of payment terms. The request does not require any parameters.
2.14 Response content (GetPaymentTermList)
The response to the GetPaymentTermList function call returns an array containing 0 to n payment term types.
The response to the GetPaymentTermList function call
Element | Type | Definition |
PaymentTerm | array(0..n) | Payment term types listed in an array |
Content of a single element in the PaymentTerm array
Element | Type | Definition |
Id | int | Type ID |
PaymentTerm | string | Payment term |
2.15 Request content (PUT)
Content of the PUT request sent to the service
Element | Type | Use | Default | Definition | Mandatory |
InvoiceBill | boolean | Control message | FALSE | true = the invoice will be automatically billed | |
CreateFromRowProjectReferenceIdentifier | boolean | Control message | FALSE | true = a new project number will be created automatically if not found in the register. The project number must end with a digit. | |
CreateFromRowAccountDimensionText | boolean | Control message | FALSE | true = a new cost center will be created automatically if not found in the register. | |
Finvoices | object | Invoices | X |
2.15.1 Finvoices-object
It is possible to submit more than one Finvoice invoice in a single call via WS invoicing.
Example of a call. The field File content [BASE64] represents the Finvoice data converted to base64:
<Finvoices>
<Finvoice1>
<FileName>Finvoice_1.xml</FileName>
<File>[BASE64]</File>
</Finvoice1>
<Finvoice2>
<FileName>Finvoice_2.xml</FileName>
<File>[BASE64]</File>
</Finvoice2>
<Finvoice3>
<FileName>Finvoice_3.xml</FileName>
<File>[BASE64]</File>
</Finvoice3>
</Finvoices>
Finvoices-object
Element | Type | Definition | Mandatory |
Finvoice(x) | object | Invoices Finvoice counter. For example, Finvoice1, Finvoice2, etc. | X |
Inv(x)-object
Element | Type | Definition | Mandatory |
FileName | string | File name | X |
File | base64binary | File content Finvoice 3.0 type XML data (More information available at http://www.finvoice.info/ ) The user must ensure that the XML included inside the element contains the XML header. | X |
2.15.2 NetBaron® Extensions to the Finvoice Standard
For incoming invoices, it is possible to import data into NetBaron® that includes elements missing from the Finvoice standard. The table below lists all the fields supported by NetBaron® that extend the standard. The root element for all of these is the Finvoice element. The element level within the Finvoice structure is indicated using slashes (/). For example, the BookingDate element must be inside the InvoiceDetails element, but its exact position otherwise does not matter.
NetBaron® Finvoice extensions
Element | Type | Definition |
BuyerCommunicationDetails/ BuyerGsmNumberIdentifier | string | Buyer’s mobile phone number |
BuyerPartyDetails/BuyerExternalIdIdentifier | string | External number in the customer register Used for linking |
BuyerPartyDetails/BuyerRoleId | int | Buyer’s customer type |
BuyerPartyDetails/BuyerInvoiceHandle | string | Buyer’s invoice processing method |
DeliveryCommunicationDetails / DeliveryGsmNumberIdentifier | string | Supplier’s mobile phone number |
DeliveryPartyDetails / DeliveryRoleId | int | Supplier’s customer type |
DeliveryPartyDetails / DeliveryInvoiceHandle | string | Supplier’s invoice processing method |
InvoiceRecipientCommunicationDetails/ InvoiceRecipientGsmNumberIdentifier | string | Invoice recipient's mobile phone number |
InvoiceRecipientPartyDetails / InvoiceRecipientRoleId | int | Invoice recipient's customer type |
InvoiceRecipientPartyDetails / InvoiceRecipientInvoiceHandle | Invoice recipient's invoice processing method | |
InvoiceAccountId InvoiceBic | string | Buyer’s account details |
InvoiceDetails/BookingDate | date(YYYYMMDD) | Invoice posting date in the format year-month-day, e.g., 15.06.2015 → 20150615 |
InvoiceAttachments | object | Invoice attachments |
InvoiceDetails/WarningPeriod | string | Warning period |
ExtraField1 – ExtraField6 | string | Extra fields 1–6 in the Additional information tab |
InvoiceFreeText2 | string | Additional information tab – Information 2 |
InvoiceFreeText3 | string | Additional information tab – Information 3 |
InternalInformationFreeText | string | Internal information in the Additional information tab |
InvoiceInstructionFreeText | string | Instructions tab – Billing instructions |
DeliveryInstructionFreeText | string | Instructions tab – Delivery instructions |
TransportInstructionFreeText | string | Instructions tab – Transport instructions |
InvoiceRow/AUnitPurchaseAmount | double(####,#####) | Unit price of purchase price A |
InvoiceRow/BUnitPurchaseAmount | double(####,#####) | Unit price of purchase price B |
Content of the InvoiceAttachments object
Element | Type | Definition |
InvoiceAttachment | object | Single attachment |
Content of the InvoiceAttachments object
Element | Type | Definition |
AttachmentName | string | Attachment name |
AttachmentMimeType | string | Attachment MIME type, for example, application/pdf or application/xml |
AttachmentSelected | boolean | Indicates the 'selected' status of the attachment |
AttachmentContent | base64binary | Attachment content encoded in base64 |
2.15.3 Using an external number as the invoice number for the created sales invoice
When using an external number as the invoice number for the created invoice, traceability of invoices can be improved because the invoice number is the same in both the external system and NetBaron®.
Prerequisite 1: The sales invoice settings must have the option "Use external document number" enabled if external numbering is to be used.
Prerequisite 2: The InvoiceBill control flag in the PUT method must be set to TRUE.
When prerequisites 1 and 2 are met, the value of the InvoiceDetails/InvoiceNumber element in the imported Finvoice will be used as the invoice number for the created invoice, and the default sales invoice number series will not be used.
If an invoice with the invoice number specified in the InvoiceDetails/InvoiceNumber element already exists in the database, the interface returns the error message "InvoiceNumber already exists", and a new invoice will not be created.
If the imported Finvoice does not contain an InvoiceDetails/InvoiceNumber element, a new invoice will be created using the default sales invoice number series.
If prerequisite 1 is not met, sales invoices will always be created using the default sales invoice number series.
Invoices have their own numbering control, according to which the information is transferred to accounting. For this reason, an external invoice number cannot be assigned an accounting document type in NetBaron®.
2.15.4 Handling of customer information on sales invoices to be created
The processing of customer information on invoices sent to the sales invoice interface proceeds as follows:
E-invoicing address information is retrieved from the customer register if the information exists for a customer linked to the invoice.
Customer information is retrieved from incoming data blocks starting with Buyer-, Delivery-, and InvoiceRecipient-, depending on the information sought: Buyer-related information from Buyer-prefixed blocks, delivery address information from Delivery-prefixed blocks, and billing address information from InvoiceRecipient-prefixed blocks. The same principle applies to all; only the prefix changes.
The data must include at least one of the following: business ID (BuyerPartyIdentifier), customer name (BuyerOrganisationName), contact person (BuyerContactPersonName), or external customer ID (BuyerExternalIdIdentifier).
Search for the customer based on the external ID (BuyerExternalIdIdentifier). If exactly one match is found, link to that customer. If multiple matches are found, refine the search using the company name (BuyerOrganisationName) and address details (BuyerStreetName, BuyerTownName, BuyerPostCodeIdentifier). If there are still multiple matches, assume they are duplicates and return the first one, since they all share the same external ID, name, and address.
If no external ID is found, search for the customer by business ID (BuyerPartyIdentifier). If multiple matches are found, refine the search further using the EDI code (BuyerOrganisationUnitNumber) and postal location details (BuyerTownName, BuyerPostCodeIdentifier). If there are still multiple matches, further refine by company name (BuyerOrganisationName) and then by secondary company name (BuyerOrganisationName2).
If no customer is found using external ID or business ID, or if these are missing in the data, search by VAT code (BuyerOrganisationTaxCode). Refine the search if necessary with the same criteria as in step 2.
If no customer is found by external ID, business ID, or VAT code, or if these are missing, search by company name (BuyerOrganisationName) using also address details (BuyerStreetName, BuyerTownName, BuyerPostCodeIdentifier). If multiple matches are found, refine the search by contact person name (BuyerContactPersonName), if present in the data.
Summary:
If an external ID is provided, the search is done only according to step 1. If no customer is found, this is reported; otherwise, the first found customer is returned.
If no external customer ID is provided, the search is done based on steps 2–4. If multiple matches are found, the first one is taken as a fallback.
A customer is created in the register during import if no matching entry is found in the customer register. Creation can be prevented by disabling the option "Allow customer creation on e-invoice import" in the sales invoice settings under the "WS-SalesInvoice" section.
2.15.5 Handling of row prices
By default, when importing data, row totals are calculated based on unit price and quantity, regardless of the Finvoice sum elements.
This behavior can be changed in the sales invoice settings under the “WS-SalesInvoice” section by selecting “Row total” in the “Price used in e-invoice import” option. When this option is selected, the unit price is calculated based on the Finvoice sum elements.
2.15.6 Seller information search
Primarily, the seller is searched by business ID (Y-tunnus), which is mandatory for steps 1–3:
By business ID (SellerPartyIdentifier). If multiple results are found, proceed to step 2.
By OVT ID (SellerOrganisationUnitNumber). If multiple results remain, further filter by postal town (SellerTownName), postal code (SellerPostCodeIdentifier), and seller’s organization name (SellerOrganisationName, SellerOrganisationName2).
By seller’s name (SellerContactPersonName). If multiple options remain, continue to step 4.
By company name (SellerOrganisationName), town (SellerTownName), and postal code (SellerPostCodeIdentifier) without using business ID.
By contact person (SellerContactPersonName), postal town (SellerTownName), postal code (SellerPostCodeIdentifier), and street address (SellerStreetName). If multiple matches occur in this search, no seller is selected.
2.16 Response content (PUT) -table
The content of the service response
Element | Type | Definition |
ResponseStatus | int (0/1) | 0=error 1=OK, Operation completed successfully |
ResponseMessage | string | Additional description of events, errors, etc. |
InvoiceIdentifier | object | Identification details of the added invoices |
InvoiceIdentifier-object
Element | Type | Definition |
[FileName] | object | Identification details contained in the file |
[FileName]-object
Element | Type | Definition |
Status | int (0/1) | 0=error 1=OK, Operation completed successfully |
Message | string | Additional description of events, errors, etc. |
InvoiceIdentifierId | string | Invoice identifier |
InvoiceNumber | string | Invoice number |
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-Invoicing interface software code to product development for review and possible feedback".
3.1 PHP (GET)
<?php
function getresp($responsex, $pref=""){
$responserows = "";
foreach($responsex as $k => $r){
if(is_array($r)){
$responserows .= $pref."$k => Array(<br>".getresp($r,$pref." ").$pref."),<br>";
} else if(is_object($r)){
$responserows .= $pref."$k => Object(<br>".getresp($r,$pref." ").$pref."),<br>";
} else $responserows .= $pref."$k => $r<br>";
}
return $responserows;
}
$ns = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd';
$token = new stdClass;
// Client-puolen encodingista riippuen, mahdollisesti utf_encode tarvitaan
$token->Username = new SOAPVar("username", XSD_STRING, null, null, null, $ns);
$token->Password = new SOAPVar("password", XSD_STRING, null, null, null, $ns);
$wsec = new stdClass;
$wsec->UsernameToken = new SoapVar($token, SOAP_ENC_OBJECT, null, null, null, $ns);
$soapHeaders[] = new SOAPHeader($ns, 'Security', $wsec->UsernameToken, true);
/**
* Client
*/
$client = new SoapClient(null, array(
"location" => "https://<serverurl>/ws/invoice",
"uri" => "urn:NBWS",
'style' => SOAP_RPC,
'use' => SOAP_LITERAL,
"soap_version" => SOAP_1_2,
"compression" => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | 5,
"trace" => 1)
);
/**
* Set headers
*/
$client->__setSoapHeaders( $soapHeaders );
/**
* Call PHP soap
*/
try{
$Request = new stdClass();
$Request->GetSellerPartyDetails = true;
$Request->GetInvoiceRecipientPartyDetails = true;
$Request->GetBuyerPartyDetails = true;
$Request->GetDeliveryPartyDetails = true;
$Request->GetDeliveryDetails = true;
$Request->GetInvoiceDetails = true;
$Request->GetInvoiceFreeText = true;
$Request->GetInvoiceRow = true;
$Request->InvoiceIdentifierIds = new stdClass();
$Inv = "Inv2";
$Request->InvoiceIdentifierIds->$Inv = (object) array("InvoiceIdentifierId"=>"3800");
$response = $client->get( new SoapVar($Request, SOAP_ENC_OBJECT,"","","Request") );
if(is_object($response)){
$responserows = getresp($response);
} else $responserows = $response;
$response = "<b>RESPONSE</b><pre>".utf8_decode($responserows)."</b></pre>";
}
catch(SoapFault $fault){
$response .= "<b>SOAP Fault:</b><pre>faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring}</pre>";
}
echo $response;
?>
3.2 PHP (GetInvoiceStatusList)
<?php
$ns = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd';
$token = new stdClass;
// Client-puolen encodingista riippuen, mahdollisesti utf_encode tarvitaan
$token->Username = new SOAPVar("username", XSD_STRING, null, null, null, $ns);
$token->Password = new SOAPVar("password", XSD_STRING, null, null, null, $ns);
$wsec = new stdClass;
$wsec->UsernameToken = new SoapVar($token, SOAP_ENC_OBJECT, null, null, null, $ns);
$soapHeaders[] = new SOAPHeader($ns, 'Security', $wsec->UsernameToken, true);
/**
* Client
*/
$client = new SoapClient(null, array(
"location" => "https://<serverurl>/ws/invoice",
"uri" => "urn:NBWS",
'style' => SOAP_RPC,
'use' => SOAP_LITERAL,
"soap_version" => SOAP_1_2,
"compression" => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | 5,
"trace" => 1)
);
/**
* Set headers
*/
$client->__setSoapHeaders( $soapHeaders );
/**
* Call PHP soap
*/
try{
$response = $client->getInvoiceStatusList();
// handle response
...
stdClass Object ( [StatusId] => stdClass Object ( [In] => Array ( [0] => 1 [1] => 50 ) ) )
?>
3.3 PHP (GetInvoicesByStatus)
<?php
$ns = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd';
$token = new stdClass;
// Client-puolen encodingista riippuen, mahdollisesti utf_encode tarvitaan
$token->Username = new SOAPVar("username", XSD_STRING, null, null, null, $ns);
$token->Password = new SOAPVar("password", XSD_STRING, null, null, null, $ns);
$wsec = new stdClass;
$wsec->UsernameToken = new SoapVar($token, SOAP_ENC_OBJECT, null, null, null, $ns);
$soapHeaders[] = new SOAPHeader($ns, 'Security', $wsec->UsernameToken, true);
/**
* Client
*/
$client = new SoapClient(null, array(
"location" => "https://<serverurl>/ws/invoice",
"uri" => "urn:NBWS",
'style' => SOAP_RPC,
'use' => SOAP_LITERAL,
"soap_version" => SOAP_1_2,
"compression" => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | 5,
"trace" => 1)
);
/**
* Set headers
*/
$client->__setSoapHeaders( $soapHeaders );
/**
* Call PHP soap
*/
try{
$params = new stdClass();
$params->StatusId = new stdClass();
$params->StatusId->In = array(1, 50);
response = $client->getInvoicesByStatus($params);
// handle response
...
3.4 PHP (GetCustomerRoleList)
<?php
$ns = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd';
$token = new stdClass;
// Client-puolen encodingista riippuen, mahdollisesti utf_encode tarvitaan
$token->Username = new SOAPVar("username", XSD_STRING, null, null, null, $ns);
$token->Password = new SOAPVar("password", XSD_STRING, null, null, null, $ns);
$wsec = new stdClass;
$wsec->UsernameToken = new SoapVar($token, SOAP_ENC_OBJECT, null, null, null, $ns);
$soapHeaders[] = new SOAPHeader($ns, 'Security', $wsec->UsernameToken, true);
/**
* Client
*/
$client = new SoapClient(null, array(
"location" => "https://<serverurl>/ws/invoice",
"uri" => "urn:NBWS",
'style' => SOAP_RPC,
'use' => SOAP_LITERAL,
"soap_version" => SOAP_1_2,
"compression" => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | 5,
"trace" => 1)
);
/**
* Set headers
*/
$client->__setSoapHeaders( $soapHeaders );
/**
* Call PHP soap
*/
try{
$response = $client->getCustomerRoleList();
// handle response
...
3.5 PHP (PUT)
<?php
function getresp($responsex, $pref=""){
$responserows = "";
foreach($responsex as $k => $r){
if(is_array($r)){
$responserows .= $pref."$k => Array(<br>".getresp($r,$pref." ").$pref."),<br>";
} else if(is_object($r)){
$responserows .= $pref."$k => Object(<br>".getresp($r,$pref." ").$pref."),<br>";
} else $responserows .= $pref."$k => $r<br>";
}
return $responserows;
}
$ns = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd';
$token = new stdClass;
$token->Username = new SOAPVar("username", XSD_STRING, null, null, null, $ns);
$token->Password = new SOAPVar("password", XSD_STRING, null, null, null, $ns);
$wsec = new stdClass;
$wsec->UsernameToken = new SoapVar($token, SOAP_ENC_OBJECT, null, null, null, $ns);
$soapHeaders[] = new SOAPHeader($ns, 'Security', $wsec->UsernameToken, true);
/**
* Client
*/
$client = new SoapClient(null, array(
"location" => "https://<serverurl>/ws/invoice",
"uri" => "urn:NBWS",
'style' => SOAP_RPC,
'use' => SOAP_LITERAL,
"soap_version" => SOAP_1_2,
"compression" => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | 5,
"trace" => 1)
);
/**
* Set headers
*/
$client->__setSoapHeaders( $soapHeaders );
/**
* Call PHP soap
*/
try{
$Request = new stdClass();
$Request->InvoiceBill = true;
$Files = new stdClass();
$Files->Finvoice1 = new stdClass();
$Files->Finvoice1->FileName = utf8_encode("e-invoice.xml");
$Files->Finvoice1->File = new SoapVar(file_get_contents("e-invcoice.xml"), XSD_BASE64BINARY);
$Request->Finvoices = $Files;
$response = $client->put( new SoapVar($Request, SOAP_ENC_OBJECT,"","","Request") );
if(is_object($response)){
$responserows = getresp($response);
} else $responserows = $response;
$response = "<b>RESPONSE</b><pre>".utf8_decode($responserows)."</b></pre>";
}
catch(SoapFault $fault){
$response .= "<b>SOAP Fault:</b><pre>faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring}</pre>";
}
echo $response;
?>
3.6 XML content
3.6.1 Request (GET)
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<env:Header>
<wsse:Security env:mustUnderstand="true">
<wsse:UsernameToken>
<wsse:Username>username</wsse:Username>
<wsse:Password>password</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</env:Header>
<env:Body>
<env:Body>
<ns1:get>
<Request>
<GetSellerPartyDetails>true</GetSellerPartyDetails>
<GetInvoiceRecipientPartyDetails>true</GetInvoiceRecipientPartyDetails>
<GetBuyerPartyDetails>true</GetBuyerPartyDetails>
<GetDeliveryPartyDetails>true</GetDeliveryPartyDetails>
<GetDeliveryDetails>true</GetDeliveryDetails>
<GetInvoiceDetails>true</GetInvoiceDetails>
<GetInvoiceFreeText>true</GetInvoiceFreeText>
<GetInvoiceRow>true</GetInvoiceRow>
<InvoiceIdentifierIds>
<Inv1>
<InvoiceIdentifierId>3800</InvoiceIdentifierId>
</Inv1>
</InvoiceIdentifierIds>
</Request>
</ns1:get>
</env:Body>
</env:Envelope>
3.6.2 Response (GET)
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://www.w3.org/2003/05/soap-encoding" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc">
<ns1:getResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding">
<rpc:result>Response</rpc:result>
<Response xsi:type="enc:Struct">
<ResponseStatus xsi:type="xsd:int">1</ResponseStatus>
<ResponseMessage xsi:type="xsd:string">
</ResponseMessage>
<NumberOfInvoices xsi:type="xsd:int">1</NumberOfInvoices>
<Invoices xsi:type="ns2:Map">
<item>
<key xsi:type="xsd:int">1</key>
<value xsi:type="enc:Struct">
<InvoiceIdentifierId xsi:type="xsd:string">3800</InvoiceIdentifierId>
<SellerPartyDetails xsi:type="enc:Struct">
<SellerPartyIdentifier xsi:type="xsd:string">1234567-1</SellerPartyIdentifier>
<SellerOrganisationName enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<SellerOrganisationName xsi:type="xsd:string">Seller</SellerOrganisationName>
</item>
</SellerOrganisationName>
<SellerOrganisationTaxCode xsi:type="xsd:string">FI12345671</SellerOrganisationTaxCode>
<SellerPostalAddressDetails xsi:type="enc:Struct">
<SellerStreetName enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<SellerStreetName xsi:type="xsd:string">Street</SellerStreetName>
</item>
</SellerStreetName>
<SellerTownName xsi:type="xsd:string">Town</SellerTownName>
<SellerPostCodeIdentifier xsi:type="xsd:string">00000</SellerPostCodeIdentifier>
</SellerPostalAddressDetails>
</SellerPartyDetails>
<SellerOrganisationUnitNumber xsi:type="xsd:string">003712345671</SellerOrganisationUnitNumber>
<SellerContactPersonName xsi:type="xsd:string">Contact</SellerContactPersonName>
<SellerCommunicationDetails xsi:type="enc:Struct">
<SellerPhoneNumberIdentifier xsi:type="xsd:string">123456789/SellerPhoneNumberIdentifier>
<SellerEmailaddressIdentifier xsi:type="xsd:string">email@email.fi</SellerEmailaddressIdentifier>
</SellerCommunicationDetails>
<SellerInformationDetails xsi:type="enc:Struct">
<SellerHomeTownName xsi:type="xsd:string">Home town</SellerHomeTownName>
<SellerPhoneNumber xsi:type="xsd:string">123456789</SellerPhoneNumber>
<SellerCommonEmailaddressIdentifier xsi:type="xsd:string">email@email.fi</SellerCommonEmailaddressIdentifier>
<SellerWebaddressIdentifier xsi:type="xsd:string">www.address.fi</SellerWebaddressIdentifier>
<SellerAccountDetails enc:itemType="enc:Struct" enc:arraySize="6" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<SellerAccountID xsi:type="xsd:string">FI6312345678901234</SellerAccountID>
<SellerBic xsi:type="xsd:string">NDEAFIHH</SellerBic>
</item>
<item xsi:type="enc:Struct">
<SellerAccountID xsi:type="xsd:string">FI2212345678901234</SellerAccountID>
<SellerBic xsi:type="xsd:string">HELSFIHH</SellerBic>
</item>
</SellerAccountDetails>
</SellerInformationDetails>
<InvoiceRecipientPartyDetails xsi:type="enc:Struct">
<InvoiceRecipientPartyIdentifier xsi:type="xsd:string">1234567-8</InvoiceRecipientPartyIdentifier>
<InvoiceRecipientOrganisationName enc:itemType="enc:Struct" enc:arraySize="2" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<InvoiceRecipientOrganisationName xsi:type="xsd:string">Invoice recipient</InvoiceRecipientOrganisationName>
</item>
<item xsi:type="enc:Struct">
<InvoiceRecipientOrganisationName xsi:type="xsd:string">Invoice recipient2</InvoiceRecipientOrganisationName>
</item>
</InvoiceRecipientOrganisationName>
<InvoiceRecipientOrganisationTaxCode xsi:type="xsd:string">1234567-8</InvoiceRecipientOrganisationTaxCode>
<InvoiceRecipientPostalAddressDetails xsi:type="enc:Struct">
<InvoiceRecipientStreetName enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<InvoiceRecipientStreetName xsi:type="xsd:string">Street</InvoiceRecipientStreetName>
</item>
</InvoiceRecipientStreetName>
<InvoiceRecipientTownName xsi:type="xsd:string">Town</InvoiceRecipientTownName>
<InvoiceRecipientPostCodeIdentifier xsi:type="xsd:string">00000</InvoiceRecipientPostCodeIdentifier>
<CountryCode xsi:type="xsd:string">FI</CountryCode>
<CountryName xsi:type="xsd:string">Finland</CountryName>
<InvoiceRecipientPostOfficeBoxIdentifier xsi:type="xsd:string">
</InvoiceRecipientPostOfficeBoxIdentifier>
</InvoiceRecipientPostalAddressDetails>
</InvoiceRecipientPartyDetails>
<InvoiceRecipientOrganisationUnitNumber xsi:type="xsd:string">003712345678</InvoiceRecipientOrganisationUnitNumber>
<InvoiceRecipientContactPersonName xsi:type="xsd:string">Contact</InvoiceRecipientContactPersonName>
<InvoiceRecipientCommunicationDetails xsi:type="enc:Struct">
<InvoiceRecipientPhoneNumberIdentifier xsi:type="xsd:string">123456789</InvoiceRecipientPhoneNumberIdentifier>
<InvoiceRecipientEmailaddressIdentifier xsi:type="xsd:string">email@email.fi</InvoiceRecipientEmailaddressIdentifier>
</InvoiceRecipientCommunicationDetails>
<BuyerPartyDetails xsi:type="enc:Struct">
<BuyerOrganisationName enc:itemType="enc:Struct" enc:arraySize="2" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<BuyerOrganisationName xsi:type="xsd:string">Buyer</BuyerOrganisationName>
</item>
<item xsi:type="enc:Struct">
<BuyerOrganisationName xsi:type="xsd:string">Buyer2</BuyerOrganisationName>
</item>
</BuyerOrganisationName>
<BuyerPostalAddressDetails xsi:type="enc:Struct">
<BuyerStreetName enc:itemType="enc:Struct" enc:arraySize="2" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<BuyerStreetName xsi:type="xsd:string">StreetBuyerStreetName>
</item>
<item xsi:type="enc:Struct">
<BuyerStreetName xsi:type="xsd:string">Street2</BuyerStreetName>
</item>
</BuyerStreetName>
<BuyerTownName xsi:type="xsd:string">Town</BuyerTownName>
<BuyerPostCodeIdentifier xsi:type="xsd:string">00000</BuyerPostCodeIdentifier>
<CountryCode xsi:type="xsd:string">FI</CountryCode>
<CountryName xsi:type="xsd:string">Finland</CountryName>
<BuyerPostOfficeBoxIdentifier xsi:type="xsd:string">
</BuyerPostOfficeBoxIdentifier>
</BuyerPostalAddressDetails>
</BuyerPartyDetails>
<BuyerOrganisationUnitNumber xsi:type="xsd:string">00000</BuyerOrganisationUnitNumber>
<BuyerContactPersonName xsi:type="xsd:string">Contact</BuyerContactPersonName>
<BuyerCommunicationDetails xsi:type="enc:Struct">
<BuyerPhoneNumberIdentifier xsi:type="xsd:string">123456789</BuyerPhoneNumberIdentifier>
<BuyerEmailaddressIdentifier xsi:type="xsd:string">email@email.fi</BuyerEmailaddressIdentifier>
</BuyerCommunicationDetails>
<DeliveryPartyDetails xsi:type="enc:Struct">
<DeliveryOrganisationName enc:itemType="enc:Struct" enc:arraySize="2" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<DeliveryOrganisationName xsi:type="xsd:string">Delivery</DeliveryOrganisationName>
</item>
<item xsi:type="enc:Struct">
<DeliveryOrganisationName xsi:type="xsd:string">Delivery2</DeliveryOrganisationName>
</item>
</DeliveryOrganisationName>
<DeliveryPostalAddressDetails xsi:type="enc:Struct">
<DeliveryStreetName enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<DeliveryStreetName xsi:type="xsd:string">Street</DeliveryStreetName>
</item>
</DeliveryStreetName>
<DeliveryTownName xsi:type="xsd:string">Town</DeliveryTownName>
<DeliveryPostCodeIdentifier xsi:type="xsd:string">00000</DeliveryPostCodeIdentifier>
<CountryCode xsi:type="xsd:string">FI</CountryCode>
<CountryName xsi:type="xsd:string">Finland</CountryName>
<DeliveryPostofficeBoxIdentifier xsi:type="xsd:string">
</DeliveryPostofficeBoxIdentifier>
</DeliveryPostalAddressDetails>
</DeliveryPartyDetails>
<DeliveryOrganisationUnitNumber xsi:type="xsd:string">00000</DeliveryOrganisationUnitNumber>
<DeliveryContactPersonName xsi:type="xsd:string">Contact</DeliveryContactPersonName>
<DeliveryCommunicationDetails xsi:type="enc:Struct">
<DeliveryPhoneNumberIdentifier xsi:type="xsd:string">123456789</DeliveryPhoneNumberIdentifier>
<DeliveryEmailaddressIdentifier xsi:type="xsd:string">email@email.fi</DeliveryEmailaddressIdentifier>
</DeliveryCommunicationDetails>
<DeliveryDetails xsi:type="enc:Struct">
<DeliveryDate xsi:type="xsd:string">2010-09-29</DeliveryDate>
<DeliveryMethodText xsi:type="xsd:string">Posti, Tuotteiden hinta yli170e</DeliveryMethodText>
<DeliveryTermsText xsi:type="xsd:string">Vapaasti varastossa</DeliveryTermsText>
</DeliveryDetails>
<InvoiceDetails xsi:type="enc:Struct">
<InvoiceTypeCode xsi:type="xsd:string">INV01</InvoiceTypeCode>
<InvoiceTypeText xsi:type="xsd:string">LASKU</InvoiceTypeText>
<OriginCode xsi:type="xsd:string">Original</OriginCode>
<InvoiceNumber xsi:type="xsd:string">2010120</InvoiceNumber>
<InvoiceDate xsi:type="xsd:string">2010-09-29</InvoiceDate>
<SellerReferenceIdentifier xsi:type="xsd:string">Tilausnumero: 22010248</SellerReferenceIdentifier>
<OrderIdentifier xsi:type="xsd:string">OrderIdentifier</OrderIdentifier>
<ProjectReferenceIdentifier xsi:type="xsd:string">333333</ProjectReferenceIdentifier>
<InvoiceTotalVatExcludedAmount xsi:type="xsd:string">1071,31</InvoiceTotalVatExcludedAmount>
<InvoiceTotalVatAmount xsi:type="xsd:string">98,56</InvoiceTotalVatAmount>
<InvoiceTotalVatIncludedAmount xsi:type="xsd:string">1169,87</InvoiceTotalVatIncludedAmount>
<AmountCurrencyIdentifier xsi:type="xsd:string">EUR</AmountCurrencyIdentifier>
<InvoiceFreeText enc:itemType="enc:Struct" enc:arraySize="3" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<InvoiceFreeTextTitle xsi:type="xsd:string">Announcement</InvoiceFreeTextTitle>
<InvoiceFreeText xsi:type="xsd:string">Tiedonanto</InvoiceFreeText>
</item>
<item xsi:type="enc:Struct">
<InvoiceFreeTextTitle xsi:type="xsd:string">TransportInstruction</InvoiceFreeTextTitle>
<InvoiceFreeText xsi:type="xsd:string">Kuljetusohjeet</InvoiceFreeText>
</item>
<item xsi:type="enc:Struct">
<InvoiceFreeTextTitle xsi:type="xsd:string">FreeField1</InvoiceFreeTextTitle>
<InvoiceFreeText xsi:type="xsd:string">Varakenttä1</InvoiceFreeText>
</item>
</InvoiceFreeText>
<PaymentTermsDetails xsi:type="enc:Struct">
<PaymentTermsFreeText xsi:type="xsd:string">14 pv netto</PaymentTermsFreeText>
<InvoiceDueDate xsi:type="xsd:string">2010-10-13</InvoiceDueDate>
<CashDiscountDate xsi:type="xsd:string">2010-10-13</CashDiscountDate>
<CashDiscountBaseAmount xsi:type="xsd:string">1169,87</CashDiscountBaseAmount>
<CashDiscountPercent xsi:type="xsd:string">11</CashDiscountPercent>
<CashDiscountAmount xsi:type="xsd:string">1041,18</CashDiscountAmount>
<PaymentOverDueFineDetails xsi:type="enc:Struct">
<PaymentOverDueFineFreeText xsi:type="xsd:string">Viivästyskorko 9.5%, maksukehotusmaksu 5,20e</PaymentOverDueFineFreeText>
<PaymentOverDueFinePercent xsi:type="xsd:string">9,50</PaymentOverDueFinePercent>
<PaymentOverDueFixedAmount xsi:type="xsd:string">5,20</PaymentOverDueFixedAmount>
</PaymentOverDueFineDetails>
</PaymentTermsDetails>
</InvoiceDetails>
<PaymentStatusDetails xsi:type="enc:Struct">
<PaymentStatusCode xsi:type="xsd:string">NOTPAID</PaymentStatusCode>
</PaymentStatusDetails>
<VirtualBankBarcode xsi:type="xsd:string">242521520019329001169870000000000002010120610101300005</VirtualBankBarcode>
<InvoiceRow enc:itemType="enc:Struct" enc:arraySize="4" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<RowIdentifier xsi:type="xsd:string">9720</RowIdentifier>
<ArticleIdentifier xsi:type="xsd:string">ArticleIdentifier</ArticleIdentifier>
<ArticleGroupIdentifier xsi:type="xsd:string">ArticleGroupIdentifier</ArticleGroupIdentifier>
<ArticleName xsi:type="xsd:string">ArticleName</ArticleName>
<ArticleInfoUrlText enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<ArticleInfoUrlText xsi:type="xsd:string">http://address.fi</ArticleInfoUrlText>
</item>
</ArticleInfoUrlText>
<EanCode xsi:type="xsd:string">4902030181000</EanCode>
<DeliveredQuantity xsi:type="xsd:string">1</DeliveredQuantity>
<QuantityUnitCode xsi:type="xsd:string">pcs</QuantityUnitCode>
<UnitPriceAmount xsi:type="xsd:string">1000,00000</UnitPriceAmount>
<RowProjectReferenceIdentifier xsi:type="xsd:string">333333</RowProjectReferenceIdentifier>
<RowVatRatePercent xsi:type="xsd:string">9</RowVatRatePercent>
<RowVatAmount xsi:type="xsd:string">90,00</RowVatAmount>
<RowVatExcludedAmount xsi:type="xsd:string">1000,00</RowVatExcludedAmount>
<RowAmount xsi:type="xsd:string">1090,00</RowAmount>
<AmountCurrencyIdentifier xsi:type="xsd:string">EUR</AmountCurrencyIdentifier>
</item>
<item xsi:type="enc:Struct">
<RowIdentifier xsi:type="xsd:string">10048</RowIdentifier>
<ArticleIdentifier xsi:type="xsd:string">ArticleIdentifier</ArticleIdentifier>
<ArticleGroupIdentifier xsi:type="xsd:string">ArticleGroupIdentifier</ArticleGroupIdentifier>
<ArticleName xsi:type="xsd:string">ArticleName</ArticleName>
<SerialNumberIdentifier xsi:type="xsd:string">SerialNumberIdentifier</SerialNumberIdentifier>
<DeliveredQuantity xsi:type="xsd:string">1</DeliveredQuantity>
<QuantityUnitCode xsi:type="xsd:string">pcs</QuantityUnitCode>
<UnitPriceAmount xsi:type="xsd:string">71,31000</UnitPriceAmount>
<RowProjectReferenceIdentifier xsi:type="xsd:string">333333</RowProjectReferenceIdentifier>
<RowNormalProposedAccountIdentifier xsi:type="xsd:string">1111</RowNormalProposedAccountIdentifier>
<RowAccountDimensionText xsi:type="xsd:string">22222</RowAccountDimensionText>
<RowVatRatePercent xsi:type="xsd:string">12</RowVatRatePercent>
<RowVatAmount xsi:type="xsd:string">8,56</RowVatAmount>
<RowVatExcludedAmount xsi:type="xsd:string">71,31</RowVatExcludedAmount>
<RowAmount xsi:type="xsd:string">79,87</RowAmount>
<AmountCurrencyIdentifier xsi:type="xsd:string">EUR</AmountCurrencyIdentifier>
</item>
<item xsi:type="enc:Struct">
<SubInvoiceRow enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<RowIdentifier xsi:type="xsd:string">10050</RowIdentifier>
<SubArticleName xsi:type="xsd:string">Yhteensä</SubArticleName>
<SubDeliveredQuantity xsi:type="xsd:string">2</SubDeliveredQuantity>
<SubRowIdentifier xsi:type="xsd:string">*</SubRowIdentifier>
<SubRowVatAmount xsi:type="xsd:string">98,56</SubRowVatAmount>
<SubRowVatExcludedAmount xsi:type="xsd:string">1071,31</SubRowVatExcludedAmount>
<SubRowAmount xsi:type="xsd:string">1169,87</SubRowAmount>
<AmountCurrencyIdentifier xsi:type="xsd:string">EUR</AmountCurrencyIdentifier>
</item>
</SubInvoiceRow>
</item>
</InvoiceRow>
</value>
</item>
</Invoices>
</Response>
</ns1:getResponse>
</env:Body>
</env:Envelope>
3.6.3 Request (GetInvoiceStatusList)
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS" 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:GetInvoiceStatusList>
<Request/>
</ns1:GetInvoiceStatusList>
</env:Body>
</env:Envelope>
3.6.4 Response (GetInvoiceStatusList)
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS" xmlns:ns2="http://xml.apache.org/xml-soap" xmlns:enc="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc">
<ns1:GetInvoiceStatusListResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding">
<rpc:result>Response</rpc:result>
<Response xsi:type="enc:Struct">
<Status enc:itemType="ns2:Map" enc:arraySize="3" xsi:type="enc:Array">
<item xsi:type="ns2:Map">
<item>
<key xsi:type="xsd:string">Id</key>
<value xsi:type="xsd:string">1</value>
</item>
<item>
<key xsi:type="xsd:string">Description</key>
<value xsi:type="xsd:string">Kesken</value>
</item>
</item>
<item xsi:type="ns2:Map">
<item>
<key xsi:type="xsd:string">Id</key>
<value xsi:type="xsd:string">50</value>
</item>
<item>
<key xsi:type="xsd:string">Description</key>
<value xsi:type="xsd:string">Laskutettu</value>
</item>
</item>
<item xsi:type="ns2:Map">
<item>
<key xsi:type="xsd:string">Id</key>
<value xsi:type="xsd:string">52</value>
</item>
<item>
<key xsi:type="xsd:string">Description</key>
<value xsi:type="xsd:string">Maksettu</value>
</item>
</item>
</Status>
</Response>
</ns1:GetInvoiceStatusListResponse>
</env:Body>
</env:Envelope>
3.6.5 Request (GetInvoicesByStatus)
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS" xmlns:xsd="http://www.w3.org/2001/XMLSchema" 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:GetInvoicesByStatus>
<Request>
<StatusId>
<In>
<xsd:int>1</xsd:int>
<xsd:int>50</xsd:int>
</In>
</StatusId>
</Request>
</ns1:GetInvoicesByStatus>
</env:Body>
3.6.6 Request (GetInvoices)
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS" xmlns:xsd="http://www.w3.org/2001/XMLSchema" 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:GetInvoicesByStatus>
<Request>
<StatusId>
<In>
<xsd:int>1</xsd:int>
<xsd:int>50</xsd:int>
</In>
</StatusId>
</Request>
</ns1:GetInvoicesByStatus>
</env:Body>
3.6.7 Response (GetInvoicesByStatus and GetInvoices)
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://www.w3.org/2003/05/soap-encoding" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://xml.apache.org/xml-soap">
<env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc">
<ns1:GetInvoicesByStatusResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding">
<rpc:result>Response</rpc:result>
<Response xsi:type="enc:Struct">
<ResponseStatus xsi:type="xsd:int">1</ResponseStatus>
<ResponseMessage xsi:type="xsd:string">
</ResponseMessage>
<NumberOfInvoices xsi:type="xsd:int">991</NumberOfInvoices>
<Invoices xsi:type="ns2:Map">
<item>
<key xsi:type="xsd:int">1</key>
<value xsi:type="enc:Struct">
<InvoiceIdentifierId xsi:type="xsd:int">24651</InvoiceIdentifierId>
<InvoiceDetails xsi:type="enc:Struct">
<InvoiceTypeCode xsi:type="xsd:string">INV01</InvoiceTypeCode>
<InvoiceTypeText xsi:type="xsd:string">Lasku</InvoiceTypeText>
<OriginCode xsi:type="xsd:string">Original</OriginCode>
<InvoiceNumber xsi:type="xsd:string">694504</InvoiceNumber>
<InvoiceDate xsi:type="xsd:string">2011-02-16</InvoiceDate>
<InvoiceTotalVatExcludedAmount xsi:type="xsd:string">35,00</InvoiceTotalVatExcludedAmount>
<InvoiceTotalVatAmount xsi:type="xsd:string">0,00</InvoiceTotalVatAmount>
<InvoiceTotalVatIncludedAmount xsi:type="xsd:string">35,00</InvoiceTotalVatIncludedAmount>
<AmountCurrencyIdentifier xsi:type="xsd:string">EUR</AmountCurrencyIdentifier>
<InvoiceFreeText enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<InvoiceFreeTextTitle xsi:type="xsd:string">Announcement</InvoiceFreeTextTitle>
<InvoiceFreeText xsi:type="xsd:string">Tiedoksi</InvoiceFreeText>
</item>
</InvoiceFreeText>
<PaymentTermsDetails xsi:type="enc:Struct">
<PaymentTermsFreeText xsi:type="xsd:string">30 pv netto, Huomautusaika 2 pv</PaymentTermsFreeText>
<InvoiceDueDate xsi:type="xsd:string">2011-03-18</InvoiceDueDate>
<PaymentOverDueFineDetails xsi:type="enc:Struct">
<PaymentOverDueFineFreeText xsi:type="xsd:string">Viivästyskorko 22%, maksukehotusmaksu 3,00e</PaymentOverDueFineFreeText>
<PaymentOverDueFinePercent xsi:type="xsd:string">22,00</PaymentOverDueFinePercent>
<PaymentOverDueFixedAmount xsi:type="xsd:string">3,00</PaymentOverDueFixedAmount>
</PaymentOverDueFineDetails>
</PaymentTermsDetails>
</InvoiceDetails>
<PaymentStatusDetails xsi:type="enc:Struct">
<PaymentStatusCode xsi:type="xsd:string">NOTPAID</PaymentStatusCode>
</PaymentStatusDetails>
<VirtualBankBarcode xsi:type="xsd:string">497123456000006780000350000000000000000006945046110318</VirtualBankBarcode>
<InvoiceRow enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<RowIdentifier xsi:type="xsd:string">38441</RowIdentifier>
<ArticleIdentifier xsi:type="xsd:string">5001-2</ArticleIdentifier>
<ArticleName xsi:type="xsd:string">Jäsenmaksu 2011, henkilöjäsen alv 0%</ArticleName>
<DeliveredQuantity xsi:type="xsd:string">1</DeliveredQuantity>
<QuantityUnitCode xsi:type="xsd:string">pcs</QuantityUnitCode>
<UnitPriceAmount xsi:type="xsd:string">35,00000</UnitPriceAmount>
<RowVatRatePercent xsi:type="xsd:string">0</RowVatRatePercent>
<RowVatAmount xsi:type="xsd:string">0,00</RowVatAmount>
<RowVatExcludedAmount xsi:type="xsd:string">35,00</RowVatExcludedAmount>
<RowAmount xsi:type="xsd:string">35,00</RowAmount>
<AmountCurrencyIdentifier xsi:type="xsd:string">EUR</AmountCurrencyIdentifier>
</item>
</InvoiceRow>
</value>
</item>
<item>
<key xsi:type="xsd:int">2</key>
<value xsi:type="enc:Struct">
<InvoiceIdentifierId xsi:type="xsd:int">24661</InvoiceIdentifierId>
<InvoiceDetails xsi:type="enc:Struct">
<InvoiceTypeCode xsi:type="xsd:string">INV01</InvoiceTypeCode>
<InvoiceTypeText xsi:type="xsd:string">Lasku</InvoiceTypeText>
<OriginCode xsi:type="xsd:string">Original</OriginCode>
<InvoiceNumber xsi:type="xsd:string">694505</InvoiceNumber>
<InvoiceDate xsi:type="xsd:string">2011-02-17</InvoiceDate>
<InvoiceTotalVatExcludedAmount xsi:type="xsd:string">35,00</InvoiceTotalVatExcludedAmount>
<InvoiceTotalVatAmount xsi:type="xsd:string">0,00</InvoiceTotalVatAmount>
<InvoiceTotalVatIncludedAmount xsi:type="xsd:string">35,00</InvoiceTotalVatIncludedAmount>
<AmountCurrencyIdentifier xsi:type="xsd:string">EUR</AmountCurrencyIdentifier>
<InvoiceFreeText enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<InvoiceFreeText xsi:type="xsd:string">Tiedoksi 3</InvoiceFreeText>
</item>
</InvoiceFreeText>
<PaymentTermsDetails xsi:type="enc:Struct">
<PaymentTermsFreeText xsi:type="xsd:string">30 pv netto, Huomautusaika 2 pv</PaymentTermsFreeText>
<InvoiceDueDate xsi:type="xsd:string">2011-03-19</InvoiceDueDate>
<PaymentOverDueFineDetails xsi:type="enc:Struct">
<PaymentOverDueFineFreeText xsi:type="xsd:string">Viivästyskorko 22%, maksukehotusmaksu 3,00e</PaymentOverDueFineFreeText>
<PaymentOverDueFinePercent xsi:type="xsd:string">22,00</PaymentOverDueFinePercent>
<PaymentOverDueFixedAmount xsi:type="xsd:string">3,00</PaymentOverDueFixedAmount>
</PaymentOverDueFineDetails>
</PaymentTermsDetails>
</InvoiceDetails>
<PaymentStatusDetails xsi:type="enc:Struct">
<PaymentStatusCode xsi:type="xsd:string">NOTPAID</PaymentStatusCode>
</PaymentStatusDetails>
<VirtualBankBarcode xsi:type="xsd:string">497123456000006780000200000000000000000006945059110319</VirtualBankBarcode>
<InvoiceRow enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<RowIdentifier xsi:type="xsd:string">38451</RowIdentifier>
<ArticleIdentifier xsi:type="xsd:string">5001-2</ArticleIdentifier>
<ArticleName xsi:type="xsd:string">Jäsenmaksu 2011, henkilöjäsen alv 0%</ArticleName>
<DeliveredQuantity xsi:type="xsd:string">1</DeliveredQuantity>
<QuantityUnitCode xsi:type="xsd:string">pcs</QuantityUnitCode>
<UnitPriceAmount xsi:type="xsd:string">35,00000</UnitPriceAmount>
<RowVatRatePercent xsi:type="xsd:string">0</RowVatRatePercent>
<RowVatAmount xsi:type="xsd:string">0,00</RowVatAmount>
<RowVatExcludedAmount xsi:type="xsd:string">35,00</RowVatExcludedAmount>
<RowAmount xsi:type="xsd:string">35,00</RowAmount>
<AmountCurrencyIdentifier xsi:type="xsd:string">EUR</AmountCurrencyIdentifier>
</item>
</InvoiceRow>
</value>
</item>
…
…
<item>
<key xsi:type="xsd:int">991</key>
<value xsi:type="enc:Struct">
<InvoiceIdentifierId xsi:type="xsd:int">214660</InvoiceIdentifierId>
<InvoiceDetails xsi:type="enc:Struct">
<InvoiceTypeCode xsi:type="xsd:string">INV01</InvoiceTypeCode>
<InvoiceTypeText xsi:type="xsd:string">Lasku</InvoiceTypeText>
<OriginCode xsi:type="xsd:string">Original</OriginCode>
<InvoiceNumber xsi:type="xsd:string">0</InvoiceNumber>
<InvoiceDate xsi:type="xsd:string">2015-12-02</InvoiceDate>
<InvoiceTotalVatExcludedAmount xsi:type="xsd:string">8,77</InvoiceTotalVatExcludedAmount>
<InvoiceTotalVatAmount xsi:type="xsd:string">1,23</InvoiceTotalVatAmount>
<InvoiceTotalVatIncludedAmount xsi:type="xsd:string">10,00</InvoiceTotalVatIncludedAmount>
<AmountCurrencyIdentifier xsi:type="xsd:string">EUR</AmountCurrencyIdentifier>
<InvoiceFreeText enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<InvoiceFreeTextTitle xsi:type="xsd:string">Announcement</InvoiceFreeTextTitle>
<InvoiceFreeText xsi:type="xsd:string">Tiedoksi</InvoiceFreeText>
</item>
</InvoiceFreeText>
<PaymentTermsDetails xsi:type="enc:Struct">
<PaymentTermsFreeText xsi:type="xsd:string">30 pv netto</PaymentTermsFreeText>
<InvoiceDueDate xsi:type="xsd:string">2016-01-01</InvoiceDueDate>
<PaymentOverDueFineDetails xsi:type="enc:Struct">
<PaymentOverDueFineFreeText xsi:type="xsd:string">Viivästyskorko 1%, maksukehotusmaksu 3,00e</PaymentOverDueFineFreeText>
<PaymentOverDueFinePercent xsi:type="xsd:string">1,00</PaymentOverDueFinePercent>
<PaymentOverDueFixedAmount xsi:type="xsd:string">3,00</PaymentOverDueFixedAmount>
</PaymentOverDueFineDetails>
</PaymentTermsDetails>
</InvoiceDetails>
<PaymentStatusDetails xsi:type="enc:Struct">
<PaymentStatusCode xsi:type="xsd:string">NOTPAID</PaymentStatusCode>
</PaymentStatusDetails>
<VirtualBankBarcode xsi:type="xsd:string">497123456000006780000100000000000000000003015393160101</VirtualBankBarcode>
<InvoiceRow enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<RowIdentifier xsi:type="xsd:string">799514</RowIdentifier>
<ArticleIdentifier xsi:type="xsd:string">1</ArticleIdentifier>
<DeliveredQuantity xsi:type="xsd:string">1</DeliveredQuantity>
<QuantityUnitCode xsi:type="xsd:string">kpl</QuantityUnitCode>
<UnitPriceAmount xsi:type="xsd:string">8,77193</UnitPriceAmount>
<RowVatRatePercent xsi:type="xsd:string">14</RowVatRatePercent>
<RowVatAmount xsi:type="xsd:string">1,23</RowVatAmount>
<RowVatExcludedAmount xsi:type="xsd:string">8,77</RowVatExcludedAmount>
<RowAmount xsi:type="xsd:string">10,00</RowAmount>
<AmountCurrencyIdentifier xsi:type="xsd:string">EUR</AmountCurrencyIdentifier>
</item>
</InvoiceRow>
</value>
</item>
</Invoices>
</Response>
</ns1:GetInvoicesByStatusResponse>
</env:Body>
</env:Envelope>
3.6.8 Request (GetCustomerRoleList)
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:invoice: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:getCustomerRoleListRequest />
</env:Body>
</env:Envelope>
3.6.9 Response (GetCustomerRoleList)
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS" xmlns:ns2="http://xml.apache.org/xml-soap" xmlns:enc="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc">
<ns1:GetCustomerRoleListResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding">
<rpc:result>Response</rpc:result>
<Response xsi:type="enc:Struct">
<CustomerRole enc:itemType="ns2:Map" enc:arraySize="13" xsi:type="enc:Array">
<item xsi:type="ns2:Map">
<item>
<key xsi:type="xsd:string">Id</key>
<value xsi:type="xsd:string">1</value>
</item>
<item>
<key xsi:type="xsd:string">Description</key>
<value xsi:type="xsd:string">type 1</value>
</item>
<item>
<key xsi:type="xsd:string">DefaultFor</key>
<value xsi:type="xsd:string">
</value>
</item>
</item>
<item xsi:type="ns2:Map">
<item>
<key xsi:type="xsd:string">Id</key>
<value xsi:type="xsd:string">2</value>
</item>
<item>
<key xsi:type="xsd:string">Description</key>
<value xsi:type="xsd:string">type 2</value>
</item>
<item>
<key xsi:type="xsd:string">DefaultFor</key>
<value xsi:type="xsd:string">
</value>
</item>
</item>
....
<item xsi:type="ns2:Map">
<item>
<key xsi:type="xsd:string">Id</key>
<value xsi:type="xsd:string">84</value>
</item>
<item>
<key xsi:type="xsd:string">Description</key>
<value xsi:type="xsd:string">type n</value>
</item>
<item>
<key xsi:type="xsd:string">DefaultFor</key>
<value xsi:type="xsd:string">customer</value>
</item>
</item>
</CustomerRole>
</Response>
</ns1:GetCustomerRoleListResponse>
</env:Body>
</env:Envelope>
3.6.10 Request (GetPaymentTermList)
<?xml version="1.0" encoding="utf-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:invoice:v1.2" 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:getPaymentTermListRequest />
</env:Body>
</env:Envelope>
3.6.11 Response (GetPaymentTermList)
<?xml version="1.0" encoding="utf-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:invoice:v1.2">
<env:Body>
<ns1:getPaymentTermListResponse>
<ns1:PaymentTerm>
<ns1:Id>1</ns1:Id>
<ns1:PaymentTerm>Cash on delivery</ns1:PaymentTerm>
</ns1:PaymentTerm>
<ns1:PaymentTerm>
<ns1:Id>2</ns1:Id>
<ns1:PaymentTerm>14 pv netto</ns1:PaymentTerm>
</ns1:PaymentTerm>
<ns1:PaymentTerm>
<ns1:Id>3</ns1:Id>
<ns1:PaymentTerm>30 pv netto</ns1:PaymentTerm>
</ns1:PaymentTerm>
</ns1:getPaymentTermListResponse>
</env:Body>
</env:Envelope>
<?xml version="1.0" encoding="utf-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS:invoice:v1.2">
<env:Body>
<ns1:getPaymentTermListResponse>
<ns1:PaymentTerm>
<ns1:Id>1</ns1:Id>
<ns1:PaymentTerm>Cash on delivery</ns1:PaymentTerm>
</ns1:PaymentTerm>
<ns1:PaymentTerm>
<ns1:Id>2</ns1:Id>
<ns1:PaymentTerm>14 pv netto</ns1:PaymentTerm>
</ns1:PaymentTerm>
<ns1:PaymentTerm>
<ns1:Id>3</ns1:Id>
<ns1:PaymentTerm>30 pv netto</ns1:PaymentTerm>
</ns1:PaymentTerm>
</ns1:getPaymentTermListResponse>
</env:Body>
</env:Envelope>
3.6.12 Request (PUT)
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<env:Header>
<wsse:Security env:mustUnderstand="true">
<wsse:UsernameToken>
<wsse:Username>username</wsse:Username>
<wsse:Password>password</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</env:Header>
<env:Body>
<ns1:put>
<Request>
<InvoiceBill>true</InvoiceBill>
<Finvoices>
<Finvoice1>
<FileName>e-lasku</FileName>
<File>PD94bWwgdmVyc2...</File>
</Finvoice1>
</Finvoices>
</Request>
</ns1:put>
</env:Body>
</env:Envelope>
3.6.12 Response (PUT)
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://www.w3.org/2003/05/soap-encoding" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc">
<ns1:postResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding">
<rpc:result>Response</rpc:result>
<Response xsi:type="enc:Struct">
<ResponseStatus xsi:type="xsd:int">1</ResponseStatus>
<ResponseMessage xsi:type="xsd:string">
</ResponseMessage>
<InvoiceIdentifier xsi:type="enc:Struct">
<e-lasku.xml xsi:type="enc:Struct">
<Status xsi:type="xsd:int">1</Status>
<Message xsi:type="xsd:string">
</Message>
<InvoiceIdentifierId xsi:type="xsd:string">3864</InvoiceIdentifierId>
<InvoiceNumber xsi:type="xsd:string">20101111</InvoiceNumber>
</e-lasku.xml>
</InvoiceIdentifier>
</Response>
</ns1:postResponse>
</env:Body>
</env:Envelope>