Use this endpoint to update or create one or many unit group tier rates. You must provide a positive integer for the rate. You must provide a valid Unit Group ID and Tier ID to create or update a unit group tier rate.
You can retrieve a list of valid unit groups by using the GET unit_groups endpoint. You can retrieve a list of valid tiers using the GET tiers endpoint.
If a unit group and tier have already been associated, the rate will be updated. If a unit group and tier have not been associated, a new unit group tier rate will be created.
{
"unit_group_tier_rates": [
{
"rate": 30,
"tier_id": "b62e40fa-0a6a-453f-85d5-135b7968198c",
"unit_group_id": "551520fa-462b-4edd-a425-eb6d49ca1390",
}
]
}
{
"unit_group_tier_rates": [
{
"id": "dc0083d1-e931-4673-a529-2e359db9b717",
"rate": 30.0,
"tier_id": "b62e40fa-0a6a-453f-85d5-135b7968198c",
"unit_group_id": "551520fa-462b-4edd-a425-eb6d49ca1390"
}
],
"meta": {
"status_code": 200,
"status_message": "OK",
"status_cat": "https://http.cat/200",
"request_method": "PUT",
"request_id": "117d8d56-fe1f-4bc9-955f-2b002e968ce3",
"parameters": {
"unit_group_tier_rates": [
{
"tier_id": "b62e40fa-0a6a-453f-85d5-135b7968198c",
"unit_group_id": "551520fa-462b-4edd-a425-eb6d49ca1390",
"rate": 3
}
],
"facility_id": "de96cc43-7c5d-419e-abcd-17e023c31b54",
"unit_group_tier_rate": {}
}
}
}
Code | Description |
---|---|
400 | Record(s) with invalid rate: <unit_group_tier_rate> |
404 | Tier(s) not found: <tier_id> |
404 | Unit Group(s) not found: <unit_group_id> |
Param name | Description |
---|---|
unit_group_tier_rates
required |
A collection of attributes to update or create a unit group tier rate. These rates will only be used by facilities with tiering enabled. Validations:
|
unit_group_tier_rates[tier_id]
required |
ID of the associated tier Validations:
|
unit_group_tier_rates[unit_group_id]
required |
ID of the associated unit group Validations:
|
unit_group_tier_rates[rate]
required |
The new rate for the unit group/tier association Validations:
|