Updating a Dealer / Sub-Dealer User
- Endpoint:
/vendor/users - HTTP Method:
PUT - Request Content-Type:
application/json - Response Content-Type:
application/json - Authorization: Valid AccessToken is required. (See: 2. Authentication – Obtaining AccessToken)
Description
This service is used to update the information of an existing dealer or sub-dealer user. The user to be updated is identified by both DealerCode (dealer/sub-dealer code) and userCode (user code).
Note: This endpoint only updates user information. No changes are made to dealer or sub-dealer records.
Header Information
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Valid token in Bearer {AccessToken} format |
| Content-Type | Yes | application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| dealerCode | string | Yes | Dealer or sub-dealer member code to update |
| userCode | string | Yes | Code of the user to be updated |
| name | string | No | User first name |
| surname | string | No | User last name |
| string | No | User email address | |
| gsm | string | No | Mobile phone |
| isActive | boolean | No | Active/inactive status |
| sendRegisterMail | boolean | No | Whether to send notification email after update |
| tckn | string | No | Individual user TCKN |
| isAdmin | boolean | No | Whether the user has admin privileges |
| isMobileActive | boolean | No | Is mobile access active |
| ruleName | array(string) | No | Authorization set names (e.g., "ROLE_USER", "ROLE_MANAGER") |
- Example Request
- Successful Response
{
"DealerCode": "MD001",
"userCode": "USR1001",
"name": "John",
"surname": "Doe",
"email": "[email protected]",
"gsm": "+905000000000",
"isActive": true,
"sendRegisterMail": false,
"tckn": "00000000000",
"isAdmin": true,
"isMobileActive": true,
"ruleName": [
"ROLE_USER",
"ROLE_MANAGER"
]
}
{
"status": "success",
"message": "Dealer user has been successfully updated."
}
Notes & Best Practices
- dealerCode and userCode uniquely identify the user to be updated.
- It is recommended to send only the fields that need to be changed; otherwise, empty fields may overwrite existing data.
- The
ruleNamearray defines the user's authorization sets; it must exactly match the role names defined in the system. - If
sendRegisterMail = trueis sent, the system will send a notification email to the user. - If the token has expired, the request returns
401 Unauthorized; a new token must be obtained and the request retried.