Skip to main content
PUT
Reorder all rules in a rule set
Replaces one set’s complete non-archived rule order in one change. rule_ids must contain every ACTIVE and SUSPENDED rule in that set exactly once. An empty list is valid for an empty set. Pass the current expected_rule_configuration_version. The response contains the rules renumbered from 1 with no gaps and the resulting version.
See Move or reorder for changing rule and rule-set order.

Authorizations

Authorization
string
header
default:sk_...
required

Send your API key as Authorization: Bearer <key>.

Path Parameters

program_id
string<uuid>
required

The program's id.

rule_set_id
string<uuid>
required

The rule set's id.

Body

application/json

Every rule id in the order you want

The full list of a rule set's rule ids in the order you want.

expected_rule_configuration_version
integer
required

Current rule_configuration_version from the configuration read endpoint. A stale value rejects the request.

Required range: x >= 1
Example:

3

rule_ids
string<uuid>[]
required

Every ACTIVE and SUSPENDED rule ID in the set, exactly once, in the desired order. Empty is valid only for an empty set.

Example:

Response

The rules in their new order, and the new rule_configuration_version

The rules in a rule set after reordering, numbered in order, and the new rule configuration version.

rule_configuration_version
integer

Resulting program rule-configuration version.

Example:

4

rules
object[]

Complete rule sequence for the set after renumbering.