POST api/buildings/{buildingId}/spaces

Insert a new Space

Request Information

URI Parameters

NameDescriptionTypeAdditional information
buildingId

Building ID

integer

Required

Body Parameters

ParkingSpaceInsertViewModel

ParkingSpaceInsertViewModel
NameDescriptionTypeAdditional information
SpaceName

ParkingSpaceName

string

Required

Matching regular expression pattern: ^[\w\d]*$

Max length: 4

SpaceDescription

ParkingSpaceDescription

string

Required

Matching regular expression pattern: ^[\w\d\s]*$

Max length: 50

TaxRate

TaxRate

decimal number

Range: inclusive between 0 and 100

SpaceTypeId

Space Type Id

integer

Required

PercentageOfOwnership

Percentage of ownership

decimal number

Required

Range: inclusive between 0 and 100

Request Formats

application/json, text/json

Sample:
{
  "spaceName": "sample string 1",
  "spaceDescription": "sample string 2",
  "taxRate": 1.0,
  "spaceTypeId": 1,
  "percentageOfOwnership": 1.0
}

application/xml, text/xml

Sample:
<ParkingSpaceInsertViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CamAcctApi.ViewModels.ParkingSpace">
  <PercentageOfOwnership>1</PercentageOfOwnership>
  <SpaceDescription>sample string 2</SpaceDescription>
  <SpaceTypeId>1</SpaceTypeId>
  <TaxRate>1</TaxRate>
  <SpaceName>sample string 1</SpaceName>
</ParkingSpaceInsertViewModel>

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 'ParkingSpaceInsertViewModel'.

Response Information

Resource Description

Created parking space

ParkingSpaceViewModel
NameDescriptionTypeAdditional information
SpaceName

Space name

string

None.

SpaceId

ParkingSpaceId

integer

None.

BuildingId

BuildingId

integer

None.

UnitId

UnitId

integer

None.

SpaceType

Space type

BuildingSpaceTypeViewModel

None.

Unit

Unit parking spaces assigned to

UnitViewModel

None.

SpaceDescription

ParkingSpaceDescription

string

Required

Matching regular expression pattern: ^[\w\d\s]*$

Max length: 50

TaxRate

TaxRate

decimal number

Range: inclusive between 0 and 100

SpaceTypeId

Space Type Id

integer

Required

PercentageOfOwnership

Percentage of ownership

decimal number

Required

Range: inclusive between 0 and 100