Requires the role: | superadmin |
DELETE | /superadmin/administrators/{Id} | Delete a administrator from your company | If you want to delete a administrator from your company. |
---|
import Foundation
import ServiceStack
// @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 class SuperAdminDeleteCompanyUser : ICompany, Codable
{
/**
* Enter the company and id for the application user, if blank company id and you are an admin, your company id will be used.
*/
// @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 var companyId:String?
/**
* Enter the user id for the administrator.
*/
// @ApiMember(Description="Enter the user id for the administrator.", IsRequired=true, ParameterType="query")
public var id:String
required public init(){}
}
public class CompanyUserQueryResponse : Codable
{
public var id:String
public var companyId:String
public var firstname:String
public var lastname:String
public var email:String
public var phone:String
public var workerId:String
public var resourceId:Int?
/**
* The resource information connected to the administrator.
*/
// @ApiMember(Description="The resource information connected to the administrator.")
public var resource:CompanyUserResource
/**
* The roles that are connected to the administrator.
*/
// @ApiMember(Description="The roles that are connected to the administrator.")
public var roles:[CompanyUserRolesQueryResponse] = []
public var active:Bool
public var created:Date
public var updated:Date
required public init(){}
}
public class CompanyUserResource : Codable
{
/**
* The resource id
*/
// @ApiMember(Description="The resource id")
public var id:Int
/**
* The resource name
*/
// @ApiMember(Description="The resource name")
public var name:String
/**
* The resource status
*/
// @ApiMember(Description="The resource status")
public var active:Bool
/**
* The resource description
*/
// @ApiMember(Description="The resource description")
public var Description:String
/**
* The resource email
*/
// @ApiMember(Description="The resource email")
public var email:String
/**
* The resource phone
*/
// @ApiMember(Description="The resource phone")
public var phone:String
/**
* The resource color
*/
// @ApiMember(Description="The resource color")
public var color:String
/**
* The resource image
*/
// @ApiMember(Description="The resource image")
public var imageUrl:Uri
/**
* If the resource want to receive email notifications
*/
// @ApiMember(Description="If the resource want to receive email notifications")
public var emailNotification:Bool
/**
* If the resource want to receive sms notifications
*/
// @ApiMember(Description="If the resource want to receive sms notifications")
public var smsNotification:Bool
/**
* If the resource want to receive email reminders
*/
// @ApiMember(Description="If the resource want to receive email reminders")
public var emailReminder:Bool
/**
* If the resource want to receive sms reminders
*/
// @ApiMember(Description="If the resource want to receive sms reminders")
public var smsReminder:Bool
required public init(){}
}
public class CompanyUserRolesQueryResponse : Codable
{
public var roleId:String
public var name:String
public var Description:String
required public init(){}
}
Swift SuperAdminDeleteCompanyUser DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
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: text/jsonl
HTTP/1.1 200 OK Content-Type: text/jsonl 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}