Requires the role: | superadmin |
DELETE | /superadmin/administrators/{Id} | Delete a administrator from your company | If you want to delete a administrator from your company. |
---|
"use strict";
export class CompanyUserResource {
/** @param {{Id?:number,Name?:string,Active?:boolean,Description?:string,Email?:string,Phone?:string,Color?:string,ImageUrl?:string,EmailNotification?:boolean,SMSNotification?:boolean,EmailReminder?:boolean,SMSReminder?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description The resource id */
Id;
/**
* @type {string}
* @description The resource name */
Name;
/**
* @type {boolean}
* @description The resource status */
Active;
/**
* @type {string}
* @description The resource description */
Description;
/**
* @type {string}
* @description The resource email */
Email;
/**
* @type {string}
* @description The resource phone */
Phone;
/**
* @type {string}
* @description The resource color */
Color;
/**
* @type {string}
* @description The resource image */
ImageUrl;
/**
* @type {boolean}
* @description If the resource want to receive email notifications */
EmailNotification;
/**
* @type {boolean}
* @description If the resource want to receive sms notifications */
SMSNotification;
/**
* @type {boolean}
* @description If the resource want to receive email reminders */
EmailReminder;
/**
* @type {boolean}
* @description If the resource want to receive sms reminders */
SMSReminder;
}
export class CompanyUserRolesQueryResponse {
/** @param {{RoleId?:string,Name?:string,Description?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
RoleId;
/** @type {string} */
Name;
/** @type {string} */
Description;
}
export class CompanyUserQueryResponse {
/** @param {{Id?:string,CompanyId?:string,Firstname?:string,Lastname?:string,Email?:string,Phone?:string,WorkerId?:string,ResourceId?:number,Resource?:CompanyUserResource,Roles?:CompanyUserRolesQueryResponse[],Active?:boolean,Created?:string,Updated?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Id;
/** @type {string} */
CompanyId;
/** @type {string} */
Firstname;
/** @type {string} */
Lastname;
/** @type {string} */
Email;
/** @type {string} */
Phone;
/** @type {string} */
WorkerId;
/** @type {?number} */
ResourceId;
/**
* @type {CompanyUserResource}
* @description The resource information connected to the administrator. */
Resource;
/**
* @type {CompanyUserRolesQueryResponse[]}
* @description The roles that are connected to the administrator. */
Roles;
/** @type {boolean} */
Active;
/** @type {string} */
Created;
/** @type {string} */
Updated;
}
export class SuperAdminDeleteCompanyUser {
/** @param {{CompanyId?:string,Id?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {?string}
* @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. */
CompanyId;
/**
* @type {string}
* @description Enter the user id for the administrator. */
Id;
}
JavaScript SuperAdminDeleteCompanyUser DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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/jsv
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 }