Loyalty Admin API

Write Call

CompleteCustomerSource3

Mark a way to earn points as completed for one customer and grant its points right away, for example when an action was done but not tracked.

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

The points configured for the way to earn are granted immediately. Its limits, rate limits and mutual exclusions apply unless force_unlock says otherwise: force_if_first rejects only if this customer already completed this way to earn, and force_again always grants. Forcing needs a shop or customer-admin token.

Name the way to earn by subject_id or subject_slug, not both; CustomerBalance3 with include_full_program lists them under sources.

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.

  • subject_id bubbleflake either subject_id or subject_slug

    The Bubblehouse ID of the way to earn.

  • subject_slug string either subject_id or subject_slug

    The slug of the way to earn.

  • force_unlock ForceUnlock1 optional

    How strictly to enforce the limits of the way to earn. Defaults to normally.

  • description string optional

    Customer-visible description of the change.

  • private_note string optional

    Extra information about the change for the staff eyes only.

Output

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

{"ok": true}

Usage Examples

Credit a missed social follow

Request

{
  "customer": {
    "email": "alice@example.com"
  },
  "force_unlock": "force_if_first",
  "private_note": "Customer sent a screenshot",
  "subject_slug": "follow-on-instagram"
}

Response

{
  "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 force a completion. Use a shop token or a customer-admin token.

404 adjustment_subject_missing

The way to earn is missing, both subject fields were set, or it is unknown or not enabled in this venue.

Global Errors

Status Error Reason & Examples
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.

401 invalid_token

The provided authentication token is invalid or has expired.

For example: The token has expired

Previous
CancelCustomerDeletion3