Updates the account's name and type. Both fields are required by this illustrative contract; the account ID and existing balance remain unchanged.
PATCH
/api/accounts/101Parameters
idinteger · path · required- The identifier of an existing account.
namestring · required- Unique without regard to case. Must contain 1–80 characters.
accountTypeenum · required- One of Asset, Liability, Equity, Revenue or Expense. Reporting currency is USD.
Returns
The updated account object, or a field-validation, missing-resource or duplicate-name error.
Response codes
- 200
- Updated account
- 400
- Invalid fields
- 404
- Unknown account
- 409
- Duplicate name
Illustrative API contract. Set $API_ORIGIN to your own backend; this example does not host these endpoints.