Discussion

Creates one or more units for the same facility. Each unit can receive a different set of parameters and may end up in different unit groups.

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 value of null will result in the unit being ungrouped.

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. 'name', 'width', etc)
    • Each error type contains an array of objects representing the units with that error. These unit objects contain keys of 'name' and 'message'.
  • 500 Internal Server Error

Params

Param name Description
units
required

Validations:

  • Must be an Array of nested elements

units[name]
required

Validations:

  • Must be a String

units[width]
required

Validations:

  • Must be a Integer

units[length]
required

Validations:

  • Must be a Integer

units[height]
required

Validations:

  • Must be a Integer

units[door_height]
required

Validations:

  • Must be a Integer

units[door_width]
required

Validations:

  • Must be a Integer

units[door_type]
required

Validations:

  • Must be a String

units[access_type]
required

Validations:

  • Must be a String

units[standard_rate]
required

Ignored if facility uses tiered pricing

Validations:

  • Must be a Integer

units[walk_thru_order]
required

Number of unit in walk through order

Validations:

  • Must be a Integer

units[unit_type]
required

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

Examples

POST /v1/2229756b-8faa-48bb-b235-42616185470f/units/bulk_create
{
  "units": [
    {
      "name": "new unit name #1",
      "width": 20.0,
      "length": 12.0,
      "height": 8.0,
      "door_height": 7,
      "door_width": 8,
      "door_type": "swing",
      "access_type": "outdoor",
      "floor": null,
      "walk_thru_order": 2,
      "standard_rate": 764.95,
      "rentable": true,
      "combination_lock_number": "34196",
      "overlock_lock_number": "57201",
      "attribute_description": "",
      "tax_rates": [
        "b8e13a42-3804-4ede-a763-3b83b3901536"
      ],
      "unit_amenities": [
        "43e22515-3b7f-48cc-b1ab-f177caec39a4"
      ],
      "unit_type": "f7687db9-654a-4018-8d27-bd0f3bfd25a0"
    },
    {
      "name": "new unit name #2",
      "width": 21.0,
      "length": 13.0,
      "height": 9.0,
      "door_height": 9,
      "door_width": 10,
      "door_type": "roll_up",
      "access_type": "indoor",
      "floor": 1,
      "walk_thru_order": 1,
      "standard_rate": 765.95,
      "rentable": true,
      "combination_lock_number": "32109",
      "overlock_lock_number": "47682",
      "attribute_description": "",
      "tax_rates": [
        "b8e13a42-3804-4ede-a763-3b83b3901536"
      ],
      "unit_amenities": [
        "43e22515-3b7f-48cc-b1ab-f177caec39a4"
      ],
      "unit_type": "f7687db9-654a-4018-8d27-bd0f3bfd25a0"
    }
  ],
  "unit": {}
}
201
{
  "units": [
    {
      "id": "58734d21-9850-4f2d-8cf7-0de60caa31ca",
      "price": 764.95,
      "name": "new unit name #1",
      "description": "Amenity 4",
      "width": 20.0,
      "length": 12.0,
      "height": 8.0,
      "door_height": 7.0,
      "door_width": 8.0,
      "door_type": "swing",
      "access_type": "outdoor",
      "floor": null,
      "directions": null,
      "size": "20x12x8",
      "area": 240.0,
      "standard_rate": 764.95,
      "managed_rate": null,
      "tiered_rate": null,
      "available_for_move_in": true,
      "rentable": true,
      "status": "vacant",
      "payment_status": null,
      "current_ledger_id": null,
      "current_tenant_id": null,
      "combo_lock_group": null,
      "combination_lock_number": "34196",
      "overlock_lock_number": null,
      "attribute_description": "",
      "deleted": false,
      "damaged": false,
      "complimentary": null,
      "unrentable": false,
      "company_owned": false,
      "is_prepped": null,
      "rank": null,
      "custom_fields": [],
      "allow_future_move_ins_limit": null,
      "channel_rate": null,
      "unit_amenities": [
        {
          "id": "43e22515-3b7f-48cc-b1ab-f177caec39a4",
          "name": "Amenity 4",
          "short_code": "A40",
          "show_in_sales_center_filter_dropdown": false,
          "deleted": false,
          "primary_key_id": 529
        }
      ],
      "unit_type": {
        "id": "f7687db9-654a-4018-8d27-bd0f3bfd25a0",
        "name": "Unit Type 216",
        "deleted": false,
        "internal_account_code": "4000",
        "code_and_description": "4000 - Rental Revenue",
        "ii_excluded": []
      },
      "tier": null,
      "unit_group_id": "4f7b35e8-c82b-40b0-9150-aa0b480c558e"
    },
    {
      "id": "6fe4ee64-e5cb-447e-b257-0912b01c5baa",
      "price": 765.95,
      "name": "new unit name #2",
      "description": "Amenity 4, 1st floor",
      "width": 21.0,
      "length": 13.0,
      "height": 9.0,
      "door_height": 9.0,
      "door_width": 10.0,
      "door_type": "roll_up",
      "access_type": "indoor",
      "floor": 1,
      "directions": null,
      "size": "21x13x9",
      "area": 273.0,
      "standard_rate": 765.95,
      "managed_rate": null,
      "tiered_rate": null,
      "available_for_move_in": true,
      "rentable": true,
      "status": "vacant",
      "payment_status": null,
      "current_ledger_id": null,
      "current_tenant_id": null,
      "combo_lock_group": null,
      "combination_lock_number": "32109",
      "overlock_lock_number": null,
      "attribute_description": "",
      "deleted": false,
      "damaged": false,
      "complimentary": null,
      "unrentable": false,
      "company_owned": false,
      "is_prepped": null,
      "rank": null,
      "custom_fields": [],
      "allow_future_move_ins_limit": null,
      "channel_rate": null,
      "unit_amenities": [
        {
          "id": "43e22515-3b7f-48cc-b1ab-f177caec39a4",
          "name": "Amenity 4",
          "short_code": "A40",
          "show_in_sales_center_filter_dropdown": false,
          "deleted": false,
          "primary_key_id": 529
        }
      ],
      "unit_type": {
        "id": "f7687db9-654a-4018-8d27-bd0f3bfd25a0",
        "name": "Unit Type 216",
        "deleted": false,
        "internal_account_code": "4000",
        "code_and_description": "4000 - Rental Revenue",
        "ii_excluded": []
      },
      "tier": null,
      "unit_group_id": "0a4d80b1-1b29-4ff0-9b97-e71162121e92"
    }
  ],
  "meta": {
    "pagination": {
      "current_page": 1,
      "total_pages": 1,
      "per_page": 100,
      "total_entries": 2,
      "previous_page": null,
      "next_page": null
    },
    "status_code": 201,
    "status_message": "Created",
    "status_cat": "https://http.cat/201",
    "request_method": "POST",
    "request_id": null,
    "parameters": {
      "units": [
        {
          "name": "new unit name #1",
          "width": 20.0,
          "length": 12.0,
          "height": 8.0,
          "door_height": 7,
          "door_width": 8,
          "door_type": "swing",
          "access_type": "outdoor",
          "floor": null,
          "walk_thru_order": 2,
          "standard_rate": 764.95,
          "rentable": true,
          "combination_lock_number": "34196",
          "overlock_lock_number": "57201",
          "attribute_description": "",
          "tax_rates": [
            "b8e13a42-3804-4ede-a763-3b83b3901536"
          ],
          "unit_amenities": [
            "43e22515-3b7f-48cc-b1ab-f177caec39a4"
          ],
          "unit_type": "f7687db9-654a-4018-8d27-bd0f3bfd25a0"
        },
        {
          "name": "new unit name #2",
          "width": 21.0,
          "length": 13.0,
          "height": 9.0,
          "door_height": 9,
          "door_width": 10,
          "door_type": "roll_up",
          "access_type": "indoor",
          "floor": 1,
          "walk_thru_order": 1,
          "standard_rate": 765.95,
          "rentable": true,
          "combination_lock_number": "32109",
          "overlock_lock_number": "47682",
          "attribute_description": "",
          "tax_rates": [
            "b8e13a42-3804-4ede-a763-3b83b3901536"
          ],
          "unit_amenities": [
            "43e22515-3b7f-48cc-b1ab-f177caec39a4"
          ],
          "unit_type": "f7687db9-654a-4018-8d27-bd0f3bfd25a0"
        }
      ],
      "facility_id": "2229756b-8faa-48bb-b235-42616185470f",
      "unit": {}
    }
  }
}