Skip to main content

Reseller Edit User API

POST /resellerEditUser

Description

This API endpoint allows a reseller to edit and update the details of an existing user within their assigned group. The reseller can update both account settings, such as password and group ID, and personal profile information.

Request Body

The request utilizes GraphQL to perform the resellerEditUser mutation.

Mutation:

mutation resellerEditUser ($id: Int!, $resellerUserEdit: ResellerUserEdit) {
resellerEditUser (id: $id, resellerUserEdit: $resellerUserEdit) {
id
email
username
resellerId
role
enabled
radAccess
radAccessClear
createdAt
updatedAt
}
}

Variables:

{
"id": 0,
"resellerUserEdit": {
"password": "<User_Password>",
"resellerId": 0,
"groupId": 0,
"multiLoginCount": 0,
"userProfileEdit": {
"firstName": "<First_Name>",
"lastName": "<Last_Name>",
"phone": "<Phone_Number>",
"address": "<Address>",
"city": "<City>",
"country": "<Country>",
"postalCode": "<Postal_Code>",
"birthDate": "<YYYY-MM-DD>"
}
}
}
  • id (Int): The unique identifier of the user being edited.
  • resellerUserEdit (ResellerUserEdit Object): An object containing the updated user details.
    • password (String): The updated password for the user's account.
    • resellerId (Int): The updated ID of the reseller associated with the user.
    • groupId (Int): The updated ID of the group the user belongs to.
    • multiLoginCount (Int): The updated number of simultaneous logins allowed for the user.
    • userProfileEdit (UserProfileEdit Object): An object containing the updated profile details for the user.
      • firstName (String): The updated first name of the user.
      • lastName (String): The updated last name of the user.
      • phone (String): The updated phone number of the user.
      • address (String): The updated street address of the user.
      • city (String): The updated city where the user resides.
      • country (String): The updated country where the user resides.
      • postalCode (String): The updated postal code for the user's address.
      • birthDate (String): The updated birth date of the user in YYYY-MM-DD format.

Response:

  • Success (200 OK):

    • If the user update is successful, the response will return the updated details of the user, including their ID, email, username, and other attributes.
    {
    "data": {
    "resellerEditUser": {
    "id": "<User_ID>",
    "email": "<User_Email>",
    "username": "<Username>",
    "resellerId": "<Reseller_ID>",
    "role": "<User_Role>",
    "enabled": "<Enabled_Status>",
    "radAccess": "<Rad_Access>",
    "radAccessClear": "<Rad_Access_Clear>",
    "createdAt": "<Creation_Timestamp>",
    "updatedAt": "<Update_Timestamp>"
    }
    }
    }
  • Error (4XX/5XX):

    • Appropriate error messages and status codes will be returned in cases of invalid data, missing required fields, or server errors.

Note:

Ensure that the id corresponds to an existing user within the reseller's group and that the resellerUserEdit object contains valid and correctly formatted data. This API should be used by resellers with the necessary permissions to manage and update user accounts within their assigned groups.