Skip to main content
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
}
'
{
  "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

Authorization
string
header
required

User session token issued by NextAuth. For human users accessing Solya via the web application.

Path Parameters

id
string
required

Unique identifier of the approval policy (UUID)

Minimum string length: 1

Body

application/json
isActive
boolean
required

The desired active state — true to activate, false to deactivate

Response

Successful response

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