BokaMera.API.Host

<back to all web services

SuperAdminUpdateCompanyUser

Requires Authentication
Requires the role:superadmin
The following routes are available for this service:
PUT/superadmin/administrators/{Id}Update administrator on your companyIf you want to update a administrator to your company.
namespace BokaMera.API.ServiceModel.Dtos

open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type CompanyUserResource() = 
        ///<summary>
        ///The resource id
        ///</summary>
        [<ApiMember(Description="The resource id")>]
        member val Id:Int32 = new Int32() with get,set

        ///<summary>
        ///The resource name
        ///</summary>
        [<ApiMember(Description="The resource name")>]
        member val Name:String = null with get,set

        ///<summary>
        ///The resource status
        ///</summary>
        [<ApiMember(Description="The resource status")>]
        member val Active:Boolean = new Boolean() with get,set

        ///<summary>
        ///The resource description
        ///</summary>
        [<ApiMember(Description="The resource description")>]
        member val Description:String = null with get,set

        ///<summary>
        ///The resource email
        ///</summary>
        [<ApiMember(Description="The resource email")>]
        member val Email:String = null with get,set

        ///<summary>
        ///The resource phone
        ///</summary>
        [<ApiMember(Description="The resource phone")>]
        member val Phone:String = null with get,set

        ///<summary>
        ///The resource color
        ///</summary>
        [<ApiMember(Description="The resource color")>]
        member val Color:String = null with get,set

        ///<summary>
        ///The resource image
        ///</summary>
        [<ApiMember(Description="The resource image")>]
        member val ImageUrl:Uri = null with get,set

        ///<summary>
        ///If the resource want to receive email notifications
        ///</summary>
        [<ApiMember(Description="If the resource want to receive email notifications")>]
        member val EmailNotification:Boolean = new Boolean() with get,set

        ///<summary>
        ///If the resource want to receive sms notifications
        ///</summary>
        [<ApiMember(Description="If the resource want to receive sms notifications")>]
        member val SMSNotification:Boolean = new Boolean() with get,set

        ///<summary>
        ///If the resource want to receive email reminders
        ///</summary>
        [<ApiMember(Description="If the resource want to receive email reminders")>]
        member val EmailReminder:Boolean = new Boolean() with get,set

        ///<summary>
        ///If the resource want to receive sms reminders
        ///</summary>
        [<ApiMember(Description="If the resource want to receive sms reminders")>]
        member val SMSReminder:Boolean = new Boolean() with get,set

    [<AllowNullLiteral>]
    type CompanyUserRolesQueryResponse() = 
        member val RoleId:Guid = new Guid() with get,set
        member val Name:String = null with get,set
        member val Description:String = null with get,set

    [<AllowNullLiteral>]
    type CompanyUserQueryResponse() = 
        member val Id:Guid = new Guid() with get,set
        member val CompanyId:Guid = new Guid() with get,set
        member val Firstname:String = null with get,set
        member val Lastname:String = null with get,set
        member val Email:String = null with get,set
        member val Phone:String = null with get,set
        member val WorkerId:String = null with get,set
        member val ResourceId:Nullable<Int32> = new Nullable<Int32>() with get,set
        ///<summary>
        ///The resource information connected to the administrator.
        ///</summary>
        [<ApiMember(Description="The resource information connected to the administrator.")>]
        member val Resource:CompanyUserResource = null with get,set

        ///<summary>
        ///The roles that are connected to the administrator.
        ///</summary>
        [<ApiMember(Description="The roles that are connected to the administrator.")>]
        member val Roles:ResizeArray<CompanyUserRolesQueryResponse> = new ResizeArray<CompanyUserRolesQueryResponse>() with get,set

        member val Active:Boolean = new Boolean() with get,set
        member val Created:DateTime = new DateTime() with get,set
        member val Updated:DateTime = new DateTime() with get,set

    [<AllowNullLiteral>]
    type AddCompanyUserRolesResponse() = 
        member val RoleId:Guid = new Guid() with get,set

    [<ApiResponse(Description="Returned if there is a validation error on the input parameters", StatusCode=400)>]
    [<ApiResponse(Description="Returned if the current user is not allowed to perform the action", StatusCode=401)>]
    [<AllowNullLiteral>]
    type SuperAdminUpdateCompanyUser() = 
        ///<summary>
        ///Enter the company and id for the application user, if blank company id and you are an admin, your company id will be used.
        ///</summary>
        [<ApiMember(Description="Enter the company and id for the application user, if blank company id and you are an admin, your company id will be used.", ParameterType="query")>]
        member val CompanyId:Nullable<Guid> = new Nullable<Guid>() with get,set

        ///<summary>
        ///Enter the user id for the administrator.
        ///</summary>
        [<ApiMember(Description="Enter the user id for the administrator.", IsRequired=true, ParameterType="path")>]
        member val Id:Guid = new Guid() with get,set

        [<ApiMember>]
        member val Firstname:String = null with get,set

        [<ApiMember>]
        member val Lastname:String = null with get,set

        [<ApiMember>]
        member val Phone:String = null with get,set

        [<ApiMember>]
        member val Email:String = null with get,set

        [<ApiMember>]
        member val ResourceId:Nullable<Int32> = new Nullable<Int32>() with get,set

        [<ApiMember>]
        member val Roles:ResizeArray<AddCompanyUserRolesResponse> = new ResizeArray<AddCompanyUserRolesResponse>() with get,set

        [<ApiMember>]
        member val WorkerId:Nullable<Int32> = new Nullable<Int32>() with get,set

F# SuperAdminUpdateCompanyUser DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

PUT /superadmin/administrators/{Id} HTTP/1.1 
Host: testapi.bokamera.se 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	CompanyId: 00000000-0000-0000-0000-000000000000,
	Firstname: String,
	Lastname: String,
	Phone: String,
	Email: String,
	ResourceId: 0,
	Roles: 
	[
		{
			
		}
	],
	WorkerId: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Firstname: String,
	Lastname: String,
	Email: String,
	Phone: String,
	WorkerId: String,
	ResourceId: 0,
	Resource: 
	{
		Id: 0,
		Name: String,
		Active: False,
		Description: String,
		Email: String,
		Phone: String,
		Color: String,
		EmailNotification: False,
		SMSNotification: False,
		EmailReminder: False,
		SMSReminder: False
	},
	Roles: 
	[
		{
			Name: String,
			Description: String
		}
	],
	Active: False
}