A billing ruleset describing the rules for billing a service user, service user contact of location contact.
Billing rulsets can either relate to a single contact (e.g service user, service user contact or location contact) or they can be shared allowing them to be assigned to any contact.
A unique Id for the billing ruleset.
The percentage discount applied to the contract fee for the service user being absent (e.g 20%, 100%).
The number of days a service user must be absent before any discount for being absent applies.
A list of absence reasons during which the service user should be billed at a discount rate.
Flag indiciating if the billing ruleset has been archived.
Whether the contract is billed per day or night; day, night.
A list of contribution types that can be used with this billing ruleset; local_authority, contribution, fnc, chc, lifestyle, top_up, block_bed, dta_spot, fpc.
The date/time the billing ruleset was created.
An invoice item type used when generating an invoice line item for days billed after death fees.
The number of days that the billing party will be billed for if the service user dies whilst a resident is at the home.
A list of invoice item type that can be used with this billing ruleset.
The location contact the billing ruleset relates to.
The date/time the billing ruleset was modified.
A name assigned to the billing ruleset to make it easier to identify. Shared billing rulesets cannot share the same name, dedicated rulesets can share names provided they are not for the same contact.
The service user the billing ruleset relates to.
The service user contact the billing ruleset relates to.
Flag indiciating if the billing ruleset is shared as opposed to specific to a billing party.
{
"_id": "6724fbd04f73a2cebf638e32",
"absent_discount_rate": 20,
"apply_absent_discount_after": 5,
"apply_absent_discount_for": [
"6724fbc74f73a2cebf637712"
],
"archived": false,
"billing_per": "day",
"contribution_types": [
"contribution",
"lifestyle",
"top_up"
],
"created": "2024-11-01 16:03:28",
"days_after_death_invoice_item_type": null,
"days_billed_after_death": 7,
"invoice_item_types": [
"6724fbc74f73a2cebf6377ee"
],
"location_contact": null,
"modified": "2024-11-01 16:03:28",
"name": "Private (care)",
"service_user": null,
"service_user_contact": null,
"shared": true
}
Return a list of billing rulesets.
['_id']
A list of attributes to include for fetched objects.
no
A filter that allows rulesets that are currently archived to be included or excluded.
A filter that accepts a list of Ids and filters the items returned to those with an Id in the list.
A filter that accepts a list of location contact Ids and filters billing rulesets to those where the billing party is one of the location contacts.
A filter that accepts a date/time and filters the items returned to those modified after the date/time.
A filter that accepts a date/time and filters the items returned to those modified before the date/time.
A case insensitive keyword filter applied to the following fields; name.
A filter that accepts a list of service user Ids and filters billing rulesets by the service user they are for.
A filter that accepts a list of service user contact Ids and filters billing rulesets to those where the billing party is one of the service user contacts.
unset
A filter that allows billing rulesets to be filtered by whether the ruleset is shared or specific to a billing party.
1
The page number to fetch.
10
The number of items to return per page.
_id
A list of fields the returned items can be sorted by. Fields prefixed with minus (-) sign are sorted in descending order.
Returns a page of billing rulesets.
var billingRulesets = apiClient.Request(
HttpMethod.Get,
"billing-rulesets",
new MultiValueDict()
.Add("attributes", "name", "days_billed_after_death")
.Add("filters-shared", "yes")
);
<?php
$billing_rulesets = $api_client->request(
'GET',
'billing-rulesets',
[
'attributes'=>['name', 'days_billed_after_death'],
'filters-shared'=>'yes'
]
);
billing_rulesets = api_client(
'GET',
'billing-rulesets',
params={
'attributes': ['name', 'days_billed_after_death'],
'filters-shared': 'yes'
}
)
billing_rulesets = api_client.request(
'GET',
'billing-rulesets',
params: {
'attributes' => ['name', 'days_billed_after_death'],
'filters-shared' => 'yes'
}
)
{
"item_count": 2,
"items": [
{
"_id": "6724fbd04f73a2cebf638e2c",
"days_billed_after_death": 0,
"name": "FNC"
},
{
"_id": "6724fbd04f73a2cebf638e32",
"days_billed_after_death": 7,
"name": "Private (care)"
}
],
"page": 1,
"page_count": 1,
"per_page": 10
}
Retrieve a billing ruleset object.
Returns a billing ruleset object.
var billingRuleset = apiClient.Request(
HttpMethod.Get,
$"billing-rulesets/{billingRulesetId}"
);
<?php
$billing_ruleset = $api_client->request(
'GET',
'billing-rulesets/' . $billing_ruleset_id
);
billing_ruleset = api_client(
'GET',
f'billing-rulesets/{billing_ruleset_id}'
)
billing_ruleset = api_client.request(
'GET',
"billing-rulesets/#{billing_ruleset_id}"
)
{
"_id": "6724fbd04f73a2cebf638e32",
"absent_discount_rate": 20,
"apply_absent_discount_after": 5,
"apply_absent_discount_for": [
"6724fbc74f73a2cebf637712"
],
"archived": false,
"billing_per": "day",
"contribution_types": [
"contribution",
"lifestyle",
"top_up"
],
"created": "2024-11-01 16:03:28",
"days_after_death_invoice_item_type": null,
"days_billed_after_death": 7,
"invoice_item_types": [
"6724fbc74f73a2cebf6377ee"
],
"location_contact": null,
"modified": "2024-11-01 16:03:28",
"name": "Private (care)",
"service_user": null,
"service_user_contact": null,
"shared": true
}