You must specify either a unit_id or unit_external_ref for your lease.If the corresponding unit record does not exist, you must create it separately via the relevant unit/property endpoints.
A unique identifier for the lease.This will be used when determining whether a lease needs to be updated or created.If this matches a lease that lease will be updated, otherwise a new one will be created.The identifier for a lease can not be updated once it has been set.When creating a new lease, a random, unique identifier will be set.Any value passed in this request will only be used for finding an existing lease.
Listed below are common errors that may be returned by the endpoint, along with their corresponding status code.Status Code - 400
Missing Authorization header
Copy
Ask AI
{ "error": { "type": "missing_authorization", "message": "Your request does not include an 'Authorization' header with a bearer token for your account." }}
Status Code - 401
Expired Authorization header bearer token value
Copy
Ask AI
{ "error": { "type": "expired_token", "message": "The bearer token you have provided in the 'Authorization' header has expired. Please obtain a new one." }}
Status Code - 401
Invalid Authorization header bearer token value
Copy
Ask AI
{ "error": { "type": "invalid_authorization", "message": "The bearer token you have provided in the 'Authorization' header is invalid." }}
Status Code - 400Returned if neither a unit id or a unit external reference is passed in the request body
No unit specified for the lease
Copy
Ask AI
{ "error": { "type": "no_unit", "message": "No unit id or unit external reference provided." }}
Status Code - 400Returned if a unit with the specified unit id or unit external reference could not be retrieved
Unit to use for lease not found
Copy
Ask AI
{ "error": { "type": "unit_not_found", "message": "No unit with the provided unit id or unit external reference." }}