/v1/fee-rules/{fee_rule_id}/end-currentAuthentication
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/fee-rules/<FEE_RULE_ID>/end-current' \
--header "Authorization: Bearer $FACILY_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"ended_on": "2026-10-29"
}'Parameters
fee_rule_idpath · stringrequiredFormat: uuid
Request body
application/json
FeeRuleEndCurrentRequest | nullVariant 1: FeeRuleEndCurrentRequest
ended_onstring | nullThe last day each attachment covers, no later than the day before each lease's next billing period (a lease it would end later is skipped). Omitted: that day.
Format: date
Show ended_on schema
string | nullThe last day each attachment covers, no later than the day before each lease's next billing period (a lease it would end later is skipped). Omitted: that day.
Variant 1: string
stringVariant 2: null
nullVariant 2: null
nullResponses
Expand a status to inspect its schema. Generated examples show structure and synthetic values.
200Successful Response
{
"data": {
"action": "attach_current",
"busy_lease_ids": [
"00000000-0000-4000-8000-000000000001"
],
"changed": 0,
"fee_rule_id": "00000000-0000-4000-8000-000000000001",
"skipped_busy": 0,
"skipped_ineligible": 0
},
"meta": {
"request_id": "string"
}
}application/json
dataFeeRuleBulkResponserequiredShow data schema
actionstringrequiredValues: "attach_current", "end_current", "reprice_current"
busy_lease_idsstring[]requiredThe busy leases, at most 200.
Show busy_lease_ids schema
stringchangedintegerrequiredLeases changed.
fee_rule_idstringrequiredThe fee the action ran for.
Format: uuid
skipped_busyintegerrequiredLeases being billed at that moment; run the action again to reach them.
skipped_ineligibleintegerrequiredLeases that no longer qualified when their turn came.
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