POST CMUser/CreateUser

If the client uses CM and Centralised Users, This call creates a new Cm User, Required Username and LevelID

Request Information

URI Parameters

None.

Body Parameters

UpdateUserRequestCommand
Name Type Description Additional information
UserId integer

None.

UserName string

None.

ExternalEmployeeID string

None.

HourlyRate decimal number

None.

RecallNumber string

None.

iButton string

None.

CardNumber string

None.

IsActive boolean

None.

UserLevel UserLevelDto

None.

AllowedToOpenTableFromOtherClerks boolean

None.

SignOffAtSaleFinalisation boolean

None.

CompulsoryClockOn boolean

None.

ShowButtonOnLoginScreen boolean

None.

AutoDisplayFloorPlan boolean

None.

UseSecondLanguage boolean

None.

DisplayName string

None.

EmployeeEmail string

None.

UserSchedule Collection of UserScheduleDto

None.

IncludedSites Collection of integer

None.

updateSites boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "UserId": 1,
  "UserName": "sample string 2",
  "ExternalEmployeeID": "sample string 3",
  "HourlyRate": 1.0,
  "RecallNumber": "sample string 4",
  "iButton": "sample string 5",
  "CardNumber": "sample string 6",
  "IsActive": true,
  "UserLevel": {
    "LevelID": 1,
    "LevelName": "sample string 2",
    "ExternalGroupId": "sample string 3"
  },
  "AllowedToOpenTableFromOtherClerks": true,
  "SignOffAtSaleFinalisation": true,
  "CompulsoryClockOn": true,
  "ShowButtonOnLoginScreen": true,
  "AutoDisplayFloorPlan": true,
  "UseSecondLanguage": true,
  "DisplayName": "sample string 8",
  "EmployeeEmail": "sample string 9",
  "UserSchedule": [
    {
      "UserScheduleID": 1,
      "UserID": 2,
      "JobID": 3,
      "SiteID": 4,
      "StartTime": "2024-11-21T06:23:55.9851696+00:00",
      "EndTime": "2024-11-21T06:23:55.9851696+00:00"
    },
    {
      "UserScheduleID": 1,
      "UserID": 2,
      "JobID": 3,
      "SiteID": 4,
      "StartTime": "2024-11-21T06:23:55.9851696+00:00",
      "EndTime": "2024-11-21T06:23:55.9851696+00:00"
    }
  ],
  "IncludedSites": [
    1,
    2
  ],
  "updateSites": true
}

application/xml, text/xml

Sample:
<UpdateUserRequestCommand xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Tevalis.API.Core.Models.User.Commands">
  <AllowedToOpenTableFromOtherClerks>true</AllowedToOpenTableFromOtherClerks>
  <AutoDisplayFloorPlan>true</AutoDisplayFloorPlan>
  <CardNumber>sample string 6</CardNumber>
  <CompulsoryClockOn>true</CompulsoryClockOn>
  <DisplayName>sample string 8</DisplayName>
  <EmployeeEmail>sample string 9</EmployeeEmail>
  <ExternalEmployeeID>sample string 3</ExternalEmployeeID>
  <HourlyRate>1</HourlyRate>
  <IncludedSites xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </IncludedSites>
  <IsActive>true</IsActive>
  <RecallNumber>sample string 4</RecallNumber>
  <ShowButtonOnLoginScreen>true</ShowButtonOnLoginScreen>
  <SignOffAtSaleFinalisation>true</SignOffAtSaleFinalisation>
  <UseSecondLanguage>true</UseSecondLanguage>
  <UserId>1</UserId>
  <UserLevel xmlns:d2p1="http://schemas.datacontract.org/2004/07/Tevalis.API.Core.Models.User.Dto">
    <d2p1:CMUserLevelCompanyID>4</d2p1:CMUserLevelCompanyID>
    <d2p1:ExternalGroupId>sample string 3</d2p1:ExternalGroupId>
    <d2p1:LevelID>1</d2p1:LevelID>
    <d2p1:LevelName>sample string 2</d2p1:LevelName>
  </UserLevel>
  <UserName>sample string 2</UserName>
  <UserSchedule xmlns:d2p1="http://schemas.datacontract.org/2004/07/Tevalis.API.Core.Models.User.Dto">
    <d2p1:UserScheduleDto>
      <d2p1:EndTime>2024-11-21T06:23:55.9851696+00:00</d2p1:EndTime>
      <d2p1:JobID>3</d2p1:JobID>
      <d2p1:SiteID>4</d2p1:SiteID>
      <d2p1:StartTime>2024-11-21T06:23:55.9851696+00:00</d2p1:StartTime>
      <d2p1:UserID>2</d2p1:UserID>
      <d2p1:UserScheduleID>1</d2p1:UserScheduleID>
    </d2p1:UserScheduleDto>
    <d2p1:UserScheduleDto>
      <d2p1:EndTime>2024-11-21T06:23:55.9851696+00:00</d2p1:EndTime>
      <d2p1:JobID>3</d2p1:JobID>
      <d2p1:SiteID>4</d2p1:SiteID>
      <d2p1:StartTime>2024-11-21T06:23:55.9851696+00:00</d2p1:StartTime>
      <d2p1:UserID>2</d2p1:UserID>
      <d2p1:UserScheduleID>1</d2p1:UserScheduleID>
    </d2p1:UserScheduleDto>
  </UserSchedule>
  <iButton>sample string 5</iButton>
  <updateSites>true</updateSites>
</UpdateUserRequestCommand>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

ApiUserModel
Name Type Description Additional information
SiteId integer

None.

Users Collection of UserDto

None.

Response Formats

application/json, text/json

Sample:
{
  "SiteId": 1,
  "Users": [
    {
      "UserId": 1,
      "UserName": "sample string 2",
      "ExternalEmployeeID": "sample string 3",
      "HourlyRate": 1.0,
      "UserLevel": {
        "LevelID": 1,
        "LevelName": "sample string 2",
        "ExternalGroupId": "sample string 3"
      },
      "RecallNumber": "sample string 4",
      "CardNumber": "sample string 5",
      "IsActive": true,
      "AllowedToOpenTableFromOtherClerks": true,
      "SignOffAtSaleFinalisation": true,
      "CompulsoryClockOn": true,
      "ShowButtonOnLoginScreen": true,
      "AutoDisplayFloorPlan": true,
      "UseSecondLanguage": true,
      "DisplayName": "sample string 8",
      "EmployeeEmail": "sample string 9",
      "UserSchedule": [
        {
          "UserScheduleID": 1,
          "UserID": 2,
          "JobID": 3,
          "SiteID": 4,
          "StartTime": "2024-11-21T06:23:56.0016349+00:00",
          "EndTime": "2024-11-21T06:23:56.0016349+00:00"
        },
        {
          "UserScheduleID": 1,
          "UserID": 2,
          "JobID": 3,
          "SiteID": 4,
          "StartTime": "2024-11-21T06:23:56.0016349+00:00",
          "EndTime": "2024-11-21T06:23:56.0016349+00:00"
        }
      ],
      "IncludedSites": [
        1,
        2
      ]
    },
    {
      "UserId": 1,
      "UserName": "sample string 2",
      "ExternalEmployeeID": "sample string 3",
      "HourlyRate": 1.0,
      "UserLevel": {
        "LevelID": 1,
        "LevelName": "sample string 2",
        "ExternalGroupId": "sample string 3"
      },
      "RecallNumber": "sample string 4",
      "CardNumber": "sample string 5",
      "IsActive": true,
      "AllowedToOpenTableFromOtherClerks": true,
      "SignOffAtSaleFinalisation": true,
      "CompulsoryClockOn": true,
      "ShowButtonOnLoginScreen": true,
      "AutoDisplayFloorPlan": true,
      "UseSecondLanguage": true,
      "DisplayName": "sample string 8",
      "EmployeeEmail": "sample string 9",
      "UserSchedule": [
        {
          "UserScheduleID": 1,
          "UserID": 2,
          "JobID": 3,
          "SiteID": 4,
          "StartTime": "2024-11-21T06:23:56.0016349+00:00",
          "EndTime": "2024-11-21T06:23:56.0016349+00:00"
        },
        {
          "UserScheduleID": 1,
          "UserID": 2,
          "JobID": 3,
          "SiteID": 4,
          "StartTime": "2024-11-21T06:23:56.0016349+00:00",
          "EndTime": "2024-11-21T06:23:56.0016349+00:00"
        }
      ],
      "IncludedSites": [
        1,
        2
      ]
    }
  ]
}

application/xml, text/xml

Sample:
<ApiUserModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Tevalis.API.Core.Models.User.Dto">
  <SiteId>1</SiteId>
  <Users>
    <UserDto>
      <AllowedToOpenTableFromOtherClerks>true</AllowedToOpenTableFromOtherClerks>
      <AutoDisplayFloorPlan>true</AutoDisplayFloorPlan>
      <CardNumber>sample string 5</CardNumber>
      <CompulsoryClockOn>true</CompulsoryClockOn>
      <DisplayName>sample string 8</DisplayName>
      <EmployeeEmail>sample string 9</EmployeeEmail>
      <ExternalEmployeeID>sample string 3</ExternalEmployeeID>
      <HourlyRate>1</HourlyRate>
      <IncludedSites xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:int>1</d4p1:int>
        <d4p1:int>2</d4p1:int>
      </IncludedSites>
      <IsActive>true</IsActive>
      <RecallNumber>sample string 4</RecallNumber>
      <ShowButtonOnLoginScreen>true</ShowButtonOnLoginScreen>
      <SignOffAtSaleFinalisation>true</SignOffAtSaleFinalisation>
      <UseSecondLanguage>true</UseSecondLanguage>
      <UserId>1</UserId>
      <UserLevel>
        <CMUserLevelCompanyID>4</CMUserLevelCompanyID>
        <ExternalGroupId>sample string 3</ExternalGroupId>
        <LevelID>1</LevelID>
        <LevelName>sample string 2</LevelName>
      </UserLevel>
      <UserLevelCompanyID>7</UserLevelCompanyID>
      <UserName>sample string 2</UserName>
      <UserSchedule>
        <UserScheduleDto>
          <EndTime>2024-11-21T06:23:56.0016349+00:00</EndTime>
          <JobID>3</JobID>
          <SiteID>4</SiteID>
          <StartTime>2024-11-21T06:23:56.0016349+00:00</StartTime>
          <UserID>2</UserID>
          <UserScheduleID>1</UserScheduleID>
        </UserScheduleDto>
        <UserScheduleDto>
          <EndTime>2024-11-21T06:23:56.0016349+00:00</EndTime>
          <JobID>3</JobID>
          <SiteID>4</SiteID>
          <StartTime>2024-11-21T06:23:56.0016349+00:00</StartTime>
          <UserID>2</UserID>
          <UserScheduleID>1</UserScheduleID>
        </UserScheduleDto>
      </UserSchedule>
      <updateSites>true</updateSites>
    </UserDto>
    <UserDto>
      <AllowedToOpenTableFromOtherClerks>true</AllowedToOpenTableFromOtherClerks>
      <AutoDisplayFloorPlan>true</AutoDisplayFloorPlan>
      <CardNumber>sample string 5</CardNumber>
      <CompulsoryClockOn>true</CompulsoryClockOn>
      <DisplayName>sample string 8</DisplayName>
      <EmployeeEmail>sample string 9</EmployeeEmail>
      <ExternalEmployeeID>sample string 3</ExternalEmployeeID>
      <HourlyRate>1</HourlyRate>
      <IncludedSites xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:int>1</d4p1:int>
        <d4p1:int>2</d4p1:int>
      </IncludedSites>
      <IsActive>true</IsActive>
      <RecallNumber>sample string 4</RecallNumber>
      <ShowButtonOnLoginScreen>true</ShowButtonOnLoginScreen>
      <SignOffAtSaleFinalisation>true</SignOffAtSaleFinalisation>
      <UseSecondLanguage>true</UseSecondLanguage>
      <UserId>1</UserId>
      <UserLevel>
        <CMUserLevelCompanyID>4</CMUserLevelCompanyID>
        <ExternalGroupId>sample string 3</ExternalGroupId>
        <LevelID>1</LevelID>
        <LevelName>sample string 2</LevelName>
      </UserLevel>
      <UserLevelCompanyID>7</UserLevelCompanyID>
      <UserName>sample string 2</UserName>
      <UserSchedule>
        <UserScheduleDto>
          <EndTime>2024-11-21T06:23:56.0016349+00:00</EndTime>
          <JobID>3</JobID>
          <SiteID>4</SiteID>
          <StartTime>2024-11-21T06:23:56.0016349+00:00</StartTime>
          <UserID>2</UserID>
          <UserScheduleID>1</UserScheduleID>
        </UserScheduleDto>
        <UserScheduleDto>
          <EndTime>2024-11-21T06:23:56.0016349+00:00</EndTime>
          <JobID>3</JobID>
          <SiteID>4</SiteID>
          <StartTime>2024-11-21T06:23:56.0016349+00:00</StartTime>
          <UserID>2</UserID>
          <UserScheduleID>1</UserScheduleID>
        </UserScheduleDto>
      </UserSchedule>
      <updateSites>true</updateSites>
    </UserDto>
  </Users>
</ApiUserModel>