NetBaron Instructions
Breadcrumbs

Web Services - Product Register

Version history

Version

Date

Update / Definition

16.4.3

14.07.2022

Added the part: The interface does not support multiple currencies; only the EUR currency is supported.

16.5

16.12.2025

Added new“UpdateLanguageFields” to POST request for modifying product language details

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 Product Register Web Services module, which enables the use of the NetBaron® Product Register from external services.

The module allows retrieving information about specified products from the product register, adding new products, and updating certain product details. The interface does not support multiple currencies; only the EUR currency is supported.

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

1.1 Usage Examples

  • Retrieve product pricing information

  • Retrieve product stock information

  • Update product pricing information

  • Record product consumption

  • Add new products


2 Technical Information

2.1 Service Information

Address:

https://server/ws/products

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

Authentication:

Organization and the organization-specific Web Services password

The character set used:

UTF-8

Available methods:

GET / POST

Type of request:

Object

Type of response:

Object


2.2 Request content (GET)

Element

Type

Use

Default

Definition

GetAlarmLimits

boolean

Control message

FALSE

TRUE = retrieve alarm limits

GetPackaging

boolean

Control message

FALSE

TRUE = retrieve packaging information

GetPictureDetails

boolean

Control message

FALSE

TRUE = retrieve additional image details

GetPrices

boolean

Control message

FALSE

TRUE = retrieve pricing information

GetPricelistSalePrices

boolean

Control message

FALSE

TRUE = retrieve price list sales prices

GetPricelistPurchasePrices

boolean

Control message

FALSE

TRUE = retrieve purchase price list prices

GetQuantity

boolean

Control message

FALSE

TRUE = retrieve quantities

GetQuantityInStockplaces

boolean

Control message

FALSE

TRUE = retrieve quantities per stock location

GetPricesInStockplaces

boolean

Control message

FALSE

TRUE = retrieve prices per stock location

GetDeliverer

boolean

Control message

FALSE

TRUE = retrieve the product's default supplier

GetProductGroups

boolean

Control message

FALSE

TRUE = retrieve product groups

GetExtraFields

boolean

Control message

FALSE

TRUE = retrieve custom fields from the product register

GetLanguageFields

boolean

Control message

FALSE

TRUE = retrieve language-specific fields

GetPictures

boolean

Control message

FALSE

TRUE = retrieve product image files

GetAttachments

boolean

Control message

FALSE

TRUE = retrieve marked attachments

GetProductNumber

string(250)

Search criteria


The product number to be retrieved. It is also possible to use the structure <BeginsWith>ProductNumberPrefix</BeginsWith>, in which case the interface returns product numbers that start with the given input.

GetPricelistSalePricesTargets

array

Search criteria


Sales price lists to be retrieved

GetPricelistSalePricesLimit

boolean

Control message

FALSE

TRUE = limits the query to only the specified price lists

GetPricelistPurchasePricesTargets

array

Search criteria


Purchase price lists to be retrieved

GetProductsFromStock

boolean

Search criteria

FALSE

Filters the returned products based on the specified stock

GetStock

string(250)

Search criteria


Stock to be retrieved

GetProductGroup

string(250)

Search criteria


Product group to be retrieved

Limit

integer

Control message


Used to paginate the size of a single query. When combined with StartFrom, allows fetching the first ten, next ten, etc.

StartFrom

integer

Control message


Used to paginate the size of a single query. When combined with Limit, allows fetching the first ten, next ten, etc.

Timestamp

type timestamp (YYYY-MM-DD HH:MM:SS)

Search criteria


Retrieves only products changed after the specified timestamp.

2.2.1 GetPricelistSalePricesTargets-table

Element

Type

Use

Default

Definition

PriceList

string(250)

Search criteria


Sales price list to retrieve

2.2.2 GetPricelistPurchasePricesTargets-table

Element

Type

Use

Default

Definition

PriceList

string(250)

Search criteria


Purchase price list to retrieve

2.3 Response content (GET)

Element

Type

Definition

ResponseStatus

int (0/1)

0 = Error

1 = OK, Operation completed succesfully

ResponseMessage

string

Additional description about events, errors, etc.

NumOfProducts

int

Number of products retrieved

Products

array

Retrieved products

2.3.1 Products-table

Element

Type

Search criteria

Definition

ProductNumber

string

Default

Product number

Product

string

Default

Product

Description

string

Default

Product description

ExtraDetail

text

Default

Product extra info

CustomColor

Text

Default

Text color

GTINCode

string

Default

GTIN (EAN) code

DelivererId

int

GetDeliverer

Default purchase supplier ID

UnitType

string

Default

Unit (pcs, kg, m etc.)

LowerAlarmLimit

Double

GetAlarmLimits

Alarm limit

Timestamp

timestamp (YYYY-MM-DD HH:MM:SS)

Timestamp

Product's latest modification time

UpperAlarmLimit

Double

GetAlarmLimits

Upper alarm limit

PacketSize

Double

GetPackaging

Units per package

PacketType

string

GetPackaging

Outer packaging type

Weight

Double

GetPackaging

Weight

WeightUnitType

string

GetPackaging

Unit of weight

Volume

Double

GetPackaging

Volume

VolumeUnitType

string

GetPackaging

Unit of volume

CommodityGroup

string

GetPackaging

Commodity group

VatRate

int

GetPrices

VAT percentage

CurrencyIdentifier

string

GetPrices

Currency code

APurchasePrice

Double

GetPrices

A. Purchase price VAT 0%

APurchasePriceVAT

Double

GetPrices

A. Purchase price including VAT

BPurchasePrice

Double

GetPrices

B. Purchase price VAT 0%

BPurchasePriceVAT

Double

GetPrices

B. Purchase price including VAT

SalePrice

Double

GetPrices

Sale price VAT 0%

SalePriceVAT

Double

GetPrices

Sale price including VAT

SalePricelists

array

GetPricelistSalePrices

Price lists

PurchasePricelists

array

GetPricelistPurchasePrices

Purchase price lists

QuantityInStock

Double

GetQuantity

Quantity in stock

QuantityFreeInStock

Double

GetQuantity

Free quantity

QuantityInPurchaseOrder

Double

GetQuantity

Quantity on purchase order

QuantityReservedInStock

Double


GetQuantity

Reserved quantities

Removed

string

Timestamp

Indicates whether the product was removed from the product register after the given timestamp, Y=removed, N=not removed

QuantityInStockplaces

array

GetQuantityInStockplaces

Quantities by stock locations

PricesInStockplaces

array

GetPricesInStockplaces

Prices by stock locations

ProductGroups

array

GetProductGroups

Product groups

ExtraFields

array

GetExtraFields

Product extra fields

LanguageFields

array

GetLanguageFields

Language fields 1–4

Pictures

array

GetPictures

Images files 1–6

Attachments

array

GetAttachments

Marked attachments

2.3.2 SalePricelists-table

Element

Type

Definition

PriceList

string

The name of the price list

CurrencyIdentifier

string

Currency code

DiscountRate

double

Discount percentage

SalePrice

double

Sale price (net)

SalePriceVAT

double

Sale price (gross)

BaseSalePrice

double

Base sale price

Condition

string

Condition

QuantityOfCondition

double

Condition quantity

>, >=, <, <=, ==

2.3.3 PurchasePricelists-table

Element

Type

Definition

PriceList

string

Price list

CurrencyIdentifier

string

Currency code

DiscountRate

double

Discount percentage

APurchasePrice

double

A. Purchase price excluding VAT

APurchasePriceVAT

double

A. Purchase price including VAT

BPurchasePrice

double

B. Purchase price excluding VAT

BPurchasePriceVAT

double

B. Purchase price including VAT

BaseAPurchasePrice

double

Base A. Purchase price

BaseBPurchasePrice

double

Base B. Purchase price

Condition

string

Condition

QuantityOfCondition

double

Condition quantity

>, >=, <, <=, ==

2.3.4 QuantityInStockplaces-table

Element

Type

Definition

Stock

string

The name of the stock place

Quantity

double

Quantity in stock

QuantityFreeInStock

double

Free quantity in stock

2.3.5 PricesInStockplaces-table

Element

Type

Definition

Stock

string

The name of the stock place

CurrencyIdentifier

string

Currency code

VatRate

int

VAT percentage

APurchasePrice

double

A. Purchase price excluding VAT

APurchasePriceVAT

double

A. Purchase price including VAT

BPurchasePrice

double

B. Purchase price excluding VAT

BPurchasePriceVAT

double

B. Purchase price including VAT

SalePrice

double

Sale price excluding VAT

SalePriceVAT

double

Sale price including VAT

2.3.6 ProductGroups-table

Element

Type

Definition

Path

string

Path of the product group

2.3.7 ExtraFields-table

Element

Type

Definition

<Field>

string

Additional fields

2.3.8 LanguageFields-table

Element

Type

Definition

ProductNumber

string

Product number language[x]

Product

string

Product language[x]

Description

string

Product description language[x]

ExtraDetail

text

Additional product info language[x]

2.3.9 Pictures-table

The Pictures table contains images 1–5 [x].

Element

Type

Definition

FileName

string

File name

  • Picture[x]

File

text (base64)

File content

  • Picture[x]

2.3.10 PictureDetails-table

The PictureDetails table contains images 1–5 [x].

Element

Type

Definition

FileName

string

File name

  • Picture[x]

FileType

string

File type

  • Picture[x]

FileSize

int

File size

  • Picture[x]

FileMD5

string

File MD5 hash

  • Picture[x]

2.3.11 Attachments-table

Element

Type

Definition

FileName

string

File name

File

text (base64)

File content


2.4 Content of the request (POST)


Element

Type

Use

Default

Definition

CreateProduct

boolean

Control message

FALSE

TRUE = creates a new product number in the register; updates are not performed.
If even one product number already exists in the register, the interface returns an error.

UpdateProductName

boolean

Control message

FALSE

TRUE = the name is updated

UpdateProductDescription

boolean

Control message

FALSE

TRUE = the description is updated

UpdateProductExtraDetail

boolean

Control message

FALSE

TRUE = updates the extra detail

UpdateCustomColor

boolean

Control message

FALSE

TRUE = updates the text color

UpdateProductUnit

boolean

Control message

FALSE

TRUE = updates the unit

UpdateProductGroup

boolean

Control message

FALSE

TRUE = updates the product group

AddDelivererById

boolean

Control message

FALSE

TRUE = adds a supplier to the product

UpdateExtraField

boolean

Control message

FALSE

TRUE = updates the extra field

UpdateSalePrices

boolean

Control message

FALSE

TRUE = updates the sale prices

UpdatePurchasePrices

boolean

Control message

FALSE

TRUE = updates the purchase prices

UpdateStockSalePrices

boolean

Control message

FALSE

TRUE = updates the stock sale prices


UpdateStockPurchasePrices

boolean

Control message

FALSE

TRUE = updates the stock purchase prices

UpdateSalePriceListPrices

boolean

Control message

FALSE

TRUE = updates the sale price list

UpdatePurchasePriceListPrices

boolean

Control message

FALSE

TRUE = updates the purchase price list

UpdatePictures

boolean

Control message

FALSE

TRUE = updates the product’s pictures

UpdateLanguageFields

boolean

Control message

FALSE

TRUE = updates product language details

DecreaseQuantity

boolean

Control message

FALSE

TRUE = decreases the quantity in stock

IncreaseQuantity

boolean

Control message

FALSE

TRUE = increases the quantity in stock

Products

array

Input


Products to be updated

2.4.1 Products table

Element

Type

Use

Additional information

Definition

ProductNumber

string(250)

Input / Search criteria

1

Product number

Stock

string(250)

Search criteria

2

Stock to be updated

Rack

string(250)

Search criteria

3

Shelf to be updated

PriceList

string(250)

Search criteria

4

Price list to be updated

ProductName

string(250)

Input


Name to be updated

ProductDescription

string(250)

Input


Description to be updated

ProductExtraDetail

string(250)

Input


Additional info to be updated

CustomColor

string(7)

Input


Color of the text to be updated

ProductUnit

string(250)

Input


Unit to be updated

ProductGroupPath

string(250)

Input


Product group path

DelivererId

int

Input


Customer number of the supplier to be added

ExtraFieldName

string(250)

Input


Name of the extra field to be updated

ExtraFieldValue

string(250)

Input


New value of the extra field

APurchasePrice

double

Input

5

A. Purchase price VAT 0%

BPurchasePrice

double

Input

5

B. Purchase price VAT 0%

SalePrice

double

Input

6

Sale price VAT 0%

CurrencyIdentifier

string

Currency

8

Currency code

Quantity

double

Input

7

Quantity

Pictures

Array

Input

9

Product images to be updated / deleted

2.4.2 Additional message information

  1. When the control message is CreateProduct, only the product number element can be used. All product numbers in the Products array are interpreted as inputs and created in the register with a single API call. If even one product number in the Products array already exists in the register, the API returns an error and does not create any new product numbers. This is intended to prevent accidental updates of existing product numbers with new product information.

    Note: After a successful product number creation, the product’s name and base prices must be updated. New stock locations can be created with IncreaseQuantity (Quantity = 0). Stock location prices can also be updated after creation. IncreaseQuantity must be performed before DecreaseQuantity.

  2. Required data for control messages UpdateStockSalePrices, UpdateStockPurchasePrices, DecreaseQuantity, IncreaseQuantity.

  3. Available control messages: DecreaseQuantity, IncreaseQuantity.

    If no shelf location is provided, the product is shelved at the default shelf of the stock. If no default shelf is set, the product is shelved on the top shelf shown in the Stock Information tab of the product register.

  4. Required data for control messages UpdateSalePriceListPrices, UpdatePurchasePriceListPrices.

  5. Required data for control messages UpdatePurchasePrices, UpdateStockPurchasePrices, UpdatePurchasePriceListPrices.

  6. Required data for control messages UpdateSalePrices, UpdateStockSalePrices, UpdateSalePriceListPrices.

  7. Required data for control messages DecreaseQuantity, IncreaseQuantity.

  8. Available control messages: UpdateSalePrices, UpdatePurchasePrices, UpdateSalePriceListPrices, UpdatePurchasePriceListPrices.

  9. Available control message: UpdatePictures. There is a code example for creating the picture array in section 4.3.3 Import / update / delete product images. The picture array can also be sent together with updates to other product information.


2.5 Response content (POST)

Element

Type

Definition

Response-Status

int (0/1)

0 = error

1 = OK, Operation completed succesfully

ResponseMessage

string

Additional description about events, errors, etc.

Products

array

Updated products

Product-specific descriptions of errors and events

2.5.1 Products-table

Element

Type

Definition

ProductNumber

string

Product number

<Control message>

array

Control message: Response to control message

2.5.2 Control message -table

Element

Type

Definition

Status

string

Status / Response to control message

ERROR = error

OK = update successful

Text

string

Detailed message about the event


3 Frequently Asked Questions

This section presents frequently asked questions related to this WS interface description. Questions are marked with a Q and answers with an A.

Q: How can products be defined for the WS interface?
A:On the product's Marketplaces tab, select the product as active and choose the marketplace. CSV import is also possible.

Q: If a product price list is changed, is the product affected by the price change marked as changed/updated?
A:Yes, editing the price list marks all products in that price list as changed.


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

4.1 PHP (GET)

The product register can be fetched using two different approaches:

  1. Fetching the entire product register returns, as the name suggests, all non-deleted products that have the marketplace WS-Products selected. This method is suitable when the product register has not been fetched via the interface before. If the product register is very large, the Limit and StartFrom query parameters can be used to split one large fetch into several smaller requests.

    Once the entire product register has been fetched and saved by the receiver, timestamp-based incremental updates can be used.

  2. Fetching only changed data works by adding a Timestamp parameter to the WS request, indicating from which point in time the changes are requested. For example, if incremental updates are performed once a week, the timestamp is set to "one week ago," and the interface returns changes accumulated during the past week. In this case, deleted products are also published, so the receiver knows to remove those products from their own register.

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

4.2 Fetching the entire product register

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;
// Depending on the client-side encoding, utf_encode may be required.
$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/products",
	"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();
	//Filter search by product number
	//$Request->GetProductNumber = utf8_encode('');
	//Filter the search to products which product number begins with the input
	//$Request->GetProductNumber->BeginsWith = utf8_encode('');
	//Includes alarm limits in the response
	//$Request->GetAlarmLimits =  true;
	//Includes packaging information in the response
	//$Request->GetPackaging =  true;
	//Includes pricing information in the response
	//$Request->GetPrices =  true;

	//Retrieves prices from the sales price list named "SalePriceList"
	//$Request->GetPricelistSalePrices =  true;
	//$splist = new stdClass();
	//$elm = "List0";
	//$splist->$elm = new stdClass();
	//$splist->$elm->PriceList = utf8_encode("SalePriceList");
	//$Request->GetPricelistSalePricesTargets = $splist;

	//Retrieves prices from the purchase price list named "PurchasePriceList"
	//$Request->GetPricelistPurchasePrices =  true;
	//$splist = new stdClass();
	//$elm = "List0";
	//$splist->$elm = new stdClass();
	//$splist->$elm->PriceList = utf8_encode("PurchasePriceList");
	//$Request->GetPricelistPurchasePricesTargets = $splist;

	//Returns the total balance in all stock places
	//$Request->GetQuantity =  true;
	//Returns stock place specific balance information
	//$Request->GetQuantityInStockplaces =  true;
	//Returns stock-specific price information
	//$Request->GetPricesInStockplaces =  true;
	//Filter QuantityInStockplaces and PricesInStockplaces lists based on stock name
	//$Request->GetStock = utf8_encode("Stock");
	//Also filters returnable products based on stock name
	//$Request->GetProductsFromStock = true;
	//Returns product groups
	//$Request->GetProductGroups =  true;
	//Filter search results to a specific product group (return only those in this product group)
	//$Request->GetProductGroup = utf8_encode("");
	//Also resturns exrta field data
	//$Request->GetExtraFields =  true;
	//Also resturns language information
	//$Request->GetLanguageFields =  true;
	//Also resturns picture files as base64
	//$Request->GetPictures =  true;
	//Also resturns attachment files as base64
	//$Request->GetAttachments =  true;
	
	$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;
?>

4.2.1 Fetching only changed data with a timestamp

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;
// Depending on the client-side encoding, utf_encode may be required.
$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/products",
	"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();
	//Filter search by product number
	//$Request->GetProductNumber = utf8_encode('');
	//Includes alarm limits in the response
	//$Request->GetAlarmLimits =  true;
	//Includes packaging information in the response
	//$Request->GetPackaging =  true;
	//Includes pricing information in the response
	//$Request->GetPrices =  true;

	//Retrieves prices from the sales price list named "SalePriceList"
	//$Request->GetPricelistSalePrices =  true;
	//$splist = new stdClass();
	//$elm = "List0";
	//$splist->$elm = new stdClass();
	//$splist->$elm->PriceList = utf8_encode("SalePriceList");
	//$Request->GetPricelistSalePricesTargets = $splist;

	//Retrieves prices from the purchase price list named "PurchasePriceList"
	//$Request->GetPricelistPurchasePrices =  true;
	//$splist = new stdClass();
	//$elm = "List0";
	//$splist->$elm = new stdClass();
	//$splist->$elm->PriceList = utf8_encode("PurchasePriceList");
	//$Request->GetPricelistPurchasePricesTargets = $splist;

	//Returns the total balance in all stock places
	//$Request->GetQuantity =  true;
	//Returns stock place specific balance information
	//$Request->GetQuantityInStockplaces =  true;
	//Returns stock-specific price information
	//$Request->GetPricesInStockplaces =  true;
	//Filter QuantityInStockplaces and PricesInStockplaces lists based on stock name
	//$Request->GetStock = utf8_encode("Stock");
	//Also filters returnable products based on stock name
	//$Request->GetProductsFromStock = true;
	//Returns product groups
	//$Request->GetProductGroups =  true;
	//Filter search results to a specific product group (return only those in this product group)
	//$Request->GetProductGroup = utf8_encode("");
	//Also resturns exrta field data
	//$Request->GetExtraFields =  true;
	//Also resturns language information
	//$Request->GetLanguageFields =  true;
	//Also resturns picture files as base64
	//$Request->GetPictures =  true;
	//Also resturns attachment files as base64
	//$Request->GetAttachments =  true;
	//Resturns information about products that have changed during the last week
	$Request->Timestamp = date('Y-m-d h:i:s', strtotime("-1 week")); // Changes within a week
	
	$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;
?>

4.3 PHP (POST)

When creating a new product number, the product does not have a name, description, prices, or other similar details. Basic information (such as unit) comes from general settings. Overriding the general settings is done as described in section 3.2.2 Updating a product.

The overall process for creating a new product is as follows:

First request: The Products array contains the product numbers to be created. If the first request is successful, the new product numbers are created in the register.

Second request: Update the created product numbers with names, descriptions, base prices, and any data that differs from the general settings (such as unit). Creating a new stock location is possible by performing IncreaseQuantity after updating prices.

Note: If CreateProduct returns an error, do not update the product information under any circumstances, as this would overwrite the existing product with the data intended for the new product.

4.3.1 Creating a product number

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;
// Depending on the client-side encoding, utf_encode may be required.
$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/products",
	"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->CreateProduct = true;
	$products = new stdClass();
	$elm = "Product0";
	$products->$elm = new stdClass();
	$products->$elm->ProductNumber = utf8_encode("ProductNumber1");
	$Request->Products = $products;
	$response  = $client->post( new SoapVar($Request, SOAP_ENC_OBJECT,"","","Request") );

	$responserows = "";
	$responserows .= "ResponseStatus => ".$response->ResponseStatus."<br>";
	$responserows .= "ResponseMessage => ".$response->ResponseMessage."<br>";
	$responserows .= "Products => <br>";
	foreach($response->Products as $product){
		foreach($product as $p=>$k){
			if(is_array($k)){
				$responserows .= "	$p => <br>";
				foreach($product->$p as $pp=>$kk){
					$responserows .= "		Status => ".$kk->Status.": ".$kk->Text."<br>";
				}
			} else $responserows .= "	$p => ".$product->$p." <br>";
		}
	}	
	$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;
?>

4.3.2 Product update

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;
// Depending on the client-side encoding, utf_encode may be required.
$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/products",
	"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->UpdateSalePrices = true;
	// $Request->UpdateCustomColor = true;
	$Request->UpdatePurchasePrices =  true;
	$Request->UpdateStockSalePrices =  true;
	$Request->UpdateStockPurchasePrices = true;
	$Request->UpdateSalePriceListPrices = true;
	$Request->UpdatePurchasePriceListPrices = true;
    $Request->UpdateLanguageFields = true;
	$Request->DecreaseQuantity =  true;
	$Request->IncreaseQuantity =  false;

	$products = new stdClass();
	$elm = "Product0";
	$products->$elm = new stdClass();
	$products->$elm->ProductNumber = utf8_encode("ProductNumber1");
	// $products->$elm->CustomColor = utf8_encode("#AA0000");
	$products->$elm->Stock = utf8_encode("Stock");
	$products->$elm->PriceList = utf8_encode("PriceList");
	$products->$elm->CurrencyIdentifier = utf8_encode("EUR");
	$products->$elm->APurchasePrice = utf8_encode(1.550);
	$products->$elm->BPurchasePrice = utf8_encode(1.600);
	$products->$elm->SalePrice = utf8_encode(2.000);
	$products->$elm->Quantity = utf8_encode(1);
    // update language details
    $langField1 = new stdClass();
    $langField1->ProductLanguageIdentifier = 1;  // Language ID (1-4)
    $langField1->ProductNumber = 'PROD-001-EN';
    $langField1->Product = 'Product Name EN';
    $langField1->Description = 'Product description in English';
    $langField1->ExtraDetail = 'Additional details in English';
    $languageFields[] = $langField1;
    $langField2 = new stdClass();
    $langField2->ProductLanguageIdentifier = 2;
    $langField2->ProductNumber = 'PROD-001-SE';
    $langField2->Product = 'Produktnamn SE';
    $langField2->Description = 'Produktbeskrivning på svenska';
    $langField2->ExtraDetail = 'Ytterligare detaljer på svenska';
    $languageFields[] = $langField2;
  
    $products->$elm->LanguageFields = $languageFields;

	$elm = "Product1";
	$products->$elm = new stdClass();
	$products->$elm->ProductNumber = utf8_encode("ProductNumber2");
	$products->$elm->Stock = utf8_encode("Stock");
	$products->$elm->PriceList = utf8_encode("PriceList");
	$products->$elm->CurrencyIdentifier = utf8_encode("EUR");
	$products->$elm->APurchasePrice = utf8_encode(2.550);
	$products->$elm->BPurchasePrice = utf8_encode(2.600);
	$products->$elm->SalePrice = utf8_encode(3.000);
	$products->$elm->Quantity = utf8_encode(1);

	$Request->Products = $products;
	$response  = $client->post( new SoapVar($Request, SOAP_ENC_OBJECT,"","","Request") );

	$responserows = "";
	$responserows .= "ResponseStatus => ".$response->ResponseStatus."<br>";
	$responserows .= "ResponseMessage => ".$response->ResponseMessage."<br>";
	$responserows .= "Products => <br>";
	foreach($response->Products as $product){
		foreach($product as $p=>$k){
			if(is_array($k)){
				$responserows .= "	$p => <br>";
				foreach($product->$p as $pp=>$kk){
					$responserows .= "		Status => ".$kk->Status.": ".$kk->Text."<br>";
				}
			} else $responserows .= "	$p => ".$product->$p." <br>";
		}
	}	
	$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;
?>

4.3.3 Product image import / update / deletion

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;
$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/products",
	"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->UpdatePictures = true;

	$products = new stdClass();
	$elm = "Product0";
	$products->$elm = new stdClass();
	$products->$elm->ProductNumber = utf8_encode("ProductNumber1");

		$Pictures = array();

		//create or update first picture of product
		$Picture = new stdClass();
		$Picture->Id = 1; // first picture of product, max. five allowed per product (1-5)
		$Picture->FileName = utf8_encode("pic1.jpg");
		$Picture->File = new SoapVar(file_get_contents("pic1.jpg"), XSD_BASE64BINARY);

		//add to soap array
		$Pictures[] = new SoapVar($Picture, SOAP_ENC_OBJECT, null, null, "Picture");

		//delete pictures 2-5 from product
		for ($i = 2; $i <= 5; $i++) {
			$Picture = new stdClass();
			$Picture->Id = $i; // picture id of product, max. five allowed (1-5)
			$Picture->Delete = true;

			//add to soap array
			$Pictures[] = new SoapVar($Picture, SOAP_ENC_OBJECT, null, null, "Picture");		
		}
		
		//all pictures processed, attach soap array to output
		$splist->$elm->Pictures = new SoapVar($Pictures, SOAP_ENC_OBJECT, null, null, "Pictures");	

	$Request->Products = $products;
	$response  = $client->post( new SoapVar($Request, SOAP_ENC_OBJECT,"","","Request") );

	$responserows = "";
	$responserows .= "ResponseStatus => ".$response->ResponseStatus."<br>";
	$responserows .= "ResponseMessage => ".$response->ResponseMessage."<br>";
	$responserows .= "Products => <br>";
	foreach($response->Products as $product){
		foreach($product as $p=>$k){
			if(is_array($k)){
				$responserows .= "	$p => <br>";
				foreach($product->$p as $pp=>$kk){
					$responserows .= "		Status => ".$kk->Status.": ".$kk->Text."<br>";
				}
			} else $responserows .= "	$p => ".$product->$p." <br>";
		}
	}	
	$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;
?>

4.4 XML content

4.4.1 Request (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: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:get>
                <Request>
                    <GetProductNumber>
		   </GetProductNumber>
                    <GetAlarmLimits>true</GetAlarmLimits>
                    <GetPackaging>true</GetPackaging>
                    <GetPrices>true</GetPrices>
                    <GetPricelistSalePrices>true</GetPricelistSalePrices>
                    <GetPricelistSalePricesTargets>
                        <List0>
                            <PriceList>SalePriceList</PriceList>
                        </List0>
                    </GetPricelistSalePricesTargets>
                    <GetPricelistPurchasePrices>true</GetPricelistPurchasePrices>
                    <GetPricelistPurchasePricesTargets>
                        <List0>
                            <PriceList>PurchasePriceList</PriceList>
                        </List0>
                    </GetPricelistPurchasePricesTargets>
                    <GetQuantity>true</GetQuantity>
                    <GetQuantityInStockplaces>true</GetQuantityInStockplaces>
                    <GetPricesInStockplaces>true</GetPricesInStockplaces>
                    <GetStock>Stock</GetStock>
                    <GetProductGroups>true</GetProductGroups>
                    <GetProductGroup>
                    </GetProductGroup>
                    <GetExtraFields>true</GetExtraFields>
                    <GetLanguageFields>true</GetLanguageFields>
                    <GetPictures>true</GetPictures>
                    <GetAttachments>true</GetAttachments>
                </Request>
            </ns1:get>
        </env:Body>
    </env:Envelope>

4.4.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/" xmlns:ns2="http://xml.apache.org/xml-soap">
        <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>
                    <NumOfProducts xsi:type="xsd:int">54</NumOfProducts>
                    <Products enc:itemType="enc:Struct" enc:arraySize="54" xsi:type="enc:Array">
                        <item xsi:type="enc:Struct">
                            <ProductNumber xsi:type="xsd:string">ProductNumber1</ProductNumber>
                            <Product xsi:type="xsd:string">ProductNumber1</Product>
                            <Description xsi:type="xsd:string">ProductNumber1</Description>
                            <ExtraDetail xsi:type="xsd:string">ProductNumber1</ExtraDetail>
					   <CustomColor xsi:type="xsd:string">#AA0000</ExtraDetail>
                            <GTINCode xsi:type="xsd:string">
			    </GTINCode>
                            <LowerAlarmLimit xsi:type="xsd:string">0</LowerAlarmLimit>
                            <UpperAlarmLimit xsi:type="xsd:string">0</UpperAlarmLimit>
                            <PacketSize xsi:type="xsd:string">1</PacketSize>
                            <PacketType xsi:type="xsd:string">Pallet</PacketType>
                            <Weight xsi:type="xsd:string">0.0001</Weight>
                            <WeightUnitType xsi:type="xsd:string">kg</WeightUnitType>
                            <Volume xsi:type="xsd:string">0.0001</Volume>
                            <VolumeUnitType xsi:type="xsd:string">m3</VolumeUnitType>
                            <CommodityGroup xsi:type="xsd:string">
                            </CommodityGroup>
                            <VatRate xsi:type="xsd:string">22</VatRate>
                            <CurrencyIdentifier xsi:type="xsd:string">EUR</CurrencyIdentifier>
                            <APurchasePrice xsi:type="xsd:string">1.550</APurchasePrice>
                            <BPurchasePrice xsi:type="xsd:string">1.600</BPurchasePrice>
                            <SalePrice xsi:type="xsd:string">2.000</SalePrice>
                            <PricesInStockplaces enc:itemType="enc:Struct" enc:arraySize="4" xsi:type="enc:Array">
                                <item xsi:type="enc:Struct">
                                    <Stock xsi:type="xsd:string">Stock</Stock>
                                    <VatRate xsi:type="xsd:string">22</VatRate>
                                    <CurrencyIdentifier xsi:type="xsd:string">EUR</CurrencyIdentifier>
                                    <APurchasePrice xsi:type="xsd:string">1.550</APurchasePrice>
                                    <BPurchasePrice xsi:type="xsd:string">1.600</BPurchasePrice>
                                    <SalePrice xsi:type="xsd:string">2.000</SalePrice>
                                </item>
                            </PricesInStockplaces>
                            <SalePricelists enc:itemType="enc:Struct" enc:arraySize="5" xsi:type="enc:Array">
                                <item xsi:type="enc:Struct">
                                    <PriceList xsi:type="xsd:string">SalePriceList</PriceList>
				  <CurrencyIdentifier xsi:type="xsd:string">EUR</CurrencyIdentifier>
                                    <DiscountRate xsi:type="xsd:string">0</DiscountRate>
                                    <SalePrice xsi:type="xsd:string">1.900</SalePrice>
                                    <BaseSalePrice xsi:type="xsd:string">2.000</BaseSalePrice>
                                    <Condition xsi:type="xsd:string">
                                    </Condition>
                                    <QuantityOfCondition xsi:type="xsd:string">
                                    </QuantityOfCondition>
                                </item>
                             </SalePricelists>
                             <PurchasePricelists enc:itemType="enc:Struct" enc:arraySize="2" xsi:type="enc:Array">
                                <item xsi:type="enc:Struct">
                                    <PriceList xsi:type="xsd:string">PurchasePriceList</PriceList>
				  <CurrencyIdentifier xsi:type="xsd:string">EUR</CurrencyIdentifier>
                                    <DiscountRate xsi:type="xsd:string">0</DiscountRate>
                                    <APurchasePrice xsi:type="xsd:string">1.450</APurchasePrice>
                                    <BPurchasePrice xsi:type="xsd:string">1.500</BPurchasePrice>
                                    <BaseAPurchasePrice xsi:type="xsd:string">1.550</BaseAPurchasePrice>
                                    <BaseBPurchasePrice xsi:type="xsd:string">1.600</BaseBPurchasePrice>
                                    <Condition xsi:type="xsd:string">
                                    </Condition>
                                    <QuantityOfCondition xsi:type="xsd:string">
                                    </QuantityOfCondition>
                                </item>
                            </PurchasePricelists>
                            <UnitType xsi:type="xsd:string">kpl</UnitType>
                            <QuantityInStock xsi:type="xsd:string">2834</QuantityInStock>
                            <QuantityFreeInStock xsi:type="xsd:string">2789</QuantityFreeInStock>
                            <QuantityReservedInStock xsi:type="xsd:string">45</QuantityReservedInStock>
                            <QuantityInStockplaces enc:itemType="enc:Struct" enc:arraySize="4" xsi:type="enc:Array">
                                <item xsi:type="enc:Struct">
                                    <Stock xsi:type="xsd:string">Stock</Stock>
                                    <Quantity xsi:type="xsd:string">2834</Quantity>
                                </item>

                            </QuantityInStockplaces>
                            <ProductGroups enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
                                <item xsi:type="enc:Struct">
                                    <Path xsi:type="xsd:string">/</Path>
                                </item>
                            </ProductGroups>
                            <ExtraFields xsi:type="ns2:Map">
                                <item>
                                    <key xsi:type="xsd:string">Classification</key>
                                    <value xsi:type="xsd:string">
                                    </value>
                                </item>
                            </ExtraFields>
                            <LanguageFields enc:itemType="enc:Struct" enc:arraySize="4" xsi:type="enc:Array">
                                <item xsi:type="enc:Struct">
                                    <ProductNumber xsi:type="xsd:string">ProductNumber1</ProductNumber>
                                    <Product xsi:type="xsd:string">
                                    </Product>
                                    <Description xsi:type="xsd:string">
                                    </Description>
                                    <ExtraDetail xsi:type="xsd:string">
                                    </ExtraDetail>
                                </item>
                                <item xsi:type="enc:Struct">
                                    <ProductNumber xsi:type="xsd:string">
                                    </ProductNumber>
                                    <Product xsi:type="xsd:string">
                                    </Product>
                                    <Description xsi:type="xsd:string">
                                    </Description>
                                    <ExtraDetail xsi:type="xsd:string">
                                    </ExtraDetail>
                                </item>
                                <item xsi:type="enc:Struct">
                                    <ProductNumber xsi:type="xsd:string">
                                    </ProductNumber>
                                    <Product xsi:type="xsd:string">
                                    </Product>
                                    <Description xsi:type="xsd:string">
                                    </Description>
                                    <ExtraDetail xsi:type="xsd:string">
                                    </ExtraDetail>
                                </item>
                                <item xsi:type="enc:Struct">
                                    <ProductNumber xsi:type="xsd:string">
                                    </ProductNumber>
                                    <Product xsi:type="xsd:string">
                                    </Product>
                                    <Description xsi:type="xsd:string">
                                    </Description>
                                    <ExtraDetail xsi:type="xsd:string">
                                    </ExtraDetail>
                                </item>
                            </LanguageFields>
                            <Pictures enc:itemType="enc:Struct" enc:arraySize="2" xsi:type="enc:Array">
                                <item xsi:type="enc:Struct">
                                    <FileName xsi:type="xsd:string">image.jpg</FileName>
                                    <File xsi:type="xsd:string"></File>
                                </item>
                            </Pictures>
                            <Attachments enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
                                <item xsi:type="enc:Struct">
                                    <FileName xsi:type="xsd:string">file.pdf</FileName>
                                    <File xsi:type="xsd:string"></File>
                                </item>
                            </Attachments>
                        </item>
                    </Products>
                </Response>
            </ns1:getResponse>
        </env:Body>
    </env:Envelope>

4.4.3 Request (POST)

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:post>
                <Request>
                    <UpdateSalePrices>true</UpdateSalePrices>
                    <UpdatePurchasePrices>false</UpdatePurchasePrices>
                    <UpdateStockSalePrices>false</UpdateStockSalePrices>
                    <UpdateStockPurchasePrices>false</UpdateStockPurchasePrices>
                    <UpdateSalePriceListPrices>true</UpdateSalePriceListPrices>
                    <UpdatePurchasePriceListPrices>false</UpdatePurchasePriceListPrices>
                    <UpdateLanguageFields>true</UpdateLanguageFields>
                    <DecreaseQuantity>true</DecreaseQuantity>
                    <IncreaseQuantity>false</IncreaseQuantity>
                    <Products>
                        <Product0>
                            <ProductNumber>ProductNumber1</ProductNumber>
                            <Stock>Stock</Stock>
                            <PriceList>PriceList</PriceList>
                			<CurrencyIdentifier>EUR</CurrencyIdentifier>
                            <APurchasePrice>1.550</APurchasePrice>
                            <BPurchasePrice>1.600</BPurchasePrice>
                            <SalePrice>2.000</SalePrice>
                            <Quantity>1</Quantity>
                            <LanguageFields>
                              <SOAP-ENC:Struct>
                                  <ProductLanguageIdentifier>1</ProductLanguageIdentifier>
                                  <ProductNumber>PROD-001-EN</ProductNumber>
                                  <Product>Product Name EN</Product>
                                  <Description>Product description in English</Description>
                                  <ExtraDetail>Additional details in English</ExtraDetail>
                              </SOAP-ENC:Struct>
                              <SOAP-ENC:Struct>
                                  <ProductLanguageIdentifier>2</ProductLanguageIdentifier>
                                  <ProductNumber>PROD-001-SE</ProductNumber>
                                  <Product>Produktnamn SE</Product>
                                  <Description>Produktbeskrivning på svenska</Description>
                                  <ExtraDetail>Produktbeskrivning på svenska</ExtraDetail>
                              </SOAP-ENC:Struct>
                        </LanguageFields>    
                        </Product0>
                        <Product1>
                            <ProductNumber>ProductNumber2</ProductNumber>
                            <Stock>Stock</Stock>
                            <PriceList>PriceList</PriceList>
                			<CurrencyIdentifier>EUR</CurrencyIdentifier>
                            <APurchasePrice>2.550</APurchasePrice>
                            <BPurchasePrice>2.600</BPurchasePrice>
                            <SalePrice>3.000</SalePrice>
                            <Quantity>1</Quantity>
                        </Product1>
                    </Products>
                </Request>
            </ns1:post>
        </env:Body>
    </env:Envelope>

4.4.4 Response (POST)

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>
                    <Products enc:itemType="enc:Struct" enc:arraySize="2" xsi:type="enc:Array">
                        <item xsi:type="enc:Struct">
                            <ProductNumber xsi:type="xsd:string">ProductNumber1</ProductNumber>
                            <DecreaseQuantity enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
                                <item xsi:type="enc:Struct">
                                    <Text xsi:type="xsd:string">Decrease quantity [1]</Text>
                                    <Status xsi:type="xsd:string">OK</Status>
                                </item>
                            </DecreaseQuantity>
                            <UpdateSalePrices enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
                                <item xsi:type="enc:Struct">
                                    <Text xsi:type="xsd:string">Update sale price [2.000]</Text>
                                    <Status xsi:type="xsd:string">OK</Status>
                                </item>
                            </UpdateSalePrices>
                            <UpdateSalePriceListPrices enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
                                <item xsi:type="enc:Struct">
                                    <Text xsi:type="xsd:string">Update price list [PriceList] sale price [2.000]</Text>
                                    <Status xsi:type="xsd:string">OK</Status>
                                </item>
                            </UpdateSalePriceListPrices>
                            <UpdateLanguageFields enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
                              <item xsi:type="enc:Struct">
                                  <Text xsi:type="xsd:string">Update language fields for product [123]</Text>
                                  <Status xsi:type="xsd:string">OK</Status>
                              </item>
                            </UpdateLanguageFields>
                        </item>
                        <item xsi:type="enc:Struct">
                            <ProductNumber xsi:type="xsd:string">ProductNumber2</ProductNumber>
                            <DecreaseQuantity enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
                                <item xsi:type="enc:Struct">
                                    <Text xsi:type="xsd:string">Decrease quantity [1]</Text>
                                    <Status xsi:type="xsd:string">OK</Status>
                                </item>
                            </DecreaseQuantity>
                            <UpdateSalePrices enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
                                <item xsi:type="enc:Struct">
                                    <Text xsi:type="xsd:string">Update sale price [3.000]</Text>
                                    <Status xsi:type="xsd:string">OK</Status>
                                </item>
                            </UpdateSalePrices>
                            <UpdateSalePriceListPrices enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
                                <item xsi:type="enc:Struct">
                                    <Text xsi:type="xsd:string">Update price list [PriceList] sale price [3.000]</Text>
                                    <Status xsi:type="xsd:string">OK</Status>
                                </item>
                            </UpdateSalePriceListPrices>
                        </item>
                      <item xsi:type="enc:Struct">
                            <ProductNumber xsi:type="xsd:string">AllProducts</ProductNumber>
                            <UpdatePriceListPricesCurrency enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
                                <item xsi:type="enc:Struct">
                                    <Text xsi:type="xsd:string">Update price list [PriceList] currency [EUR]</Text>
                                    <Status xsi:type="xsd:string">OK</Status>
                                </item>
                            </UpdatePriceListPricesCurrency>
                        </item>
                    </Products>
                </Response>
            </ns1:postResponse>
        </env:Body>