Skip to content
FacilydevelopersDashboard
Build with Facily
DocsREST APIsList Revenue Rules
Search the full API reference Esc to close

List Revenue Rules

Pricing & rates · REST API reference

Get support
GET/v1/facilities/{facility_id}/revenue-rules
Every live rule covering the facility -- its own, multi-facility ones and Corporate ones -- newest first; with `facility_id="all"` every rule in the org (`all` needs an org-wide grant). Unpaged.

Authentication

Bearer API key or Facily session, subject to permissions and facility scope.

Authentication and scope

Request 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
curl --request GET \
  --url 'https://api.staging.facily.ai/v1/facilities/<FACILITY_ID>/revenue-rules' \
  --header "Authorization: Bearer $FACILY_API_KEY"
An example for building your request, not an executed call. Check required fields, allowed values, and environment configuration before sending.

Try a request

Staging · read-only

Explore your organization with a read-only request to staging.

Kept in this tab only. Sent directly to api.staging.facily.ai.

GET

Replace the {placeholders} in the path with your resource IDs.

Response
Your response will appear here.

Parameters

facility_idpath · string | stringrequired

Format: uuid

rule_typequery · string[] | null

Only 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
JSON · generated example
{
  "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[]required
Show data schema
active_group_countintegerrequired

How many unit groups the rule applies to now.

active_groupsRevenueRuleActiveGroup[]required

The unit groups the rule applies to now.

Show active_groups schema
codestring | nullrequired

The group's code, where it has one.

Show code schema
string | null

The group's code, where it has one.

Variant 1: string
string
Variant 2: null
null
facility_idstringrequired

The facility the group belongs to.

Format: uuid

idstringrequired

The unit group's id.

Format: uuid

namestringrequired

The group's name.

adjust_amountstring | nullrequired

Size of the adjustment, for price rules.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

Show adjust_amount schema
string | null

Size of the adjustment, for price rules.

Variant 1: string
string
Variant 2: null
null
adjust_directionstring | nullrequired

increase or decrease, for price rules.

Show adjust_direction schema
string | null

increase or decrease, for price rules.

Variant 1: string
string
Variant 2: null
null
adjust_unitstring | nullrequired

percent or dollar, for price rules.

Show adjust_unit schema
string | null

percent or dollar, for price rules.

Variant 1: string
string
Variant 2: null
null
created_atstringrequired

When the rule was created.

Format: date-time

created_bystringrequired

Who created the rule.

Format: uuid

display_statusstringrequired

Active, Paused, or Expired once a one-off date window has ended.

Values: "Active", "Paused", "Expired"

facility_idsstring[]required

Facilities the rule covers; empty means every facility.

Show facility_ids schema
string
idstringrequired

The rule's id.

Format: uuid

last_activated_atstring | nullrequired

When the rule last started applying to a unit group.

Format: date-time

Show last_activated_at schema
string | null

When the rule last started applying to a unit group.

Variant 1: string
string
Variant 2: null
null
namestringrequired

What the rule is called.

promotion_idstring | nullrequired

The promotion a promotion rule switches on.

Format: uuid

Show promotion_id schema
string | null

The promotion a promotion rule switches on.

Variant 1: string
string
Variant 2: null
null
promotion_namestring | nullrequired

That promotion's name.

Show promotion_name schema
string | null

That promotion's name.

Variant 1: string
string
Variant 2: null
null
repeats_yearlybooleanrequired

Whether the date window repeats every year.

rule_typestringrequired

street, seasonal, web or promotion.

scope_feature_namestring | nullrequired

The characteristic, for the characteristic scope.

Show scope_feature_name schema
string | null

The characteristic, for the characteristic scope.

Variant 1: string
string
Variant 2: null
null
scope_group_idsstring[] | nullrequired

The unit groups, for the groups scope.

Show scope_group_ids schema
string[] | null

The unit groups, for the groups scope.

Variant 1: string[]
string[]
Variant 2: null
null
scope_kindstringrequired

all, groups or characteristic.

statusstringrequired

active or paused.

threshold_pctstring | nullrequired

Occupancy percentage, for the occupancy triggers.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

Show threshold_pct schema
string | null

Occupancy percentage, for the occupancy triggers.

Variant 1: string
string
Variant 2: null
null
trigger_kindstringrequired

always, occupancy_below, occupancy_above or date_window.

updated_atstringrequired

When the rule last changed.

Format: date-time

window_endstring | nullrequired

Last day of the date window.

Format: date

Show window_end schema
string | null

Last day of the date window.

Variant 1: string
string
Variant 2: null
null
window_startstring | nullrequired

First day of the date window.

Format: date

Show window_start schema
string | null

First day of the date window.

Variant 1: string
string
Variant 2: null
null
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
metricsEmbeddedMetrics | null
Show metrics schema
EmbeddedMetrics | null
Variant 1: EmbeddedMetrics
cardsobjectrequired
computed_atstring | nullrequired

Format: date-time

Show computed_at schema
string | null
Variant 1: string
string
Variant 2: null
null
is_stalebooleanrequired
scopestringrequired

Values: "facility", "portfolio"

Variant 2: null
null
paginationPaginationBlockrequired

Pagination metadata for list responses.

Show pagination schema
cursorstring | null
Show cursor schema
string | null
Variant 1: string
string
Variant 2: null
null
has_morebooleanrequired
limitintegerrequired
total_countinteger | null
Show total_count schema
integer | null
Variant 1: integer
integer
Variant 2: null
null
400Validation error
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
401Unauthenticated
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
403Permission denied
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
404Not found
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
409Business logic error
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
503Temporary failure
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
Build something that works beautifully.

Facily API · Contract v1.200 · Reviewed October 29, 2026

List Revenue Rules | Facily Developers