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.
"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 AddCompanyUserRolesResponse {
    /** @param {{RoleId?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    RoleId;
}
export class SuperAdminUpdateCompanyUser {
    /** @param {{CompanyId?:string,Id?:string,Firstname?:string,Lastname?:string,Phone?:string,Email?:string,ResourceId?:number,Roles?:AddCompanyUserRolesResponse[],WorkerId?:number}} [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;
    /** @type {string} */
    Firstname;
    /** @type {string} */
    Lastname;
    /** @type {string} */
    Phone;
    /** @type {string} */
    Email;
    /** @type {?number} */
    ResourceId;
    /** @type {AddCompanyUserRolesResponse[]} */
    Roles;
    /** @type {?number} */
    WorkerId;
}

JavaScript SuperAdminUpdateCompanyUser DTOs

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

HTTP + OTHER

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: api.bokamera.se 
Accept: text/jsonl
Content-Type: text/jsonl
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/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}