Skip to main content
Skip table of contents

Web Services - Purchase Invoice

Version history

Version

Date

Update / Definition

16.6.8

18.01.2024

Added 2.4.1 Retrieving supplier information for the imported purchase invoice

23.1.1

31.7.2024

Added in section 2.3.1.11 OriginalInvoiceNumber below InvoiceDate.

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 Purchase Invoicing Web Services module, which enables the use of NetBaron's purchase invoicing functionality from external services.

The module allows retrieving invoice data and creating new invoices. The interfaces do not support multiple currencies; only EUR is supported.

Error handling must be integrated into the interfaces in case of connection interruptions.

1.1 Usage Examples

  • Retrieve purchase invoices using a given identifier

  • Retrieve all purchase invoices with optional filters

  • Add new purchase invoices

1.2 Updating existing purchase invoice

Note: Updating overwrites all purchase invoice fields and will be registered as correction cycle in the system.

When importing purchase invoices via the interface, the system will update an existing invoice if all of the following fields match an existing invoice:

  • Invoice number

  • Due date

  • Reference number

  • Seller party’s business ID (SellerPartyIdentifier)

If these fields match, the invoice will be updated automatically during the import process.


2 Technical Information

2.1 Service Information

Address:

https://server/ws/purchasebill

If a parallel interface has been enabled, the interface number must be included in addition to the address to ensure the request is directed to the correct endpoint. Otherwise, authentication will fail.

Example:

https://server/ws/purchasebill2

Authentication:

Organization and the organization-specific Web Services password

The character set used:

UTF-8

Available methods:

GET / PUT

Type of request:

Object

Type of response:

Object


2.2 Request content (GET)

The content of the request to be sent to the service

Element

Type

Use

Default

Definition

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

GetInvoiceRow

boolean

Control message

FALSE

Invoice rows

GetDimensionDetails

boolean

Control message

FALSE

Dimension rows

InvoiceIdentifierIds

object

Search criteria

Identifiers of the purchase invoices to be retrieved

GetInvoices

boolean

Search criteria

FALSE

Returns the purchase invoices as a list

Filters

object

Search criteria

Filters the list of purchase invoices when using GetInvoices

2.2.1 InvoiceIdentifierIds-object

Element

Type

Use

Default

Definition

Mandatory

Inv(x)

object

Search criteria

InvoiceIdentifierId counter. For example: Inv1, Inv2, etc.

X

2.2.1.1 Inv(x)-object

Element

Type

Use

Default

Definition

Mandatory

InvoiceIdentifierId

int(11)

Search criteria

Identifier of the purchase invoice to be retrieved

X

2.2.1.2 Filters-object

Element

Type

Use

Definition

Mandatory

ReceiptNumbers

object

Search criteria

List of document numbers of purchase invoices to be retrieved

StatusCodes

object

Search criteria

List of status codes of the purchase invoices to be retrieved

DateRanges

object

Search criteria

List of date range filters for the purchase invoices to be retrieved

2.2.1.3 ReceiptNumbers-object

Element

Type

Use

Definition

Mandatory

ReceiptNumber

String

Search criteria

Document number of the purchase invoice to be retrieved

X

2.2.1.4 StatusCodes-object

Element

Type

Use

Default

Definition

Mandatory

StatusCode

Int

Search criteria

1 = Incomplete

13 = Circulation - To be checked

15 = Circulation – Comment (Additional information required)

24 = Circulation – Waiting for approval

46 = Open (Approved)

51 = Under payment

52 = Paid, Archived

X

2.2.1.5 DateRanges-object

Element

Type

Use

Default

Definition

Mandatory

DateRange

object

Search criteria

Date filter.

Multiple elements perform an OR search.

X

2.2.1.6 DateRange-object

Element

Type

Use

Definition

Mandatory

StartDate

date(YYYY-MM-DD)

Search criteria

Start date

X

EndDate

date(YYYY-MM-DD)

Search criteria

End date

X

SearchDate

string

Search criteria

The date type the filter is applied to. Possible values:

CreationDate = Creation date

BillingDate = Billing date

DeliveryDate = Delivery date

BookingDate = Booking date

PrintingDate = Printing date

SendingDate = Sending date

CashDiscountDate = Cash discount date

DueDate = Due date

PaymentDate = Payment date

CashflowDate = Cash flow date

X


2.3 Response content (GET)

The content of the response returned by the service

Element

Type

Definition

ResponseStatus

int (0/1)

0=error

1=OK

ResponseMessage

string

Additional description about events, errors, etc.

NumberOfInvoices

int

Number of invoices found

Invoices

array

List of found invoices

2.3.1 Invoices-table

Element

Type

Definition

InvoiceIdentifierId

int(11)

Identifier of a single purchase invoice

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

Delievry details

InvoiceDetails

object

Purchase invoice details

PaymentStatusDetails

object

Purchase invoice status

VirtualBankBarcode

string

Virtual barcode

InvoiceRow

object

Purchase invoice rows

2.3.1.1 SellerPartyDetails-object

Element

Type

Definition

SellerPartyIdentifier

string

Business ID

SellerOrganisationName

array(1-2)

Seller

SellerOrganisationTaxCode

string

VAT number

SellerPostalAddressDetails

object

Address details

2.3.1.1.1 SellerOrganisationName-table

Element

Type

Definition

SellerOrganisationName

string

Seller name

2.3.1.1.2 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)

2.3.1.1.2.1 SellerStreetName-table

Element

Type

Definition

StreetName

string

Street address

2.3.1.2 SellerCommunicationDetails-object

Element

Type

Definition

SellerPhoneNumberIdentifier

string

Phone number

SellerEmailaddressIdentifier

string

E-mail address

2.3.1.3 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

2.3.1.3.1 SellerAccountDetails-table

Element

Type

Definition

SellerAccountID

array(0...2)

IBAN

SellerBic

string

BIC

2.3.1.4 InvoiceRecipientPartyDetails-object

Element

Type

Use

InvoiceRecipientPartyIdentifier

string

Business ID

InvoiceRecipientOrganisationName

array(1-2)

Seller

InvoiceRecipientOrganisationTaxCode

string

VAT number

InvoiceRecipientPostalAddressDetails

object

Address details

2.3.1.4.1 InvoiceRecipientOrganisationName-table

Element

Type

Definition

InvoiceRecipientOrganisationName

string

Invoice recipient name

2.3.1.4.2 InvoiceRecipientPostalAddressDetails-object

Element

Type

Definition

InvoiceRecipientStreetName

array(0...2)

Street addresses

InvoiceRecipientTownName

string

Town / post office

InvoiceRecipientPostCodeIdentifier

string

Postal code

InvoiceRecipientCountrySubdivision

string

Department

CountryCode

string(2)

Country code

CountryName

string

Country

InvoiceRecipientPostOfficeBoxIdentifier

string

2.3.1.4.2.1 InvoiceRecipientStreetName-table

Element

Type

Definition

InvoiceRecipientStreetName

string

Street address

2.3.1.5 InvoiceRecipientCommunicationDetails-object

Element

Type

Definition

InvoiceRecipientPhoneNumberIdentifier

string

Phone number

InvoiceRecipientEmailaddressIdentifier

string

E-mail address

2.3.1.6 BuyerPartyDetails-object

Element

Type

Definition

BuyerPartyIdentifier

string

Business ID

BuyerOrganisationName

array(1-2)

Seller

BuyerOrganisationTaxCode

string

VAT number

BuyerPostalAddressDetails

object

Address details

2.3.1.6.1 BuyerOrganisationName-table

Element

Type

Definition

BuyerOrganisationName

string

Buyer name

2.3.1.6.2 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)

2.3.1.6.2.1 BuyerStreetName-table

Element

Type

Definition

BuyerStreetName

string

Street address

2.3.1.7 BuyerCommunicationDetails-object

Element

Type

Definition

BuyerPhoneNumberIdentifier

string

Phone number

BuyerEmailaddressIdentifier

string

E-mail address

2.3.1.8 DeliveryPartyDetails-object

Element

Type

Definition

DeliveryPartyIdentifier

string

Business ID

DeliveryOrganisationName

array(1-2)

Seller

DeliveryOrganisationTaxCode

string

VAT number

DeliveryPostalAddressDetails

object

Address details

2.3.1.8.1 DeliveryOrganisationName-table

Element

Type

Definition

DeliveryOrganisationName

string

Delivery address name

2.3.1.8.2 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)

2.3.1.8.2.1 DeliveryStreetName-table

Element

Type

Definition

DeliveryStreetName

string

Street address

2.3.1.9 DeliveryCommunicationDetails-object

Element

Type

Definition

DeliveryPhoneNumberIdentifier

string

Phone number

DeliveryEmailaddressIdentifier

string

E-mail address

2.3.1.10 DeliveryDetails-object

Element

Type

Use

DeliveryDate

date(YYYY-mm-dd)

Delivery date

DeliveryMethodText

string

Delivery method

DeliveryTermsText

string

Delivery terms

2.3.1.11 InvoiceDetails-object

Element

Type

Definition

InvoiceTypeCode

string

Type code of the purchase invoice

InvoiceTypeCodeUN

string

Semantic invoice type (untdid1001)

InvoiceTypeText

string

Purchase invoice type

OriginCode

string

InvoiceNumber

string

Purchase invoice number

InvoiceDate

Billing 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 amount excluding tax

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

2.3.1.11.1 InvoiceFreeText-table

Element

Type

Definition

InvoiceFreeText

string

2.3.1.11.2 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

2.3.1.11.3 PaymentOverDueFineDetails-object

Element

Type

Definition

PaymentOverDueFineFreeText

string

Late payment free text

PaymentOverDueFinePercent

double(####,##)

Interest

PaymentOverDueFixedAmount

double(####,##)

Amount

2.3.1.11.4 PaymentStatusDetails-object

Element

Type

Definition

PaymentStatusCode

string

Invoice status

2.3.1.12 InvoiceRow-taulukko

Taulukko 39 Ohessa on esitetty InvoiceRow-taulukko.

Element

Type

Definition

RowIdentifier

string

Row identifier

ArticleIdentifier

string

Product number

ArticleGroupIdentifier

string

Product group

ArticleName

string

Product name

EanCode

string

EAN barcode

SerialNumberIdentifier

string

Serial number

ArticleInfoUrlText

array

Product extra info

DeliveredQuantity

double(####)

Delivered quantity

QuantityUnitCode

string

Unit

UnitPriceAmount

double(####,#####)

VAT free unit price

RowProjectReferenceIdentifier

string

Project number

RowNormalProposedAccountIdentifier

string

Account

RowAccountDimensionText

string

Cost center

DimensionRow

array

Dimension rows

RowDiscountPercent

double(####)

Discount percentage

RowVatRatePercent

double(####)

VAT percentage

RowVatCode

string

VAT number (untdid5305)

RowVatAmount

double(####,##)

VAT amount

RowVatExcludedAmount

double(####,##)

Total amount excluding tax

RowAmount

double(####,##)

Total amount including tax

AmountCurrencyIdentifier

string(3)

Currency

SubInvoiceRow

array

2.3.1.13 ArticleInfoUrlText-table

Element

Type

Definition

ArticleInfoUrlText

string

Product extra info

2.3.1.14 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(####,##)

Total amount excluding tax

SubRowAmount

double(####,##)

Total amount including tax

AmountCurrencyIdentifier

string(3)

Currency


2.4 Request content (PUT)

The content of the PUT request to be sent to the service

Element

Type

Use

Default

Definition

Mandatory

Finvoices

object

Purchase invoices

X

CreateFromRowProjectReferenceIdentifier

boolean

Control message

FALSE

True = a new job number is automatically created if it is not found in the registry. The job number must end with a digit.

CreateFromRowAccountDimensionText

boolean

Control message

FALSE

True = a new cost center is automatically created if it is not found in the registry.

AdditionalStatusMessage

string

Status change

Additional message saved for status changes of added purchase invoices

Paid

boolean

Control message

FALSE

If the parameter value is true, and the Finvoice data’s PaymentStatusCode = PAID, InvoiceTypeCode = INV01, EpiInstructedAmount = 0, and InvoiceTotalVatIncludedAmount is not 0, the purchase invoice will be imported with the status Paid.

2.4.1 Retrieving supplier information for the imported purchase invoice

Supplier Identification Order

The system does not attempt to retrieve information from deleted suppliers in the NetBaron customer registry.

The identification is performed in the following order:

  1. Based on the Business ID (Y-tunnus).

  2. Based on the VAT number (VAT ID).

  3. Based on IBAN accounts.

If multiple matches are found, the search is refined step-by-step using the fields below in the order presented until only one match remains:

  1. OVT code.

  2. Postal code and city.

  3. IBAN accounts.

  4. Customer name field 1.

  5. Customer name field 2.

  6. Contact person.

  7. If multiple matches still exist, the most precise query from the above is used to retrieve supplier-type customers. The oldest customer added to the registry is returned unless the original search was done solely based on IBAN accounts. In that case, further refinement is attempted.

  8. Additional addresses are searched. The first added is taken unless the original search was done solely on IBAN accounts.

  9. Customers are searched by external number as in step 10.

  10. If still no single match is found, the first from the original search is taken. Exceptionally, if the original search was based solely on IBAN accounts, only one match is acceptable.

2.4.2 Finvoices-object

It is possible to import more than one Finvoice invoice in a single call via the WS purchase invoice service.

Example of a call. The field File content [BASE64] means base64-encoded Finvoice data:

XML
<Finvoices>
	<Finvoice1>
		<FileName>Purchasebill_1.xml</FileName>
               	<File>[BASE64]</File>
	</Finvoice1>
	<Finvoice2>
		<FileName>Purchasebill_2.xml</FileName>
		<File>[BASE64]</File>
	</Finvoice2>
	<Finvoice3>
		<FileName>Purchasebill_3.xml</FileName>
		<File>[BASE64]</File>
	</Finvoice3>
</Finvoices>

Finvoices-object

Element

Type

Definition

Mandatory

Finvoice(x)

object

Purchase invoices

  • Finvoice counter. For example: Finvoice1, Finvoice2, etc.

X

2.4.2.1 Finvoice(x)-object

Element

Type

Definition

Mandatory

FileName

string

File name

X

File

base64binary

File content

X

Attachments

array

File attachments

2.4.2.1.1 Attachments-array

The attachments array of the Finvoice(x) object

Element

Type

Definition

Mandatory

Attachment

object

Attachment

X

2.4.2.1.1.1 Attachment-object

Element

Type

Definition

Mandatory

FileName

string

File name

X

File

base64binary

File content

X

FileType

string

Attachment MIME type

X


2.5 Response content (PUT) -table

The content of the response returned by the service

Element

Type

Definition

ResponseStatus

int (0/1)

0=error

1=OK

ResponseMessage

string

Additional description of events, errors, etc.

InvoiceIdentifier

object

Identifiers of added purchase invoices

2.5.1 InvoiceIdentifier-object

Element

Type

Definition

[FileName]

object

Identifiers contained in the file

2.5.1.1 [FileName]-object

Element

Type

Definition

Status

int (0/1)

0=error

1=OK

Message

string

Additional description of events, errors, etc.

InvoiceIdentifierId

string

Purchase invoice identifier


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-Purchase Invoice interface software code to product development for review and possible feedback".

3.1 PHP (GET)

3.1.1 InvoiceIdentifierIds

PHP
<?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/purchasebill",
	"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.1.2 GetInvoices

PHP
<?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/purchasebill",
	"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->GetInvoices = true;
	$Request->Filters = new stdClass;
     $Request->Filters->ReceiptNumbers = new SoapVar(array(
        new SoapVar('40141', XSD_STRING, null, null, 'ReceiptNumber'),
     ), SOAP_ENC_OBJECT);
     $Request->Filters->StatusCodes = new SoapVar(array(
         new SoapVar(1, XSD_INT, null, null, 'StatusCode'),
         new SoapVar(13, XSD_INT, null, null, 'StatusCode'),
         new SoapVar(15, XSD_INT, null, null, 'StatusCode'),
         new SoapVar(24, XSD_INT, null, null, 'StatusCode'),
         new SoapVar(51, XSD_INT, null, null, 'StatusCode'),
         new SoapVar(52, XSD_INT, null, null, 'StatusCode'),
     ), SOAP_ENC_OBJECT);
     $Request->Filters->DateRanges = new SoapVar(array(
         new SoapVar(array(
             'StartDate' => '2018-01-01',
             'EndDate' => '2018-12-31',
             'SearchDate' => 'CreationDate'
         ), SOAP_ENC_OBJECT, null, null, 'DateRange'),
     ), SOAP_ENC_OBJECT);
	
	$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 (PUT)

PHP
<?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/purchasebill",
	"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();

	$Files = new stdClass();
	$Files->Finvoice1 = new stdClass();
	$Files->Finvoice1->FileName = utf8_encode("e-lasku.xml");
	$Files->Finvoice1->File = new SoapVar(file_get_contents("e-lasku.xml"), XSD_BASE64BINARY);
	// Liitetiedostojen tuominen
	$tmp = array();
	$attachments = array();
	$tmp['FileName'] = 'Testi.txt';
	$tmp['FileType'] = 'text/plain';
	$tmp['File'] = 'SGVsbG8gd29ybGQh';
	$attachments[] = new SoapVar($tmp, SOAP_ENC_OBJECT, null, null, 'Attachment');
	$Files->Finvoice1->Attachments = new SoapVar($attachments, SOAP_ENC_OBJECT);
	$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.3 XML content

3.3.1 Request (GET)

3.3.1.1 InvoiceIdentifierIds
XML
<?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.3.1.2 GetInvoices
XML
<?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: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>
                <GetInvoices>true</GetInvoices>
                <Filters>
                    <ReceiptNumbers>
                        <ReceiptNumber>40141</ReceiptNumber>
                    </ReceiptNumbers>
                    <StatusCodes>
                        <StatusCode>1</StatusCode>
                        <StatusCode>13</StatusCode>
                        <StatusCode>15</StatusCode>
                        <StatusCode>24</StatusCode>
                        <StatusCode>51</StatusCode>
                        <StatusCode>52</StatusCode>
                    </StatusCodes>
                    <DateRanges>
                        <DateRange>
                            <StartDate>2018-01-01</StartDate>
                            <EndDate>2018-12-31</EndDate>
                            <SearchDate>CreationDate</SearchDate>
                        </DateRange>
                    </DateRanges>
                </Filters>
            </Request>
        </ns1:get>
    </env:Body>
</env:Envelope>

3.3.2 Response (GET)

XML
<?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="8" xsi:type="enc:Array">
                                        <item xsi:type="enc:Struct">
                                            <InvoiceFreeText xsi:type="xsd:string">From time: 1.9.2010-20.9.2010</InvoiceFreeText>
                                        </item>
                                        <item xsi:type="enc:Struct">
                                            <InvoiceFreeText xsi:type="xsd:string">Type of bill: lasku</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">kpl</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">kpl</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.3.3 Request (PUT)

XML
<?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>
                    <Finvoices>
                        <Finvoice1>
                            <FileName>e-lasku</FileName>
                            <File>PD94bWwgdmVyc2...</File>
                        </Finvoice1>
                    </Finvoices>                
		</Request>
            </ns1:put>
        </env:Body>
    </env:Envelope>

3.3.4 Response (PUT)

XML
<?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>
                        </e-lasku.xml>
                    </InvoiceIdentifier>
                </Response>
            </ns1:postResponse>
        </env:Body>
    </env:Envelope>

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.