GET api/units/{unitId}
Get unit by id
Request Information
Authentication
This method requires user authentication
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| unitId |
(Required) |
integer |
Required |
Body Parameters
None.
Response Information
Resource Description
Unit| Name | Description | Type | Additional information |
|---|---|---|---|
| UnitId |
Unit Id. Primary key of the units table. |
integer |
None. |
| PropertyId |
Property Id. See the GET api/properties/{propertyId} route to get the property data. |
integer |
None. |
| UnitNumber |
Unit Number. |
string |
None. |
| Address1 |
Address 1. |
string |
None. |
| Address2 |
Address 2. |
string |
None. |
| City |
City. |
string |
None. |
| State |
State. |
string |
None. |
| Zip |
Zip Code. |
string |
None. |
| DisplayOrder |
Unit Display Order. The order in which units should be displayed. This sorting order is set up in Connect in the Property Edit Page > Unit Sorting Options. |
integer |
None. |
| Floor |
Floor information for the unit |
integer |
None. |
| Latitude |
Geo Position info: Latitude |
decimal number |
None. |
| Longitude |
Geo Position info: Latitude |
decimal number |
None. |
Response Formats
application/json, text/json
Sample:
{
"UnitId": 1,
"PropertyId": 2,
"UnitNumber": "sample string 3",
"Address1": "sample string 4",
"Address2": "sample string 5",
"City": "sample string 6",
"State": "sample string 7",
"Zip": "sample string 8",
"DisplayOrder": 1,
"Floor": 1,
"Latitude": 1.0,
"Longitude": 1.0
}
Internal Error Codes
-
106: ResourceNotFound
(The requested resource was not found., NotFound) -
100: MissingRequiredHeader
(Invalid request format. A required HTTP header was not specified., BadRequest) -
118: InvalidHeaderValue
(The value provided for one of the HTTP headers was not in the correct format., BadRequest) -
199: UnknownError
(Internal server error., InternalServerError) -
105: ResourceNotLinkedToUser
(User is trying to access a resource that belongs to a property not linked to the user., Forbidden)