/v1/facilities/{facility_id}/revenue-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 GET \
--url 'https://api.staging.facily.ai/v1/facilities/<FACILITY_ID>/revenue-rules' \
--header "Authorization: Bearer $FACILY_API_KEY"Try a request
Staging · read-onlyExplore your organization with a read-only request to staging.
Parameters
facility_idpath · string | stringrequiredFormat: uuid
rule_typequery · string[] | nullOnly these rule types; repeat the parameter for several.
Responses
Expand a status to inspect its schema. Generated examples show structure and synthetic values.
200Successful Response
{
"data": [
{
"active_group_count": 0,
"active_groups": [
{
"code": "string",
"facility_id": "00000000-0000-4000-8000-000000000001",
"id": "00000000-0000-4000-8000-000000000001",
"name": "string"
}
],
"adjust_amount": "<VALUE_MATCHING_PATTERN>",
"adjust_direction": "string",
"adjust_unit": "string",
"created_at": "2026-10-29T12:00:00Z",
"created_by": "00000000-0000-4000-8000-000000000001",
"display_status": "Active",
"facility_ids": [
"00000000-0000-4000-8000-000000000001"
],
"id": "00000000-0000-4000-8000-000000000001",
"last_activated_at": "2026-10-29T12:00:00Z",
"name": "string",
"promotion_id": "00000000-0000-4000-8000-000000000001",
"promotion_name": "string",
"repeats_yearly": false,
"rule_type": "string",
"scope_feature_name": "string",
"scope_group_ids": [
"00000000-0000-4000-8000-000000000001"
],
"scope_kind": "string",
"status": "string",
"threshold_pct": "<VALUE_MATCHING_PATTERN>",
"trigger_kind": "string",
"updated_at": "2026-10-29T12:00:00Z",
"window_end": "2026-10-29",
"window_start": "2026-10-29"
}
],
"meta": {
"request_id": "string"
},
"pagination": {
"has_more": false,
"limit": 0,
"cursor": "string",
"total_count": 0
},
"metrics": {
"cards": {},
"computed_at": "2026-10-29T12:00:00Z",
"is_stale": false,
"scope": "facility"
}
}application/json
dataRevenueRuleResponse[]requiredShow data schema
active_group_countintegerrequiredHow many unit groups the rule applies to now.
active_groupsRevenueRuleActiveGroup[]requiredThe unit groups the rule applies to now.
Show active_groups schema
codestring | nullrequiredThe group's code, where it has one.
Show code schema
string | nullThe group's code, where it has one.
Variant 1: string
stringVariant 2: null
nullfacility_idstringrequiredThe facility the group belongs to.
Format: uuid
idstringrequiredThe unit group's id.
Format: uuid
namestringrequiredThe group's name.
adjust_amountstring | nullrequiredSize of the adjustment, for price rules.
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
Show adjust_amount schema
string | nullSize of the adjustment, for price rules.
Variant 1: string
stringVariant 2: null
nulladjust_directionstring | nullrequiredincrease or decrease, for price rules.
Show adjust_direction schema
string | nullincrease or decrease, for price rules.
Variant 1: string
stringVariant 2: null
nulladjust_unitstring | nullrequiredpercent or dollar, for price rules.
Show adjust_unit schema
string | nullpercent or dollar, for price rules.
Variant 1: string
stringVariant 2: null
nullcreated_atstringrequiredWhen the rule was created.
Format: date-time
created_bystringrequiredWho created the rule.
Format: uuid
display_statusstringrequiredActive, Paused, or Expired once a one-off date window has ended.
Values: "Active", "Paused", "Expired"
facility_idsstring[]requiredFacilities the rule covers; empty means every facility.
Show facility_ids schema
stringidstringrequiredThe rule's id.
Format: uuid
last_activated_atstring | nullrequiredWhen the rule last started applying to a unit group.
Format: date-time
Show last_activated_at schema
string | nullWhen the rule last started applying to a unit group.
Variant 1: string
stringVariant 2: null
nullnamestringrequiredWhat the rule is called.
promotion_idstring | nullrequiredThe promotion a promotion rule switches on.
Format: uuid
Show promotion_id schema
string | nullThe promotion a promotion rule switches on.
Variant 1: string
stringVariant 2: null
nullpromotion_namestring | nullrequiredThat promotion's name.
Show promotion_name schema
string | nullThat promotion's name.
Variant 1: string
stringVariant 2: null
nullrepeats_yearlybooleanrequiredWhether the date window repeats every year.
rule_typestringrequiredstreet, seasonal, web or promotion.
scope_feature_namestring | nullrequiredThe characteristic, for the characteristic scope.
Show scope_feature_name schema
string | nullThe characteristic, for the characteristic scope.
Variant 1: string
stringVariant 2: null
nullscope_group_idsstring[] | nullrequiredThe unit groups, for the groups scope.
Show scope_group_ids schema
string[] | nullThe unit groups, for the groups scope.
Variant 1: string[]
string[]Variant 2: null
nullscope_kindstringrequiredall, groups or characteristic.
statusstringrequiredactive or paused.
threshold_pctstring | nullrequiredOccupancy percentage, for the occupancy triggers.
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
Show threshold_pct schema
string | nullOccupancy percentage, for the occupancy triggers.
Variant 1: string
stringVariant 2: null
nulltrigger_kindstringrequiredalways, occupancy_below, occupancy_above or date_window.
updated_atstringrequiredWhen the rule last changed.
Format: date-time
window_endstring | nullrequiredLast day of the date window.
Format: date
Show window_end schema
string | nullLast day of the date window.
Variant 1: string
stringVariant 2: null
nullwindow_startstring | nullrequiredFirst day of the date window.
Format: date
Show window_start schema
string | nullFirst day of the date window.
Variant 1: string
stringVariant 2: null
nullmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequiredmetricsEmbeddedMetrics | nullShow metrics schema
EmbeddedMetrics | nullVariant 1: EmbeddedMetrics
cardsobjectrequiredcomputed_atstring | nullrequiredFormat: date-time
Show computed_at schema
string | nullVariant 1: string
stringVariant 2: null
nullis_stalebooleanrequiredscopestringrequiredValues: "facility", "portfolio"
Variant 2: null
nullpaginationPaginationBlockrequiredPagination metadata for list responses.
Show pagination schema
cursorstring | nullShow cursor schema
string | nullVariant 1: string
stringVariant 2: null
nullhas_morebooleanrequiredlimitintegerrequiredtotal_countinteger | nullShow total_count schema
integer | nullVariant 1: integer
integerVariant 2: null
null400Validation 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