Loyalty API

Change2

Represents a change in the loyalty data.

Properties

  • idbubbleflakerequired

    Unique ID of the change in the Bubblehouse system

  • areaChangeArea1required

    An enum defining the shape of the change object (ie which other fields are relevant)

    You MUST ignore the changes with area values that you do not know how to handle. New areas can be introduced without notice, and undocumented areas may be returned.

  • typeChangeType1required

    Determines the exact change that has occurred

    You MUST handle types that you do not know how to handle. Either ignore them, or fallback to the generic properties defined by the area.

  • descstringrequired

    A user-visible description of the change, suitable for a history page

  • customer_bhidbubbleflakerequired

    A Bubblehouse ID of the customer this change is for.

  • customer_shopidstringrequired but can be empty

    An online shop ID of the customer this change is for, an empty string if unknown.

    Note that in some edge cases involving imports and integrations, the customer in Bubblehouse database might not have an associated account in the online shop, so this field might be empty. You can fall back to a Bubblehouse ID when identifying these customers, or simply ignore the corresponding changes.

  • customer_emailstringrequired but can be empty

    The email address of the customer this change is for, an empty string if unknown.

  • order_shopidstringoptional

    Shop ID of the order that has caused this change.

  • order_shortstringoptional

    Short name of the order (typically assigned by the online shop) that has caused this change.

  • hiddenbooleanoptional

    Whether this change should be hidden from the user-visible change history.

  • pts_deltaintegerrequired when area = points, ignore otherwise

    The change in loyalty points (positive values correspond to earned points, negative values correspond to spent or lost points).

    Note that some changes (like redemptions) will always have negative values here.

  • amountmonetaryoptional when area = points, ignore otherwise

    The monetary amount corresponding to the loyalty points. A non-negative number.

    This field is only filled in for some redemption changes.

  • discount_codestringoptional when area = points, ignore otherwise

    An online shop discount code that corresponds to this change.

  • redemption_statusRedemptionStatus1optional when area = points, ignore otherwise

    Whether the discount code (or another benefit requiring multiple steps to redeem) has been successfully redeemed.

  • old_tierstringrequired when area = tier, ignore otherwise

    The name of the customer's old tier, may be an empty string.

  • new_tierstringrequired when area = tier, ignore otherwise

    The name of the customer's new tier, may be an empty string.

  • old_cycle_countintegerrequired when area = milestone, ignore otherwise

    The previous number of active subscription cycles the customer has been considered to have. 0 means not subscribed.

  • new_cycle_countintegerrequired when area = milestone, ignore otherwise

    The new number of active subscription cycles the customer is considered to have. 0 means not subscribed.

Previous
Referral2