POST /api/public/v1/loyalty/launchProgram
Changed onLaunches the organization's loyalty program as live with the given settings, its tiers included; without tiers it starts with none, and without points with Points on. While points.enabled is false nothing earns, spends, welcomes or credits a birthday in points, and the points fields are stored as sent, unchecked against one another. stamps launches the stamps settings and rows beside them, adopting each row imageUrl, which must be a stamp image draft the organization uploaded through mediaDrafts.control; without it stamps start off with no rows. Queues no re-placement, since the program has no members yet. Refused with CONFLICT when it was already launched, with BAD_REQUEST when a stamp row sends an id, more than two rows are sent, a row's stampsToCollect is outside 2 to 10, a sent name is blank or over 30 characters (an edit without one keeps the stored name and a new row is named Reward), or it lacks an earn or a reward target, with BAD_REQUEST and refusal stampTargetUnavailable, publishing the row's position and the target as stampTarget, when a target is not in the organization's catalog or is archived, with BAD_REQUEST and refusal stampImageNotUploaded when a row's imageUrl is neither that row's stored image nor any stamp image draft the organization uploaded, with CONFLICT and refusal mediaDraftImageExpired when it is such a draft that was released or expired and must be uploaded again, with FORBIDDEN and refusal stampsDisabled when stamps is sent while the stamps flag is off for the organization, with BAD_REQUEST and refusal loyaltyBlocksOff when points.enabled is false while stamps are off, have no active row or the stamps flag is off for the organization, with BAD_REQUEST and refusal cashbackAboveTier when Points and tiers are on and the cashback is above the first tier's, with BAD_REQUEST and refusal birthdayNeedsDateOfBirth when Points and the birthday bonus are on while signupFields.dateOfBirth is off, with BAD_REQUEST when the settings are otherwise invalid, and with FORBIDDEN and refusal loyaltyDisabled while the business switched Loyalty off, featureRestrictedByPlan while its plan restricts Loyalty, or featureNotEntitled while its plan lacks Loyalty. Refused with FORBIDDEN and refusal billingReadOnly once an overdue subscription's grace has run out, and subscriptionEnded once the business's verified base plan has ended with no eligible base in its place. Either refusal is lifted for this operation's category by an active plan grant whose plan allows it, which does not change the subscription's own standing. Refused with FORBIDDEN as paywallLocked when the caller is an Owner or Manager of a business the merchant Paywall locks: one with no verified subscription that has taken 5 orders while the Paywall's rollout reaches it, an order counting from its first saved line, whether or not it is paid or completed, until it is archived or cancelled before activation. Nothing is read or written; a verified subscription lifts the lock.
Request
- Base URLhttps://app.fortuneos.ai
- Authnone declared
Request body
Response
OK
Changes
- info
added the new optional request property
stamps/rows/items/name - info
added the required property
stamps/rows/items/nameto the response with the status
- info
- info
added the new optional request property
settings/points
1 more change in this revision
- info