This endpoint can create multiple empty unit groups at once by providing a unit_groups
array of objects with the name
parameter.
Common errors that may be encountered:
- Unit groups must have unique names across the facility. If non-unique names are provided or names conflict with any existing unit group, a list of errors will be returned under 'errors'
-> 'name_assignments'
.
Param name | Description |
---|---|
unit_groups
required |
Array of Unit Group names Validations:
|
unit_groups[name]
required |
Name of the Unit Group Validations:
|
POST /v1/c34f098b-c628-4859-8b22-f2077ab3a1cc/unit_groups { "unit_groups": [ { "name": "Test Group 1" }, { "name": "Test Group 2" } ], "unit_group": {} } 201 { "unit_groups": [ { "id": 3218, "total_units_count": null, "available_units_count": null, "size": null, "price": null, "floor": null, "group_key": null, "created_at": "2023-09-15T04:37:19.313-10:00", "updated_at": "2023-09-15T04:37:19.313-10:00", "uuid": "be2bc0d7-9c30-49d4-a23b-84937fc57ee6", "facility_id": 3658, "unit_type_id": null, "occupied_units_count": null, "total_non_excluded_units_count": 0, "cross_sell_group_id": null, "justification": null, "managed_rate": null, "standard_rate": null, "attribute_description": null, "access_type": null, "door_width": null, "door_height": null, "width": null, "height": null, "length": null, "area": null, "unoccupied_rate_plan_id": null, "fully_enclosed": null, "name": "Test Group 1", "reference_unit_id": null }, { "id": 3219, "total_units_count": null, "available_units_count": null, "size": null, "price": null, "floor": null, "group_key": null, "created_at": "2023-09-15T04:37:19.313-10:00", "updated_at": "2023-09-15T04:37:19.313-10:00", "uuid": "c792ce52-2843-4c17-b7bd-634844732ac0", "facility_id": 3658, "unit_type_id": null, "occupied_units_count": null, "total_non_excluded_units_count": 0, "cross_sell_group_id": null, "justification": null, "managed_rate": null, "standard_rate": null, "attribute_description": null, "access_type": null, "door_width": null, "door_height": null, "width": null, "height": null, "length": null, "area": null, "unoccupied_rate_plan_id": null, "fully_enclosed": null, "name": "Test Group 2", "reference_unit_id": null } ], "meta": { "status_code": 201, "status_message": "Created", "status_cat": "https://http.cat/201", "request_method": "POST", "request_id": null, "parameters": { "unit_groups": [ { "name": "Test Group 1" }, { "name": "Test Group 2" } ], "facility_id": "c34f098b-c628-4859-8b22-f2077ab3a1cc", "unit_group": {} } } }