List Account Balances

Account balances include a starting balance, for period/net change amounts, ending balance, and adjustments together with all book and dimension combinations.

readByQuery

List account balances for the given period

<readByQuery>
    <object>GLACCOUNTBALANCE</object>
    <fields>*</fields>
    <query>PERIOD = 'Month Ended June 2016'</query>
    <pagesize>100</pagesize>
</readByQuery>

List account balances for the given period, excluding entries with the specified zero balances

<readByQuery>
    <object>GLACCOUNTBALANCE</object>
    <fields>*</fields>
    <query>PERIOD = 'Month Ended May 2017' AND NOT (TOTDEBIT = 0 AND TOTCREDIT = 0 AND TOTADJDEBIT = 0 AND TOTADJCREDIT = 0 AND FORBAL = 0 AND ENDBAL = 0)</query>
    <pagesize>100</pagesize>
</readByQuery>

Parameters

Name Required Type Description
object Required string Use GLACCOUNTBALANCE
fields Optional string Comma-separated list of fields on the object to list. For best performance and predictability, limit the number of fields. To return all fields, omit the element or provide * for the value.
query Required string SQL-like query based on fields on the object. Illegal XML characters must be properly encoded. The following SQL operators are supported: <, >, >=, <=, =, like, not like, in, not in. When doing NULL comparisons: IS NOT NULL, IS NULL. Multiple fields may be matched using the AND and OR operators. Joins are not supported. Single quotes in any operands must be escaped with a backslash - For example, the value Erik's Deli would become 'Erik\'s Deli'. Must provide PERIOD as a parameter.
pagesize Optional integer Custom page size between 1 and 1000 items (Default: 100)

query

Name Required Type Description
PERIOD Required string Budgetable reporting period name. These are the reporting periods shown on the Reporting Periods list with the budgetable flag set to true. System periods (Today, Current Month, Current Year to Date, etc) and non-budgetable reporting periods are not supported.
BOOKID Optional string Reporting book ID. System standard book ID’s include ACCRUAL, CASH, GAAPADJACCRUAL, GAAPADJCASH, TAXADJACCRUAL, TAXADJCASH, GAAPACCRUAL, GAAPCASH, TAXACCRUAL, TAXCASH, GAAPTAXACCRUAL, and GAAPTAXCASH. Keep in mind, these are dependent on the company/GL configuration. In addition to these, a Sage Intacct company may also have User Defined Books and/or Consolidation books. In the case of User Defined Books, the system appends ACCRUAL and CASH to the end of the User Defined Book ID to come up with the appropriate Book ID for GL Account Balances. For example, a UDB setup with the ID of TEST would have balances using the book ID’s TESTACCRUAL and TESTCASH.
CURRENCY Optional string Currency code. If the company is multi-currency and the request is run at the top level, your list will contain all currencies and not just the base. You should run the request privately in an entity or provide a currency filter with the base currency and whatever entity/location hierarchy needed.
OPENBAL Optional currency Opening account balance
TOTDEBIT Optional currency Total debits
TOTCREDIT Optional currency Total credits
TOTADJDEBIT Optional currency Total adjusting debits
TOTADJCREDIT Optional currency Total adjusting credits
FORBAL Optional currency For period account balance (debits - credits)
ENDBAL Optional currency Ending account account balance (opening + debits - credits)
WHENCREATED Optional string When the account balance was created in mm/dd/yyyy hh:mm:ss format
WHENMODIFIED Optional string When the account balance was last modified in mm/dd/yyyy hh:mm:ss format
CREATEDBY Optional integer User record number that created the account balance
MODIFIEDBY Optional integer User record number that last modified the account balance
ACCOUNTREC Optional integer Account record number
ACCOUNTNO Optional string Account number
ACCOUNTTITLE Optional string Account title
DEPARTMENTDIMKEY Optional integer Department record number
DEPARTMENTID Optional string Department ID
DEPARTMENTTITLE Optional string Department title
LOCATIONDIMKEY Optional integer Location record number
LOCATIONID Optional string Location ID
LOCATIONNAME Optional string Location name
PROJECTDIMKEY Optional integer Project record number
PROJECTID Optional string Project ID
PROJECTNAME Optional string Project name
CUSTOMERDIMKEY Optional integer Customer record number
CUSTOMERID Optional string Customer ID
CUSTOMERNAME Optional string Customer name
VENDORDIMKEY Optional integer Vendor record number
VENDORID Optional string Vendor ID
VENDORNAME Optional string Vendor name
EMPLOYEEDIMKEY Optional integer Employee record number
EMPLOYEEID Optional string Employee ID
EMPLOYEENAME Optional string Employee name
ITEMDIMKEY Optional integer Item record number
ITEMID Optional string Item ID
ITEMNAME Optional string Item name
WAREHOUSEDIMKEY Optional integer Warehouse record number
WAREHOUSEID Optional string Warehouse ID
WAREHOUSENAME Optional string Warehouse name
CLASSDIMKEY Optional integer Class record number
CLASSID Optional string Class ID
CLASSNAME Optional string Class name
CONTRACTDIMKEY Optional integer Contract record number
CONTRACTID Optional string Contract ID
CONTRACTNAME Optional string Contract name
GLDIM* Optional integer User defined dimension id field. UDD object integration name usually appended to GLDIM

Tips

If you only need to list the changes to account balances, you can use something like WHENMODIFIED &gt;= '04/19/2017 12:00:00' as part of your query.

Consider excluding fields you don’t need in order to avoid the underlying table joins in the Sage Intacct system. For example, query for DEPARTMENTDIMKEY instead of DEPARTMENTID and DEPARTMENTNAME. Then query DEPARTMENTID and DEPARTMENTNAME separately and join them in your system with the DEPARTMENTDIMKEY.


Get Account Balance

read

<read>
    <object>GLACCOUNTBALANCE</object>
    <keys>1</keys>
    <fields>*</fields>
</read>

Parameters

Name Required Type Description
object Required string Use GLACCOUNTBALANCE
keys Required string The balance RECORDNO to get
fields Optional string Comma-separated list of fields on the object to get. For best performance and predictability, limit the number of fields. To return all fields, omit the element or provide * for the value.

List Account Balances (Legacy)

get_accountbalances

List an account of balances for a reporting period

<get_accountbalances>
    <reportingperiodname>Calendar Year Ended December 2016</reportingperiodname>
    <glaccountno>4000</glaccountno>
    <locationid></locationid>
    <departmentid></departmentid>
    <showzerobalances>false</showzerobalances>
</get_accountbalances>

List an account group of balances for a date range

<get_accountbalances>
    <startdate>
        <year>2016</year>
        <month>01</month>
        <day>01</day>
    </startdate>
    <enddate>
        <year>2016</year>
        <month>01</month>
        <day>31</day>
    </enddate>
    <accountgroupname>Total Revenue</accountgroupname>
    <showzerobalances>false</showzerobalances>
</get_accountbalances>

List an account range of balances for a date range

<get_accountbalances>
    <startdate>
        <year>2016</year>
        <month>01</month>
        <day>01</day>
    </startdate>
    <enddate>
        <year>2016</year>
        <month>01</month>
        <day>31</day>
    </enddate>
    <startaccountno>4000</startaccountno>
    <endaccountno>4999</endaccountno>
    <showzerobalances>false</showzerobalances>
</get_accountbalances>

Parameters

Name Required Type Description
reportingperiodname Optional string Reporting period name. Required if not using startdate and enddate.
startdate Optional object Opening balance date. Required if not using reportingperiodname.
enddate Optional object Closing balance date. Required if not using reportingperiodname.
glaccountno Optional string GL account number. Required if not using accountgroupname or startaccountno and endaccountno.
accountgroupname Optional string Account group name. Required if not using glaccountno or startaccountno and endaccountno.
startaccountno Optional string Starting GL account number. Required if not using glaccountno or accountgroupname.
endaccountno Optional string Ending GL account number. Required if not using glaccountno or accountgroupname.
locationid Optional string Location ID or location group ID.
departmentid Optional string Department ID or department group ID.
showzerobalances Optional boolean Return zero balances. Use true or false. (Default: false)
reportingbook Optional string Reporting book ID.
adjbooks Optional array[adjbook] Adjustment book IDs.
includereportingbook Optional boolean Combine reporting book with other books.
statistical Optional string Statistical accounts. Use either include, exclude, or only. (Default: include)
dept_subs Optional boolean Include department subs. (Default: true)
loc_subs Optional boolean Include location subs. (Default: true)
projectid Optional string Project ID or project group ID.
projectid_subs Optional boolean Include project subs. (Default: true)
projecttypeid Optional string Project type. Do not use if project ID is set.
customerid Optional string Customer ID or customer group ID.
customerid_subs Optional boolean Include customer subs. (Default: true)
customertypeid Optional string Customer type. Do not use if Customer ID is set.
vendorid Optional string Vendor ID or vendor group ID.
vendorid_subs Optional boolean Include vendor subs. (Default: true)
vendortypeid Optional string Vendor type. Do not use if Vendor ID is set.
employeeid Optional string Employee ID or employee group ID.
employeeid_subs Optional boolean Include employee subs. (Default: true)
employeetypeid Optional string Employee type. Do not use if Employee ID is set.
itemid Optional string Item ID or item group ID.
productlineid Optional string Product line. Do not use if Item ID is set.
classid Optional string Class ID or class group ID.
classid_subs Optional boolean Include class subs. (Default: true)
contractid Optional string Contract ID or contract group ID.
contractid_subs Optional boolean Include contract subs. (Default: true)
warehouseid Optional string Warehouse ID or warehouse group ID.
warehouseid_subs Optional boolean Include warehouse subs. (Default: true)
userDefinedDimensions Optional array[userDefinedDimension] User defined dimension filters.

userDefinedDimension

Name Required Type Description
objectName Required string UDD object integration name.
recordId Optional string UDD record ID. Do not use if Record name is set.
recordName Optional string UDD record name. Do not use if Record ID set. If UDD name is not unique, must use record ID instead.

Provide feedback