Update a business-logic rule
curl --request PUT \
--url https://app.solya.app/api/business-logic-rules/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enforcementMode": "BLOCK",
"name": "Updated minimum order value"
}
'import requests
url = "https://app.solya.app/api/business-logic-rules/{id}"
payload = {
"enforcementMode": "BLOCK",
"name": "Updated minimum order value"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enforcementMode: 'BLOCK', name: 'Updated minimum order value'})
};
fetch('https://app.solya.app/api/business-logic-rules/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.solya.app/api/business-logic-rules/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'enforcementMode' => 'BLOCK',
'name' => 'Updated minimum order value'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.solya.app/api/business-logic-rules/{id}"
payload := strings.NewReader("{\n \"enforcementMode\": \"BLOCK\",\n \"name\": \"Updated minimum order value\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://app.solya.app/api/business-logic-rules/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enforcementMode\": \"BLOCK\",\n \"name\": \"Updated minimum order value\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.solya.app/api/business-logic-rules/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enforcementMode\": \"BLOCK\",\n \"name\": \"Updated minimum order value\"\n}"
response = http.request(request)
puts response.read_body{
"actionFamily": "RESTOCK_PLAN",
"category": "ORDERING",
"conditions": {
"operator": "AND",
"rules": []
},
"createdAt": "2026-06-04T10:00:00.000Z",
"description": "Warn when a restock item total is below the supplier minimum",
"enforcementMode": "BLOCK",
"evaluationPoints": [
"RESTOCK_PRE_ADD_ITEM"
],
"id": "rule-uuid-123",
"isActive": true,
"logAllEvaluations": false,
"name": "Updated minimum order value",
"paradigm": "VALIDATION",
"phase": null,
"priority": 1,
"ruleGroupIds": [
"ruleset-uuid-default"
],
"scope": {
"checkLevel": "PLAN_ITEM"
},
"sourceTemplateId": null,
"updatedAt": "2026-06-04T12:00:00.000Z",
"validationHooks": [
"RESTOCK_PRE_ADD_ITEM"
],
"violationMessage": null
}Business Logic Rules
Update a business-logic rule
Updates an existing business-logic rule in the caller’s organization. All fields are optional — only the provided fields are updated. When scope is included, validates all entity IDs against the organization. Returns 404 when the rule does not exist or belongs to another organization. Requires intelligenceLayer.configure permission.
PUT
/
api
/
business-logic-rules
/
{id}
Update a business-logic rule
curl --request PUT \
--url https://app.solya.app/api/business-logic-rules/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enforcementMode": "BLOCK",
"name": "Updated minimum order value"
}
'import requests
url = "https://app.solya.app/api/business-logic-rules/{id}"
payload = {
"enforcementMode": "BLOCK",
"name": "Updated minimum order value"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enforcementMode: 'BLOCK', name: 'Updated minimum order value'})
};
fetch('https://app.solya.app/api/business-logic-rules/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.solya.app/api/business-logic-rules/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'enforcementMode' => 'BLOCK',
'name' => 'Updated minimum order value'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.solya.app/api/business-logic-rules/{id}"
payload := strings.NewReader("{\n \"enforcementMode\": \"BLOCK\",\n \"name\": \"Updated minimum order value\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://app.solya.app/api/business-logic-rules/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enforcementMode\": \"BLOCK\",\n \"name\": \"Updated minimum order value\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.solya.app/api/business-logic-rules/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enforcementMode\": \"BLOCK\",\n \"name\": \"Updated minimum order value\"\n}"
response = http.request(request)
puts response.read_body{
"actionFamily": "RESTOCK_PLAN",
"category": "ORDERING",
"conditions": {
"operator": "AND",
"rules": []
},
"createdAt": "2026-06-04T10:00:00.000Z",
"description": "Warn when a restock item total is below the supplier minimum",
"enforcementMode": "BLOCK",
"evaluationPoints": [
"RESTOCK_PRE_ADD_ITEM"
],
"id": "rule-uuid-123",
"isActive": true,
"logAllEvaluations": false,
"name": "Updated minimum order value",
"paradigm": "VALIDATION",
"phase": null,
"priority": 1,
"ruleGroupIds": [
"ruleset-uuid-default"
],
"scope": {
"checkLevel": "PLAN_ITEM"
},
"sourceTemplateId": null,
"updatedAt": "2026-06-04T12:00:00.000Z",
"validationHooks": [
"RESTOCK_PRE_ADD_ITEM"
],
"violationMessage": null
}Authorizations
User session token issued by NextAuth. For human users accessing Solya via the web application.
Path Parameters
Unique identifier of the business-logic rule (UUID)
Minimum string length:
1Body
application/json
Available options:
RESTOCK_PLAN, REBALANCE_PLAN, MARKDOWN_PLAN, PRE_SEASON_PLAN, RECOMMENDATION, WORKFLOW, SUPPLIER_RETURN_PLAN, SUPPLIER_EXCHANGE_PLAN Available options:
CAPACITY, ASSORTMENT, ORDERING, TRANSFER, PRICING, DISTRIBUTION, COMPLIANCE - Option 1
- Option 2
Show child attributes
Show child attributes
Available options:
BLOCK, WARN, LOG Minimum array length:
1Available options:
PRE_PLAN_ITEM_ADD, PRE_PLAN_VALIDATE, RECOMMENDATION_GENERATION, WORKFLOW_EXECUTION, MANUAL_CHECK Required string length:
1 - 255Available options:
SCORING, SIZING, SOURCING, APPROVAL Required range:
0 <= x <= 9007199254740991Minimum string length:
1Show child attributes
Show child attributes
Available options:
RESTOCK_PRE_ADD_ITEM, RESTOCK_PRE_VALIDATE_ITEM, RESTOCK_PRE_CHANGE_STATUS, REBALANCE_PRE_ADD_ITEM, REBALANCE_PRE_VALIDATE_ITEM, REBALANCE_PRE_CHANGE_STATUS, MARKDOWN_PRE_ADD_ITEM, MARKDOWN_PRE_VALIDATE_ITEM, PRE_SEASON_PRE_ADD_ITEM, PRE_SEASON_PRE_VALIDATE_ITEM, PRE_SEASON_PRE_CHANGE_STATUS, RECOMMENDATION_PRE_GENERATE, MANUAL_CHECK, SUPPLIER_RETURN_PRE_ADD_ITEM, SUPPLIER_RETURN_PRE_CHANGE_STATUS, SUPPLIER_EXCHANGE_PRE_ADD_ITEM, SUPPLIER_EXCHANGE_PRE_CHANGE_STATUS Show child attributes
Show child attributes

