Account Objects

Get Account Balances

GET /(company_code)/v2/aol/account/balance

Get Balance objects for accounts

Either account_id, or profile and name_mask filter must be specified.

If name_mask is used, users with roles EMPLOYEE, COMPANY must supply ledger parameter.

Request Headers:
 
  • AuthorizationBearer <session_token>, or Signature <signature>
Query Parameters:
 
  • profile (string) – (Optional) Code of profile to get accounts for. Profile mnemocode is accepted for all users. If user role is PARTNER, profile external ID for CLIENT role profiles is checked before mnemocode.
  • account_id (integer/string) – (Optional) Account ID to get, or comma-separated list of IDs
  • name_mask (string) – (Optional) Account name regexp mask
  • ledger (string) – (Optional) Account ledger name
Response JSON Object:
 
  • status (string) – success or error
  • data (array) – Account Balance data objects
  • error_code (string) – (Optional) If status is error: one of error codes listed below

Account Balance data fields

Each object in data response array has the following fields:

Field name Type Description
account_id integer Account ID
name string Account name
beginning_balance integer Beginning balance
debits integer Debit turnover
credits integer Credit turnover
net integer Net
ending_balance integer Ending balance

Error codes used

  • auth.apikey.missing
  • auth.apikey.invalid
  • auth.header.missing
  • auth.header.invalid
  • auth.token.invalid
  • auth.token.expired
  • auth.session.invalid
  • auth.user.restricted
  • auth.user.closed
  • auth.user.denied
  • auth.restricted

See Error Codes for details.

Get Account Trial Balances

GET /(company_code)/v2/aol/account/trialbalance

Get Trial balance objects for accounts

Either account_id, or profile and name_mask filter must be specified.

If name_mask is used, users with roles EMPLOYEE, COMPANY must supply ledger parameter.

Request Headers:
 
  • AuthorizationBearer <session_token>, or Signature <signature>
Query Parameters:
 
  • profile (string) – (Optional) Code of profile to get accounts for. Profile mnemocode is accepted for all users. If user role is PARTNER, profile external ID for CLIENT role profiles is checked before mnemocode.
  • account_id (integer/string) – (Optional) Account ID to get, or comma-separated list of IDs
  • name_mask (string) – (Optional) Account name regexp mask
  • ledger (string) – (Optional) Account ledger name
  • start_date (string) – Trial balance start date, ISO-formatted: YYYY-MM-DD
  • end_date (string) – Trial balance end date, ISO-formatted: YYYY-MM-DD
Response JSON Object:
 
  • status (string) – success or error
  • data (array) – Account Trial balance data objects
  • error_code (string) – (Optional) If status is error: one of error codes listed below

Account Trial balance data fields

Each object in data response array has the following fields:

Field name Type Description
account_id integer Account ID
name string Account name
balances array/null Trial balance objects for periods

Trial balance for period data fields

Each object in balances array has the following fields:

Field name Type Description
period string Period name
beginning_dr integer Beginning debit balance
beginning_cr integer Beginning credit balance
debits integer Debit turnover
credits integer Credit turnover
ending_dr integer Ending debit balance
ending_cr integer Ending credit balance

Error codes used

  • auth.apikey.missing
  • auth.apikey.invalid
  • auth.header.missing
  • auth.header.invalid
  • auth.token.invalid
  • auth.token.expired
  • auth.session.invalid
  • auth.user.restricted
  • auth.user.closed
  • auth.user.denied
  • auth.restricted

See Error Codes for details.