Skip to main content
GET
/
api
/
data-platform
/
organizations
/
{organizationId}
/
business-logic-rules
Get active business-logic rules for an organization
curl --request GET \
  --url https://app.solya.app/api/data-platform/organizations/{organizationId}/business-logic-rules \
  --header 'Authorization: Bearer <token>'
{
  "pagination": {
    "limit": 100,
    "offset": 0,
    "totalCount": 1
  },
  "rules": [
    {
      "actionFamily": "RESTOCK",
      "category": "STOCK",
      "conditions": {
        "threshold": 12,
        "unit": "WEEKS"
      },
      "createdAt": "2026-01-10T08:00:00.000Z",
      "description": "Block restock if coverage exceeds 12 weeks",
      "enforcementMode": "BLOCK",
      "evaluationPoints": [
        "RESTOCK_PRE_ADD_ITEM"
      ],
      "id": "rule-uuid-1",
      "isActive": true,
      "logAllEvaluations": false,
      "name": "Minimum coverage rule",
      "phase": "PRE_DECISION",
      "priority": 1,
      "ruleGroupIds": [],
      "scope": {},
      "sourceTemplateId": "template-uuid-1",
      "updatedAt": null,
      "validationHooks": [
        "RESTOCK_PRE_ADD_ITEM"
      ],
      "violationMessage": null
    }
  ],
  "templatesMetadata": {
    "template-uuid-1": {
      "applicableFamilies": [
        "RESTOCK"
      ],
      "category": "STOCK",
      "defaultEvaluationPoints": [
        "RESTOCK_PRE_ADD_ITEM"
      ],
      "descriptionKey": "templates.minCoverage.description",
      "id": "template-uuid-1",
      "nameKey": "templates.minCoverage.name",
      "phase": "PRE_DECISION"
    }
  }
}

Authorizations

Authorization
string
header
required

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

organizationId
string
required

UUID of the organization whose rules are being queried

Minimum string length: 1

Query Parameters

phase
enum<string>

Filter by business phase

Available options:
SCORING,
SIZING,
SOURCING,
APPROVAL
actionFamily
enum<string>

Filter by action family (e.g. RESTOCK, MARKDOWN)

Available options:
RESTOCK_PLAN,
REBALANCE_PLAN,
MARKDOWN_PLAN,
PRE_SEASON_PLAN,
RECOMMENDATION,
WORKFLOW,
SUPPLIER_RETURN_PLAN,
SUPPLIER_EXCHANGE_PLAN
scopeShopId
string

Filter rules whose scope includes this shop ID

Minimum string length: 1
scopeBrandId
string

Filter rules whose scope includes this brand ID

Minimum string length: 1
scopeVariantId
string

Filter rules whose scope includes this variant ID

Minimum string length: 1
scopeSupplierId
string

Filter rules whose scope includes this supplier ID

Minimum string length: 1
limit
integer
default:100

Maximum number of rules to return (default: 100, max: 1000)

Required range: 1 <= x <= 1000
offset
integer
default:0

Number of rules to skip (default: 0)

Required range: 0 <= x <= 9007199254740991

Response

Successful response

data
object
required
success
enum<boolean>
required
Available options:
true