POST api/units/profile

Create Unit Profile

Request Information

URI Parameters

None.

Body Parameters

CreateUnitProfileViewModel
NameDescriptionTypeAdditional information
UnitNumber

string

Required

Max length: 50

BuildingId

integer

Required

Range: inclusive between 1 and 2147483647

SpaceIds

Collection of integer

None.

PercentOwned

Percent Owned value ({10}.{9})

decimal number

Range: inclusive between 0 and 9999999999.999999999

Description

Unit Description

string

Max length: 50

UnitTypeId

Unit Type

integer

Range: inclusive between 0 and 2147483647

NumberOfShares

decimal number

Range: inclusive between 0 and 99999999.99

SquareFootage

Square Footage value ({9}.{3})

decimal number

Range: inclusive between 0 and 999999999.999

NoOfRooms

No of Rooms max value ({8})

integer

Range: inclusive between 0 and 99999999

Block

Block

string

Max length: 15

Lot

Lot

string

Max length: 15

ParcelId

Parcel ID

string

Max length: 50

LegalUnitNumber

Legal Unit Number

string

Max length: 50

Address

AddressBaseViewModel

Required

Request Formats

application/json, text/json

Sample:
{
  "unitNumber": "sample string 1",
  "buildingId": 2,
  "spaceIds": [
    1,
    2
  ],
  "percentOwned": 3.0,
  "description": "sample string 4",
  "unitTypeId": 1,
  "numberOfShares": 1.0,
  "squareFootage": 1.0,
  "noOfRooms": 1,
  "block": "sample string 5",
  "lot": "sample string 6",
  "parcelId": "sample string 7",
  "legalUnitNumber": "sample string 8",
  "address": {
    "address1": "sample string 1",
    "address2": "sample string 2",
    "city": "sample string 3",
    "state": "sample string 4",
    "zipCode": "sample string 5",
    "country": "sample string 6"
  }
}

application/xml, text/xml

Sample:
<CreateUnitProfileViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CamAcctApi.ViewModels.Units">
  <Address xmlns:d2p1="http://schemas.datacontract.org/2004/07/CamAcctApi.ViewModels.Address">
    <d2p1:Address1>sample string 1</d2p1:Address1>
    <d2p1:Address2>sample string 2</d2p1:Address2>
    <d2p1:City>sample string 3</d2p1:City>
    <d2p1:Country>sample string 6</d2p1:Country>
    <d2p1:State>sample string 4</d2p1:State>
    <d2p1:ZipCode>sample string 5</d2p1:ZipCode>
  </Address>
  <Block>sample string 5</Block>
  <Description>sample string 4</Description>
  <LegalUnitNumber>sample string 8</LegalUnitNumber>
  <Lot>sample string 6</Lot>
  <NoOfRooms>1</NoOfRooms>
  <NumberOfShares>1</NumberOfShares>
  <ParcelId>sample string 7</ParcelId>
  <PercentOwned>3</PercentOwned>
  <SquareFootage>1</SquareFootage>
  <UnitTypeId>1</UnitTypeId>
  <BuildingId>2</BuildingId>
  <SpaceIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </SpaceIds>
  <UnitNumber>sample string 1</UnitNumber>
</CreateUnitProfileViewModel>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'CreateUnitProfileViewModel'.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.