Skip to content

Define a tenant-scoped participant trait

POST
/participant-trait-definitions
curl --request POST \
--url https://quikstik-core.fly.dev/participant-trait-definitions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: example' \
--header 'x-tenant-id: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \
--data '{ "name": "example", "value_type": "text", "sensitivity": "standard", "requirement_class": "required_at_checkout", "integer_min": 1, "integer_max": 1, "policy_version": 1 }'

Configuration, never a free-form field (arch-030 §2.5): name, value type, integer bounds where applicable, sensitivity tier, and operational requirement class. Core ships zero built-in trait names — height_cm, grade_level, and belay_certified_gym are all tenant vocabulary on the same machinery.

x-tenant-id
required
string format: uuid

Tenant identifier (UUID).

Authn/authz semantics are intentionally TBD for this contract slice; this header exists to keep the contract explicitly multi-tenant from day 0.

Idempotency-Key
required
string
>= 1 characters

Idempotency key for the command envelope. A retry with the same key is a no-op.

Media typeapplication/json
object
name
required

Tenant vocabulary (height_cm, grade_level) — core ships no built-in names.

string
>= 1 characters
value_type
required
string
Allowed values: text integer boolean
sensitivity
required

Sensitive covers health/biometrics-adjacent, legal, or regulated facts (arch-030 §2.6).

string
Allowed values: standard sensitive
requirement_class
required
string
Allowed values: required_at_checkout required_before_start staff_only optional
integer_min

Only valid when value_type is integer.

integer format: int64
nullable
integer_max

Only valid when value_type is integer.

integer format: int64
nullable
policy_version
required
integer format: int32

Command accepted; the definition identifier is assigned server-side

Media typeapplication/json
object
definition_id
required
string format: uuid

Example generated

{
"definition_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

Malformed body

Media typeapplication/json
object
reason
required
string

Example generated

{
"reason": "example"
}

Missing or invalid session bearer token

Media typeapplication/json
object
reason
required

Stable, machine-readable reason code (e.g. “sold_out”, “processor_not_configured”, “rail_refused”).

string

Example

{
"reason": "sold_out"
}

The session’s effect authority does not cover this operation

Media typeapplication/json
object
reason
required

Stable, machine-readable reason code (e.g. “sold_out”, “processor_not_configured”, “rail_refused”).

string

Example

{
"reason": "sold_out"
}

No durable backend is wired for this operation (fail-closed)

Media typeapplication/json
object
reason
required

Stable, machine-readable reason code (e.g. “sold_out”, “processor_not_configured”, “rail_refused”).

string

Example

{
"reason": "sold_out"
}