Read balance properties

You use this method to read information of a balance record and to retrieve specific balances.

Request method

GET

Request url

https://venice.unit4.com/webconnect/api/{DossierId}/{FinancialYear}/Balance/{InformationType}?{Key}={KeyValues}[&fields={FieldList}&fieldIdentifier={FieldIdentifier}&fieldValue={FieldValue}&beginMonth={BeginMonth}&endMonth={EndMonth}]

Context identification

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

    Seeks the balance record(s) by the given key value(s). If no balance record(s) can be found, this method returns http status 404 'NotFound'.

    Required parameters: SystemNumber or AccountNumber.

  • GetBalance:

    Gets the balance for a group of account numbers and for a period or the complete financial year.

    Required parameters: AccountNumber, BeginMonth and EndMonth.

  • GetField:

    Gets the balance of account numbers sharing a value in an account field and for a period.

    Required parameters: FieldIdentifier, FieldValue, BeginMonth and EndMonth.

Parameters

Parameter Description
{Key} The available keys to seek one or more balance records:
  • SystemNumber={SystemNumber}: Seek balance record(s) by system number(s).
  • AccountNumber={AccountNumber}: Seek balance record(s) by account number(s).
Fields List of fields, , containing property names of the balance record, of which the value has to be returned in the response body. (optional)
FieldIdentifier Identifier of a general account field, a value of the 'eAccntFld' enumeration.
FieldValue The restriction for the given general account field.
BeginMonth The month from where to start (a value of 1 to 25 or 0 for the complete financial year).
EndMonth The month where to end (a value of 1 to 25 or 0 for the complete financial year).
Example 1: Get balance fields, limited to the balance ('BalanMonth1DosC') and the quantity ('QuantMonth1') of the first month, for account number '600' in dossier 'Demo' and financial year 2016.
https://venice.unit4.com/WebConnect/api/Demo/2016/Balance/Seek?AccountNumber=600&fields=BalanMonth1DosC,QuantMonth1
Example 2: Get the balance of all customers (assuming that '400' is the customer prefix account) for the complete financial year.
https://venice.unit4.com/WebConnect/api/Demo/2016/Balance/GetBalance?AccountNumber=400&BeginMonth=0&EndMonth=0
Example 3: Get the first quarter balance for all general accounts of which the English description starts with 'CAPITAL'.
https://venice.unit4.com/WebConnect/api/Demo/2016/Balance/GetField?FieldIdentifier=accfDescrEng&FieldValue=CAPITAL*&BeginMonth=1&EndMonth=3

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 request body depends on the value of the parameter 'informationType'. Parameter 'informationType' has the value 'Seek'
Response (object)
Parameter 'informationType' has the value 'GetBalance' Parameter 'informationType' has the value 'GetField'

Examples

{
  "Response": {
    "Balances": {
      "Balance": [
        {
          "Fields" : {
            "BalanMonth1DosC": "2000.00",
            "QuantMonth1": "17.00"
          }
        }
      ]
    }
  }
}
{
  "Response": {
    "GetBalance": "17235.15"
  }
}
{
  "Response": {
    "GetField": {
      "Balance": "789.43",
      "Quantity": "2.00"
    }
  }
}
<?xml version="1.0" encoding="utf-8"?>
<Response>
  <Balances>
    <Balance>
      <Fields>
        <BalanMonth1DosC>2000.00</BalanMonth1DosC>
        <QuantMonth1>17.00</QuantMonth1>
      </Fields>
    </Balance>
  </Balances>
</Response>
<?xml version="1.0" encoding="utf-8"?>
<Response>
  <GetBalance>17235.15</GetBalance>
</Response>
<?xml version="1.0" encoding="utf-8"?>
<Response>
  <GetField>
    <Balance>789.43</Balance>
    <Quantity>2.00</Quantity>
  </GetField>
</Response>