Request/response body

The request body contains the data you want to insert or modify.
The response body contains the data you have asked for or an error response when an error occurs.
The data may be formatted in xml or json.

Remark
  • We do not support all xml or json specifications. We intend only to support features that are common to both xml and json.
  • The request body is similar to the response body. Both are knowingly structured in the same way.

General structure

WebConnect expects all data is supplied in one root object 'Request'. This root object always contains an array node which contains just one object.
In case of getting data the response body contains one root object 'Response'. This root object contains an array node which contains one or more objects.

This is an example of a request body for a customer card:
{
  "Request": {
    "Customers": {
      "Customer": [
        {
          "Fields" : {
            "Name": "Unit4 C-Logic NV",
            "VatNum": "BE 0427.604.308",
          }
        }
      ]
    }
  }
}
<?xml version="1.0" encoding="utf-8" ?>
<Request>
  <Customers>
    <Customer>
      <Fields>
        <Name>UNIT4 C-Logic NV</Name>
        <VatNum>BE 0427.604.308</VatNum>
      </Fields>  
    </Customer>
  </Customers>
</Request>

Array node

The following rules apply:

  • The name of the array node is mostly the pluralized form of the name of the Venice object. E.g. a Venice object 'Article' is placed in a array node with name 'Articles'. You can find the exact name in the API page.
  • There is always exactly one array node under the request/response node.
  • All child nodes have the same name.

Objects

An object contains the information of a card or document. This information is structured in one of more field lists.

Remark
  • Check out the API page for specific information about the name of the Venice objects and the name of the available field lists.

Fields

A field can represent different types of information. The formatting needs to be appropriate.

  • Boolean values: keyword 'true' or 'false' ('0' and '1' are not valid)
  • Integers: just digits are allowed
  • Decimal numbers: just digits and one decimal point
  • Text: Use the same input as in Venice. Some characters must be escaped (see below).
  • Date: in format yyyy-MM-dd
  • Time: in format HH:mm:ss
  • Date time: in format yyyy-MM-dd HH:mm:ss

Remark
  • Check out the API page for specific information about the available fields and their name.
Example:
"BrowseVisible": "true",
"ExpTerm": "30",
"ComDiscount": "5.00",
"Name": "Unit4 C-Logic NV",
"LastUsed": "01/01/2016",
"CreTime": "09:05:17"
<BrowseVisible>true</BrowseVisible>
<ExpTerm>30</ExpTerm>
<ComDiscount>5.00</ComDiscount>
<Name>Unit4 C-Logic NV</Name>
<LastUsed>01/01/2016</LastUsed>
<CreTime>09:05:17</CreTime>