Discussion

This endpoint is only available if the facility has custom unit groups enabled.

This endpoint can delete multiple unit groups at once by providing a unit_groups array of objects with the id parameter.
Any Channel Rates associated with the Unit Groups will be deleted along with those Unit Groups.
The unit_group_id for Units that correspond to Unit Groups being deleted will be set to null.

Common errors that may be encountered:
- All Unit group ids must be valid. If any id doesn't correspond to a unit group in the given facility a Record not found error will be returned.

Params

Param name Description
unit_groups
required

Array of Unit Group objects

Validations:

  • Must be an Array of nested elements

unit_groups[id]
required

UUID of the Unit Group

Validations:

  • Must be a String

Examples

DELETE /v1/d9cfc804-9afb-409d-9ccb-6d337ac38cd2/unit_groups
{
  "unit_groups": [
    {
      "id": "65ac3295-bae7-4a7c-9b4f-51940455bb07"
    },
    {
      "id": "15e8816b-c0ee-4995-bb96-2c47829500d8"
    }
  ],
  "unit_group": {}
}
204
{
  "meta": {
    "status_code": 204,
    "status_message": "No Content",
    "status_cat": "https://http.cat/204",
    "request_method": "DELETE",
    "request_id": null,
    "parameters": {
      "unit_groups": [
        {
          "id": "65ac3295-bae7-4a7c-9b4f-51940455bb07"
        },
        {
          "id": "15e8816b-c0ee-4995-bb96-2c47829500d8"
        }
      ],
      "facility_id": "d9cfc804-9afb-409d-9ccb-6d337ac38cd2",
      "unit_group": {}
    }
  }
}