PUT api/v1/Occupancies/{id}
Updates a single Occupancy that is already in the system. Returns Success/Error code.
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| id |
User Id |
globally unique identifier |
Required |
Body Parameters
AddUpdateOccupancyViewModel| Name | Description | Type | Additional 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. |
| EmailAddressDomainFormula |
Represents the email address of the Occupancy. |
string |
None. |
| sAvailableEmailAddressFormulaTemplateId |
Represents the email address formula template id of the Occupancy. |
AvailableEmailAddressFormulaTemplateEnum |
None. |
Request Formats
application/json, text/json
{
"OccupancyId": "18ada81e-8018-4b16-9ccf-292a73406054",
"Name": "sample string 2",
"FacilityId": "05818f84-af0a-45d5-b843-1183774b462b",
"CompanyId": "ecf08368-c355-4e5a-9391-b002297e2522",
"StreetAddress1": "sample string 4",
"StreetAddress2": "sample string 5",
"City": "sample string 6",
"RegionId": "dd69f778-2718-4573-a66f-73ecee85fbb3",
"CountryId": "e4930742-e64e-4e39-bd12-4a45eed09753",
"PostalCode": "sample string 9",
"Website": "sample string 10",
"Phone": "sample string 11",
"DefaultBadgeTemplateId": "6443bea3-3f37-45f3-ba24-91c80a2617b6",
"Deleted": true,
"EmailAddressDomainFormula": "sample string 13",
"sAvailableEmailAddressFormulaTemplateId": 0
}
application/xml, text/xml
<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>ecf08368-c355-4e5a-9391-b002297e2522</CompanyId> <CountryId>e4930742-e64e-4e39-bd12-4a45eed09753</CountryId> <DefaultBadgeTemplateId>6443bea3-3f37-45f3-ba24-91c80a2617b6</DefaultBadgeTemplateId> <Deleted>true</Deleted> <EmailAddressDomainFormula>sample string 13</EmailAddressDomainFormula> <FacilityId>05818f84-af0a-45d5-b843-1183774b462b</FacilityId> <Name>sample string 2</Name> <OccupancyId>18ada81e-8018-4b16-9ccf-292a73406054</OccupancyId> <Phone>sample string 11</Phone> <PostalCode>sample string 9</PostalCode> <RegionId>dd69f778-2718-4573-a66f-73ecee85fbb3</RegionId> <StreetAddress1>sample string 4</StreetAddress1> <StreetAddress2>sample string 5</StreetAddress2> <Website>sample string 10</Website> <sAvailableEmailAddressFormulaTemplateId>Custom</sAvailableEmailAddressFormulaTemplateId> </AddUpdateOccupancyViewModel>
application/x-www-form-urlencoded
Sample not available.
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
application/json, text/json
{
"ResultCode": 1,
"Description": "sample string 2"
}
application/xml, text/xml
<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>