Update Admin
An overview of the Update Admins Endpoint
Endpoint Description
The "Update Admin" endpoint allows for modifications to an existing administrator's profile in the R1 Discover system. This functionality is essential for maintaining up-to-date administrator details and adjusting their program, location, and status assignments as necessary.
HTTP Method
PUT /api/v1/companies/{companyId}/admins/{adminId}
Headers
Content-Type:
application/json
- Specifies the media type of the request.Accept:
application/json
- Indicates that the response should be in JSON format.Authorization:
Bearer {token}
- A valid Bearer token is required to authenticate the request.
URL Parameters
companyId (integer): The identifier for the company under which the admin exists. This parameter must correspond to an existing company within the R1 Discover system. See Company List to get the IDs.
adminId (string): The unique identifier of the admin whose details are to be updated. This should match the admin ID provided during the creation or current record. See View Company Admins to get the list of IDs.
Body Parameters
admin_username (string, optional): The admin's username, if it needs to be updated. Must remain unique within R1 Discover. See Check Global Username Availability.
admin_email (string, optional): The admin's email address. Changes to this field must maintain the uniqueness across the platform.
admin_type (string, optional): Describes the role or type of the admin and indicates if User's can be aligned to them via the Practitioner assignment. Available options:
Practitioner: Access to manage and review user activities relevant to their programs. Only a practitioner can have users aligned to them.
Company Admin: Label for reporting, Admin Role sets permissions, see Permission Matrix.
Compliance Officer: Label for reporting, Admin Role sets permissions, see Permission Matrix.
Executive Team: Label for reporting, Admin Role sets permissions, see Permission Matrix.
Other: Label for reporting, Admin Role sets permissions, see Permission Matrix.
admin_location (string, optional): The primary location associated with the admin, used for managing which users an admin can access. See View Company Locations
admin_program (string, optional): The specific program associated with th admin, user for managing which users the admin can access. See View Company Programs.
admin_status (string, optional): The status of the admin, typically toggled between "active" and "inactive" based on operational needs.
Request Examples
curl --request GET \
--get "https://api.r1learning.com/api/v1/view-company-practitioners/1/1/50" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
Response Examples
{
"error": 0,
"message": "Admin updated successfully",
"data": ""
}
Notes
Authorization Required: Ensure the provided Bearer token is valid and has sufficient privileges to create an admin.
Data Validation: All body parameters must be correctly formatted and complete. The system will validate these parameters and reject requests with missing or invalid data.
Uniqueness Required: The
admin_id
,admin_username
andadmin_email
must be unique within the system to prevent conflicts.
Last updated