Update user roles
Updates the roles of a user in Parchment
Integration Notes
- Role Management: This endpoint specifically handles user role assignments within an organization.
- Complete Replacement: The
access_rolesarray completely replaces the user’s current roles. - Role Validation: Invalid roles (not in the allowed list) will cause the request to fail with a 400 error.
- Authorization: Requires
update:userscope to modify user roles. - Request ID: Always log the
requestIdfor debugging support requests.
Request
Update User Roles
Assign Single Role
Request Fields
Valid Roles
The following roles can be assigned via this API:rx_queue_manager requires provider identity details. Like provider, this role must be backed by a verified healthcare individual (HPI-I, date of birth, sex, qualifications). These details are captured when the user is created — see Create User. Assigning rx_queue_manager via this endpoint does not collect them, so only assign it to users created with the required identity fields; otherwise create the user with the role directly, or backfill the details via Update User provider_details.Validation Rules
- Required Field:
access_rolesis required and must be an array - Non-Empty Array:
access_rolesmust contain at least one role (cannot be empty) - Valid Roles: All roles must be from the supported roles list
Response
Success Response (200 OK)
Bad Request (400 Bad Request)
Invalid Roles
Empty After Filtering
User Not Found (404 Not Found)
Response Fields
Success Response Data
Common Response Fields
All responses include these standard fields:Status Codes
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Organization secret for authentication - provided by Parchment
Path Parameters
Organization ID
User ID
Body
User roles data to update in Parchment
User roles update request
Array of roles to assign to the user
Valid user roles. Note: owner, support, and member roles cannot be assigned via API.
admin, provider, receptionist, rx_reader, rx_queue_manager Response
User roles updated successfully
Indicates if the request was successful
true
HTTP status code
200
Human-readable success message
"User roles updated successfully"
User roles update response data
ISO 8601 timestamp of the response
"2024-01-15T10:30:00.000Z"
Unique identifier for request tracing
"req_1705312200000_abc123"
Machine-readable operation code
"SUCCESS"
Pagination information for list operations

