Update a ledger account
Changes a ledger account's name, parent group, active flag or report group. Its code, account type and currency cannot be changed after creation, and reclassifying does not affect child accounts.
How to use it
- Find the account ID with List ledger accounts.
- Send only what changes: name, active, reportGroup (must suit the account type) or a new parentId (a group account of the same type).
- Code, type and currency stay fixed; reclassifying an account does not change its children.
BearerAuthAuthorizationBearer <JWT>id*stringID of the record (UUID).
uuidX-TenantID*stringYour merchant's tenant code — the value typed in the Domain field on the iotoms login screen. See Concepts.
application/json- body
name?|New display name. Omit to keep the current name; blank is rejected.
parentId?|Move the account under this group account. The parent must be a group of the same type, and an account cannot be moved under itself or its own children.
uuidactive?|Set false to deactivate the account or true to reactivate it. Omit to leave unchanged.
reportGroup?|Reclassify the account, e.g. mark a new bank account as CASH_AND_BANK. Must suit the account type; child accounts are not changed.
"DIRECT_INCOME""INDIRECT_INCOME""DIRECT_EXPENSE""INDIRECT_EXPENSE""CURRENT_ASSET""CASH_AND_BANK""RECEIVABLE""FIXED_ASSET""CURRENT_LIABILITY""PAYABLE""LONG_TERM_LIABILITY""EQUITY"nullOK
*/*- response
status*stringOutcome of the call: SUCCESS when the request was processed; otherwise an error status.
message*stringShort human-readable message describing the outcome, e.g. which record was saved or why the call failed.
data?The ledger account after the call.
curl -X PUT 'https://beta.iotoms.com/api/v1/accounting/accounts/497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'X-TenantID: your-tenant-code' \ -H 'Content-Type: application/json' \ -d '{}'{ "status": "string", "message": "string", "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "code": "string", "name": "string", "type": "ASSET", "reportGroup": "DIRECT_INCOME", "parentId": "70850378-7d3c-4f45-91b7-942d4dfbbd43", "currency": "string", "isGroup": true, "isControl": true, "active": true, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }}