curl --location --request POST 'https://api.travtus.com/units/find/' \
--header 'Content-Type: application/json' \
--header 'Authorization: bearer <token>' \
--data-raw '{
"address": {
"country": "United States"
},
"group_ids": ["group-1"],
"after-id": 1
}'
{
"last_id": 5,
"units": [
{
"identifier": "internal-unit-id-1",
"unit_number": "1",
"is_flex": false,
"full_bathrooms": 1,
"half_bathrooms": 1,
"number_of_bedrooms": 2,
"sqft": 40,
"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": "internal-unit-id-2",
"unit_number": "2",
"is_flex": false,
"full_bathrooms": 1,
"half_bathrooms": 0,
"number_of_bedrooms": 1,
"sqft": 30,
"address": {
"building_name": "Building 1",
"address_line_1": "Blvd Street",
"address_line_2": "Appartment 10",
"city": "New York",
"country": "United States",
"state": "New York",
"postal_code": "10001",
"latitude": 40.730610,
"longitude": -73.935242
}
},
]
}
This endpoint finds units with the list of body attributes passed to it.
curl --location --request POST 'https://api.travtus.com/units/find/' \
--header 'Content-Type: application/json' \
--header 'Authorization: bearer <token>' \
--data-raw '{
"address": {
"country": "United States"
},
"group_ids": ["group-1"],
"after-id": 1
}'
{
"last_id": 5,
"units": [
{
"identifier": "internal-unit-id-1",
"unit_number": "1",
"is_flex": false,
"full_bathrooms": 1,
"half_bathrooms": 1,
"number_of_bedrooms": 2,
"sqft": 40,
"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": "internal-unit-id-2",
"unit_number": "2",
"is_flex": false,
"full_bathrooms": 1,
"half_bathrooms": 0,
"number_of_bedrooms": 1,
"sqft": 30,
"address": {
"building_name": "Building 1",
"address_line_1": "Blvd Street",
"address_line_2": "Appartment 10",
"city": "New York",
"country": "United States",
"state": "New York",
"postal_code": "10001",
"latitude": 40.730610,
"longitude": -73.935242
}
},
]
}
group_ids parameter or a list of group external references through the groups_external_refs attribute to filter the list of retrieved units down.
Do not provide both, as this will result in the request failing.
If no group_ids or group_external_refs are specified in the request body, the authenticated user will retrieve unit records for all groups they have access to.
Show child attributes
last_id.after-id parameter to load the next set of results.If there are no more results to load, this value will be -1.Show unit
Show address
{
"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": "both_group_identifiers_provided",
"message": "You have provided both group ids and group external references for the find units operation. Please only provide one of the two."
}
}
{
"error": {
"type": "not_found",
"message": "There are no unit records matching the information provided."
}
}
curl --location --request POST 'https://api.travtus.com/units/find/' \
--header 'Content-Type: application/json' \
--header 'Authorization: bearer <token>' \
--data-raw '{
"address": {
"country": "United States"
},
"group_ids": ["group-1"],
"after-id": 1
}'
{
"last_id": 5,
"units": [
{
"identifier": "internal-unit-id-1",
"unit_number": "1",
"is_flex": false,
"full_bathrooms": 1,
"half_bathrooms": 1,
"number_of_bedrooms": 2,
"sqft": 40,
"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": "internal-unit-id-2",
"unit_number": "2",
"is_flex": false,
"full_bathrooms": 1,
"half_bathrooms": 0,
"number_of_bedrooms": 1,
"sqft": 30,
"address": {
"building_name": "Building 1",
"address_line_1": "Blvd Street",
"address_line_2": "Appartment 10",
"city": "New York",
"country": "United States",
"state": "New York",
"postal_code": "10001",
"latitude": 40.730610,
"longitude": -73.935242
}
},
]
}