Skip to main content

logoCorrectSize.png

Adaptive Insights LLC.

updateAccounts

Supported in API v20 +

Category

Metadata modification

Description

Update a set of existing GL accounts or create new GL accounts. Multiple accounts with multiple values can be updated in one call. If successful, the API returns details for the accounts that were updated/created. If the API fails, a comprehensive list of errors and their causes returns.

Permissions Required To Invoke

Model and permissions on each level

Parameters Required On Request

Credentials

This method's request contains a credentials tag to identify and authorize the calling user. User must have the "Model" permission and the permission required to administer the accounts being updated.

Best Practice: Invoke exportAccounts to retrieve the Adaptive Insights account IDs needed for your updateAccounts request. Do your best to minimize the time between exportAccounts calls and updateAccount requests.

HTTP Description
Method Post
Content-Type text/xml

 

Curl Example

curl -H "Content-Type: text/xml" -d @C:/temp/updateAccounts.xml -X POST https://api.adaptiveinsights.com/api/v20

updateAccounts.xml contents

Request Format

<?xml version='1.0' encoding='UTF-8'?>
<call method="updateAccounts" callerName="a string that identifies your client application">
 <credentials login="sampleuser@company.com" password="my_pwd"/>
 <accounts proceedWithWarnings="0">
   <account id="1441" code="LocalAssets" name="LocalAssets" shortName="" description="Local Assets"
   displayAs="CURRENCY" decimalPrecision="0" suppressZeroes="true"
   exchangeRateType="E" isIntercompany="0" planBy="DELTA" timeRollup="LAST" hasSalaryDetail="" dataPrivacy="PRIVATE"
   subType="CUMULATIVE" enableActuals="true">
     <account id="1610" code="LocalCashAssets" name="Local Cash Assets" shortName="" description="cash assets"
     displayAs="CURRENCY" decimalPrecision="0" suppressZeroes="true"
     exchangeRateType="E" isIntercompany="0" planBy="DELTA"
     timeRollup="LAST" hasSalaryDetail="" dataPrivacy="PRIVATE"
     subType="CUMULATIVE" enableActuals="true" propagateToDescendants="1">
       <attribute name="SEC Reporting" value="Yes" />
       <attribute name="GAAP Reporting" value="No" />
     </account>
   </account>
 </accounts>
 </call>

For large payloads, you can post compressed XML files (zipped). Find out how, here.

The following conditions apply to updateAccounts:

  • Accounts are identified for update via their internal ID number.

  • To create new accounts, give them a blank or missing ID property.

    • You can move an existing (non-new) item so that it becomes a child of a new item. Doing so creates the new item and moves the existing item under it as a child.

Re-parenting Accounts

  • updateAccounts errors out if the attribute value for a child is not compatible with the new parent attribute. Example: reparentedAccount1 attribute has color="light red" and is not compatible because newParentAccount2 color="blue".
  • updateAccounts fixes non-compatible attribute values to match their new parent during re-parenting when proceedWithWarnings=1.
  • Re-parenting accounts cannot form a cyclic relationship.
  • Re-parenting is not allowed for system-generated root accounts: Assets, Liabilities and Equities, Net Income, PL Income, Non-Operating Income, PL COGS, PL Expense, Non-Operating Expenses.

Leaf Account Children   

  • The first child of a leaf account can only be a new account. An existing GL account cannot be moved underneath an existing leaf account.
  • When an account gets its first child during re-parentage, the account mapping in Integration > Import Account Mappings is deleted.
  • When re-parenting accounts, balanceType and subType properties are inherited from their parent GL account.

Cube Accounts and Cube Entered Data

  • Cube entered accounts cannot be re-parented.
  • Only accounts without cube entered data in their source and destination subtrees can be re-parented.
  • CUBE/MIXED ACCOUNTs cannot be re-parented.
  • New accounts under a CUBE ACCOUNT are not allowed. New accounts under a STANDARD/MIXED ACCOUNT are allowed.

Request Format for Creating a New Account

To create a new account, include its parent by its ID. For example, to add a new child account below the LocalAssets account which has id 1441, you can use:

<?xml version='1.0' encoding='UTF-8'?>
<call method="updateAccounts" callerName="Steve C">
    <credentials login="sampleuser@company.com" password="my_password"/>
    <accounts>
      <account id="1441">
        <account id="" code="newLocalAssets" name="new Local Assets" description="new local assets account for this area" shortName="" >
        </account>
      </account> 
    </accounts>
</call>

This method does not change anything about account id 1441. It creates a new child named new Local Assets for id 1441. All unmentioned children of LocalAssets move to the end of the child list. This is the equivalent of "setting the parent" for the new account.

credentials element

Tag Name

credentials

Description

All API calls must contain a single credentials element to identify the user invoking the API. The API call is then performed as this user (any audit trail or history of actions in the system will show that this user performed the action), and therefore the user must have the required permissions to perform the action in order for the API call to succeed.

Attributes of the Element

Attribute Name

Required?

Value

Example

login

Y

The login name of the user invoking the API method. This user must have a role containing the permissions required for the method being invoked.

sampleuser@company.com

password

Y

The password of the user invoking the API method.

my_password

locale

N

Specify the locale to be used to interpret incoming numbers and dates, and to format outgoing numbers and dates (using the proper thousands separator, month names, and date formatting). The locale is also used to specify the language in which any system messages in the response should appear. If not specified, en_US (American English) is used.

fr_FR

instanceCode

N

If the user specified in the credentials has access to more than one instance of Adaptive Planning, this attribute can be used to specify that the user is intending to access an instance other than their default instance. If not specified, the user's default instance will be used. To determine the available instance codes, use the exportInstances API.

MYINSTANCE1

Contents of the Element

(none)

 

accounts element

Tag Name

accounts

Description

Only 1 accounts element request is allowed per payload. It contains one or more account elements.

Attributes of the Element

Attribute Name

Required?

Value

Example

proceedWithWarnings N

proceedWithWarnings="1" indicates updateAccounts API should adjust account's attribute and properties based on re-parentage changes.

proceedWithWarnings="0" indicates updateAccounts API should not adjust account's attribute and properties based on re-parentage changes. UpdateAccounts errors out with a message conveying the failure reason. For example, the attribute mapping will become invalid after re-parentage.

Defaults to 0 if missing.

1

Contents of the Element

Contains one or more account elements.

 

account element

Tag Name

account

Description

Specifies an account to create.

Attributes of the Element

Attribute Name

Required?

Value

Example

id

Y

The internal system ID number for the account.

16

code

N

The code of the account, alphanumeric characters and underscores only. Should not supply a code attribute for account groups.

Cur_Assets

name

Y

The name of the account, as it appears on reports and sheets.

Current Assets

shortName

N

The short name for the account.

CA

description

N

The textual description of the account. Max character length is 2048.

Total current assets

subType N

Indicates whether the account is PERIODIC or CUMULATIVE. If an account is periodic, its value in a given month equals the net activity for the month. Examples include revenue and expense accounts. If an account is cumulative, its value equals the ending balance for a given month. This is the prior month’s value plus or minus any activity in the given month. Balance sheet accounts are cumulative. This will be empty for account groups and metric accounts.

Read-only, identified based on its parent account.

Cumulative
planBy N

For Cumulative accounts, indicates whether the account is plan by balance (BALANCE) or plan by delta (DELTA).

Defaults to DELTA.

Change of planBy to DELTA is NOT allowed when account has splits in non-actual versions.

Only applicable for leaf accounts. updateAccounts errors out when the user attempts to set planBy for a non-leaf account.

DELTA
actualsBy N

For Cumulative accounts, indicates whether the account is actuals by balance (BALANCE) or actuals by delta (DELTA).

Defaults to BALANCE.

Only applicable for leaf accounts. updateAccounts errors out when the user attempts to set actualsBy for a non-leaf account.

BALANCE
enableActuals N

0 to show only plan data for the account. 1 to import actuals into the account. For linked accounts, 0 will show actuals only if the linked account has them, and 1 will enable actuals for the linked account. This will be empty for account groups and metric accounts. Planning GL admin UI uses term "actuals overlay".

Defaults to 0 when the current account is a group. Defaults to1 when the current account is a leaf

1
balanceType N

Indicates the balance type of an account: DEBIT or CREDIT.  balanceType is empty if the account does not have an associated balance type.

Only GL accounts have a balance type.

Read-only, identified based on its parent account.

CREDIT
timeStratum N

The code of the time stratum of the account. For modeled and cube accounts, this is inherited from the account's owning sheet.

See Time Administration for more on time structure and time period codes.

Read-only property selected from time structure, modeled or cube sheet.

month
displayAs N

The account's output display setting: NUMBER, CURRENCY, or PERCENT. Only provided for accounts which have a Display As property in Account Administration.

Read-only property for GL Accounts.

NUMBER
decimalPercision N

The number of decimal places to display for numbers in this account.

The special value of 99 indicates a Linked Account which inherits the decimal precision of its target. The value -1 indicates the account is a currency account and uses the precision of the currency it displays.

Allowed values: -1, 0, 1-9, 99

Default is 0.

0

exchangeRateType

N

Only present for instances with multicurrency enabled and for accounts with displayAs="CURRENCY". Possible values: any of the exchange rate type codes present in the instance, as configured in Manage Currencies. "A"=Monthly Average, "E"=End of Month.

If missing, use A for PERIODIC and E for CUMULATIVE.

E

suppressZeroes N

Indicates whether the account allows users to suppress zeros on sheets. If 0 users cannot suppress zeros. If 1 users can suppress zeros. Only provided for accounts with the "Suppress on sheets" property turned on in the Accounts admin.

If missing, defaults to 1.

1
startExpanded N

Indicates whether an account and its children start out in an expanded state when the sheet first loads. Applies only to parent accounts. 

1 for expanded, 0 for collapsed.

If missing, defaults to 1.

1
dataEntryType N

Indicates the data entry type for a leaf account. Either STANDARD or CUBE. A blank value indicates data entry type is not applicable for the account.

dataEntryType is read-only and defaults to STANDARD for new accounts.

STANDARD

hasSalaryDetail

N

Indicates whether this account has splits that require the Access Salary Detail permission for viewing. Empty if not applicable to this account.

hasSalaryDetail=1 is not allowed for account group/non-leaf accounts.

To make hasSalaryDetail=1:

  • dataEntryType must be STANDARD
  • accountType must be GL 

Errors out when dataEntryType is NOT STANDARD.

Errors out when dataEntryType=1 for non-leaf accounts.

Errors out for non-GL and custom accounts.

1

dataPrivacy

N

Indicates the levels the account's values are public on and refrencable in other levels when writing formulas. PRIVATE indicates the account's values are private. PUBLIC_TOP indicates the account's values are public at only the top level, or PUBLIC_ALL so that the account's values are public at all levels. Assumptions are always public and do not have a dataPrivacy setting.

When missing, default to PRIVATE.

Errors out for account group and assumption accounts.

PRIVATE

isInterCompany N

Indicates if the account is an intercompany account or not.

When missing, defaults to 0.

isInterCompany is read-only.

0
propagateToDescendants N

Indicates the propagation of attribute mapping changes to descendants.

When missing, defaults to 0.

Errors out if empty or holds any value other than 1 or 0.

Properties that propagate to descendants:

  • subType
  • planBy
  • displayAs
  • actualsBy
  • decimalPrecision
  • exchangeRateType
  • accountTypeCode
1

Contents of the Element

One optional attributes element if you want to edit one or more account attributes associated with the account.

 

attribute element

Tag Name

attribute

Description

Specifies an attribute to update. Tags the account with the attribute if the model has account attributes.

Attributes of the Element

Attribute Name

Required?

Value

Example

name

Y

The name of the attribute.

Errors out if the name does not already exist in the system.

Errors out if the name exists but the attribute is not an account attribute.

Errors out if the attribute name is empty or missing.

Location

value

Y

The attribute value for this attribute.

Allows either an empty value to remove the current value, or any of the defined account attribute values.

The attribute value must be compatible with the account's assigned attribute.

170

Contents of the Element

(none)

 

Response Format

<?xml version="1.0" encoding="UTF-8"?>
<response success="true">
  <messages>
    <message type="INFO">Accounts were saved successfully.</message>
  </messages>
  <output>
    <accounts>
      <account id="1441" code="LocalAssets" name="LocalAssets" shortName="" description="Local Assets"displayAs="CURRENCY" 
      decimalPrecision="0" suppressZeroes="true" exchangeRateType="E" formula="" isIntercompany="0" 
      planBy="DELTA" timeRollup="LAST" timeWeightAcctId="" levelDimRollup="SUM" levelDimWeightAcctId="" rollupText="" 
      startExpanded="true" hasSalaryDetail="" dataPrivacy="PRIVATE" isBreakbackEligible="" subType="CUMULATIVE" enableActuals="true">
        <account id="1610" code="LocalCashAssets" name="Local Cash Assets" shortName="" description="cash assets" displayAs="CURRENCY" 
        decimalPrecision="0" suppressZeroes="true" exchangeRateType="E" formula="" isIntercompany="0" planBy="DELTA" timeRollup="LAST" 
        timeWeightAcctId="" levelDimRollup="SUM" levelDimWeightAcctId="" rollupText="" startExpanded="true" hasSalaryDetail="" 
        dataPrivacy="PRIVATE" isBreakbackEligible="" subType="CUMULATIVE" enableActuals="true">
        </account>
      </accounts>
    </output>
  </response>

output element

Tag Name

output

Attributes of the Element

(none)

Contents of the Element

A single required accounts element. This output wrapper is standard on all API responses and encloses the valid output of any successful API call.

 

accounts element

Tag Name

accounts

Description

Container for one or more account elements.

Attributes of the Element

Attribute Name

Required?

Value

Example

Contents of the Element

One or more account elements.

 

account element

Tag Name

account

Description

Represents a single account being returned in the response to an updateAccounts API call. If this element is directly within the enclosing accounts element of the response (that is, it is not enclosed within another account element), this account element represents a root account (an account that has no parent).

Attributes of the Element

Attribute Name

Required?

Value

Example

id Y The internal system ID number for the account. This can be used to identify accounts in other API calls, such as exportDimensionFamilies. 16
code Y The code of the account, as it appears when referenced in formulas. Cur_Assets

name

Y

The name of the account, as it appears on reports and sheets.

Current
Assets

accountTypeCode

N

The letter code corresponding to the data type of this account

 

Type Code

Account Type

Account Class

A

Asset

GL

B

Current Asset

GL

C

Liability & Equity

GL

CUBE

Cube

Cube

EN

YTD Earnings/Loss

GL

F

Fixed Asset

GL

G

Cost of Goods Sold

GL

I

Income

GL

J

Non-Operating Income

GL

K

Cumulative Translation Adjustment

System

L

Liability

GL

M

Current Liability

GL

MI

Consolidation Percentages

Predefined

MT

Metric

Metric

N

Net Income

GL

O

Other Asset

GL

Q

Equity

GL

R

Long Term Asset

GL

S

Assumption

Assumption

T

Long Term Liability

GL

W

Modeled

Modeled

X

Expense

GL

XR

Exchange Rate

Predefined

Y

Non-Operating Expenses

GL

Z

Custom

Custom

description

N

The textual description of the account, if any, as entered in Account Administration

Total
current assets

shortName

N

The short name for the account, if any, as entered in Account Administration

CA

timeStratum

N The code of the time stratum of the account. For modeled and cube accounts, this is inherited from the account's owning sheet. Month

displayAs

N

The account's output display setting: NUMBER, CURRENCY, or PERCENT. Only provided for accounts that have a Display As property in Account Administration.

NUMBER

isAssumption

N

Either "0" or "1", indicating whether the account is an assumption. This is set to “1” for assumptions and exchange rate accounts.

1

suppressZeroes

N

Indicates whether the account allows users to suppress zeros on sheets. If 0 users cannot suppress zeros. If 1 users can suppress zeros. Only provided for accounts with the "Suppress on sheets" property turned on in the Accounts admin.

1

isDefaultRoot

N

Either "0" or "1", indicating whether the account or account group is a default root.

1

decimalPrecision

N

Number of decimal places to display for numbers in this account.

The special value of 99 indicates a Linked Account which inherits the decimal precision of its target. The value -1 indicates the account is a currency account and uses the precision of the currency it displays.

Allowed values: -1, 0, 1-9, 99

Default is 0.

0

planBy

N

For Cumulative accounts, indicates whether the account is plan by balance (BALANCE) or plan by delta (DELTA).

BALANCE

exchangeRateType

N

Only present for accounts with displayAs="CURERENCY". Possible values: any of the exchange rate type codes present in the instance, as configured in Manage Currencies. "A"=Monthly Average, "E"=End of Month.

E

balanceType

N

Indicates the balance type of an account, DEBIT or CREDIT. This attribute is empty if the account does not have an associated balance type. Only GL accounts have a balance type.

DEBIT

dataEntryType

N

List of possible values: STANDARD, CUBE, MIXED, or empty. An empty value indicates data entry type is not applicable for the account.

STANDARD

timeRollUp

N

Indicates how the account behaves when rolled up over a time period. Can be SUM, WEIGHTED_AVERAGE, LAST, or AVERAGE. This will be empty for account groups and metric accounts.

SUM

timeWeightAcctId

N

If this account has a timeRollup of WEIGHTED_AVERAGE, this will be the internal system id number of the account from where the weights are determined. This will be empty if no weight account exists or the account does not have a timeRollup of WEIGHTED_AVERAGE.

133

hasSalaryDetail

N

Indicates whether this account has splits that require the Access Salary Detail permission for viewing. Empty if not applicable to this account.

1

dataPrivacy

N

Indicates the levels the account's values are public on and refrencable in other levels when writing formulas. PRIVATE indicates the account's values are private. PUBLIC_TOP indicates the account's values are public at only the top level, or PUBLIC_ALL so that the account's values are public at all levels. Assumptions are always public and do not have a dataPrivacy setting.

PRIVATE

subType

N

Indicates whether the account is PERIODIC or CUMULATIVE. If an account is periodic, its value in a given time period equals the net activity for the time period. Examples include revenue and expense accounts. If an account is cumulative, its value equals the ending balance for a given time period. This is the prior time period’s value plus or minus any activity in the given time period. Balance sheet accounts are cumulative. This will be empty for account groups and metric accounts.

PERIODIC

startExpanded

N

This indicates whether an account and its children start out in an expanded state when first loading a sheet. This applies only for parent accounts. This will be empty for leaf accounts.

1

isBreakbackEligible

N

Either 0 or 1 to indicate whether this account can be used in a breakback. This applies only to standard assumptions. This will be empty for other types of accounts.

0

levelDimRollup

N

Indicates how the account behaves when rolled up along a level or dimension. Can be SUM, WEIGHTED_AVERAGE, TEXT, or NONBLANK_AVERAGE. This will be empty for account groups and metric accounts.

NONBLANK_AVERAGE

levelDimWeightAcctId

N

If this account has a levelDimRollup of WEIGHTED_AVERAGE, this will be the internal system id number of the account from where the weights are determined. This will be empty if no weight account exists or the account's levelDimRollup is not WEIGHTED_AVERAGE.

118

rollupText

N

If this account has a levelDimRollup of TEXT, then this is the text string that will show up in the cell indicating the rolled up value of the account.

None

enableActuals

N

0 to show only plan data for the account. 1 to import actuals into the account. For linked accounts, 0 will show actuals only if the linked account has them, and 1 will enable actuals for the linked account. This will be empty for account groups and metric accounts.

1

isGroup

Y

0 or 1 to indicate whether this is an account group or not.

1

isIntercompany

N

0 or 1 to indicate whether this account is an intercompany account or not.

1

isLinked

N

0 or 1 to indicate whether this account is a linked account or not.

1

isSystem

N

0 or 1 to indicate whether this account is a system account or not.

1

status Y

The status of the account following update. For warning and error, the message element contains the message contents. The status of updated does not return any message contents.

  • Error: An error was found in the entity 
  • Warning: A warning was found in the entity
  • Created: The entity was created successfully
  • Updated: The entity was updated successfully
Updated
message N The error message for the account input. The account ModAccount33 is either duplicated in the payload or already exists in the system with ID 8

Contents of the Element

One nested account element for each direct child account of this account.
One attributes element if account has one or more attributes associated with it.

 

attribute element

Tag Name

attribute

Description

Indicates the attribute tagging for the account.

Attributes of the Element

Attribute Name

Required?

Value

Example

name

Y

The name of the account attribute

Education Type

value

Y

The value of the account attribute.

Tech1

status Y

The status of the attribute following update. For warning and error, the message element contains the message contents. The status of updated does not return any message contents.

  • Error: An error was found in the entity 
  • Warning: A warning was found in the entity
  • Created: The account was tagged with an attribute successfully for the first time.
  • Updated: The account attribute tag was updated successfully
updated
message N The error message for an invalid attribute input.  

Contents of the Element

(none)

 

Error and Warning Message Descriptions 

 

  • Was this article helpful?