Updates an account's account code and optionally its description, preserving the previous code in the account's code history
Use this endpoint when an account’s code changes (e.g., the vendor assigns a new account number). The previous account code
is stored in the account’s code history with an end date, allowing users to search by old account codes.
If the new account code matches the current code, no changes are made. Optionally updates the account info/description as well.
This is different from the general EditAccount endpoint because it specifically manages account code versioning with history tracking.
Request Headers
| Header | Value | Required | Description |
|---|---|---|---|
| ECI-ApiKey | string | Yes | Your API key. See Authentication. |
| Content-Type | application/json | Yes | All requests must specify JSON content type, including the request body. |
Path Parameters
| Name | Description | Type | Required |
|---|---|---|---|
| accountId | The unique numeric identifier of the account whose code is being versioned | integer (int32) | Required |
Request Body
AccountCodeHistoryRequest
| Property | Description | Type |
|---|---|---|
| codeChangeDate | Date that the account code was changed Required (defined) | string (date-time) |
| newAccountCode | Account code that will replace the existing one Required Must be between 0 and 50 characters | string |
| newAccountInfo | Account info that can replace the existing info Must be between 0 and 50 characters Required (defined) | string |
Example Request Body
{ "codeChangeDate": "2026-06-29", "newAccountCode": "string", "newAccountInfo": "string"
}
Responses
200
OK
The request succeeded and the response body contains the requested data.
Response Body Parameters
AccountCodeHistoryResponse
| Property | Description | Type | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| accountCode | Account code of the account Required (defined) | string | |||||||||
| accountCodeHistory | AccountCodeHistoryChild | ||||||||||
|
AccountCodeHistoryChild properties
|
|||||||||||
| accountId | Account identifier Required (defined) | integer (int32) | |||||||||
| accountInfo | Name of the account Required (defined) | string | |||||||||
Example Response
{ "accountCode": "string", "accountCodeHistory": { "endDate": "2026-06-29", "previousAccountCode": "string"
}, "accountId": 1, "accountInfo": "string"
}
404
Not Found
The requested resource was not found. Verify the ID or path is correct.