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 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 SuperAdminUpdateCompanyUser : 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="path")
    public var id:String

    // @ApiMember()
    public var firstname:String

    // @ApiMember()
    public var lastname:String

    // @ApiMember()
    public var phone:String

    // @ApiMember()
    public var email:String

    // @ApiMember()
    public var resourceId:Int?

    // @ApiMember()
    public var roles:[AddCompanyUserRolesResponse] = []

    // @ApiMember()
    public var workerId:Int?

    required public init(){}
}

public class AddCompanyUserRolesResponse : Codable
{
    public var roleId: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 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>