Web Services - Calendar
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 Sales Order Web Services module, which enables the use of NetBaron® Calendar from external services.
The module allows retrieving information from calendars other than personal calendars, as well as creating, modifying, and deleting entries. 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 entries within a given time range from a specified calendar
Add entries
Update entries
Delete entries
2 Technical Information
2.1 Service Information
Address: | If an additional parallel interface has been enabled, the interface number must be specified along with the address to ensure the interface is called from the correct address. Otherwise, authentication will fail. For example: https://server/ws/calendar2 |
Authentication: | Organization and the organization-specific Web Services password |
The character set used: | UTF-8 |
Available methods: | GET / PUT /POST /DELETE |
Type of request: | Object |
Type of response: | Object |
2.2 Request content (GET)
Element | Type | Use | Default | Definition | Mandatory |
ShowEvents | boolean | Control message | FALSE | true = retrieve entries | |
ShowReservations | boolean | Control message | TRUE | true = retrieve reservations | |
ShowWait | boolean | Control message | FALSE | true = retrieve unprocessed reservations | |
ShowAccepted | boolean | Control message | TRUE | true = retrieve accepted reservations | |
ShowRejected | boolean | Control message | FALSE | true = retrieve rejected reservations | |
ShowEventData | boolean | Control message | FALSE | Additional information | |
ShowBuyer | boolean | Control message | FALSE | Customer details | |
ShowInvoice | boolean | Control message | FALSE | Billing information | |
ShowInvoiceRows | boolean | Control message | FALSE | Billing row details | |
ShowRemainder | boolean | Control message | FALSE | Reminder information | |
ShowNotification | boolean | Control message | FALSE | Notification information | |
ShowRecurrence | boolean | Control message | FALSE | Recurrency information | |
GetSingleEvent | boolean | Control message | FALSE | Search for details of a single entry/reservation | |
Calendar | string(250) | Search criteria | Calendar | X | |
DateStart | date(YYYY-mm-dd) | Search criteria | Start date of search | X | |
DateEnd | date(YYYY-mm-dd) | Search criteria | End date of search | X | |
EventIdentifier | int(11) | Search criteria | Identifier of a single entry |
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, Operation completed successfully |
ResponseMessage | string | Additional description of events, errors, etc. |
TimeInterval | int | Query time interval: DateStart – DateEnd |
Events | array | Retrieved reservations |
2.3.1 Events-table
Element | Type | Definition |
EventIdentifier | int(11) | Single entry identifier |
EventType | string | Type of entry:
|
ReservationStatus | int(1) | Reservation status: 1 = Unprocessed 2 = Rejected 3 = Approved |
DateStart | date(YYYY-mm-dd) | Start date of entry |
TimeStart | time(HH:ii:ss) | Start time of entry |
DateEnd | date(YYYY-mm-dd) | End date of entry |
TimeEnd | time(HH:ii:ss) | End time of entry |
EventData | object | Additional information |
BuyerPartyDetails | object | Customer details |
RemainderData | object | Reminder information |
NotificationData | object | Notification information |
RecurrenceData | object | Recurrency details |
PaymentTermsDetails | object | Payment terms |
Invoice | object | Billing information |
InvoiceRow | object | Billing row details |
2.3.2 EventData-object
Element | Type | Definition |
Title | string | Title |
Event | text | Entry |
EventColor | string(7) | Entry colour (#XXXXXX) |
EventBillingStatus | int(1) | Status: 0 / 50 / 52 |
2.3.3 BuyerPartyDetails-object
Element | Type | Definition |
BuyerPartyIdentifierId | int(11) | Customer identifier |
BuyerPartyIdentifierField | string | Customer identification field:
|
BuyerOrganisationName | array(0...2) | Customer’s name |
BuyerPostalAddressDetails | object | Address details |
BuyerContactPersonName | string | Contact person |
BuyerCommunicationDetails | object | Contact details |
2.3.3.1 BuyerOrganisationName-table
Element | Type | Definition |
OrganisationName | string | Customer’s name |
2.3.3.2 BuyerPostalAddressDetails-object
Element | Type | Definition |
BuyerStreetName | array(0...2) | Street addresses |
BuyerTownName | string | City / Town |
BuyerPostCodeIdentifier | string | Postal code |
CountryCode | string(3) | Country code |
CountryName | string | Country |
2.3.3.3 BuyerStreetName-table
Element | Type | Definition |
StreetName | string | Street address |
2.3.3.4 BuyerCommunicationDetails-object
Element | Type | Definition |
BuyerPhoneNumberIdentifier | string | Phone number |
BuyerGsmNumberIdentifier | string | Mobile number |
BuyerEmailaddressIdentifier | string | E-mail address |
2.3.4 RemainderData-object
Element | Type | Use |
Date | date(YYYY-mm-dd) | Remainder date |
Time | time(HH:ii:ss) | Remainder time |
GsmNumberIdentifier | string | Mobile number |
EmailaddressIdentifier | text | E-mail address |
Title | string | Title |
Method | string | Reminder method (comma-separated):
|
2.3.5 NotificationData-object
Element | Type | Use |
Date | date(YYYY-mm-dd) | Notification date |
Time | time(HH:ii:ss) | Notification time |
GsmNumberIdentifier | string | Mobile number |
EmailaddressIdentifier | text | E-mail address |
Title | string | Title |
Method | string | Notification method (comma-separated):
|
2.3.6 RecurrenceData-object
Element | Type | Definition |
Repeat | enum(Y/N) | File name Default= N |
RepeatInterval | int | Recurrence interval [RepeatMethod] |
RepeatMethod | string | Recurrence interval: Day/Week/Month/Year |
RepeatDays | array | Recurring days |
RepeatForever | enum(Y/N) | Repeat indefinitely Default= Y |
RepeatTimes | enum(Y/N) | Repeat count Default= N |
RepeatTime | int | Number of occurrences |
RepeatUntil | enum(Y/N) | Repeat until Default= N |
RepeatUntilDay | date(YYYY-mm-dd) | Repeat until date |
RepeatExceptions | array | Exceptions |
2.3.6.1 RepeatDays-table
Element | Type | Definition |
Day | string (3) | Week day Mon, Tue, Wed, Thu, Fri, Sat, Sun |
2.3.6.2 RepeatExceptions-table
Element | Type | Definition |
Date | date(YYYY-mm-dd) | Exception day |
2.3.7 PaymentTermsDetails-object
Element | Type | Definition |
PaymentTermsFreeText | string | Payment term |
2.3.8 Invoice-object
Element | Type | Definition |
InvoiceTotalVatExcludedAmount | double(####.##) | VAT free amount |
InvoiceTotalVatAmount | double(####.##) | VAT amount |
InvoiceTotalVatIncludedAmount | double(####.##) | Total amount including tax |
2.3.9 InvoiceRow-object
Element | Type | Use |
RowIdentifier | int(11) | Row identifier |
ArticleIdentifier | string | Product number |
ArticleName | string | Product |
ArticleStockName | string | Stock |
ArticleRackName | string | Shelf |
DeliveredQuantity | double(####) | Quantity |
QuantityUnitCode | string | Unit |
UnitPriceAmount | double(####.###) | Vat free unit price |
AmountCurrencyIdentifier | string | Currency |
UnitPurchaseAPriceAmount | double(####.###) | A-purchase price |
UnitPurchaseBPriceAmount | double(####.###) | B-purchase price |
SerialNumberIdentifier | text | Serial number |
RowDiscountPercent | double(####.##) | Discount percentage |
RowVatRatePercent | double(####) | VAT rate percentage |
RowVatAmount | double(####.##) | VAT amount |
RowVatExcludedAmount | double(####.##) | VAT free amount |
RowAmount | double(####.##) | Total amount including tax |
RowType | string | Row type:
|
RowInvoice | enum(Y/N) | Invoiced: Default = Y |
RowNormalProposedAccountIdentifier | string(4) | Own account |
2.4 Response Content (PUT/POST)
Element | Type | Definition | Mandatory |
Calendar | string(250) | Calendar | X |
DateStart | date(YYYY-mm-dd) | Start date of entry | X |
TimeStart | time(HH:ii:ss) | Start time of entry | X |
DateEnd | date(YYYY-mm-dd) | End date of entry | X |
TimeStart | time(HH:ii:ss) | End time of entry | X |
EventType | string | Type of entry:
| |
ReservationStatus | int(1) | Reservation status: 1 = Unprocessed 2 = Rejected 3 = Approved | |
EventIdentifier | int(11) | Entry identifier | POST |
EventData | object | Additional details | (PUT) |
BuyerPartyDetails | object | Customer details | |
RemainderData | object | Reminder details | |
NotificationData | object | Notification info | |
RecurrenceData | object | Recurrency info | |
PaymentTermsDetails | object | Payment terms | |
Invoice | object | Invoicing details | |
InvoiceRow | object | Invoice row details | |
RemoveInvoiceRow | object | Invoice row items to be deleted |
2.4.1 EventData object
Element | Type | Use | Mandatory |
Title | string(250) | Title | PUT |
Event | text | Entry | |
EventColor | string(7) | Colour of the entry (#XXXXXX) | |
EventBillingStatus | int(1) | Billing status of the entry: 0 / 50 / 52 | |
ServiceFieldId | int(11) | Service work ID related to the entry Note: Only applicable if the Service-application is also in use. |
2.4.2 BuyerPartyDetails object
Element | Type | Use |
MatchByerToRegister | boolean | Control message Default= FALSE* |
AddByerToRegister | boolean | Control message Default= FALSE** |
BuyerPartyIdentifierId | int(1) | Customer identifier |
BuyerPartyIdentifierField | string(250) | Customer identification field:
|
BuyerOrganisationName | array(0...2) | Customer’s name |
BuyerPostalAddressDetails | object | Address details |
BuyerContactPersonName | string | Contact person |
BuyerCommunicationDetails | object | Contact details |
* | Links the customer to the customer register if matching data is found. |
** | Adds the customer to the customer register if the above does not apply. |
2.4.2.1 BuyerOrganisationName table
Element | Type | Definition |
OrganisationName | string(250) | Customer’s name |
2.4.2.2 BuyerPostalAddressDetails object
Element | Type | Definition |
BuyerStreetName | array(0...2) | Street addresses |
BuyerTownName | string(250) | City /Town |
BuyerPostCodeIdentifier | string(250) | Postal code |
CountryCode | string(3) | Country code |
CountryName | string | Country |
2.4.2.3 BuyerStreetName table
Element | Type | Use |
StreetName | string(250) | Street address |
2.4.2.4 BuyerCommunicationDetails object
Element | Type | Use |
BuyerPhoneNumberIdentifier | string(250) | Phone number |
BuyerGsmNumberIdentifier | string(250) | Mobile number |
BuyerEmailaddressIdentifier | string(250) | E-mail address |
2.4.3 RemainderData-object
Element | Type | Definition |
Date | date(YYYY-mm-dd) | Reminder date |
Time | time(HH:ii:ss) | Reminder time |
GsmNumberIdentifier | string(250) | Mobile phone |
EmailaddressIdentifier | text | E-mail address |
Title | string(250) | Title |
Method | string(250) | Reminder method, separated by commas:
|
2.4.4 NotificationData-object
Element | Type | Use |
Date | date(YYYY-mm-dd) | Notification date |
Time | time(HH:ii:ss) | Notification time |
GsmNumberIdentifier | string(250) | Mobile number |
EmailaddressIdentifier | text | E-mail address |
Title | string(250) | Title |
Method | string(250) | Notification method, separated by commas:
|
2.4.5 RecurrenceData-object
Element | Type | Definition |
Repeat | enum(Y/N) | File name Default = N |
RepeatInterval | int(3) | Recurrence interval [RepeatMethod] |
RepeatMethod | string(10) | Recurrence interval: Day/Week/Month/Year |
RepeatDays | array | Recurring days |
RepeatForever | enum(Y/N) | Repeat indefinitely Default = Y |
RepeatTimes | enum(Y/N) | Repeat count Default = N |
RepeatTime | int(3) | Number of occurrences |
RepeatUntil | enum(Y/N) | Repeat until Default = N |
RepeatUntilDay | date(YYYY-mm-dd) | Repeat until dte |
RepeatExceptions | array | Exceptions |
2.4.5.1 RepeatDays-table
Element | Type | Definition |
Day | strin(3) | Week day: Mon, Tue, Wed, Thu, Fri, Sat, Sun |
2.4.5.2 RepeatExceptions-table
Element | Type | Definition |
Date | date(YYYY-mm-dd) | Exception day |
2.4.6 PaymentTermsDetails-object
Element | Type | Definition |
PaymentTermsFreeText | string(250) | Payment term |
2.4.7 Invoice-object
Element | Type | Definition |
InvoiceTotalVatExcludedAmount | double(####.##) | VAT free amount |
InvoiceTotalVatAmount | double(####.##) | VAT amount |
InvoiceTotalVatIncludedAmount | double(####.##) | Total amount including tax |
2.4.8 InvoiceRow-table
Element | Type | Definition | Mandatory |
MatchArticleToRegister | boolean | Default= FALSE* | |
MustMatchArticleToRegister | boolean | Default= FALSE** | |
RowIdentifier | int(11) | Row identifier*** | (POST) |
ArticleIdentifier | string(250) | Product number | |
ArticleName | string(250) | Product name | |
ArticleStockName | string(250) | Stock | |
ArticleRackName | string(250) | Shelf | |
DeliveredQuantity | double(####) | Quantity Default = 1 | |
QuantityUnitCode | string | Unit Default = default quantity unit (pcs) | |
UnitPriceAmount | double(####.###) | VAT free unit price | |
AmountCurrencyIdentifier | string | Currency Default = organization’s currency (EUR) | |
UnitPurchaseAPriceAmount | double(####.###) | A.purchase price | |
UnitPurchaseBPriceAmount | double(####.###) | B.purchase price | |
SerialNumberIdentifier | text | Serial number | |
RowDiscountPercent | double(####.##) | Discount percentage | |
RowVatRatePercent | double(####) | VAT percentage | |
RowVatAmount | double(####.##) | VAT amount | |
RowVatExcludedAmount | double(####.##) | VAT free amount | |
RowAmount | double(####.##) | Total amount including tax | |
RowType | string | Row type:
| |
RowInvoice | enum(Y/N) | Invoiced Default = Y | |
RowNormalProposedAccountIdentifier | string(4) | Own account |
* | If the selected product is intended to be linked to the product register based on the ArticleIdentifier information. |
** | If the selected product must be found in the product register based on the ArticleIdentifier value. |
*** | If the data is found using the POST method, the corresponding row is updated; otherwise, a new row is added. |
2.4.9 RemoveInvoiceRow-object
Element | Type | Definition | Mandatory |
RowIdentifier | int(11) | Identifier for the row to delete | X |
2.5 Response Content (PUT/POST) -table
Element | Type | Definition |
ResponseStatus | int (0/1) | 0 = Error 1 = OK, Operation completed successfully |
ResponseMessage | string | Additional description of events, errors, etc. |
EventIdentifier | int(11) | Identifier of the added/updated entry |
2.6 Request Content (DELETE) -table
Element | Type | Definition | Mandatory |
Calendar | string(250) | Calendar | X |
EventIdentifier | int(11) | Entry identifier | X |
2.7 Response Content (DELETE) -table
Element | Type | Definition |
ResponseStatus | int (0/1) | 0 = Error 1 = OK, Operation completed successfully |
ResponseMessage | string | Additional description of events, errors, etc. |
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-Sales Calendar interface software code to product development for review and possible feedback".
3.1 PHP
3.1.1 PHP (GET) list of entries
<?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/calendar",
"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->ShowEvents = false;
$Request->ShowReservations = true;
$Request->ShowWait = true;
$Request->ShowAccepted = true;
$Request->ShowRejected = true;
$Request->ShowEventData = false;
$Request->ShowBuyer = false;
$Request->ShowRemainder = false;
$Request->ShowNotification = false;
$Request->ShowRecurrence = false;
$Request->ShowInvoice = false;
$Request->ShowInvoiceRows = false;
$Request->GetSingleEvent = false;
$Request->Calendar = utf8_encode("Calendar name");
$Request->DateStart = utf8_encode("2010-10-01");
$Request->DateEnd = utf8_encode("2010-10-01");
$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 PHP (GET) single entry
<?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/calendar",
"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->ShowEventData = true;
$Request->ShowBuyer = false;
$Request->ShowRemainder = false;
$Request->ShowNotification = false;
$Request->ShowRecurrence = false;
$Request->ShowInvoice = false;
$Request->ShowInvoiceRows = false;
$Request->GetSingleEvent = true;
$Request->Calendar = utf8_encode("Calendar name");
$Request->EventIdentifier = utf8_encode("1");
$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.3 PHP (PUT)
<?php
function getresp($responsex, $pref=""){
$responserows = "";
foreach($responsex as $k => $r){
if(is_array($r)){
$responserows .= $pref."$k => Array(<br>".getresp($r,$pref." ").$pref."),<br>";
} else if(is_object($r)){
$responserows .= $pref."$k => Object(<br>".getresp($r,$pref." ").$pref."),<br>";
} else $responserows .= $pref."$k => $r<br>";
}
return $responserows;
}
$ns = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd';
$token = new stdClass;
// 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/calendar",
"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->Calendar = utf8_encode("Calendar name");
$Request->DateStart = utf8_encode("2010-10-01");
$Request->DateEnd = utf8_encode("2010-10-01");
$Request->TimeStart = utf8_encode("08:00:00");
$Request->TimeEnd = utf8_encode("09:00:00");
$Request->EventType = "Reservation";
$Request->ReservationStatus = 2;
$Request->EventData = new stdClass();
$Request->EventData->Title = utf8_encode("Title");
$Request->EventData->Event = utf8_encode("Event data");
$Request->RemainderData = new stdClass();
$Request->RemainderData->Title = utf8_encode("Remainder title");
$Request->RemainderData->Method = utf8_encode("Internal, Mobile phone, Email");
$Request->RemainderData->GsmNumberIdentifier = utf8_encode("12345678");
$Request->RemainderData->EmailaddressIdentifier = utf8_encode("email@address.com");
$Request->RemainderData->Date = utf8_encode("2010-10-01");
$Request->RemainderData->Time = utf8_encode("07:00");
$Request->NotificationData = new stdClass();
$Request->NotificationData->Title = utf8_encode("Notification title");
$Request->NotificationData->Method = utf8_encode("Internal, Mobile phone, Email");
$Request->NotificationData->GsmNumberIdentifier = utf8_encode("12345678");
$Request->NotificationData->EmailaddressIdentifier = utf8_encode("email@address.com");
$Request->NotificationData->Date = utf8_encode("2010-10-01");
$Request->NotificationData->Time = utf8_encode("07:00");
$Request->RecurrenceData = new stdClass();
$Request->RecurrenceData->Repeat = utf8_encode("Y");
$Request->RecurrenceData->RepeatInterval = utf8_encode(1);
$Request->RecurrenceData->RepeatMethod = utf8_encode("Day");
$Request->RecurrenceData->RepeatDays = new stdClass();
$Request->RecurrenceData->RepeatDays->RepeatDays1->Day = utf8_encode("Mon");
$Request->RecurrenceData->RepeatDays->RepeatDays2->Day = utf8_encode("Wed");
$Request->RecurrenceData->RepeatForever = utf8_encode("Y");
$Request->RecurrenceData->RepeatTimes = utf8_encode("N");
$Request->RecurrenceData->RepeatTime = utf8_encode(1);
$Request->RecurrenceData->RepeatUntil = utf8_encode("N");
$Request->RecurrenceData->RepeatUntilDay = utf8_encode("2010-10-31");
$Request->RecurrenceData->RepeatExceptions = new stdClass();
$Request->RecurrenceData->RepeatExceptions->RepeatExceptions1->Date = utf8_encode("2010-10-01");
$Request->BuyerPartyDetails = new stdClass();
//control message
$Request->BuyerPartyDetails->MatchByerToRegister = true;
$Request->BuyerPartyDetails->AddByerToRegister = false;
$Request->BuyerPartyDetails->BuyerPartyIdentifierId = utf8_encode("1");
$Request->BuyerPartyDetails->BuyerPartyIdentifierField = utf8_encode("CustomerId");
$Request->BuyerPartyDetails->BuyerOrganisationName = new stdClass();
$Request->BuyerPartyDetails->BuyerOrganisationName->BuyerOrganisationName1->OrganisationName = utf8_encode("Organisation name");
$Request->BuyerPartyDetails->BuyerOrganisationName->BuyerOrganisationName2->OrganisationName = utf8_encode("Organisation name");
$Request->BuyerPartyDetails->BuyerContactPersonName = utf8_encode("Contact person");
$Request->BuyerPartyDetails->BuyerPostalAddressDetails = new stdClass();
$Request->BuyerPartyDetails->BuyerPostalAddressDetails->BuyerStreetName = new stdClass();
$Request->BuyerPartyDetails->BuyerPostalAddressDetails->BuyerStreetName->BuyerStreetName1->StreetName = utf8_encode("Street name");
$Request->BuyerPartyDetails->BuyerPostalAddressDetails->BuyerStreetName->BuyerStreetName2->StreetName = utf8_encode("Street name");
$Request->BuyerPartyDetails->BuyerPostalAddressDetails->BuyerTownName = utf8_encode("Town name");
$Request->BuyerPartyDetails->BuyerPostalAddressDetails->BuyerPostCodeIdentifier = utf8_encode("00000");
$Request->BuyerPartyDetails->BuyerPostalAddressDetails->CountryCode = utf8_encode("FI");
$Request->BuyerPartyDetails->BuyerPostalAddressDetails->CountryName = utf8_encode("Finland");
$Request->BuyerPartyDetails->BuyerCommunicationDetails = new stdClass();
$Request->BuyerPartyDetails->BuyerCommunicationDetails->BuyerPhoneNumberIdentifier = utf8_encode("12345678");
$Request->BuyerPartyDetails->BuyerCommunicationDetails->BuyerGsmNumberIdentifier = utf8_encode("12345678");
$Request->BuyerPartyDetails->BuyerCommunicationDetails->BuyerEmailaddressIdentifier = utf8_encode("email@address.com");
$Request->PaymentTermsDetails = new stdClass();
$Request->PaymentTermsDetails->PaymentTermsFreeText = utf8_encode("Käteinen");
$Request->Invoice = new stdClass();
$Request->Invoice->InvoiceTotalVatExcludedAmount = utf8_encode("8.27");
$Request->Invoice->InvoiceTotalVatAmount = utf8_encode("1.90");
$Request->Invoice->InvoiceTotalVatIncludedAmount = utf8_encode("10.17");
$Request->InvoiceRow = new stdClass();
$row="Row1";
$Request->InvoiceRow->$row = new stdClass();
//control message
$Request->InvoiceRow->$row->MatchArticleToRegister = true;
$Request->InvoiceRow->$row->MustMatchArticleToRegister = false;
$Request->InvoiceRow->$row->ArticleIdentifier = utf8_encode("ArticleIdentifier");
$Request->InvoiceRow->$row->ArticleName = utf8_encode("Article name");
$Request->InvoiceRow->$row->ArticleStockName = utf8_encode("Stock");
$Request->InvoiceRow->$row->ArticleRackName = utf8_encode("Rack");
$Request->InvoiceRow->$row->DeliveredQuantity = utf8_encode("1");
$Request->InvoiceRow->$row->QuantityUnitCode = utf8_encode("kpl");
$Request->InvoiceRow->$row->UnitPriceAmount = utf8_encode("8.265");
$Request->InvoiceRow->$row->AmountCurrencyIdentifier = utf8_encode("EUR");
$Request->InvoiceRow->$row->UnitPurchaseAPriceAmount = utf8_encode("5.000");
$Request->InvoiceRow->$row->UnitPurchaseBPriceAmount = utf8_encode("5.000");
$Request->InvoiceRow->$row->SerialNumberIdentifier = utf8_encode("");
$Request->InvoiceRow->$row->RowDiscountPercent = utf8_encode("0");
$Request->InvoiceRow->$row->RowVatRatePercent = utf8_encode("23");
$Request->InvoiceRow->$row->RowVatAmount = utf8_encode("1.90");
$Request->InvoiceRow->$row->RowVatExcludedAmount = utf8_encode("8.27");
$Request->InvoiceRow->$row->RowAmount = utf8_encode("10.17");
$Request->InvoiceRow->$row->RowType = "Row";
$Request->InvoiceRow->$row->RowInvoice = "Y";
$Request->InvoiceRow->$row->RowNormalProposedAccountIdentifier = utf8_encode("3000");
$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.1.4 PHP (POST)
<?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/calendar",
"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->Calendar = utf8_encode("Calendar name");
$Request->EventIdentifier = utf8_encode("1");
$Request->InvoiceRow = new stdClass();
$row="Row1";
$Request->InvoiceRow->$row = new stdClass();
//control message
$Request->InvoiceRow->$row->MatchArticleToRegister = true;
$Request->InvoiceRow->$row->MustMatchArticleToRegister = false;
$Request->InvoiceRow->$row->RowIdentifier = utf8_encode("1");
$Request->InvoiceRow->$row->ArticleIdentifier = utf8_encode("ArticleIdentifier");
$Request->InvoiceRow->$row->ArticleName = utf8_encode("Article name");
$Request->InvoiceRow->$row->ArticleStockName = utf8_encode("Stock");
$Request->InvoiceRow->$row->ArticleRackName = utf8_encode("Rack");
$Request->InvoiceRow->$row->DeliveredQuantity = utf8_encode("1");
$Request->InvoiceRow->$row->QuantityUnitCode = utf8_encode("kpl");
$Request->InvoiceRow->$row->UnitPriceAmount = utf8_encode("8.265");
$Request->InvoiceRow->$row->AmountCurrencyIdentifier = utf8_encode("EUR");
$Request->InvoiceRow->$row->UnitPurchaseAPriceAmount = utf8_encode("5.000");
$Request->InvoiceRow->$row->UnitPurchaseBPriceAmount = utf8_encode("5.000");
$Request->InvoiceRow->$row->SerialNumberIdentifier = utf8_encode("");
$Request->InvoiceRow->$row->RowDiscountPercent = utf8_encode("0");
$Request->InvoiceRow->$row->RowVatRatePercent = utf8_encode("23");
$Request->InvoiceRow->$row->RowVatAmount = utf8_encode("1.90");
$Request->InvoiceRow->$row->RowVatExcludedAmount = utf8_encode("8.27");
$Request->InvoiceRow->$row->RowAmount = utf8_encode("10.17");
$Request->InvoiceRow->$row->RowType = "Row";
$Request->InvoiceRow->$row->RowInvoice = "Y";
$Request->InvoiceRow->$row->RowNormalProposedAccountIdentifier = utf8_encode("3000");
$Request->RemoveInvoiceRow = new stdClass();
$row="Row1";
$Request->RemoveInvoiceRow->$row = new stdClass();
$Request->RemoveInvoiceRow->$row->RowIdentifier = utf8_encode('2');
$response = $client->post( 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.5 PHP (DELETE)
<?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/calendar",
"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->Calendar = utf8_encode("Calendar name");
$Request->EventIdentifier = utf8_encode("1");
$response = $client->delete( 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 XML Content
3.2.1 Request (GET) list of entries
<?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>
<ShowEvents>false</ShowEvents>
<ShowReservations>true</ShowReservations>
<ShowWait>true</ShowWait>
<ShowAccepted>true</ShowAccepted>
<ShowRejected>true</ShowRejected>
<ShowEventData>false</ShowEventData>
<ShowBuyer>false</ShowBuyer>
<ShowRemainder>false</ShowRemainder>
<ShowNotification>false</ShowNotification>
<ShowRecurrence>false</ShowRecurrence>
<ShowInvoice>false</ShowInvoice>
<ShowInvoiceRows>false</ShowInvoiceRows>
<GetSingleEvent>false</GetSingleEvent>
<Calendar>Calendar name</Calendar>
<DateStart>2010-10-01</DateStart>
<DateEnd>2010-10-01</DateEnd>
</Request>
</ns1:get>
</env:Body>
</env:Envelope>
3.2.2 Response (GET) list of entries
<?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>
<TimeInterval xsi:type="xsd:string">2010-10-01 - 2010-10-01</TimeInterval>
<Events enc:itemType="enc:Struct" enc:arraySize="4" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<DateStart xsi:type="xsd:string">2010-10-01</DateStart>
<TimeStart xsi:type="xsd:string">07:00:00</TimeStart>
<DateEnd xsi:type="xsd:string">2010-10-01</DateEnd>
<TimeEnd xsi:type="xsd:string">08:00:00</TimeEnd>
<ReservationStatus xsi:type="xsd:string">1</ReservationStatus>
<EventType xsi:type="xsd:string">Reservation</EventType>
<EventIdentifier xsi:type="xsd:string">1</EventIdentifier>
</item>
<item xsi:type="enc:Struct">
<DateStart xsi:type="xsd:string">2010-10-01</DateStart>
<TimeStart xsi:type="xsd:string">14:00:00</TimeStart>
<DateEnd xsi:type="xsd:string">2010-10-01</DateEnd>
<TimeEnd xsi:type="xsd:string">15:00:00</TimeEnd>
<ReservationStatus xsi:type="xsd:string">1</ReservationStatus>
<EventType xsi:type="xsd:string">Reservation</EventType>
<EventIdentifier xsi:type="xsd:string">2</EventIdentifier>
</item>
</Events>
</Response>
</ns1:getResponse>
</env:Body>
</env:Envelope>
3.2.3 Request (GET) single entry
<?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>
<ShowEventData>true</ShowEventData>
<ShowBuyer>false</ShowBuyer>
<ShowRemainder>false</ShowRemainder>
<ShowNotification>false</ShowNotification>
<ShowRecurrence>false</ShowRecurrence>
<ShowInvoice>false</ShowInvoice>
<ShowInvoiceRows>false</ShowInvoiceRows>
<GetSingleEvent>false</GetSingleEvent>
<Calendar>Calendar name</Calendar>
<EventIdentifier>1</EventIdentifier>
</Request>
</ns1:get>
</env:Body>
</env:Envelope>
3.2.4 Response (GET) single entry
<?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>
<TimeInterval xsi:type="xsd:string"> - </TimeInterval>
<Events enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<DateStart xsi:type="xsd:string">2010-10-01</DateStart>
<TimeStart xsi:type="xsd:string">07:00:00</TimeStart>
<DateEnd xsi:type="xsd:string">2010-10-01</DateEnd>
<TimeEnd xsi:type="xsd:string">08:00:00</TimeEnd>
<ReservationStatus xsi:type="xsd:string">1</ReservationStatus>
<EventType xsi:type="xsd:string">Reservation</EventType>
<EventIdentifier xsi:type="xsd:string">1</EventIdentifier>
<EventData xsi:type="enc:Struct">
<Title xsi:type="xsd:string">Title</Title>
<Event xsi:type="xsd:string">Event</Event>
<EventColor xsi:type="xsd:string">#FFFFCC</EventColor>
<EventBillingStatus xsi:type="xsd:string">
</EventBillingStatus>
</EventData>
</item>
</Events> </Response>
</ns1:getResponse>
</env:Body>
</env:Envelope>
3.2.5 Request (PUT)
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<env:Header>
<wsse:Security env:mustUnderstand="true">
<wsse:UsernameToken>
<wsse:Username>username</wsse:Username>
<wsse:Password>password</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</env:Header>
<env:Body>
<ns1:put>
<Request>
<Calendar>Calendar name</Calendar>
<DateStart>2010-10-01</DateStart>
<DateEnd>2010-10-01</DateEnd>
<TimeStart>08:00:00</TimeStart>
<TimeEnd>09:00:00</TimeEnd>
<EventType>Reservation</EventType>
<ReservationStatus>2</ReservationStatus>
<EventData>
<Title>Title</Title>
<Event>Event data</Event>
</EventData>
<RemainderData>
<Title>Remainder title</Title>
<Method>Internal, Mobile phone, Email</Method>
<GsmNumberIdentifier>12345678</GsmNumberIdentifier>
<EmailaddressIdentifier>email@address.com</EmailaddressIdentifier>
<Date>2010-10-01</Date>
<Time>07:00</Time>
</RemainderData>
<NotificationData>
<Title>Notification title</Title>
<Method>Internal, Mobile phone, Email</Method>
<GsmNumberIdentifier>12345678</GsmNumberIdentifier>
<EmailaddressIdentifier>email@address.com</EmailaddressIdentifier>
<Date>2010-10-01</Date>
<Time>07:00</Time>
</NotificationData>
<RecurrenceData>
<Repeat>Y</Repeat>
<RepeatInterval>1</RepeatInterval>
<RepeatMethod>Day</RepeatMethod>
<RepeatDays>
<RepeatDays1>
<Day>Mon</Day>
</RepeatDays1>
<RepeatDays2>
<Day>Wed</Day>
</RepeatDays2>
</RepeatDays>
<RepeatForever>Y</RepeatForever>
<RepeatTimes>N</RepeatTimes>
<RepeatTime>1</RepeatTime>
<RepeatUntil>N</RepeatUntil>
<RepeatUntilDay>2010-10-31</RepeatUntilDay>
<RepeatExceptions>
<RepeatExceptions1>
<Date>2010-10-01</Date>
</RepeatExceptions1>
</RepeatExceptions>
</RecurrenceData>
<BuyerPartyDetails>
<MatchByerToRegister>true</MatchByerToRegister>
<AddByerToRegister>false</AddByerToRegister>
<BuyerPartyIdentifierId>1</BuyerPartyIdentifierId>
<BuyerPartyIdentifierField>CustomerId</BuyerPartyIdentifierField>
<BuyerOrganisationName>
<BuyerOrganisationName1>
<OrganisationName>Organisation name</OrganisationName>
</BuyerOrganisationName1>
<BuyerOrganisationName2>
<OrganisationName>Organisation name</OrganisationName>
</BuyerOrganisationName2>
</BuyerOrganisationName>
<BuyerContactPersonName>Contact person</BuyerContactPersonName>
<BuyerPostalAddressDetails>
<BuyerStreetName>
<BuyerStreetName1>
<StreetName>Street name</StreetName>
</BuyerStreetName1>
<BuyerStreetName2>
<StreetName>Street name</StreetName>
</BuyerStreetName2>
</BuyerStreetName>
<BuyerTownName>Town name</BuyerTownName>
<BuyerPostCodeIdentifier>00000</BuyerPostCodeIdentifier>
<CountryCode>FI</CountryCode>
<CountryName>Finland</CountryName>
</BuyerPostalAddressDetails>
<BuyerCommunicationDetails>
<BuyerPhoneNumberIdentifier>12345678</BuyerPhoneNumberIdentifier>
<BuyerGsmNumberIdentifier>12345678</BuyerGsmNumberIdentifier>
<BuyerEmailaddressIdentifier>email@address.com</BuyerEmailaddressIdentifier>
</BuyerCommunicationDetails>
</BuyerPartyDetails>
<PaymentTermsDetails>
<PaymentTermsFreeText>Käteinen</PaymentTermsFreeText>
</PaymentTermsDetails>
<Invoice>
<InvoiceTotalVatExcludedAmount>8.27</InvoiceTotalVatExcludedAmount>
<InvoiceTotalVatAmount>1.90</InvoiceTotalVatAmount>
<InvoiceTotalVatIncludedAmount>10.17</InvoiceTotalVatIncludedAmount>
</Invoice>
<InvoiceRow>
<Row1>
<MatchArticleToRegister>true</MatchArticleToRegister>
<MustMatchArticleToRegister>false</MustMatchArticleToRegister>
<ArticleIdentifier>ArticleIdentifier</ArticleIdentifier>
<ArticleName>Article name</ArticleName>
<ArticleStockName>Stock</ArticleStockName>
<ArticleRackName>Rack</ArticleRackName>
<DeliveredQuantity>1</DeliveredQuantity>
<QuantityUnitCode>kpl</QuantityUnitCode>
<UnitPriceAmount>8.265</UnitPriceAmount>
<AmountCurrencyIdentifier>EUR</AmountCurrencyIdentifier>
<UnitPurchaseAPriceAmount>5.000</UnitPurchaseAPriceAmount>
<UnitPurchaseBPriceAmount>5.000</UnitPurchaseBPriceAmount>
<SerialNumberIdentifier>
</SerialNumberIdentifier>
<RowDiscountPercent>0</RowDiscountPercent>
<RowVatRatePercent>23</RowVatRatePercent>
<RowVatAmount>1.90</RowVatAmount>
<RowVatExcludedAmount>8.27</RowVatExcludedAmount>
<RowAmount>10.17</RowAmount>
<RowType>Row</RowType>
<RowInvoice>Y</RowInvoice>
<RowNormalProposedAccountIdentifier>3000</RowNormalProposedAccountIdentifier>
</Row1>
</InvoiceRow>
</Request>
</ns1:put>
</env:Body>
</env:Envelope>
3.2.6 Response (PUT)
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://www.w3.org/2003/05/soap-encoding" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc">
<ns1:postResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding">
<rpc:result>Response</rpc:result>
<Response xsi:type="enc:Struct">
<ResponseStatus xsi:type="xsd:int">1</ResponseStatus>
<ResponseMessage xsi:type="xsd:string">
</ResponseMessage>
<EventIdentifier xsi:type="xsd:int">3</EventIdentifier>
</Response>
</ns1:postResponse>
</env:Body>
</env:Envelope>
3.2.7 Resquest (POST)
<?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>
<Calendar>Calendar name</Calendar>
<EventIdentifier>3</EventIdentifier>
<InvoiceRow>
<Row1>
<MatchArticleToRegister>true</MatchArticleToRegister>
<MustMatchArticleToRegister>false</MustMatchArticleToRegister>
<RowIdentifier>1</RowIdentifier>
<ArticleIdentifier>ArticleIdentifier</ArticleIdentifier>
<ArticleName>Article name</ArticleName>
<ArticleStockName>Stock</ArticleStockName>
<ArticleRackName>Rack</ArticleRackName>
<DeliveredQuantity>1</DeliveredQuantity>
<QuantityUnitCode>kpl</QuantityUnitCode>
<UnitPriceAmount>8.265</UnitPriceAmount>
<AmountCurrencyIdentifier>EUR</AmountCurrencyIdentifier>
<UnitPurchaseAPriceAmount>5.000</UnitPurchaseAPriceAmount>
<UnitPurchaseBPriceAmount>5.000</UnitPurchaseBPriceAmount>
<SerialNumberIdentifier>
</SerialNumberIdentifier>
<RowDiscountPercent>0</RowDiscountPercent>
<RowVatRatePercent>23</RowVatRatePercent>
<RowVatAmount>1.90</RowVatAmount>
<RowVatExcludedAmount>8.27</RowVatExcludedAmount>
<RowAmount>10.17</RowAmount>
<RowType>Row</RowType>
<RowInvoice>Y</RowInvoice>
<RowNormalProposedAccountIdentifier>3000</RowNormalProposedAccountIdentifier>
</Row1>
</InvoiceRow>
<RemoveInvoiceRow>
<Row1>
<RowIdentifier>2</RowIdentifier>
</Row1>
</RemoveInvoiceRow>
</Request>
</ns1:post>
</env:Body>
</env:Envelope>
3.2.8 Response (POST)
<?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>
<EventIdentifier xsi:type="xsd:int">3</EventIdentifier>
</Response>
</ns1:postResponse>
</env:Body>
</env:Envelope>
3.2.9 Request (DELETE)
<?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:delete>
<Request>
<Calendar>Calendar name</Calendar>
<EventIdentifier>3</EventIdentifier>
</Request>
</ns1:delete>
</env:Body>
</env:Envelope>
3.2.10 Response (DELETE)
<?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>
</Response>
</ns1:postResponse>
</env:Body>
</env:Envelope>