/v1/facilities/{facility_id}/fee-rulesAuthentication
Bearer API key or Facily session, subject to permissions and facility scope.
Authentication and scopeRequest example
Replace bracketed path values with real IDs from your environment. The body, where shown, is generated from the schema and uses illustrative values.
curl --request POST \
--url 'https://api.staging.facily.ai/v1/facilities/<FACILITY_ID>/fee-rules' \
--header "Authorization: Bearer $FACILY_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"code": "string",
"fee_type": "flat",
"frequency": "one_time",
"name": "string",
"amount": 0,
"applicable_unit_group_ids": [
"00000000-0000-4000-8000-000000000001"
],
"facility_ids": [
"00000000-0000-4000-8000-000000000001"
],
"fee_base": "rent",
"is_active": true,
"is_taxable": false,
"kind": "fee",
"percentage": 0
}'Parameters
facility_idpath · stringrequiredFormat: uuid
Request body
application/json · Required
amountnumber | string | nullRequired for flat; refused otherwise.
Pattern: ^(?!^[-+.]*$)[+-]?0*(?:\d{0,8}|(?=[\d.]{1,11}0*$)\d{0,8}\.\d{0,2}0*$)
Show amount schema
number | string | nullRequired for flat; refused otherwise.
Variant 1: number
numberVariant 2: string
stringVariant 3: null
nullapplicable_unit_group_idsstring[] | nullUnit groups the fee applies to, each in a covered facility; null for all units.
Show applicable_unit_group_ids schema
string[] | nullUnit groups the fee applies to, each in a covered facility; null for all units.
Variant 1: string[]
string[]Variant 2: null
nullcodestringrequiredProduct code. Stored upper-case; spaces allowed. Unique among live fees covering a facility.
Min length: 1 · Max length: 50
facility_idsstring[] | nullFacilities the fee applies at. Omit for the facility in the path; [] for every facility (Corporate, needs an organization-wide grant). A non-empty list must include the path facility.
Show facility_ids schema
string[] | nullFacilities the fee applies at. Omit for the facility in the path; [] for every facility (Corporate, needs an organization-wide grant). A non-empty list must include the path facility.
Variant 1: string[]
string[]Variant 2: null
nullfee_basestring | nullRequired for percentage: what the percentage is of.
Values: "rent", "rent_plus_insurance", "rent_plus_all"
Show fee_base schema
string | nullRequired for percentage: what the percentage is of.
Variant 1: string
stringValues: "rent", "rent_plus_insurance", "rent_plus_all"
Variant 2: null
nullfee_typestringrequiredflat (a fixed amount), percentage (of fee_base), or custom (amount entered when charged or added).
Values: "flat", "percentage", "custom"
frequencystringrequiredone_time (charged), monthly or annual (added to a lease). Cannot change later; a percentage fee must recur.
Values: "one_time", "monthly", "annual"
is_activebooleanTurned off stops new attachments; existing ones keep billing.
Default: true
is_taxablebooleanWhether sales tax is charged on this fee.
Default: false
kindstringfee or service.
Default: "fee" · Values: "fee", "service"
namestringrequiredDescription shown to staff and on the ledger line.
Min length: 1 · Max length: 100
percentagenumber | string | nullRequired for percentage (above 0, at most 100).
Maximum: 100 · Pattern: ^(?!^[-+.]*$)[+-]?0*(?:\d{0,3}|(?=[\d.]{1,6}0*$)\d{0,3}\.\d{0,2}0*$)
Show percentage schema
number | string | nullRequired for percentage (above 0, at most 100).
Variant 1: number
numberVariant 2: string
stringVariant 3: null
nullrequiredbooleanAdded to every new lease at move-in; staff cannot remove it from one lease. Not for custom.
Default: false
Responses
Expand a status to inspect its schema. Generated examples show structure and synthetic values.
200Successful Response
{
"data": {
"amount": "<VALUE_MATCHING_PATTERN>",
"applicable_unit_group_ids": [
"00000000-0000-4000-8000-000000000001"
],
"code": "string",
"created_at": "2026-10-29T12:00:00Z",
"facility_ids": [
"00000000-0000-4000-8000-000000000001"
],
"fee_base": "string",
"fee_type": "string",
"frequency": "string",
"id": "00000000-0000-4000-8000-000000000001",
"is_active": false,
"is_taxable": false,
"kind": "string",
"name": "string",
"percentage": "<VALUE_MATCHING_PATTERN>",
"required": false
},
"meta": {
"request_id": "string"
}
}application/json
dataFeeRuleResponserequiredShow data schema
amountstring | nullrequiredThe fixed amount of a flat fee.
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
Show amount schema
string | nullThe fixed amount of a flat fee.
Variant 1: string
stringVariant 2: null
nullapplicable_unit_group_idsstring[] | nullrequiredUnit groups the fee applies to; null for all.
Show applicable_unit_group_ids schema
string[] | nullUnit groups the fee applies to; null for all.
Variant 1: string[]
string[]Variant 2: null
nullcodestringrequiredProduct code, upper-case.
created_atstringrequiredWhen the fee was created.
Format: date-time
facility_idsstring[]requiredFacilities the fee applies at. Empty means every facility.
Show facility_ids schema
stringfee_basestring | nullrequiredWhat a percentage fee is a percentage of.
Show fee_base schema
string | nullWhat a percentage fee is a percentage of.
Variant 1: string
stringVariant 2: null
nullfee_typestringrequiredflat, percentage, or custom.
frequencystringrequiredone_time, monthly or annual.
idstringrequiredUnique identifier for this fee.
Format: uuid
is_activebooleanrequiredWhether the fee can be added or charged now.
is_taxablebooleanrequiredWhether sales tax is charged on this fee.
kindstringrequiredfee or service.
live_attachment_countintegerLeases currently carrying this fee.
Default: 0
namestringrequiredDescription shown to staff and on the ledger line.
percentagestring | nullrequiredThe percentage of a percentage fee.
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
Show percentage schema
string | nullThe percentage of a percentage fee.
Variant 1: string
stringVariant 2: null
nullrequiredbooleanrequiredAdded to every new lease at move-in.
metaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired400Validation error
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired401Unauthenticated
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired403Permission denied
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired404Not found
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired409Business logic error
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired503Temporary failure
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired