Skip to main content
PUT
cURL

Integration Notes

  1. Role Management: This endpoint specifically handles user role assignments within an organization.
  2. Complete Replacement: The access_roles array completely replaces the user’s current roles.
  3. Role Validation: Invalid roles (not in the allowed list) will cause the request to fail with a 400 error.
  4. Authorization: Requires update:user scope to modify user roles.
  5. Request ID: Always log the requestId for 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

  1. Required Field: access_roles is required and must be an array
  2. Non-Empty Array: access_roles must contain at least one role (cannot be empty)
  3. 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

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-organization-secret
string
required

Organization secret for authentication - provided by Parchment

Path Parameters

organization_id
string<uuid>
required

Organization ID

user_id
string<uuid>
required

User ID

Body

application/json

User roles data to update in Parchment

User roles update request

access_roles
enum<string>[]
required

Array of roles to assign to the user

Valid user roles. Note: owner, support, and member roles cannot be assigned via API.

Available options:
admin,
provider,
receptionist,
rx_reader,
rx_queue_manager
Example:

Response

User roles updated successfully

success
boolean
required

Indicates if the request was successful

Example:

true

statusCode
integer
required

HTTP status code

Example:

200

message
string
required

Human-readable success message

Example:

"User roles updated successfully"

data
object
required

User roles update response data

timestamp
string<date-time>
required

ISO 8601 timestamp of the response

Example:

"2024-01-15T10:30:00.000Z"

requestId
string
required

Unique identifier for request tracing

Example:

"req_1705312200000_abc123"

code
string

Machine-readable operation code

Example:

"SUCCESS"

pagination
object

Pagination information for list operations