Updates one or more units that belong to the same facility. The units do not need to belong to the same unit group, and each unit can receive a different set of changes.

If a field is omitted from the request body, then the existing value for that field will not change.

Notes for unit_group_id:

  • This parameter is only available when Custom Unit Groups are enabled.
  • It will assign the unit to the given unit group.
  • A reference unit may only be moved if the request would empty its original group.
  • A value of null will keep the unit in its current group.
  • An empty string will remove the unit from its current unit group.

Array parameters (unit_amenities, tax_rates, or custom_field_values_attributes):

  • If null is provided, the field's values will not be changed.
  • If an empty array is provided, the field's values will be deleted.

Allowed values for door_type

  • none
  • roll_up
  • swing

Allowed values for access_type

  • indoor
  • outdoor

Possible errors:

  • 400 Bad Request - Some of the parameters were invalid. The error_hash field in the response is structured as follows:
    • Each key in error_hash represents an error type (i.e. 'id', 'width', etc)
    • Each error type contains an array of objects representing the units with that error. These unit objects contain keys of 'id', 'name', and 'message'.
  • 404 Not Found - Some of the unit ids were not found. The error_hash field in the response follows the structure described above.
  • 500 Internal Server Error

Params

Param name Description
units
required

Validations:

  • Must be an Array of nested elements

units[allow_future_move_ins_limit]
optional

Validations:

  • Must be a Integer

units[id]
required

Validations:

  • Must be a String

units[name]
optional

Validations:

  • Must be a String

units[width]
optional

Validations:

  • Must be a Integer

units[length]
optional

Validations:

  • Must be a Integer

units[height]
optional

Validations:

  • Must be a Integer

units[door_height]
optional

Validations:

  • Must be a Integer

units[door_width]
optional

Validations:

  • Must be a Integer

units[door_type]
optional

Validations:

  • Must be a String

units[access_type]
optional

Validations:

  • Must be a String

units[standard_rate]
optional

Ignored if facility uses tiered pricing

Validations:

  • Must be a Integer

units[walk_thru_order]
optional

Number of unit in walk through order

Validations:

  • Must be a Integer

units[unit_type]
optional

Unit type id

Validations:

  • Must be a String

units[floor]
optional

Floor number

Validations:

  • Must be a Integer

units[rentable]
optional

Is the unit rentable

Validations:

  • Must be one of: true, false, 1, 0.

units[combination_lock_number]
optional

Validations:

  • Must be a String

units[overlock_lock_number]
optional

Validations:

  • Must be a String

units[attribute_description]
optional

Validations:

  • Must be a String

units[tax_rates]
optional

Array of tax rate ids

Validations:

  • Must be an array of String

units[unit_amenities]
optional

Array of unit amenity ids

Validations:

  • Must be an array of String

units[unit_group_id]
optional

Unit group id; only available when Custom Unit Groups are enabled

Validations:

  • Must be a String

units[tier]
optional

Tier id. Required if tiering is enabled

Validations:

  • Must be a String

units[rank]
optional

Rank of the desirability of the unit across all units at the facility

Validations:

  • Must be a Integer

units[exclude_from_api]
optional

True if the unit is excluded from relevant API responses; only available if the client application has the "read_excluded" permission.

Validations:

  • Must be one of: true, false, 1, 0.

units[custom_field_values_attributes]
optional

Array of custom field id and value pairs

Validations:

  • Must be an Array of nested elements

units[custom_field_values_attributes][custom_field_id]
optional

Custom field's ID

Validations:

  • Must be a Integer

units[custom_field_values_attributes][value]
optional

Value of the custom field for this unit

Validations:

  • Must be a String

Examples

PUT /v1/919360e8-3f70-4d82-90be-05619619cfba/units/bulk_update
{
  "units": [
    {
      "id": "5bf7c2fd-21f7-42f2-99dd-478f46750bc8",
      "name": "updated unit name #1",
      "width": 9,
      "length": 10,
      "height": 11,
      "door_height": 7,
      "door_width": 8,
      "door_type": "swing",
      "access_type": "outdoor",
      "floor": 0,
      "walk_thru_order": 5,
      "standard_rate": 856.34,
      "rentable": true,
      "combination_lock_number": "14953",
      "overlock_lock_number": "72092",
      "attribute_description": "",
      "tax_rates": [
        "bcf876dd-b45b-4c32-99d1-0e5c1f6c95ac"
      ],
      "unit_amenities": [
        "f433affa-2e04-4aa5-9e9a-38dfae1d5d9d"
      ],
      "unit_type": "28b43abf-83f0-4867-8235-f1c5b7ce4300"
    },
    {
      "id": "27cf515e-ece8-489f-9f35-3c7136cfce91",
      "name": "updated unit name #2",
      "width": 12,
      "length": 13,
      "height": 14,
      "door_height": 9,
      "door_width": 10,
      "door_type": "roll_up",
      "access_type": "indoor",
      "floor": 1,
      "walk_thru_order": 2,
      "standard_rate": 861.34,
      "rentable": true,
      "combination_lock_number": "24387",
      "overlock_lock_number": "33761",
      "attribute_description": "",
      "tax_rates": [
        "bcf876dd-b45b-4c32-99d1-0e5c1f6c95ac"
      ],
      "unit_amenities": [
        "f433affa-2e04-4aa5-9e9a-38dfae1d5d9d"
      ],
      "unit_type": "28b43abf-83f0-4867-8235-f1c5b7ce4300"
    }
  ],
  "unit": {}
}
404
{
  "meta": {
    "message": "id not found at this facility, 5bf7c2fd-21f7-42f2-99dd-478f46750bc8, updated unit name #1",
    "status_code": 404,
    "docs": "http://test.host/docs/v1",
    "error_code": 9,
    "error_hash": {
      "id": [
        {
          "message": "id not found at this facility",
          "id": "5bf7c2fd-21f7-42f2-99dd-478f46750bc8",
          "name": "updated unit name #1"
        }
      ]
    },
    "status_message": "Not Found",
    "status_cat": "https://http.cat/404",
    "request_method": "PUT",
    "request_id": null,
    "parameters": {
      "units": [
        {
          "id": "5bf7c2fd-21f7-42f2-99dd-478f46750bc8",
          "name": "updated unit name #1",
          "width": 9,
          "length": 10,
          "height": 11,
          "door_height": 7,
          "door_width": 8,
          "door_type": "swing",
          "access_type": "outdoor",
          "floor": 0,
          "walk_thru_order": 5,
          "standard_rate": 856.34,
          "rentable": true,
          "combination_lock_number": "14953",
          "overlock_lock_number": "72092",
          "attribute_description": "",
          "tax_rates": [
            "bcf876dd-b45b-4c32-99d1-0e5c1f6c95ac"
          ],
          "unit_amenities": [
            "f433affa-2e04-4aa5-9e9a-38dfae1d5d9d"
          ],
          "unit_type": "28b43abf-83f0-4867-8235-f1c5b7ce4300"
        },
        {
          "id": "27cf515e-ece8-489f-9f35-3c7136cfce91",
          "name": "updated unit name #2",
          "width": 12,
          "length": 13,
          "height": 14,
          "door_height": 9,
          "door_width": 10,
          "door_type": "roll_up",
          "access_type": "indoor",
          "floor": 1,
          "walk_thru_order": 2,
          "standard_rate": 861.34,
          "rentable": true,
          "combination_lock_number": "24387",
          "overlock_lock_number": "33761",
          "attribute_description": "",
          "tax_rates": [
            "bcf876dd-b45b-4c32-99d1-0e5c1f6c95ac"
          ],
          "unit_amenities": [
            "f433affa-2e04-4aa5-9e9a-38dfae1d5d9d"
          ],
          "unit_type": "28b43abf-83f0-4867-8235-f1c5b7ce4300"
        }
      ],
      "facility_id": "919360e8-3f70-4d82-90be-05619619cfba",
      "unit": {}
    }
  }
}