createAccount
Category
| Metadata modification |
Description
| Create an account in the system. This API either returns an error message when
validation or creation fails, or it returns metadata for the created account upon
success. This API supports only the following account types: Assumption, GL Account,
and Custom Account. It does not support system or linked accounts. |
Permissions Required To Invoke
| Model for GL and Custom account. Assumptions for Assumptions. |
Parameters Required On Request
| Credentials |
This method's request contains a credentials tag to identify and authorize the calling user.
User must have Model or Assumptions permission to perform the account creation. The XML
request is validated for each field and against certain business logic. Error messages are
returned as part of the response when the creation fails. The operation may be halted and a
warning message provided when a risky operation (one that would potentially have unexpected
side effects on other accounts or data) is detected; in which case, the request needs to be
resubmitted with the attribute "ignoreWarnings" set to 1 in order to complete the account
creation.
Request Format
The request schema is provided in the Relax NG Compact format.
default namespace = "" start = element account { attribute parentId { xsd:integer }, #id of the parent account the new account should roll up to attribute name { xsd:string { maxLength="2048" minLength="1"} }, #Non-empty string with a maximum length of 2048 characters. attribute isGroup { string "0" | string "1" }, #0=No, 1=Yes attribute code { xsd:string { maxLength="2048"} }, #String with a maximum length of 2048 characters. attribute description { xsd:string { maxLength="2048"} }?, #Potentially empty string with a maximum length of 2048 characters. attribute shortName { xsd:string { maxLength="64"} }?, #Potentially empty string with a maximum length of 64 characters. attribute exchangeRateType { xsd:string }?, #displayAs must be CURRENCY (only if multicurrency is enabled) attribute hasSalaryDetail { string "0" | string "1" }?, #0=No, 1=Yes attribute dataPrivacy { string "PRIVATE" | string "PUBLIC_TOP" | string "PUBLIC_ALL" }?, attribute isBreakbackEligible { string "0" | string "1" }?, #0=No, 1=Yes attribute proceedWithWarnings { string "0" | string "1" }?, #0=No, 1=Yes element attributes{ element attribute{ attribute attributeId{ xsd:integer }, attribute valueId{ xsd:integer } }* }? }
Example
<?xml version='1.0' encoding='UTF-8'?> <call method="createAccount" callerName="a string that identifies your client application"> <credentials login="sampleuser@company.com" password="my_pwd"/> <account parentId="441" isGroup="0" name="Account Name" code="Account_Code" description="Account Description" shortName="Short Name" exchangeRateType="A" hasSalaryDetail="1" dataPrivacy="PRIVATE" > <attributes> <attribute attributeId="20" valueId="170" /> </attributes> </account> </call>
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 the
required permissions to invoke the method. | 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) | |||
account element
| |||
Tag Name
| account | ||
Description
| Specifies an account to create. | ||
Attributes of the Element
| |||
Attribute Name
| Required?
| Value
| Example
|
parentId | Y | The internal system ID number for the account's
roll-up-to account. | 16 |
name | Y | The name of the account, as it appears on reports
and sheets. | Current Assets |
isGroup | Y | Whether to create an account group, 0 for no, 1
for yes. | 1 |
code | N | The code of the account, alphanumeric characters
and underscores only. Must be empty or not supplied if creating an account
group. | Cur_Assets |
description | N | The textual description of the account. Defaults
to empty string. | Total current assets |
shortName | N | The short name for the account. Defaults to empty
string. | CA |
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. Inherits from parent if not set.
If multicurrency is disabled or parent doesn't have an exchangeRateType, this
defaults to E for cumulative accounts and A for everything else. | E |
hasSalaryDetail | N | Viewing splits of account requires salary detail
permission. 0 for no, 1 for yes. Inherits from parent if not set, or if parent does
not have hasSalaryDetail, this default to 0. | 1 |
dataPrivacy | N | Choose whether the value of account is private
(PRIVATE), public at top level only (PUBLIC_TOP) or public at all levels
(PUBLIC_ALL). This defaults to PRIVATE. | PRIVATE |
isBreakbackEligible | N | Available as a weighting choice in breakback. 0
for no, 1 for yes. Applicable only for assumptions. This defaults to 0. | 0 |
proceedWithWarnings | N | Indicates whether the user wants to ignore warning
messages and go ahead with the create operation. 0 for no, 1 for yes. If there are
warnings and proceedWithWarnings=0, then the account will not be created. Set
proceedWithWarnings=1 to create the account when there are warnings. | 1 |
Contents of the Element
| |||
One optional attributes element if you want to add
one or more account attributes associated with the account. | |||
attributes element
| |||
Tag Name
| attributes | ||
Description
| Container for one or more account attribute
elements. | ||
Attributes of the Element
| |||
Attribute Name
| Required?
| Value
| Example
|
(none) | |||
Contents of the Element
| |||
One or more
attribute elements. | |||
attribute element
| |||
Tag Name
| attribute | ||
Description
| Represents one account attribute element. | ||
Attributes of the Element
| |||
Attribute Name
| Required?
| Value
| Example
|
attributeID | Y | The ID of the account attribute that was generated by the system. | 20 |
valueID | Y | The unique ID of the account attribute value that was generated by the system.
If this value is 0, then this attribute will be removed from the account. | 170 |
Contents of the Element
| |||
none | |||
Response Format
These are examples of responses for successful and unsuccessful creating of an account.
Success Example
<?xml version='1.0' encoding='UTF-8'?> <response success="true"> <messages> <message type="WARNING" key="warning-unpublished-changes" values="" parentId="1">You have unpublished changes. Your changes will not be visible every where until it is published.</message> </messages> <output> <accounts> <account id="1" code="AssetsChild" name="AssetsChild" timeStratum="month" description="Total Assets Child" displayAs="CURRENCY" accountTypeCode="A" decimalPrecision="0" isAssumption="0" suppressZeroes="1" isDefaultRoot="1" shortName="" exchangeRateType="E" balanceType="DEBIT" formula="" isLinked="0" owningSheetId="" isSystem="0" isIntercompany="0" dataEntryType="" planBy="DELTA" timeRollup="LAST" timeWeightAcctId="" levelDimRollup="SUM" levelDimWeightAcctId="" rollupText="" startExpanded="1" hasSalaryDetail="" dataPrivacy="PRIVATE" isBreakbackEligible="" subType="CUMULATIVE" enableActuals="1" isGroup="0" /> </accounts> </output> </response>
Error Example
<?xml version='1.0' encoding='UTF-8'?> <response success="false"> <messages> <message type="ERROR" key="invalid-attributevalueid" values="-50" parentId="-50">Invalid account id: "-50"</message> </messages> </response>
response element
| |||
Tag Name
| response | ||
Attributes of the Element
| |||
Attribute Name
| Required?
| Value
| Example
|
success | Y | Either true or
false, indicating whether the API call was
successful or not. Even successful calls may contain warning messages in their
response. | true |
Contents of the Element
| |||
A single optional
messages element and/or a single optional
output element. | |||
output element
| |||
Tag Name
| output | ||
Attributes of the Element
| |||
(none) | |||
Contents of the Element
| |||
A single accounts element. This
output wrapper is standard on all API responses
and encloses the valid output of any successful API call. | |||
messages element
| |||
Tag Name
| messages | ||
Description
| Container for one or more
message elements. | ||
Attributes of the Element
| |||
(none) | |||
Contents of the Element
| |||
One or more
message elements. | |||
message element
| |||
Tag Name
| message | ||
Description
| Represents a message being sent from the system
back to the caller. Messages are used for error messages when requests do not
succeed, for warning messages when requests do succeed, and for confirmation
messages upon success. | ||
Attributes of the Element
| |||
Attribute Name
| Required?
| Value
| Example
|
type | Y | Type is a way to identify the type of message. The different types are INFO,
WARNING and ERROR. Type ERROR means that this request was not processed. | WARNING |
key | Y | A key is a way to identify a particular message or type of message, useful for
purposes of automated error logging and recovery in client programs. Keys do not
change under different locales of requests, even when the language of the message
changes. Keys also are unlikely to change in the future due to wording adjustments
or terminology changes. | warning-invalid-timespan-start |
values | N | When given, the values represent variables used in the message text. | 199,12 |
parentId | N | When available, the ID of the new account's parent that was supplied in the
request. | 50 |
Contents of the Element
| |||
The text of the message. This text is in the
language of the locale specified on the request (assuming that locale is supported).
The text may also contain variable information such as the number of rows which were
processed, or the particular column or value that caused an error. | |||
accounts element
| |||
Tag Name
| accounts | ||
Description
| Container for one or more
account elements. | ||
Attributes of the Element
| |||
(none) | |||
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 exportAccounts 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 which has no
parent. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Attributes of the Element
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Attribute Name
| Required?
| Value
| Example
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name | Y | The name of the account, as it appears on reports
and sheets. | Current Assets | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
code | Y | The code of the account, as it appears when
referenced in formulas. | Cur_Assets | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | N | The internal system ID number for the account.
This can be used to identify accounts in other API calls, such as
exportDimensionFamilies. | 16 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
accountTypeCode | N | The letter code corresponding to the data type of
this account.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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 Supported in API v16 + | N | The time stratum of the account, as the code of
the time stratum. For Cube accounts, Modeled accounts, and cube-entered GL accounts,
the time stratum is determined by the time stratum of their owning sheet. All other
accounts use the default time stratum set within the Time Admin UI. | 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 | Flag indicating whether the account allows users
to suppress zeroes on sheets or not. 0 is disallowed, 1 is allowed. Only provided
for accounts that have a Suppress Zeroes property in Account Administration. | 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. Default is 0. The special value of 99 is used to indicate a Linked
Account that inherits the decimal precision of its target. A value of -1 means the
account is a currency account and uses the precision of whichever currency it is
displaying. | 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 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
isImportable | N | Indicates whether the account is able to accept
imported data. 0 means the account is not
importable and 1 is importable. Only present
if versionName or
versionId is specified in the
request. Note: isImportable only
indicates that an account is available for import in the specified version, not
that the user making the API call has the permission to import into the version or
account. Use exportVersions to see which
versions are available to the user for import. | 1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
isContra Available in API v34+ | N | Either 0 or 1 to indicate whether this account is Contra or not. | 1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
dataEntryType | N | Indicates the data entry type of an account.
Either STANDARD or CUBE. A blank value indicates that data entry type is not
applicable to an account. For example, a linked account or a modeled account will
have a blank data entry type. | CUBE | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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 | Either 0 or 1 to indicate whether this account has
splits that require the Access Salary Detail permission to be viewed. This will be
empty if not applicable to this account. | 1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
dataPrivacy | N | Indicates which levels the account's values are
public on and able to be referenced in other levels when writing formulas. Can be
PRIVATE so that the account's values are private, PUBLIC_TOP so that 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 do not have a dataPrivacy setting since they
are always public. | PRIVATE | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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. | 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 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
formula | N | The formula for the account, if it has
one. | ACCT.Revenue - ACCT.Expenses | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
owningSheetId | N | For accounts that can be on modeled and cube
sheets, the internal system id number of the sheet that this account is on. This
will be empty if it is not such an account, or if it is such an account but is not
currently assigned to a sheet. | 17 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
attributes element
| |||
Tag Name
| attributes | ||
Description
| Container for one or more
attribute elements. | ||
Attributes of the Element
| |||
Attribute Name
| Required?
| Value
| Example
|
(none) | |||
Contents of the Element
| |||
One or more
attribute elements. | |||
attribute element
| |||
Tag Name
| attribute | ||
Description
| Represents a single non-blank account attribute
mapping to which an account is associated. | ||
Attributes of the Element
| |||
Attribute Name
| Required?
| Value
| Example
|
name | Y | The name of the account attribute. | SEC Reporting |
value | Y | The name of the account attribute associated with the account. | Yes |
attributeId | Y | The internal system ID number of the account attribute. | 10 |
valueId | Y | The internal system ID number of the account attribute value. | 108 |
Contents of the Element
| |||
None. | |||