User Update Info

Update an existing user's profile and contact information in the Treasury system. This endpoint verifies that any updated fields do not conflict with existing records.

Update User Info

PATCH /user/info

Headers

Header / TypeConditionDescription
Authorizationstring
required
Bearer token retrieved from the Authentication endpoint.
X-User-Idstring
optional-when
X-Partner-User-Id
Unique user identifier from Treasury.
X-Partner-User-Idstring
optional-when
X-User-Id
Your internal user identifier.

JSON Body

Field / TypeConditionDescription
namestring
optional
Full name of the user.
genderstring enum
optional
The gender of the user. Value: male or female.
email_addressstring
optional
Unique email address of the user.
phone_numberstring
optional
Contact phone number for the user.
partner_user_idstring
optional
User ID from partner's side.
ℹ️

Note: All request body fields are optional, but at least one field must be provided in the request to perform an update.

Example Request

json
{
  "name"           : "andy",
  "gender"         : "male",
  "email_address"  : "[email protected]",
  "phone_number"   : "0812345678901",
  "partner_user_id": "pru-01"
}

Response

Sample Response (200 OK)

Returned when the user information is successfully updated with the newly provided values in the system:

json
{
  "code"   : 200,
  "message": "success"
}

Sample Response (202 Accepted)

Returned when the request is successfully accepted, but no database updates are performed because all provided fields match the user's current values in the system:

json
{
  "code"    : 202,
  "sub_code": "no_update",
  "message" : "no update will be performed"
}