Toggle the active status of an approval policy
curl --request PATCH \
--url https://app.solya.app/api/approval-policies/{id}/status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"isActive": false
}
'import requests
url = "https://app.solya.app/api/approval-policies/{id}/status"
payload = { "isActive": False }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({isActive: false})
};
fetch('https://app.solya.app/api/approval-policies/{id}/status', 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}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'isActive' => false
]),
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}/status"
payload := strings.NewReader("{\n \"isActive\": false\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://app.solya.app/api/approval-policies/{id}/status")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"isActive\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.solya.app/api/approval-policies/{id}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"isActive\": false\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": false,
"name": "High-value restock approval",
"organizationId": "org-uuid-1",
"scopeActorTypes": [],
"scopeBrandIds": [],
"scopeCollections": [],
"scopeShopIds": [
"shop-uuid-1"
],
"scopeSupplierIds": [],
"scopeWorkflowIds": [],
"thresholdMetric": "PLAN_TOTAL_VALUE",
"thresholdValue": 50000,
"updatedAt": "2026-06-05T12:00:00.000Z",
"updatedBy": "user-uuid-1"
}Approval Policies
Toggle the active status of an approval policy
Sets the isActive flag on an approval policy. This is the only way to activate or deactivate a policy — isActive is not editable via PUT /api/approval-policies/{id}. Returns 404 when the policy does not exist or belongs to another organization. Requires intelligenceLayer.configure permission.
PATCH
/
api
/
approval-policies
/
{id}
/
status
Toggle the active status of an approval policy
curl --request PATCH \
--url https://app.solya.app/api/approval-policies/{id}/status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"isActive": false
}
'import requests
url = "https://app.solya.app/api/approval-policies/{id}/status"
payload = { "isActive": False }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({isActive: false})
};
fetch('https://app.solya.app/api/approval-policies/{id}/status', 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}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'isActive' => false
]),
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}/status"
payload := strings.NewReader("{\n \"isActive\": false\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://app.solya.app/api/approval-policies/{id}/status")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"isActive\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.solya.app/api/approval-policies/{id}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"isActive\": false\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": false,
"name": "High-value restock approval",
"organizationId": "org-uuid-1",
"scopeActorTypes": [],
"scopeBrandIds": [],
"scopeCollections": [],
"scopeShopIds": [
"shop-uuid-1"
],
"scopeSupplierIds": [],
"scopeWorkflowIds": [],
"thresholdMetric": "PLAN_TOTAL_VALUE",
"thresholdValue": 50000,
"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
The desired active state — true to activate, false to deactivate
⌘I

