PUT
/
security
/
merchantUsers
/
update
cURL
curl -X PUT "https://dev.api.onekhusa.com/sandbox/v1/security/merchantUsers/update" \
  --header "Authorization: Bearer your-jwt-token" \
  --header "Content-Type: application/json" \
  --header "Accept-Language: en" \
  -d '{
    "userId": "user-id-123",
    "merchantAccountNumber": 35253486,
    "firstName": "John",
    "lastName": "Phiri",
    "emailAddress": "john.phiri@example.com",
    "phoneNumber": "0881234567",
    "roleId": "MERC_ADMIN",
    "capturedBy": "admin@example.com"
  }'
"User account has been updated successfully"

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer Token, Where accessToken is the access token used to authenticate the request.

Headers

Accept-Language
string
default:en

Preferred language for the response

Body

application/json
userId
string
required

The unique identifier of the user to update

Example:

"user-id-123"

merchantAccountNumber
integer
required

The unique identifier of the merchant account

Example:

35253486

firstName
string
required

The updated first name of the user

Example:

"John"

lastName
string
required

The updated last name of the user

Example:

"Phiri"

emailAddress
string<email>
required

The updated email address of the user (only updated if email is not confirmed)

Example:

"john.phiri@example.com"

phoneNumber
string
required

The updated phone number of the user

Example:

"0881234567"

roleId
string
required

The unique identifier of the role to assign

Example:

"MERC_ADMIN"

capturedBy
string
required

The email address of the user performing the update

Example:

"admin@example.com"

Response

200 - application/json

Success - Merchant user updated successfully

Success message confirming the update

Example:

"User account has been updated successfully"