Creating participants
Explicitly via the API
A new participant returns
201 with the participant and its state:
external_id already exists, the call updates that participant instead of creating a duplicate, and returns 200 with the same shape:
With an
Idempotency-Key, a repeat of the same request returns the first response again, with Idempotent-Replayed: true.
Automatically on first event
When a program’son_unknown_participant is set to CREATE (the default), participants are created the first time you send an event with an unrecognized external_id:
on_unknown_participant to REJECT if you want to require explicit creation before sending events. See Programs for details.
Auto-enrollment of existing participants
When an event names a participant who exists but isn’t enrolled in the event’s program, Scrip enrolls them automatically. This applies to every field an event can name a participant with:external_id or participant_id for the participant the event is about, and recipient_id or recipient_external_id for a second participant such as a gift recipient (see Sending an event). Enrollment status is per-program and separate from the participant’s own status; the next event reactivates an inactive enrollment.
GET /v1/participants/{participant_id} lists the participant’s programs in enrollments, oldest first. Each has enrolled_at, when the participant first joined that program. Reactivating an enrollment keeps its enrolled_at.
The on_unknown_participant setting only controls whether new participants are created. It does not affect enrollment of existing ones.
Identifiers
Participants have two IDs:
Every
{participant_id} URL path accepts either one. Prefix your external_id with ext: to use it directly in any endpoint path:
external_id contains / or ?, percent-encode those characters (ext:team%2Fuser_123).
The detail endpoint (GET /v1/participants/ext:user_123) returns the participant’s profile, tags, attributes, counters, balances, tiers, and program_ids. You can limit the expanded sections with expand[] (programs, tiers, balances), or pass expand[]=none for profile and state only:
expand[]=tag_details for each tag’s label, icon, and category. See Show earned badges.
Balances
Check a participant’s current balances across all assets:available (spendable now), held (set aside or pending settlement), and deferred (waiting for a future maturity date to vest). See Accounts and buckets for details.
When the asset has a value_per_unit, each balance also carries available_value, what available is worth in money, such as {"amount_minor": 25000, "currency": "USD"} for 25,000 points at USD 0.01. Scrip rounds it down to the currency’s smallest unit.
You can also adjust a participant’s balance directly for customer support or manual corrections:
Transaction history
View the ledger entries for a participant:amount is positive for credits and negative for debits. When a rule action caused the change, the row includes event_id, event_timestamp, rule_id, and rule_name.
Time-range filters
You can filter history by when Scrip recorded the entry (created_after / created_before) or when the event occurred (occurred_after / occurred_before), using exclusive RFC 3339 timestamps.
To list the raw events processed for a participant, call:
Profile fields
Participants support optional profile fields for contact and display information:email, phone, first_name, last_name, and display_name.
Update profile fields (along with status, tags, attributes, and counters) using PATCH:
Finding participants
UseGET /v1/participants to search for accounts, filter by segment, or export participants to CSV. See List participants for all filter, sorting, and CSV export options.
Status
A participant’sstatus controls whether they can earn and spend rewards:
Allowed actions by status
Inactive participants and events
When an event arrives for aSUSPENDED or CLOSED participant, Scrip evaluates its rules as usual:
- Tag, attribute, and scheduling actions (
TAG,UNTAG,SET_ATTRIBUTE,SCHEDULE_EVENT,BROADCAST) are allowed to run. - Balance, counter, and tier actions (
CREDIT,DEBIT,HOLD,RELEASE,FORFEIT,VOID_PENDING,COUNTER,SET_TIER) fail the entire event witherror_code: "participant_inactive"if either the event’s participant or the action’s target participant is inactive.
participant.status == 'ACTIVE' to your earn rule conditions.
State management
Read, update, and audit participant tags, counters, and attributes.
Groups
List a participant’s groups (
GET /v1/groups?participant_id=...) and manage shared wallets.Balance operations
Adjust, hold, release, forfeit, and mature participant balances.