Loyalty Admin API

Write Call

AdjustCustomerMark3

Add or remove a mark on one customer: flag as tester, insider (employee), trusted or high risk; make read-only; block or allow earning or spending rewards, referrals, tiers, voting, or the whole program (ban or unban).

Kind Write API call
Method POST
URL https://app.bubblehouse.com/api/v2023061/<shop>/AdjustCustomerMark3
Authentication Admin Customer TokenShop Token

add_customer_mark applies the mark and remove_customer_mark removes it. Adding a mark the customer has, or removing one they lack, changes nothing and succeeds.

Removing a mark does not clear the same restriction when it comes from a customer tag. The call needs a shop or customer-admin token. See CustomerMark1 for what each mark does.

One adjustment per call. To apply several adjustments in one request, or for the less common actions, use AdjustCustomerState3.

Input

  • customer CustomerIdentity1 required if using a shop token

    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.

  • action AdjustmentAction1 required

    add_customer_mark or remove_customer_mark. There is no default.

  • mark CustomerMark1 required

    The mark to add or remove. An unknown mark is an error.

Output

A successful response has no meaningful properties and only contains an ok property always set to true:

{"ok": true}

Usage Examples

Flag a suspicious account

Request

{
  "action": "add_customer_mark",
  "customer": {
    "email": "alice@example.com"
  },
  "mark": "high_risk"
}

Response

{
  "ok": true
}

Specific Errors

Status Error Reason & Examples
403 access_denied

A customer token cannot change marks. Use a shop token or a customer-admin token.

400 adjustment_missing_required_field

The action is missing or is not one this call accepts, or the mark is missing or unknown.

Global Errors

Status Error Reason & Examples
401 invalid_token

The provided authentication token is invalid or has expired.

For example: The token has expired

400 inaccessible_global_api_version

The global API version you are trying to use is not enabled on your account.

400 obsolete_global_api_version

The global API version you are trying to use is no longer supported.

429 rate_limit_exceeded

Your usage is over the rate limit. Ensure that you're not making duplicate calls, and contact our team for a rate limit increase.

For example: You are over the read limit per second for this customer

400 invalid_global_api_version

The global API version you are trying to use has never existed.

Previous
Overview