Deployment Guide
- File Uploads
- Data Feeds
- Chat Widget Deployment
- 3rd Party Integrations
Travtus API & Webhook
- Request Access
- API License Agreement
- POSTAuthentication
- Webhook
- Data Types & Endpoints
- Community
- Person
- Lease
- Properties
- Listings
- Tasks
- Reviews
- Messaging
Glossary
Create/Update Properties
This endpoint creates or updates multiple units.
curl --location --request "POST 'https://api.travtus.com/units/multiple/'" \
--header 'Content-Type: application/json' \
--header 'Authorization: bearer <token>' \
--data-raw '{
"group_id": "group-id-1",
"units": [
{
"identifier": "unit-id-1",
"external_ref": "unit-ext-ref-1",
"has_flex_wall": false,
"number_of_bathrooms": 2,
"number_of_bedrooms": 1,
"sqft": 40,
"unit_number": "2",
"bathrooms": [
{
"has_shower_or_bath": false,
"has_sink": true,
"has_toilet": true
},
{
"has_shower_or_bath": true,
"has_sink": true,
"has_toilet": true
}
],
"address": {
"building_name": "Building 1",
"address_line_1": "Blvd Street",
"address_line_2": "Appartment 12",
"city": "New York",
"country": "United States",
"state": "New York",
"postal_code": "10001",
"latitude": 40.730610,
"longitude": -73.935242
},
},
{
"identifier": "unit-id-2",
"external_ref": "unit-ext-ref-2",
"has_flex_wall": false,
"number_of_bathrooms": 1,
"number_of_bedrooms": 1,
"sqft": 20,
"unit_number": "3",
"bathrooms": [
{
"has_shower_or_bath": true,
"has_sink": true,
"has_toilet": true
}
],
"address": {
"building_name": "Building 1",
"address_line_1": "Blvd Street",
"address_line_2": "Appartment 13",
"city": "New York",
"country": "United States",
"state": "New York",
"postal_code": "10001",
"latitude": 40.730610,
"longitude": -73.935242
},
}
]
}'
{
"units": [
{
"sucess": true,
"failure_reason": "",
"identifier": "unit-id-1",
"external_ref": "unit-ext-ref-1",
"has_flex_wall": false,
"number_of_bathrooms": 2,
"number_of_bedrooms": 1,
"sqft": 40,
"unit_number": "2",
"bathrooms": [
{
"has_shower_or_bath": false,
"has_sink": true,
"has_toilet": true
},
{
"has_shower_or_bath": true,
"has_sink": true,
"has_toilet": true
}
],
"address": {
"building_name": "Building 1",
"address_line_1": "Blvd Street",
"address_line_2": "Appartment 12",
"city": "New York",
"country": "United States",
"state": "New York",
"postal_code": "10001",
"latitude": 40.730610,
"longitude": -73.935242
},
},
{
"sucess": true,
"failure_reason": "",
"identifier": "unit-id-2",
"external_ref": "unit-ext-ref-2",
"has_flex_wall": false,
"number_of_bathrooms": 1,
"number_of_bedrooms": 1,
"sqft": 20,
"unit_number": "3",
"bathrooms": [
{
"has_shower_or_bath": true,
"has_sink": true,
"has_toilet": true
}
],
"address": {
"building_name": "Building 1",
"address_line_1": "Blvd Street",
"address_line_2": "Appartment 13",
"city": "New York",
"country": "United States",
"state": "New York",
"postal_code": "10001",
"latitude": 40.730610,
"longitude": -73.935242
},
}
]
}
A group must be provided for updating or creating the units.
You can provide either a group id through the group_id
parameter or a group external reference through the group_external_ref
attribute.
Do not provide both, as this will result in the request failing.
If no group id or group external reference is provided, the operation will fail.
This endpoint firstly attempts to match the provided units data with existing units via the unit’s identifier body parameter, in order to update an existing entry.
If a unit is not found via the identifier or the identifier parameter is not set, the endpoint attempts to match an existing unit via the address.
Header
The authentication token for your request
Body
The id of the group you want to create or update the units for.
The external reference of the group you want to create or update the units for.
A list of units to be updated or created
A unique identifier for the unit.
This will be used when determining whether a unit needs to be updated or created.
If this matches a unit in the groups you have specified that unit will be updated, otherwise a new one will be created.
The identifier for a unit can not be updated once it has been set.
When creating a new unit, a random, unique identifier will be set.
Any value passed in this request will only be used for finding an existing unit.
An external reference for the unit you want to create or update.
This is typically an identifier you may use for unit records in your own system.
True if the unit is a flex apartment, false if it is not.
The unit’s number of bathrooms.
The unit’s number of bedrooms.
The square feet surface for the unit.
The unit’s number.
Address information for the unit to be created or updated.
The name of the building.
The first line of the unit’s address.
The second line of the unit’s address.
The city of the unit’s address.
The country of the unit’s address.
The state in which the unit’s address is located.
The postal code of the unit’s address.
The latitude of the unit’s address.
The longitude of the unit’s address.
Response
The list of units created or updated by the operation along with the most up to date attributes for each unit.
Also indicates whether each of the units was succesfully updated or created and a reason for failure, if the update or creat for the unit failed.
Indicates whether the update or create operation was successful.
The reason for an unsuccesful unit record creation or update. Empty if creation was successful.
The internal identifier for the retrieved unit.
The external reference for the retrieved unit.
The number of the retrieved unit.
True if the retrieved unit is a flex apartment, false if it is not.
The number of full bathrooms for the retrieved unit.
The number of half bathrooms for the retrieved unit.
The number of bedrooms for the retrieved unit.
The square feet surface for the retrieved unit.
The unit’s address.
The name of the building.
The first line of the unit’s address.
The second line of the unit’s address.
The city of the unit’s address.
The country in which the unit’s address is located.
The state in which the unit’s address is located.
The postal code for the unit’s address.
The latitude of the unit’s address.
The longitude of the unit’s address.
Errors
Listed below are common errors that may be returned by the endpoint, along with their corresponding status code.
Status Code - 400
{
"error": {
"type": "missing_authorization",
"message": "Your request does not include an 'Authorization' header with a bearer token for your account."
}
}
Status Code - 401
{
"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
{
"error": {
"type": "invalid_authorization",
"message": "The bearer token you have provided in the 'Authorization' header is invalid."
}
}
Status Code - 400
Returned if no group id or external reference is passed in the body.
{
"error": {
"type": "no_group",
"message": "You must either provide a group id or group external reference in the request body."
}
}
Status Code - 400
Returned if both a group id and group_external_ref are provided
{
"error": {
"type": "both_group_identifiers_provided",
"message": "You have provided both a group id and group external reference for the create/update units operation. Please only provide one of the two."
}
}
Status Code - 401
Returned if the authenticated API user does not have access to the requested group.
{
"error": {
"type": "no_access_to_group",
"message": "You do not have access to the group you have provided."
}
}
Status Code - 404
Returned if no group for the provided group ID is found
{
"error": {
"type": "group_not_found",
"message": "We could not find a group with the ID you have provided."
}
}
curl --location --request "POST 'https://api.travtus.com/units/multiple/'" \
--header 'Content-Type: application/json' \
--header 'Authorization: bearer <token>' \
--data-raw '{
"group_id": "group-id-1",
"units": [
{
"identifier": "unit-id-1",
"external_ref": "unit-ext-ref-1",
"has_flex_wall": false,
"number_of_bathrooms": 2,
"number_of_bedrooms": 1,
"sqft": 40,
"unit_number": "2",
"bathrooms": [
{
"has_shower_or_bath": false,
"has_sink": true,
"has_toilet": true
},
{
"has_shower_or_bath": true,
"has_sink": true,
"has_toilet": true
}
],
"address": {
"building_name": "Building 1",
"address_line_1": "Blvd Street",
"address_line_2": "Appartment 12",
"city": "New York",
"country": "United States",
"state": "New York",
"postal_code": "10001",
"latitude": 40.730610,
"longitude": -73.935242
},
},
{
"identifier": "unit-id-2",
"external_ref": "unit-ext-ref-2",
"has_flex_wall": false,
"number_of_bathrooms": 1,
"number_of_bedrooms": 1,
"sqft": 20,
"unit_number": "3",
"bathrooms": [
{
"has_shower_or_bath": true,
"has_sink": true,
"has_toilet": true
}
],
"address": {
"building_name": "Building 1",
"address_line_1": "Blvd Street",
"address_line_2": "Appartment 13",
"city": "New York",
"country": "United States",
"state": "New York",
"postal_code": "10001",
"latitude": 40.730610,
"longitude": -73.935242
},
}
]
}'
{
"units": [
{
"sucess": true,
"failure_reason": "",
"identifier": "unit-id-1",
"external_ref": "unit-ext-ref-1",
"has_flex_wall": false,
"number_of_bathrooms": 2,
"number_of_bedrooms": 1,
"sqft": 40,
"unit_number": "2",
"bathrooms": [
{
"has_shower_or_bath": false,
"has_sink": true,
"has_toilet": true
},
{
"has_shower_or_bath": true,
"has_sink": true,
"has_toilet": true
}
],
"address": {
"building_name": "Building 1",
"address_line_1": "Blvd Street",
"address_line_2": "Appartment 12",
"city": "New York",
"country": "United States",
"state": "New York",
"postal_code": "10001",
"latitude": 40.730610,
"longitude": -73.935242
},
},
{
"sucess": true,
"failure_reason": "",
"identifier": "unit-id-2",
"external_ref": "unit-ext-ref-2",
"has_flex_wall": false,
"number_of_bathrooms": 1,
"number_of_bedrooms": 1,
"sqft": 20,
"unit_number": "3",
"bathrooms": [
{
"has_shower_or_bath": true,
"has_sink": true,
"has_toilet": true
}
],
"address": {
"building_name": "Building 1",
"address_line_1": "Blvd Street",
"address_line_2": "Appartment 13",
"city": "New York",
"country": "United States",
"state": "New York",
"postal_code": "10001",
"latitude": 40.730610,
"longitude": -73.935242
},
}
]
}
curl --location --request "POST 'https://api.travtus.com/units/multiple/'" \
--header 'Content-Type: application/json' \
--header 'Authorization: bearer <token>' \
--data-raw '{
"group_id": "group-id-1",
"units": [
{
"identifier": "unit-id-1",
"external_ref": "unit-ext-ref-1",
"has_flex_wall": false,
"number_of_bathrooms": 2,
"number_of_bedrooms": 1,
"sqft": 40,
"unit_number": "2",
"bathrooms": [
{
"has_shower_or_bath": false,
"has_sink": true,
"has_toilet": true
},
{
"has_shower_or_bath": true,
"has_sink": true,
"has_toilet": true
}
],
"address": {
"building_name": "Building 1",
"address_line_1": "Blvd Street",
"address_line_2": "Appartment 12",
"city": "New York",
"country": "United States",
"state": "New York",
"postal_code": "10001",
"latitude": 40.730610,
"longitude": -73.935242
},
},
{
"identifier": "unit-id-2",
"external_ref": "unit-ext-ref-2",
"has_flex_wall": false,
"number_of_bathrooms": 1,
"number_of_bedrooms": 1,
"sqft": 20,
"unit_number": "3",
"bathrooms": [
{
"has_shower_or_bath": true,
"has_sink": true,
"has_toilet": true
}
],
"address": {
"building_name": "Building 1",
"address_line_1": "Blvd Street",
"address_line_2": "Appartment 13",
"city": "New York",
"country": "United States",
"state": "New York",
"postal_code": "10001",
"latitude": 40.730610,
"longitude": -73.935242
},
}
]
}'
{
"units": [
{
"sucess": true,
"failure_reason": "",
"identifier": "unit-id-1",
"external_ref": "unit-ext-ref-1",
"has_flex_wall": false,
"number_of_bathrooms": 2,
"number_of_bedrooms": 1,
"sqft": 40,
"unit_number": "2",
"bathrooms": [
{
"has_shower_or_bath": false,
"has_sink": true,
"has_toilet": true
},
{
"has_shower_or_bath": true,
"has_sink": true,
"has_toilet": true
}
],
"address": {
"building_name": "Building 1",
"address_line_1": "Blvd Street",
"address_line_2": "Appartment 12",
"city": "New York",
"country": "United States",
"state": "New York",
"postal_code": "10001",
"latitude": 40.730610,
"longitude": -73.935242
},
},
{
"sucess": true,
"failure_reason": "",
"identifier": "unit-id-2",
"external_ref": "unit-ext-ref-2",
"has_flex_wall": false,
"number_of_bathrooms": 1,
"number_of_bedrooms": 1,
"sqft": 20,
"unit_number": "3",
"bathrooms": [
{
"has_shower_or_bath": true,
"has_sink": true,
"has_toilet": true
}
],
"address": {
"building_name": "Building 1",
"address_line_1": "Blvd Street",
"address_line_2": "Appartment 13",
"city": "New York",
"country": "United States",
"state": "New York",
"postal_code": "10001",
"latitude": 40.730610,
"longitude": -73.935242
},
}
]
}