POST api/v1/Occupancies/{id}/Floors

Adds a single Floor to the Occupancy. Returns Success/Error code plus primary key of Occupancy Floor added.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

Id pf the occupancy to add floor to

globally unique identifier

Required

Body Parameters

AddUpdateOccupancyFloorViewModel
NameDescriptionTypeAdditional information
OccupancyFloorId

Represents the PK of the Occupancy Floor combination. Should be Null when passed to an Add action.

globally unique identifier

None.

OccupancyId

Required: Represents the PK of the Occupancy

globally unique identifier

None.

FloorId

Required: Represents the PK of the Floor

globally unique identifier

None.

Deleted

Required: Represents whether the Occupancy / Floor combination is deleted or not. Should be false for an Add action.

boolean

None.

FloorUseFlagsMask

Required: Represents a bitmask of how the floor is used by the Occupancy. 1 = Reception, 2 = Mail/Deliver, 4 = Office Space, 8 = Retail, 16 = Residential, 32 = Commercial/Industrial

integer

None.

IsDefaultMailFloor

Required: Represents whether the Occupancy / Floor combination is used as the default Mail Floor (assuming FloorUseFlagsMask contains bitmask value of 2). Only one floor can be the "default", so setting this to true will "steal" the attribute if it was previously assigned to another Occupancy Floor combination for the same Occupancy.

boolean

None.

IsDefaultReceptionFloor

Required: Represents whether the Occupancy / Floor combination is used as the default Reception Floor (assuming FloorUseFlagsMask contains bitmask value of 1). Only one floor can be the "default", so setting this to true will "steal" the attribute if it was previously assigned to another Occupancy Floor combination for the same Occupancy.

boolean

None.

IsDefaultOccupantFloor

Required: Represents whether the Occupancy / Floor combination is used as the default Occupancy Floor (assuming FloorUseFlagsMask contains bitmask value of 4). This is used to determine default floors of new employees amongst other things. Only one floor can be the "default", so setting this to true will "steal" the attribute if it was previously assigned to another Occupancy Floor combination for the same Occupancy.

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "OccupancyFloorId": "389ab131-66a9-4fc8-a5aa-39c4906208c6",
  "OccupancyId": "abd2db0b-3028-4cb6-9e45-6bdab62f0704",
  "FloorId": "e974e037-3c92-4b51-b3c0-759755c0f695",
  "Deleted": true,
  "FloorUseFlagsMask": 4,
  "IsDefaultMailFloor": true,
  "IsDefaultReceptionFloor": true,
  "IsDefaultOccupantFloor": true
}

application/xml, text/xml

Sample:
<AddUpdateOccupancyFloorViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APIWebRole.Controllers">
  <Deleted>true</Deleted>
  <FloorId>e974e037-3c92-4b51-b3c0-759755c0f695</FloorId>
  <FloorUseFlagsMask>4</FloorUseFlagsMask>
  <IsDefaultMailFloor>true</IsDefaultMailFloor>
  <IsDefaultOccupantFloor>true</IsDefaultOccupantFloor>
  <IsDefaultReceptionFloor>true</IsDefaultReceptionFloor>
  <OccupancyFloorId>389ab131-66a9-4fc8-a5aa-39c4906208c6</OccupancyFloorId>
  <OccupancyId>abd2db0b-3028-4cb6-9e45-6bdab62f0704</OccupancyId>
</AddUpdateOccupancyFloorViewModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

ResultWithGuid
NameDescriptionTypeAdditional information
Value

Represents the PK value that was created as a result of an add

globally unique identifier

None.

ResultCode

Represents the result code

integer

None.

Description

Represents a description of the result code

string

None.

Response Formats

application/json, text/json

Sample:
{
  "Value": "204b7ed8-3a10-49a0-9177-7c125ee4f198",
  "ResultCode": 2,
  "Description": "sample string 3"
}

application/xml, text/xml

Sample:
<ResultWithGuid xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APIWebRole.Controllers">
  <Description>sample string 3</Description>
  <HttpStatusCode>Continue</HttpStatusCode>
  <ResultCode>2</ResultCode>
  <Value>204b7ed8-3a10-49a0-9177-7c125ee4f198</Value>
</ResultWithGuid>