Enroll a user into a given service
Description
The EnrollUser() method is used to enroll a user given a service and (optionally) an organization.
Package Details
Interface
IServiceManager
Syntax
ServiceManager.EnrollUser( int userId, int serviceId, int? organizationId = null )
Returns
Task
API
[POST] /api/v1/services/{id}/enrolluser
Parameters
userId: User to enroll
serviceId: Service for which the user will be enrolled to
organizationId: The optional id of the organization
Returns
200 OK
Example
int myServiceId = 12345 int myOrganizationId = 323; _serviceManager.EnrollUser(CurrentUser.Id, myServiceId, myOrganizationId); // No organization _serviceManager.EnrollUser(CurrentUser.Id, myServiceId);