Read financial year properties

You use this method to read information of a financial year.

Request method

GET

Request url

https://venice.unit4.com/webconnect/api/{DossierId}/{FinancialYear}/Year[/{InformationType}?{Parameters}]

Context identification

Identification Description
DossierId The unique identifier of the dossier.
FinancialYear The financial year.
InformationType Requests a specific type of information. Possible values:
  • FreeDate:

    Gets the first free date of the financial year.

    This request takes the following into account:

    • Transfers: If a complete transfer is already done for the given book type, no more entries can be made and 0 is returned.
    • VAT closings: The begin date of the first non closed period is returned. This is only the case if the parameter eBookType has the value btPurch or btSales and when the parameter 'Limit entry in closed period to new sundry documents' is checked in your Venice installation (see general accounting parameters) also for the value btFinan.
    • Closed journals

    Required parameters: BookType, MostRecentDate.

    Returns 'FreeDate': A date containing the smallest date on which entries can be made for the given book type. If no entries can be made for the given book type, this method returns http status 404 'NotFound'.

  • JournalClosedDate:

    Gets the last closed journal date.

    Required parameters: BookType.

    Optional parameters: Book.

    Returns 'JournalClosedDate': A date containing the final closing day of the given journal. If no closures are performed yet, this method returns http status 404 'NotFound'.

  • TransfertStatus:

    Gets the transfer status.

    Required parameters: TransfertType.

    returns:

    • 'Status': A byte containing the transfer status (eTrnStat-enumeration value) of the financial year.
    • 'SystemNumber': A long containing 0 if no transfer was done (return value is equal to tsNone) or the system number of the last entry on the given type (parameter eTrnType) that was transferred (return value is equal to tsPartial or tsComplete).

Parameters

Parameter Description
Book The code of the book of which you want to know the final closing date. (optional)
BookType A value of the 'eBookType' enumeration.
TransfertType A value of the 'eTrnType' enumeration.
MostRecentDate If this parameter is set to true the biggest closing date of the journals, on which entries for all books of the given book type can be made, will be returned. If you set this parameter to false the smallest date is returned, i.e. the date on which entries can be made on at least one of the books of the given book type.
Example 1: Get general information of financial year 2016 in dossier 'Demo'.
https://venice.unit4.com/WebConnect/api/Demo/2016/Year
Example 2: Get the first free date for sales documents of financial year 2016 in dossier 'Demo'.
https://venice.unit4.com/WebConnect/api/Demo/2016/Year/FreeDate?BookType=btSales&MostRecentDate=true

Request header

See request header.

Request body

-

Http status

See http status.

Response body

You can receive the response in json or xml.

Structure

The structure of the response body depends on the value of the parameter 'informationType'. Parameter 'informationType' is not provided
Response (object)
Parameter 'informationType' has the value 'FreeDate'
Response (object)
Parameter 'informationType' has the value 'JournalClosedDate'
Response (object)
Parameter 'informationType' has the value 'TransfertStatus'
Response (object)

Examples

{
  "Response": {
    "Year": {
      "Name": "2016",
      "Begin": "2016-01-01",
      "End": "2016-12-31",
      "LastClosedVatDate": "2015-12-31"
    }
  }
}
{
  "Response": {
    "Year": {
      "FreeDate": "2016-04-01"
    }
  }
}
<?xml version="1.0" encoding="utf-8"?>
<Response>
  <Year>
    <Name>2016</Name>
    <Begin>2016-01-01</Begin>
    <End>2016-12-31</End>
    <LastClosedVatDate>2015-12-31</LastClosedVatDate>
  </Year>
</Response>
<?xml version="1.0" encoding="utf-8"?>
<Response>
  <Year>
    <FreeDate>2016-04-01</FreeDate>
  </Year>
</Response>