PUT api/v1/Occupancies/{id}

Updates a single Occupancy that is already in the system. Returns Success/Error code.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

User Id

globally unique identifier

Required

Body Parameters

AddUpdateOccupancyViewModel
NameDescriptionTypeAdditional information
OccupancyId

Represents the PK of the Occupancy

globally unique identifier

None.

Name

Required: Represents the name of the Occupancy. Max Length = 200

string

None.

FacilityId

Required: Represents the PK of the Facility the Occupancy is located in. Retrieve possible values by calling /Facility/GetAllFacilities

globally unique identifier

None.

CompanyId

Conditional: Represents the PK of the global company that the Occupancy is an instance of, if not passed in POST method, then the company is created on the Fly.

globally unique identifier

None.

StreetAddress1

Represents the primary street address of the Occupancy

string

None.

StreetAddress2

Represents the secondary street address of the Occupancy

string

None.

City

Represents the city of the Occupancy

string

None.

RegionId

Represents the PK of the region (State, Province, County, etc) of the Occupancy. Retrieve possible values by calling /Region/GetAllRegionsByCountryId

globally unique identifier

None.

CountryId

Represents the PK of the country of the Occupancy. Retrieve possible values by calling /Country/GetAllCountries

globally unique identifier

None.

PostalCode

Represents the Postal Code/Zip Code of the Occupancy

string

None.

Website

Represents the URL of the website associated with the Occupancy

string

None.

Phone

Represents the primary phone number of the Occupancy

string

None.

DefaultBadgeTemplateId

Represents the PK of the default Badge Template for the Occupancy

globally unique identifier

None.

Deleted

Represents the deleted status of the Occupancy. Should be false for an Add action,

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "OccupancyId": "dd466ffa-10be-4ea5-9dbb-658a11bf90e6",
  "Name": "sample string 2",
  "FacilityId": "397db9df-40fb-4d68-946f-9f6cefb9e042",
  "CompanyId": "55e52d96-e0db-483c-9f66-b0330ffbb445",
  "StreetAddress1": "sample string 4",
  "StreetAddress2": "sample string 5",
  "City": "sample string 6",
  "RegionId": "dd4db633-03d3-4e98-9938-2e1ffbab4968",
  "CountryId": "06290f3e-c9e9-4d8c-92fa-9a2989da12b2",
  "PostalCode": "sample string 9",
  "Website": "sample string 10",
  "Phone": "sample string 11",
  "DefaultBadgeTemplateId": "cbf9549c-cf04-4a7e-b58f-979239bd78e2",
  "Deleted": true
}

application/xml, text/xml

Sample:
<AddUpdateOccupancyViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APIWebRole.Controllers">
  <City>sample string 6</City>
  <CompanyId>55e52d96-e0db-483c-9f66-b0330ffbb445</CompanyId>
  <CountryId>06290f3e-c9e9-4d8c-92fa-9a2989da12b2</CountryId>
  <DefaultBadgeTemplateId>cbf9549c-cf04-4a7e-b58f-979239bd78e2</DefaultBadgeTemplateId>
  <Deleted>true</Deleted>
  <FacilityId>397db9df-40fb-4d68-946f-9f6cefb9e042</FacilityId>
  <Name>sample string 2</Name>
  <OccupancyId>dd466ffa-10be-4ea5-9dbb-658a11bf90e6</OccupancyId>
  <Phone>sample string 11</Phone>
  <PostalCode>sample string 9</PostalCode>
  <RegionId>dd4db633-03d3-4e98-9938-2e1ffbab4968</RegionId>
  <StreetAddress1>sample string 4</StreetAddress1>
  <StreetAddress2>sample string 5</StreetAddress2>
  <Website>sample string 10</Website>
</AddUpdateOccupancyViewModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

Result
NameDescriptionTypeAdditional information
ResultCode

Represents the result code

integer

None.

Description

Represents a description of the result code

string

None.

Response Formats

application/json, text/json

Sample:
{
  "ResultCode": 1,
  "Description": "sample string 2"
}

application/xml, text/xml

Sample:
<Result xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APIWebRole.Controllers">
  <Description>sample string 2</Description>
  <HttpStatusCode>Continue</HttpStatusCode>
  <ResultCode>1</ResultCode>
</Result>