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.
import java.math.*
import java.util.*
import net.servicestack.client.*


@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)
open class SuperAdminUpdateCompanyUser : ICompany
{
    /**
    * 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")
    var CompanyId:UUID? = null

    /**
    * Enter the user id for the administrator.
    */
    @ApiMember(Description="Enter the user id for the administrator.", IsRequired=true, ParameterType="path")
    var Id:UUID? = null

    @ApiMember()
    var Firstname:String? = null

    @ApiMember()
    var Lastname:String? = null

    @ApiMember()
    var Phone:String? = null

    @ApiMember()
    var Email:String? = null

    @ApiMember()
    var ResourceId:Int? = null

    @ApiMember()
    var Roles:ArrayList<AddCompanyUserRolesResponse> = ArrayList<AddCompanyUserRolesResponse>()

    @ApiMember()
    var WorkerId:Int? = null
}

open class AddCompanyUserRolesResponse
{
    var RoleId:UUID? = null
}

open class CompanyUserQueryResponse
{
    var Id:UUID? = null
    var CompanyId:UUID? = null
    var Firstname:String? = null
    var Lastname:String? = null
    var Email:String? = null
    var Phone:String? = null
    var WorkerId:String? = null
    var ResourceId:Int? = null
    /**
    * The resource information connected to the administrator.
    */
    @ApiMember(Description="The resource information connected to the administrator.")
    var Resource:CompanyUserResource? = null

    /**
    * The roles that are connected to the administrator.
    */
    @ApiMember(Description="The roles that are connected to the administrator.")
    var Roles:ArrayList<CompanyUserRolesQueryResponse> = ArrayList<CompanyUserRolesQueryResponse>()

    var Active:Boolean? = null
    var Created:Date? = null
    var Updated:Date? = null
}

open class CompanyUserResource
{
    /**
    * The resource id
    */
    @ApiMember(Description="The resource id")
    var Id:Int? = null

    /**
    * The resource name
    */
    @ApiMember(Description="The resource name")
    var Name:String? = null

    /**
    * The resource status
    */
    @ApiMember(Description="The resource status")
    var Active:Boolean? = null

    /**
    * The resource description
    */
    @ApiMember(Description="The resource description")
    var Description:String? = null

    /**
    * The resource email
    */
    @ApiMember(Description="The resource email")
    var Email:String? = null

    /**
    * The resource phone
    */
    @ApiMember(Description="The resource phone")
    var Phone:String? = null

    /**
    * The resource color
    */
    @ApiMember(Description="The resource color")
    var Color:String? = null

    /**
    * The resource image
    */
    @ApiMember(Description="The resource image")
    var ImageUrl:Uri? = null

    /**
    * If the resource want to receive email notifications
    */
    @ApiMember(Description="If the resource want to receive email notifications")
    var EmailNotification:Boolean? = null

    /**
    * If the resource want to receive sms notifications
    */
    @ApiMember(Description="If the resource want to receive sms notifications")
    var SMSNotification:Boolean? = null

    /**
    * If the resource want to receive email reminders
    */
    @ApiMember(Description="If the resource want to receive email reminders")
    var EmailReminder:Boolean? = null

    /**
    * If the resource want to receive sms reminders
    */
    @ApiMember(Description="If the resource want to receive sms reminders")
    var SMSReminder:Boolean? = null
}

open class CompanyUserRolesQueryResponse
{
    var RoleId:UUID? = null
    var Name:String? = null
    var Description:String? = null
}

Kotlin SuperAdminUpdateCompanyUser DTOs

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

HTTP + XML

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: testapi.bokamera.se 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<SuperAdminUpdateCompanyUser xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
  <Email>String</Email>
  <Firstname>String</Firstname>
  <Id>00000000-0000-0000-0000-000000000000</Id>
  <Lastname>String</Lastname>
  <Phone>String</Phone>
  <ResourceId>0</ResourceId>
  <Roles>
    <AddCompanyUserRolesResponse>
      <RoleId>00000000-0000-0000-0000-000000000000</RoleId>
    </AddCompanyUserRolesResponse>
  </Roles>
  <WorkerId>0</WorkerId>
</SuperAdminUpdateCompanyUser>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<CompanyUserQueryResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <Active>false</Active>
  <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
  <Created>0001-01-01T00:00:00</Created>
  <Email>String</Email>
  <Firstname>String</Firstname>
  <Id>00000000-0000-0000-0000-000000000000</Id>
  <Lastname>String</Lastname>
  <Phone>String</Phone>
  <Resource>
    <Active>false</Active>
    <Color>String</Color>
    <Description>String</Description>
    <Email>String</Email>
    <EmailNotification>false</EmailNotification>
    <EmailReminder>false</EmailReminder>
    <Id>0</Id>
    <ImageUrl i:nil="true" />
    <Name>String</Name>
    <Phone>String</Phone>
    <SMSNotification>false</SMSNotification>
    <SMSReminder>false</SMSReminder>
  </Resource>
  <ResourceId>0</ResourceId>
  <Roles>
    <CompanyUserRolesQueryResponse>
      <Description>String</Description>
      <Name>String</Name>
      <RoleId>00000000-0000-0000-0000-000000000000</RoleId>
    </CompanyUserRolesQueryResponse>
  </Roles>
  <Updated>0001-01-01T00:00:00</Updated>
  <WorkerId>String</WorkerId>
</CompanyUserQueryResponse>