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
},
}
]
}
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
},
}
]
}
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.
Show unit
Show child attributes
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": "no_group",
"message": "You must either provide a group id or group external reference in the request body."
}
}
{
"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."
}
}
{
"error": {
"type": "no_access_to_group",
"message": "You do not have access to the group you have provided."
}
}
{
"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
},
}
]
}