Get active business-logic rules for an organization
Returns active rules for the organization with optional filters on phase, actionFamily, and scope dimensions (shop, brand, variant, supplier). Filter predicates and pagination (limit, offset) are pushed into the SQL query so orgs with thousands of rules don’t pay the cost of an in-memory filter. limit defaults to 100 (max 1000); offset defaults to 0. Scope filters follow transversal semantics: a rule with an empty list on a dimension applies to all entities on that dimension. The response includes a pagination block with limit, offset, and totalCount (count of rules matching the filters, before pagination) and a templatesMetadata map keyed by sourceTemplateId so the data platform can resolve the originating template’s i18n labels and applicable action families. Requires Bearer token authentication.
Authorizations
Static internal-ops token used by the data platform and internal cron jobs (e.g. zombie-run sweep). Validated via requireBearerToken inside the handler against a service-specific environment variable.
Path Parameters
UUID of the organization whose rules are being queried
1Query Parameters
Filter by business phase
SCORING, SIZING, SOURCING, APPROVAL Filter by action family (e.g. RESTOCK, MARKDOWN)
RESTOCK_PLAN, REBALANCE_PLAN, MARKDOWN_PLAN, PRE_SEASON_PLAN, RECOMMENDATION, WORKFLOW, SUPPLIER_RETURN_PLAN, SUPPLIER_EXCHANGE_PLAN Filter rules whose scope includes this shop ID
1Filter rules whose scope includes this brand ID
1Filter rules whose scope includes this variant ID
1Filter rules whose scope includes this supplier ID
1Maximum number of rules to return (default: 100, max: 1000)
1 <= x <= 1000Number of rules to skip (default: 0)
0 <= x <= 9007199254740991
