@alytegen/sdk 0.7.0. One API key with
merchant:read and merchant:write manages rules and membership. Shop owners get the same flow
in the console under Access rules.
Audiences
Levels are explicit: listing
Gold does not imply Platinum. Membership grants early access
only. It never grants payment permission, which still comes from the buyer’s own grant.
Create, review, schedule
A rule starts as an inactive draft. You preview its current impact, then publish it with the preview’s ID and the rule’s revision, so nothing goes live that an operator has not reviewed.- Times need an explicit offset. The preview reports the venue’s time zone so an operator can check the window in local time.
- Windows on one tier cannot overlap, and each must end by the tier’s general sale.
- Published rules cannot be edited. To cancel, call
preview(shopId, ruleId, 'cancel'), thencancelwith that preview’s ID, the current revision and a new request ID. - Impact counts are observations, not stock forecasts or queue positions.
- Every change carries a request ID. Store it with the input before sending. Resending the same ID and input is safe after an uncertain response; changed input needs a new ID.
/v1/integration/merchants/{shopId}/access:
rules, rules/{ruleId}, rules/{ruleId}/preview, rules/{ruleId}/schedule,
rules/{ruleId}/cancel, programs and programs/{programId}/members/{buyerId}.
Attesting membership
You attest membership for the Alyte buyer ID: thebuyerId returned by
buyerSessions.mint. Keep a mapping from your signed-in customer to
that value. Your own customer ID will not match, and the ID must never be guessed from an email.
sourceRevision.
Revocation takes effect for the next purchase decision.
What buyers and agents see
Before a buyer’s window opens, discovery reports the tier as not yet on sale with aretryAfter at the buyer’s own opening time. An agent that tries to buy too early gets
409 access_waiting with the same retryAfter; nothing was charged, so retrying at that time
with the same idempotency key is safe. Once general sale opens, rules no longer apply.
Changing a tier that has rules
While a scheduled window exists, the tier’s general-sale time cannot change (409 access_conflict). Cancel the windows first. Deleting a tier archives its rules: they
leave the list, and reading one by ID returns status: 'archived' with its history.
