This resource allows for administrative tasks to be performed on users via the API.

Supported Formats

json

GET /api/admin/users
Get a list of users.

Returns a paginated list of all users in the database.

Supported Formats

json

Examples

[{"_id":"53bab4134d4d31c98d0a0000","admin":null,"agree_license":null,"approved":false,"company":"","company_url":"","disabled":false,"effective_date":null,"email":"email@email.com","first_name":"fname","last_name":"lname","npi":"","registry_id":"","registry_name":"","staff_role":true,"tin":"","username":"user"}]

Params

Param name Description
page
optional

Validations:

  • Must match regular expression /\d+/.

per_page
optional

Validations:

  • Must match regular expression /\d+/.


POST /api/admin/users/:id/promote
Promote a user to provided role.

Supported Formats

json

Params

Param name Description
id
required

The ID of the user to promote.

Validations:

  • Must be a String

role
required

The role to promote the user to, for example staff_role or admin.

Validations:

  • Must be a String


POST /api/admin/users/:id/demote
Demote a user from provided role.

Supported Formats

json

Params

Param name Description
id
required

The ID of the user to demote.

Validations:

  • Must be a String

role
required

The role to demote the user from, for example staff_role or admin.

Validations:

  • Must be a String


GET /api/admin/users/:id/enable
Enable a users account.

Supported Formats

json

Params

Param name Description
id
required

The ID of the user to enable.

Validations:

  • Must be a String


GET /api/admin/users/:id/disable
Disable a users account.

Supported Formats

json

Params

Param name Description
id
required

The ID of the user to disable.

Validations:

  • Must be a String


GET /api/admin/users/:id/approve
Approve a users account.

Supported Formats

json

Params

Param name Description
id
required

The ID of the user to approve.

Validations:

  • Must be a String


POST /api/admin/users/:id/update_npi
Update users associated NPI.

Supported Formats

json

Params

Param name Description
id
required

The ID of the user to update.

Validations:

  • Must be a String

npi
required

The new NPI to assign the user to.

Validations:

  • Must be a String