Skip to main content
POST
/
api
/
admin
/
rulesets
Create ruleset
curl --request POST \
  --url https://{instance}.{env}.on-hellgate.cloud/api/admin/rulesets \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "context": "checkout",
  "created_by": "ops@example.com",
  "description": "Standard checkout rules",
  "rules": [
    {
      "id": "r1",
      "async": true,
      "backend": "vdm",
      "condition": {},
      "description": "<string>",
      "enabled": true,
      "name": "Block USD"
    }
  ]
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "activated_at": "2023-11-07T05:31:56Z",
  "context": "checkout",
  "created_at": "2023-11-07T05:31:56Z",
  "created_by": "<string>",
  "description": "<string>",
  "rules": [
    {
      "enabled": true,
      "id": "r1",
      "async": true,
      "backend": "vdm",
      "condition": {},
      "description": "<string>",
      "fields": [
        "<string>"
      ],
      "live": true,
      "members": [
        {
          "backend": "vdm",
          "live": true,
          "weight": 60
        }
      ],
      "name": "Block USD",
      "populate_on": [],
      "ttl_seconds": 123
    }
  ],
  "version": 1
}

Authorizations

Authorization
string
header
required

HS256-signed JWT bearer token, obtained via the OAuth2 client-credentials grant (see Authentication).

Body

application/json

Ruleset attributes

context
string
required

Ruleset context key used for routing

Example:

"checkout"

created_by
string
Example:

"ops@example.com"

description
string
Example:

"Standard checkout rules"

rules
RuleInput · object[]

Initial rule definitions (can also be added via PATCH while DRAFT)

Response

Created ruleset

id
string<uuid>
activated_at
string<date-time> | null
context
string
Example:

"checkout"

created_at
string<date-time>
created_by
string | null
description
string | null
rules
Rule · object[]

Rule definitions evaluated in array order

status
enum<string>
Available options:
DRAFT,
ACTIVE,
INACTIVE
version
integer
Example:

1