List units across the authenticated organization
GET
/api/units
const url = 'https://api.getvespy.com/api/units?status=occupied&sortBy=unitNumber&sortDirection=asc';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.getvespy.com/api/units?status=occupied&sortBy=unitNumber&sortDirection=asc' \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”search
string
status
string
propertyId
string format: uuid
createdAfter
string format: date
createdBefore
string format: date
minOverdueRentCents
integer
maxOverdueRentCents
integer
minOpenWorkOrders
integer
maxOpenWorkOrders
integer
sortBy
string
sortDirection
string
Responses
Section titled “Responses”Default Response
Media typeapplication/json
object
noteSummaries
required
Array<object>
object
entityId
required
string format: uuid
latestNote
required
object
body
required
string
createdAt
required
string format: date-time
visibility
required
string
noteCount
required
integer
units
required
Array<object>
object
accessInstructions
required
string
bathrooms
required
integer
bedrooms
required
integer
buildingId
required
string format: uuid
createdAt
required
string format: date-time
currentLease
object
endDate
required
string format: date
id
required
string format: uuid
leaseKind
string
rentCents
required
integer
startDate
required
string format: date
status
required
string
tenantId
required
string format: uuid
tenantName
required
string
currentTenant
object
email
required
string format: email
fullName
required
string
id
required
string format: uuid
description
required
string
floorId
required
string format: uuid
id
required
string format: uuid
monthlyRentCents
required
integer
openWorkOrderCount
integer
overduePostedRentCents
integer
propertyCity
required
string
propertyId
required
string format: uuid
propertyName
required
string
propertyPostalCode
required
string
propertyState
required
string
propertyStreetLine1
required
string
propertyStreetLine2
required
string
rentableSqft
required
integer
spaceType
required
string
status
required
string
unitNumber
required
string
usableSqft
required
integer
Example
{ "noteSummaries": [ { "latestNote": { "visibility": "organization_only" } } ], "units": [ { "currentLease": { "leaseKind": "residential", "status": "draft" }, "spaceType": "residential_unit", "status": "occupied" } ]}Default Response
Media typeapplication/json
object
code
string
errors
Array<object>
object
code
required
string
message
required
string
path
required
string
message
required
string
Examplegenerated
{ "code": "example", "errors": [ { "code": "example", "message": "example", "path": "example" } ], "message": "example"}Default Response
Media typeapplication/json
object
code
string
errors
Array<object>
object
code
required
string
message
required
string
path
required
string
message
required
string
Examplegenerated
{ "code": "example", "errors": [ { "code": "example", "message": "example", "path": "example" } ], "message": "example"}Default Response
Media typeapplication/json
object
code
string
errors
Array<object>
object
code
required
string
message
required
string
path
required
string
message
required
string
Examplegenerated
{ "code": "example", "errors": [ { "code": "example", "message": "example", "path": "example" } ], "message": "example"}