BokaMera.API.Host

<back to all web services

SuperAdminDeleteCompanyUser

Requires Authentication
Requires the role:superadmin
The following routes are available for this service:
DELETE/superadmin/administrators/{Id}Delete a administrator from your companyIf you want to delete a administrator from your company.
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports BokaMera.API.ServiceModel.Dtos

Namespace Global

    Namespace BokaMera.API.ServiceModel.Dtos

        Public Partial Class CompanyUserQueryResponse
            Public Sub New()
                Roles = New List(Of CompanyUserRolesQueryResponse)
            End Sub

            Public Overridable Property Id As Guid
            Public Overridable Property CompanyId As Guid
            Public Overridable Property Firstname As String
            Public Overridable Property Lastname As String
            Public Overridable Property Email As String
            Public Overridable Property Phone As String
            Public Overridable Property WorkerId As String
            Public Overridable Property ResourceId As Nullable(Of Integer)
            '''<Summary>
            '''The resource information connected to the administrator.
            '''</Summary>
            <ApiMember(Description:="The resource information connected to the administrator.")>
            Public Overridable Property Resource As CompanyUserResource

            '''<Summary>
            '''The roles that are connected to the administrator.
            '''</Summary>
            <ApiMember(Description:="The roles that are connected to the administrator.")>
            Public Overridable Property Roles As List(Of CompanyUserRolesQueryResponse)

            Public Overridable Property Active As Boolean
            Public Overridable Property Created As Date
            Public Overridable Property Updated As Date
        End Class

        Public Partial Class CompanyUserResource
            '''<Summary>
            '''The resource id
            '''</Summary>
            <ApiMember(Description:="The resource id")>
            Public Overridable Property Id As Integer

            '''<Summary>
            '''The resource name
            '''</Summary>
            <ApiMember(Description:="The resource name")>
            Public Overridable Property Name As String

            '''<Summary>
            '''The resource status
            '''</Summary>
            <ApiMember(Description:="The resource status")>
            Public Overridable Property Active As Boolean

            '''<Summary>
            '''The resource description
            '''</Summary>
            <ApiMember(Description:="The resource description")>
            Public Overridable Property Description As String

            '''<Summary>
            '''The resource email
            '''</Summary>
            <ApiMember(Description:="The resource email")>
            Public Overridable Property Email As String

            '''<Summary>
            '''The resource phone
            '''</Summary>
            <ApiMember(Description:="The resource phone")>
            Public Overridable Property Phone As String

            '''<Summary>
            '''The resource color
            '''</Summary>
            <ApiMember(Description:="The resource color")>
            Public Overridable Property Color As String

            '''<Summary>
            '''The resource image
            '''</Summary>
            <ApiMember(Description:="The resource image")>
            Public Overridable Property ImageUrl As Uri

            '''<Summary>
            '''If the resource want to receive email notifications
            '''</Summary>
            <ApiMember(Description:="If the resource want to receive email notifications")>
            Public Overridable Property EmailNotification As Boolean

            '''<Summary>
            '''If the resource want to receive sms notifications
            '''</Summary>
            <ApiMember(Description:="If the resource want to receive sms notifications")>
            Public Overridable Property SMSNotification As Boolean

            '''<Summary>
            '''If the resource want to receive email reminders
            '''</Summary>
            <ApiMember(Description:="If the resource want to receive email reminders")>
            Public Overridable Property EmailReminder As Boolean

            '''<Summary>
            '''If the resource want to receive sms reminders
            '''</Summary>
            <ApiMember(Description:="If the resource want to receive sms reminders")>
            Public Overridable Property SMSReminder As Boolean
        End Class

        Public Partial Class CompanyUserRolesQueryResponse
            Public Overridable Property RoleId As Guid
            Public Overridable Property Name As String
            Public Overridable Property Description As String
        End Class

        <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)>
        Public Partial Class SuperAdminDeleteCompanyUser
            Implements ICompany
            '''<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")>
            Public Overridable Property CompanyId As Nullable(Of Guid)

            '''<Summary>
            '''Enter the user id for the administrator.
            '''</Summary>
            <ApiMember(Description:="Enter the user id for the administrator.", IsRequired:=true, ParameterType:="query")>
            Public Overridable Property Id As Guid
        End Class
    End Namespace
End Namespace

VB.NET SuperAdminDeleteCompanyUser DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

DELETE /superadmin/administrators/{Id} HTTP/1.1 
Host: api.bokamera.se 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
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}