Skip to main content

UpdateOccupancy

Overview

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

Request Information


Method

POST - api/Occupancy/UpdateOccupancy

URI Parameters

None.

Body Parameters

AddUpdateOccupancyViewModel

NameDescriptionTypeAdditional information
NameRequired: Represents the name of the Occupancy. Max Length = 200stringNone.
FacilityIdRequired: Represents the PK of the Facility the Occupancy is located in. Retrieve possible values by calling /Facility/GetAllFacilitiesglobally unique identifierNone.
CompanyIdRequired: Represents the PK of the global company that the Occupancy is an instance of.globally unique identifierNone.
StreetAddress1Represents the primary street address of the OccupancystringNone.
StreetAddress2Represents the secondary street address of the OccupancystringNone.
CityRepresents the city of the OccupancystringNone.
RegionIdRepresents the PK of the region (State, Province, County, etc) of the Occupancy. Retrieve possible values by calling /Region/GetAllRegionsByCountryIdglobally unique identifierNone.
CountryIdRepresents the PK of the country of the Occupancy. Retrieve possible values by calling /Country/GetAllCountriesglobally unique identifierNone.
PostalCodeRepresents the Postal Code/Zip Code of the OccupancystringNone.
WebsiteRepresents the URL of the website associated with the OccupancystringNone.
PhoneRepresents the primary phone number of the OccupancystringNone.
DefaultBadgeTemplateIdRepresents the PK of the default Badge Template for the Occupancyglobally unique identifierNone.
DeletedRepresents the deleted status of the Occupancy. Should be false for an Add action,booleanNone.

JSON

{
"Name": "sample string 1",
"FacilityId": "0412d5f8-4f48-4476-a85a-1ef077b91339",
"CompanyId": "b7cc41a4-8a68-4df6-98da-18b9e5de09c7",
"StreetAddress1": "sample string 4",
"StreetAddress2": "sample string 5",
"City": "sample string 6",
"RegionId": "d2bb122c-c2db-4d8e-8df7-f4c9f82b8a34",
"CountryId": "46fcb1b4-e9e2-4107-90b5-aefafd62d183",
"PostalCode": "sample string 9",
"Website": "sample string 10",
"Phone": "sample string 11",
"DefaultBadgeTemplateId": "f7f1e09e-aabe-4606-b10c-33b23bbae93e",
"Deleted": true
}

XML

<AddUpdateOccupancyViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BluSKYWebAPI.Controllers">
<City>sample string 6</City>
<CompanyId>b7cc41a4-8a68-4df6-98da-18b9e5de09c7</CompanyId>
<CountryId>46fcb1b4-e9e2-4107-90b5-aefafd62d183</CountryId>
<DefaultBadgeTemplateId>f7f1e09e-aabe-4606-b10c-33b23bbae93e</DefaultBadgeTemplateId>
<Deleted>true</Deleted>
<FacilityId>0412d5f8-4f48-4476-a85a-1ef077b91339</FacilityId>
`<Name>`sample string 1</Name>
<Phone>sample string 11</Phone>
<PostalCode>sample string 9</PostalCode>
<RegionId>d2bb122c-c2db-4d8e-8df7-f4c9f82b8a34</RegionId>
<StreetAddress1>sample string 4</StreetAddress1>
<StreetAddress2>sample string 5</StreetAddress2>
<Website>sample string 10</Website>
</AddUpdateOccupancyViewModel>
```

## Response Information

---

### Resource Description

Result

| Name | Description | Type | Additional information |
| --- | --- | --- | --- |
| ResultCode | Represents the result code | integer | None. |
| Description | Represents a description of the result code | string | None. |

### Response Formats

#### JSON

```json
{
"ResultCode": 1,
"Description": "sample string 2"
}
```

#### XML

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