Request url

This example for a GET request gets the sales invoice with system number 1 from financial year 2016 of dossier 'Demo'.
https://venice.unit4.com/webconnect/api/Demo/2016/SalesInvoice?SystemNumber=1
The request url contains the following parts:
Part Name Comment
https Protocol The web service is always accessed by a secure connection.
venice.unit4.com Host name The label that is assigned to identify the device that is hosting the web service.
webconnect Web service name The name of the web service. Via https://venice.unit4.com/webconnect you can access the home page.
api Part of the route for the API calls.
Demo Dossier id (optional) The identification of the dossier.
2016 Financial year (optional) The financial year within a dossier.
SalesInvoice Controller The object of which you want to request or change data, e.g. Calls, Venice, Article, Customer, SalesInvoice.
SystemNumber=1 Parameters Additional information to perform the action.

Parameters

There are different kinds of parameters for a request, namely keys and field lists. To separate this info from the rest, the parameters start always with '?'.

Key

Each Venice object has one or more keys. A key contains one or more fields which can uniquely define each item. The available keys depend on the object. Look at the reference to find out which keys can be used.

Format:
  • If a key contains multiple values, each value is separated by %09 (tab).
    {Name key}={Value1}%09{Value2}
  • Multiple keys are separated with %0A (line feed)
    {Name key}={Key1}%0A{Key2}
Remarks The following example searches for 2 customer cards, one with number/subnumber 2/0 and another with number/subnumber 5/1:
https://venice.unit4.com/webconnect/api/Demo/Customer?NumberPair=2%090%0A5%091

Field lists

Each Venice object has one of more field lists. In the Venice object for sales invoices there is a field list for the header, a field list for the entries, etc. The available field lists depend on the object. Look at the reference to find out which field lists can be used. For each of the field lists you can choose which fields you want in a GET request.
It is recommended to limit the number of fields:
  • It takes less time to process the request.
  • The resulting json or xml file will be smaller. So less data has to be transferred over the wire.

Format
Value Result
Comma separated list The specified fields will be included.
* (Asterisk) All the fields are included.
- (Hyphen-minus) None of the fields will be included.
Remarks
  • You can use all the fields described in the Venice sdk help. The fields must be specified without any prefix (The lower case characters before the first uppercase character).
  • You can specify the fields in the url parameters or in the request header.
The following example returns only some header fields from a sales invoice: Book, DocNum, DocDate, TotalDocC and no fields from the entries.
http://venice.unit4.com/webconnect/api/Demo/2016/SalesInvoice?SystemNumber=1&Fields=Book,Number,DocDate,TotalDocC&DetailFields=-

Other

The value depends on the the type.

  • 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