Skip to main content
Adaptive Planning
Last Updated: 2023-06-23
Accounts

Accounts

Version: v1

Supported HTTP VERB(s)

HTTP Verb
Description
POST
Delete the accounts mentioned in the request.

POST:

Request:
/removeGLAccounts:
Deletes the accounts for the given GL account codes.
This endpoint is behind the "
ENABLE_ACCOUNTS_DELETION_JSON_API
" (currently ON by default) feature flag.
Supports all GL accounts that can be deleted in the UI. Ignores accounts which cannot be deleted.
Sample Request URI:
https://api.adaptiveplanning.com/api/rest/modeling/v1/globosales/accounts/removeGLAccounts
Sample Request Header:
Authorization: Basic
Content-Type: application/json
Sample Request Body
Sample POST Request
[ { "accountCodesToDelete": ["Assets", "b"] } ]
Payload Parameters
Name
Description
Required
accountCodesToDelete
Account Codes to be deleted name.
Y
Path Parameter
Name
Description
Required
tenant
Tenant to operate on. e.g. globosales
Y
Query Parameters
Name
Description
Required
forceRemove
Deletes in-use accounts when forceRemove=true and ignores in-use accounts when forceRemove=false.
Default is always forceRemove=false.
N
instanceCode
The instanceCode to retrieve values from. For example, GLOBO. If no instanceCode is specified, the default insantce of the user is used.
N
Sample Response:
204 No Content
Successful response is blank with status code 204.
400 Bad Request
The request could not be understood by the server.
401 Unauthorized
User is not authorized.
403 Forbidden
User has insufficient permissions.
500 Internal Server Error
Internal Server Error.

POST:

Request:
/removeAccounts
Deletes the accounts for the given GL account codes.
This endpoint is behind the "
ENABLE_ACCOUNTS_DELETION_JSON_API_2
" (currently OFF by default) feature flag.
Supports all accounts that can be deleted in the UI. Ignores accounts which cannot be deleted, and can provide optional warnings.
Sample Request URI:
https://api.adaptiveplanning.com/api/rest/modeling/v1/globosales/accounts/removeAccounts
Sample Request Header:
Authorization: Basic
Content-Type: application/json
Sample Request Body
Sample POST Request
{ "accountCodesToDelete": ["Assets", "b"] }
Payload Parameters
Name
Description
Required
accountCodesToDelete
Account Codes to be deleted name.
Y
Path Parameter
Name
Description
Required
tenant
Tenant to operate on. e.g. globosales
Y
Query Parameters
Name
Description
Default
Required
forceRemove
Deletes in-use accounts.
false
N
showWarnings
Shows warnings in response.
false
N
doValidateOnly
Enables validation mode.
false
N
Warnings
account-deletion-warning=Some accounts were not deleted.
warning-default-root=Default root account cannot be deleted.
warning-sheet-root=Sheet root group cannot be deleted.
warning-cta-account=Cumulative Translation Adjustment account cannot be deleted.
warning-in-use=In-use account cannot be deleted because forceRemove is set to OFF.
warning-cannot_delete_mi_system_account=Minority Interest System account cannot be deleted. It is used in the calculation of minority interest for the Full Consolidation method.
warning-cannot_delete_mi_net_income_account=Minority Interest Net Income account cannot be deleted. It is used in the calculation of minority interest for the Full Consolidation method.
warning-cannot_delete_mi_account_ancestor=The account cannot be deleted because one of its descendant accounts is used in the calculation of minority interest for the Full Consolidation method.
warning-delete_child_used_in_breakback-msg=The account cannot be deleted as this account or one of its descendants is used in Auto Breakback.
warning-cannot_delete_pcm_account=Use the Planning Configuration Manager to delete this account.
warning-nonexistent-code=This account does not exist.
warning-ambiguous-code=This code is shared by multiple accounts.
Sample Response:
200 OK
{ "total": 0 }
200 OK (with warnings)
{ "total": 0, "warning": { "info": "Some accounts were not deleted.", "warnings": [ { "field": "xyz", "warning": "This account does not exist." } ] } }
400 Bad Request
The request could not be understood by the server.
401 Unauthorized
User is not authorized.
403 Forbidden
User has insufficient permissions / feature flag is OFF.
{ "error": "Service Unavailable" }
500 Internal Server Error
Internal Server Error.