Skip to main content
POST
Set one asset class's rule in a scenario

Authorizations

x-api-key
string
header
required

Raw API key shown once when created in the Allocait app (Settings > API keys). Send it verbatim in this header; the server stores and compares only its SHA-256 hash. Allocait generates every key: alc_ followed by 64 lowercase hex characters. Keys issued before 2026-10-10 are 64 hex characters with no prefix and keep working. A key may carry an expiry (90 days or 1 year, or never). A malformed, unknown, revoked or expired key gets 401 with no further detail, and a malformed one is refused before any lookup. Keys cannot be created through this API.

Path Parameters

id
string<uuid>
required

scenario_id

Body

application/json
asset_class
string
required

Class name, rules text alias or id. Resolved own class first, then the system class, then the alias.

band_min_pct
number | null
Required range: 0 <= x <= 100
band_max_pct
number | null
Required range: 0 <= x <= 100
target_pct
number | null
Required range: 0 <= x <= 100
size_min_pct
number | null
Required range: 0 <= x <= 100
size_max_pct
number | null
Required range: 0 <= x <= 100
short_size_min_pct
number | null
Required range: 0 <= x <= 100
short_size_max_pct
number | null
Required range: 0 <= x <= 100
create_class
boolean
default:false

Create a custom class when asset_class names none. Set it only when the user asked for a new class.

Response

The rule was saved

success
boolean
scenario_id
string<uuid>
change
enum<string>
Available options:
added,
changed,
removed,
unchanged
asset_class
string
asset_class_id
string<uuid>
before
object | null

The class's rule before this call, or null when it had none.

after
object | null

The class's rule after this call, or null when the call removed it.

restore_point_id
string<uuid>
created_class
boolean

True when create_class created the class.