Create a new approval policy for the authenticated organization
curl --request POST \
--url https://app.solya.app/api/approval-policies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"actionFamily": "RESTOCK_PLAN",
"name": "High-value restock approval",
"scopeShopIds": [
"shop-uuid-1"
],
"thresholdValue": 50000
}
'import requests
url = "https://app.solya.app/api/approval-policies"
payload = {
"actionFamily": "RESTOCK_PLAN",
"name": "High-value restock approval",
"scopeShopIds": ["shop-uuid-1"],
"thresholdValue": 50000
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
actionFamily: 'RESTOCK_PLAN',
name: 'High-value restock approval',
scopeShopIds: ['shop-uuid-1'],
thresholdValue: 50000
})
};
fetch('https://app.solya.app/api/approval-policies', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'actionFamily' => 'RESTOCK_PLAN',
'name' => 'High-value restock approval',
'scopeShopIds' => [
'shop-uuid-1'
],
'thresholdValue' => 50000
]),
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"
payload := strings.NewReader("{\n \"actionFamily\": \"RESTOCK_PLAN\",\n \"name\": \"High-value restock approval\",\n \"scopeShopIds\": [\n \"shop-uuid-1\"\n ],\n \"thresholdValue\": 50000\n}")
req, _ := http.NewRequest("POST", 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.post("https://app.solya.app/api/approval-policies")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"actionFamily\": \"RESTOCK_PLAN\",\n \"name\": \"High-value restock approval\",\n \"scopeShopIds\": [\n \"shop-uuid-1\"\n ],\n \"thresholdValue\": 50000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.solya.app/api/approval-policies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"actionFamily\": \"RESTOCK_PLAN\",\n \"name\": \"High-value restock approval\",\n \"scopeShopIds\": [\n \"shop-uuid-1\"\n ],\n \"thresholdValue\": 50000\n}"
response = http.request(request)
puts response.read_body{
"actionFamily": "RESTOCK_PLAN",
"createdAt": "2026-06-05T10:00:00.000Z",
"createdBy": null,
"id": "policy-uuid-new",
"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": 50000,
"updatedAt": null,
"updatedBy": null
}Approval Policies
Create a new approval policy for the authenticated organization
Creates an approval policy in the caller’s organization. Returns 400 when a policy with the same name already exists for the same organization and action family. Requires intelligenceLayer.configure permission.
POST
/
api
/
approval-policies
Create a new approval policy for the authenticated organization
curl --request POST \
--url https://app.solya.app/api/approval-policies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"actionFamily": "RESTOCK_PLAN",
"name": "High-value restock approval",
"scopeShopIds": [
"shop-uuid-1"
],
"thresholdValue": 50000
}
'import requests
url = "https://app.solya.app/api/approval-policies"
payload = {
"actionFamily": "RESTOCK_PLAN",
"name": "High-value restock approval",
"scopeShopIds": ["shop-uuid-1"],
"thresholdValue": 50000
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
actionFamily: 'RESTOCK_PLAN',
name: 'High-value restock approval',
scopeShopIds: ['shop-uuid-1'],
thresholdValue: 50000
})
};
fetch('https://app.solya.app/api/approval-policies', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'actionFamily' => 'RESTOCK_PLAN',
'name' => 'High-value restock approval',
'scopeShopIds' => [
'shop-uuid-1'
],
'thresholdValue' => 50000
]),
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"
payload := strings.NewReader("{\n \"actionFamily\": \"RESTOCK_PLAN\",\n \"name\": \"High-value restock approval\",\n \"scopeShopIds\": [\n \"shop-uuid-1\"\n ],\n \"thresholdValue\": 50000\n}")
req, _ := http.NewRequest("POST", 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.post("https://app.solya.app/api/approval-policies")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"actionFamily\": \"RESTOCK_PLAN\",\n \"name\": \"High-value restock approval\",\n \"scopeShopIds\": [\n \"shop-uuid-1\"\n ],\n \"thresholdValue\": 50000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.solya.app/api/approval-policies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"actionFamily\": \"RESTOCK_PLAN\",\n \"name\": \"High-value restock approval\",\n \"scopeShopIds\": [\n \"shop-uuid-1\"\n ],\n \"thresholdValue\": 50000\n}"
response = http.request(request)
puts response.read_body{
"actionFamily": "RESTOCK_PLAN",
"createdAt": "2026-06-05T10:00:00.000Z",
"createdBy": null,
"id": "policy-uuid-new",
"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": 50000,
"updatedAt": null,
"updatedBy": null
}Authorizations
User session token issued by NextAuth. For human users accessing Solya via the web application.
Body
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 - 255Required range:
x >= 0Available 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 
