Update an approval policy
curl --request PUT \
--url https://app.solya.app/api/approval-policies/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"thresholdValue": 75000
}
'import requests
url = "https://app.solya.app/api/approval-policies/{id}"
payload = { "thresholdValue": 75000 }
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({thresholdValue: 75000})
};
fetch('https://app.solya.app/api/approval-policies/{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/approval-policies/{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([
'thresholdValue' => 75000
]),
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/approval-policies/{id}"
payload := strings.NewReader("{\n \"thresholdValue\": 75000\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/approval-policies/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"thresholdValue\": 75000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.solya.app/api/approval-policies/{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 \"thresholdValue\": 75000\n}"
response = http.request(request)
puts response.read_body{
"actionFamily": "RESTOCK_PLAN",
"createdAt": "2026-01-10T08:00:00.000Z",
"createdBy": "user-uuid-1",
"id": "policy-uuid-1",
"isActive": true,
"name": "High-value restock approval",
"organizationId": "org-uuid-1",
"scopeActorTypes": [],
"scopeBrandIds": [],
"scopeCollections": [],
"scopeShopIds": [
"shop-uuid-1"
],
"scopeSupplierIds": [],
"scopeWorkflowIds": [],
"thresholdMetric": "PLAN_TOTAL_VALUE",
"thresholdValue": 75000,
"updatedAt": "2026-06-05T12:00:00.000Z",
"updatedBy": "user-uuid-1"
}Approval Policies
Update an approval policy
Updates an existing approval policy in the caller’s organization. All fields are optional — only the provided fields are updated. The isActive flag is not editable through this endpoint. Returns 404 when the policy does not exist or belongs to another organization. Requires intelligenceLayer.configure permission.
PUT
/
api
/
approval-policies
/
{id}
Update an approval policy
curl --request PUT \
--url https://app.solya.app/api/approval-policies/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"thresholdValue": 75000
}
'import requests
url = "https://app.solya.app/api/approval-policies/{id}"
payload = { "thresholdValue": 75000 }
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({thresholdValue: 75000})
};
fetch('https://app.solya.app/api/approval-policies/{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/approval-policies/{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([
'thresholdValue' => 75000
]),
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/approval-policies/{id}"
payload := strings.NewReader("{\n \"thresholdValue\": 75000\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/approval-policies/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"thresholdValue\": 75000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.solya.app/api/approval-policies/{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 \"thresholdValue\": 75000\n}"
response = http.request(request)
puts response.read_body{
"actionFamily": "RESTOCK_PLAN",
"createdAt": "2026-01-10T08:00:00.000Z",
"createdBy": "user-uuid-1",
"id": "policy-uuid-1",
"isActive": true,
"name": "High-value restock approval",
"organizationId": "org-uuid-1",
"scopeActorTypes": [],
"scopeBrandIds": [],
"scopeCollections": [],
"scopeShopIds": [
"shop-uuid-1"
],
"scopeSupplierIds": [],
"scopeWorkflowIds": [],
"thresholdMetric": "PLAN_TOTAL_VALUE",
"thresholdValue": 75000,
"updatedAt": "2026-06-05T12:00:00.000Z",
"updatedBy": "user-uuid-1"
}Authorizations
User session token issued by NextAuth. For human users accessing Solya via the web application.
Path Parameters
Unique identifier of the approval policy (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 Required string length:
1 - 255Available options:
USER, WORKFLOW, SCENARIO_GENERATOR, SYSTEM, API_TOKEN Minimum string length:
1Minimum string length:
1Minimum string length:
1Minimum string length:
1Minimum string length:
1Available options:
PLAN_TOTAL_VALUE, PLAN_TOTAL_QUANTITY, VARIANT_QUANTITY, SHOP_QUANTITY Required range:
x >= 0
