Discussion

This endpoint can create multiple identical units at once by providing a comma-separated list of names for the name parameter

Examples

POST /v1/ac554359-a2af-4d82-9c81-bb455cf7a7a6/units
{
  "unit": {
    "name": "new unit name",
    "width": 8,
    "length": 9,
    "height": 10,
    "door_height": 8,
    "door_width": 9,
    "door_type": "swing",
    "access_type": "outdoor",
    "floor": 0,
    "walk_thru_order": 5,
    "standard_rate": 40,
    "rentable": false,
    "combination_lock_number": "12321",
    "fully_enclosed": true,
    "attribute_description": "",
    "tax_rates": [
      "e308a271-3ae6-4cd2-b9e5-b46a6ebd700c"
    ],
    "unit_amenities": [
      "edecec5c-7a96-425b-a8a5-286c893356e0"
    ],
    "unit_type": "70c02ac9-c88c-484c-8354-56c87f453e08"
  }
}
200
{
  "units": {
    "id": "d3a70c59-2456-4a5f-b334-f2905ed1bd36",
    "price": 40.0,
    "name": "new unit name",
    "description": "Amenity 2, 0th floor",
    "width": 8.0,
    "length": 9.0,
    "height": 10.0,
    "door_height": 8.0,
    "door_width": 9.0,
    "door_type": "swing",
    "access_type": "outdoor",
    "floor": 0,
    "directions": null,
    "size": "8x9x10",
    "area": 72.0,
    "standard_rate": 40.0,
    "managed_rate": null,
    "available_for_move_in": false,
    "rentable": false,
    "status": "vacant",
    "payment_status": null,
    "current_ledger_id": null,
    "current_tenant_id": null,
    "combination_lock_number": "12321",
    "attribute_description": "",
    "deleted": false,
    "damaged": false,
    "complimentary": null,
    "unrentable": true,
    "company_owned": false,
    "channel_rate": null,
    "unit_amenities": [
      {
        "id": "edecec5c-7a96-425b-a8a5-286c893356e0",
        "name": "Amenity 2",
        "short_code": null,
        "show_in_sales_center_filter_dropdown": false,
        "deleted": false
      }
    ],
    "unit_type": {
      "id": "70c02ac9-c88c-484c-8354-56c87f453e08",
      "name": "Unit Type 100",
      "deleted": false,
      "internal_account_code": "4000",
      "code_and_description": "4000 - Rental Revenue"
    },
    "unit_group_id": "de656472-d00f-47a0-9488-52d9e48825d5"
  },
  "meta": {
    "status_code": 200,
    "status_message": "OK",
    "status_cat": "https://http.cat/200",
    "request_method": "POST",
    "request_id": null,
    "parameters": {
      "unit": {
        "name": "new unit name",
        "width": 8,
        "length": 9,
        "height": 10,
        "door_height": 8,
        "door_width": 9,
        "door_type": "swing",
        "access_type": "outdoor",
        "floor": 0,
        "walk_thru_order": 5,
        "standard_rate": 40,
        "rentable": false,
        "combination_lock_number": "12321",
        "attribute_description": "",
        "tax_rates": [
          "e308a271-3ae6-4cd2-b9e5-b46a6ebd700c"
        ],
        "unit_amenities": [
          "edecec5c-7a96-425b-a8a5-286c893356e0"
        ],
        "unit_type": "70c02ac9-c88c-484c-8354-56c87f453e08"
      },
      "facility_id": "ccdaa779-9e3a-48a5-a75c-f824531e05fa",
      "id": "d3a70c59-2456-4a5f-b334-f2905ed1bd36"
    }
  }
}

Params

Param name Description
unit
required

Value: Must be a Hash
unit[name]
required

Value: Must be a String
unit[width]
required

Value: Must be a Integer
unit[length]
required

Value: Must be a Integer
unit[height]
required

Value: Must be a Integer
unit[door_height]
required

Value: Must be a Integer
unit[door_width]
required

Value: Must be a Integer
unit[door_type]
required

Value: Must be a String
unit[access_type]
required

Value: Must be a String
unit[floor]
optional , nil allowed

Floor number


Value: Must be a Integer
unit[walk_thru_order]
optional , nil allowed

Number of unit in walk through order


Value: Must be a Integer
unit[standard_rate]
required

Value: Must be a Integer
unit[rentable]
optional , nil allowed

Is the unit rentable


Value: Must be one of: <code>true</code>, <code>false</code>.
unit[combination_lock_number]
optional , nil allowed

Value: Must be a String
unit[overlock_lock_number]
optional , nil allowed

Value: Must be a String
unit[attribute_description]
optional , nil allowed

Value: Must be a String
unit[tax_rates]
optional , nil allowed

Array of tax rate uuids


Value: Must be an array of String
unit[unit_amenities]
optional , nil allowed

Array of unit amenity uuids


Value: Must be an array of String
unit[unit_type]
required

Unit type uuid


Value: Must be a String
unit[fully_enclosed]
optional , nil allowed

True if unit is fully enclosed. If new units belong to an existing unit group, the existing group's value will take precedence.


Value: Must be one of: <code>true</code>, <code>false</code>.
unit[custom_fields]
required

Array of custom field name and value pairs


Value: Must be an array of Hash