Updating a Current Account
- Endpoint:
/vendor/currentAccount - HTTP Method:
PUT - Request Content-Type:
application/json - Response Content-Type:
application/json - Authorization: Valid AccessToken is required. (See: 2. Authentication – Obtaining AccessToken)
Description
Through this service, the information of an existing current account in the system can be updated.
The record to be updated is identified by the updateCode field.
Note: The code field can be changed during the process. This allows assigning a new code to the current account as a result of the update.
Header Information
| Header Name | Required | Description |
|---|---|---|
| Authorization | Yes | Valid token in Bearer {AccessToken} format |
| Content-Type | Yes | application/json |
Request Body
| Field Name | Type | Required | Description |
|---|---|---|---|
| updateCode | string | Yes | Current code of the account to be updated (must exist in the system). |
| code | string | Yes | New code for the current account (can be the same or different from the current code). |
| currencyCode | string | No | Currency code (e.g., "TRY", "USD"). |
| currentAccountType | string | No | Current account type (e.g., "Customer", "Supplier", "Dealer"). |
| customerOrDealerCode | string | No | Code of the customer or dealer the account belongs to. |
| description | string | No | Description of the current account. |
| erpCode | string | No | Current account code in the ERP system. |
| isVisibleOnPayment | boolean | No | Should it be visible on payment screens? (default: false). |
| accountName | string | No | Name of the current account. |
| taxNumber | string | No | Tax number (for company accounts). |
| tcknNumber | string | No | National ID number (for individual accounts). |
| title | string | No | Title of the current account. |
- Example Request
- Successful Response
{
"updateCode": "CA-001",
"code": "CA-002",
"currencyCode": "EUR",
"currentAccountType": "Customer",
"customerOrDealerCode": "CUST-456",
"description": "European Customer Current Account",
"erpCode": "ERP-ACC-999",
"isVisibleOnPayment": false,
"accountName": "XYZ Trade Account",
"taxNumber": "00000000000",
"tcknNumber": null,
"title": "VIP Customer"
}
{
"isSuccess": true,
"message": "Current account updated successfully."
}
Notes & Best Practices
updateCodeidentifies the existing record; thecodefield specifies the new value after the update.- The
erpCodevalue must be unique system-wide. The same ERP code cannot be used for multiple accounts. - If
currencyCodeorcurrentAccountTypeis left empty, the existing value is preserved. - Fields sent as
nullcan clear the corresponding value in the system — use with caution. - If the token has expired, the request returns
401 Unauthorized; obtain a new token and resend.