Create a property with its units, tenants and leases
POST
/api/properties/setup
const url = 'https://api.getvespy.com/api/properties/setup';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"dryRun":false,"property":{"assetClass":"residential","city":"example","name":"example","ownerIds":[],"postalCode":"example","state":"example","streetLine1":"example","streetLine2":null},"rentCategoryId":null,"rows":[{"lease":null,"tenant":null,"unit":{"bathrooms":null,"bedrooms":null,"buildingId":null,"floorId":null,"monthlyRentCents":null,"rentableSqft":null,"spaceType":"residential_unit","unitNumber":"example"}}],"sendInvites":false}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.getvespy.com/api/properties/setup \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "dryRun": false, "property": { "assetClass": "residential", "city": "example", "name": "example", "ownerIds": [], "postalCode": "example", "state": "example", "streetLine1": "example", "streetLine2": null }, "rentCategoryId": null, "rows": [ { "lease": null, "tenant": null, "unit": { "bathrooms": null, "bedrooms": null, "buildingId": null, "floorId": null, "monthlyRentCents": null, "rentableSqft": null, "spaceType": "residential_unit", "unitNumber": "example" } } ], "sendInvites": false }'Creates the property and every row in one transaction: nothing is saved unless every row is valid. Set dryRun to run every check and roll back.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
dryRun
boolean
property
required
rows
required
Array<object>
object
lease
tenant
unit
required
object
sendInvites
boolean
Responses
Section titled “Responses”Default Response
Media typeapplication/json
object
created
required
object
leases
required
integer
tenants
required
integer
tenantsLinked
required
integer
units
required
integer
dryRun
required
boolean
invites
required
object
sent
required
integer
skipped
required
Array<object>
object
reason
required
string
row
required
integer
Example
{ "rows": [ { "tenant": "created" } ]}Default Response
Media typeapplication/json
object
created
required
object
leases
required
integer
tenants
required
integer
tenantsLinked
required
integer
units
required
integer
dryRun
required
boolean
invites
required
object
sent
required
integer
skipped
required
Array<object>
object
reason
required
string
row
required
integer
Example
{ "rows": [ { "tenant": "created" } ]}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"}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"}