Loyalty Admin API
Write CallAdjustCustomerState3
Manual admin changes to one customer: give or take away points (goodwill, corrections), return spent points or mark points as spent, upgrade or reset the tier, restart tier expiration, add or remove marks (tester, read-only, high risk, no rewards, no referrals, no tiers, no voting), complete a way to earn, fire a custom trigger, request or cancel account deletion (GDPR).
| Kind | Write API call |
|---|---|
| Method | POST |
| URL | https://app.bubblehouse.com/api/v2023061/<shop>/AdjustCustomerState3 |
| Authentication | Admin Customer TokenShop Token |
Applies a list of adjustments to one customer in order. An adjustment that fails stops the list; earlier ones stay applied.
For a single adjustment the single-purpose calls are simpler: AdjustCustomerPoints3, AdjustCustomerTier3, AdjustCustomerMark3, CompleteCustomerSource3, RequestCustomerDeletion3 and CancelCustomerDeletion3.
Input
-
A customer to operate upon, when using a shop token.
If you're using a customer token and decide to pass this field (which we do not recommend), it must match the customer from the token.
-
The adjustments to perform.
Output
A successful response has no meaningful properties and only contains an ok property always set to true:
{"ok": true}
Specific Errors
| Status | Error | Reason & Examples |
|---|---|---|
| 422 | source_already_used |
The point source has already been completed by this customer and does not allow additional completions, or a rate limit has been reached. |
| 403 | access_denied |
A customer token cannot use upgrade_tier, reset_tier, reset_tier_expiration, add_customer_mark, remove_customer_mark, or record_trigger. Use a shop token or a customer-admin token. |
| 404 | adjustment_subject_missing |
The adjustment needs a subject_id or subject_slug, both were set, or the subject is unknown or not enabled in this venue. |
| 400 | adjustment_missing_required_field |
A required detail for this action is missing, such as points or mark. |
| 400 | adjustment_not_configured_in_shop |
This adjustment action is not implemented yet (for example undo_trigger, achievement, vendible, and referral approve/reject actions). |