Requires the role: | superadmin |
PUT | /superadmin/administrators/{Id} | Update administrator on your company | If you want to update a administrator to your company. |
---|
export class CompanyUserResource
{
/** @description The resource id */
// @ApiMember(Description="The resource id")
public Id: number;
/** @description The resource name */
// @ApiMember(Description="The resource name")
public Name: string;
/** @description The resource status */
// @ApiMember(Description="The resource status")
public Active: boolean;
/** @description The resource description */
// @ApiMember(Description="The resource description")
public Description: string;
/** @description The resource email */
// @ApiMember(Description="The resource email")
public Email: string;
/** @description The resource phone */
// @ApiMember(Description="The resource phone")
public Phone: string;
/** @description The resource color */
// @ApiMember(Description="The resource color")
public Color: string;
/** @description The resource image */
// @ApiMember(Description="The resource image")
public ImageUrl: string;
/** @description If the resource want to receive email notifications */
// @ApiMember(Description="If the resource want to receive email notifications")
public EmailNotification: boolean;
/** @description If the resource want to receive sms notifications */
// @ApiMember(Description="If the resource want to receive sms notifications")
public SMSNotification: boolean;
/** @description If the resource want to receive email reminders */
// @ApiMember(Description="If the resource want to receive email reminders")
public EmailReminder: boolean;
/** @description If the resource want to receive sms reminders */
// @ApiMember(Description="If the resource want to receive sms reminders")
public SMSReminder: boolean;
public constructor(init?: Partial<CompanyUserResource>) { (Object as any).assign(this, init); }
}
export class CompanyUserRolesQueryResponse
{
public RoleId: string;
public Name: string;
public Description: string;
public constructor(init?: Partial<CompanyUserRolesQueryResponse>) { (Object as any).assign(this, init); }
}
export class CompanyUserQueryResponse
{
public Id: string;
public CompanyId: string;
public Firstname: string;
public Lastname: string;
public Email: string;
public Phone: string;
public WorkerId: string;
public ResourceId?: number;
/** @description The resource information connected to the administrator. */
// @ApiMember(Description="The resource information connected to the administrator.")
public Resource: CompanyUserResource;
/** @description The roles that are connected to the administrator. */
// @ApiMember(Description="The roles that are connected to the administrator.")
public Roles: CompanyUserRolesQueryResponse[];
public Active: boolean;
public Created: string;
public Updated: string;
public constructor(init?: Partial<CompanyUserQueryResponse>) { (Object as any).assign(this, init); }
}
export class AddCompanyUserRolesResponse
{
public RoleId: string;
public constructor(init?: Partial<AddCompanyUserRolesResponse>) { (Object as any).assign(this, init); }
}
// @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)
export class SuperAdminUpdateCompanyUser implements ICompany
{
/** @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. */
// @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 CompanyId?: string;
/** @description Enter the user id for the administrator. */
// @ApiMember(Description="Enter the user id for the administrator.", IsRequired=true, ParameterType="path")
public Id: string;
// @ApiMember()
public Firstname: string;
// @ApiMember()
public Lastname: string;
// @ApiMember()
public Phone: string;
// @ApiMember()
public Email: string;
// @ApiMember()
public ResourceId?: number;
// @ApiMember()
public Roles: AddCompanyUserRolesResponse[];
// @ApiMember()
public WorkerId?: number;
public constructor(init?: Partial<SuperAdminUpdateCompanyUser>) { (Object as any).assign(this, init); }
}
TypeScript SuperAdminUpdateCompanyUser 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
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: application/json
Content-Type: application/json
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: 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}