This example for a GET request gets the sales invoice with system number 1 from financial year 2016 of dossier 'Demo'.
The request url contains the following parts:
||The web service is always accessed by a secure connection.
||The label that is assigned to identify the device that is hosting the web service.
||Web service name
||The name of the web service. Via https://venice.unit4.com/webconnect you can access the home page.
||Part of the route for the API calls.
||Dossier id (optional)
||The identification of the dossier.
||Financial year (optional)
||The financial year within a dossier.
||The object of which you want to request or change data, e.g. Calls, Venice, Article, Customer, SalesInvoice.
||Additional information to perform the action.
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 '?'.
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.
The following example searches for 2 customer cards, one with number/subnumber 2/0 and another with number/subnumber 5/1:
If a key contains multiple values, each value is separated by %09 (tab).
Multiple keys are separated with %0A (line feed)
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.
|Comma separated list
||The specified fields will be included.
||All the fields are included.
||None of the fields will be included.
The following example returns only some header fields from a sales invoice: Book, DocNum, DocDate, TotalDocC and no fields from the entries.
- 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 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