curl --location --request POST 'https://api.travtus.com/leases/create/' \
--header 'Content-Type: application/json' \
--header 'Authorization: bearer <token>' \
--data-raw '{
"lease": {
"identifier": "lease-1",
"start_date": "2023-01-17",
"end_date": "2023-12-17",
"move_in_date": "2023-01-17",
"unit_id": "unit-id-1",
"unit_external_ref": "unit-external-ref-1",
"is_furnished": false,
"minimum_days_notice": 30,
"deposit": 1400.0,
"rent": 700.0
},
"tenants": [
{
"email_address": "[email protected]",
"first_name": "Test",
"last_name": "Tenant 1",
"external_ref": "id-1",
"phone_number": "01234567890"
},
{
"email_address": "[email protected]",
"first_name": "Test",
"last_name": "Tenant 2",
"external_ref": "id-2",
"phone_number": "01234567891"
}
]
}'
{
"success": true,
"lease": "lease-1"
}
This endpoint creates or updates a lease and tenant records for it.
curl --location --request POST 'https://api.travtus.com/leases/create/' \
--header 'Content-Type: application/json' \
--header 'Authorization: bearer <token>' \
--data-raw '{
"lease": {
"identifier": "lease-1",
"start_date": "2023-01-17",
"end_date": "2023-12-17",
"move_in_date": "2023-01-17",
"unit_id": "unit-id-1",
"unit_external_ref": "unit-external-ref-1",
"is_furnished": false,
"minimum_days_notice": 30,
"deposit": 1400.0,
"rent": 700.0
},
"tenants": [
{
"email_address": "[email protected]",
"first_name": "Test",
"last_name": "Tenant 1",
"external_ref": "id-1",
"phone_number": "01234567890"
},
{
"email_address": "[email protected]",
"first_name": "Test",
"last_name": "Tenant 2",
"external_ref": "id-2",
"phone_number": "01234567891"
}
]
}'
{
"success": true,
"lease": "lease-1"
}
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.
Show lease
Show tenant
{
"error": {
"type": "missing_authorization",
"message": "Your request does not include an 'Authorization' header with a bearer token for your account."
}
}
{
"error": {
"type": "expired_token",
"message": "The bearer token you have provided in the 'Authorization' header has expired. Please obtain a new one."
}
}
{
"error": {
"type": "invalid_authorization",
"message": "The bearer token you have provided in the 'Authorization' header is invalid."
}
}
{
"error": {
"type": "no_unit",
"message": "No unit id or unit external reference provided."
}
}
{
"error": {
"type": "unit_not_found",
"message": "No unit with the provided unit id or unit external reference."
}
}
curl --location --request POST 'https://api.travtus.com/leases/create/' \
--header 'Content-Type: application/json' \
--header 'Authorization: bearer <token>' \
--data-raw '{
"lease": {
"identifier": "lease-1",
"start_date": "2023-01-17",
"end_date": "2023-12-17",
"move_in_date": "2023-01-17",
"unit_id": "unit-id-1",
"unit_external_ref": "unit-external-ref-1",
"is_furnished": false,
"minimum_days_notice": 30,
"deposit": 1400.0,
"rent": 700.0
},
"tenants": [
{
"email_address": "[email protected]",
"first_name": "Test",
"last_name": "Tenant 1",
"external_ref": "id-1",
"phone_number": "01234567890"
},
{
"email_address": "[email protected]",
"first_name": "Test",
"last_name": "Tenant 2",
"external_ref": "id-2",
"phone_number": "01234567891"
}
]
}'
{
"success": true,
"lease": "lease-1"
}