Loyalty API

Type

OrderLineDetails1

Detailed breakdown of point calculations for a single order line item.

Kind Type
Used in EstimateAccrual1, QueryOrderDetails1

This type provides a comprehensive view of how points are calculated for each individual line item in an order, including the original amounts, applicable multipliers, discounts, and estimated point earnings.

Properties

  • id string required

    External ID of the line item from the original order.

  • bhid bubbleflake required

    Bubblehouse internal ID for this line item.

  • subtotal_amount monetaryWithCurrency required

    The subtotal amount for this line item before any loyalty-related calculations.

  • accrual_amount monetaryWithCurrency required

    The amount that qualifies for point accrual after applying discounts and multipliers.

    This is the final amount used to calculate points for this line item. It may differ from the subtotal due to various factors like loyalty multipliers, excluded categories, or line-specific discounts.

  • accrual_pts_approx integer required

    Approximate number of points this line item would earn.

    The number of points corresponding to accrual_amount. The value is approximate because line item points might not add up to the entire order's exact number of points due to rounding: Bubblehouse normally performs rounding at the order level, so line items that would accrue 1.4 and 2.4 points will report 1 and 2 points respectively, but the entire order would round 3.8 points to 4 in this example. (This depends on the chosen rounding mode for the account, of course; if configured to always round down, no discrepancies can occur, and per-item point numbers are exact.)

  • multiplier permyriad required

    The multiplier applied to this line item, expressed in permyriads.

    Will be 0 for line items that are not eligible for loyalty points.

  • line_discounts monetaryWithCurrency optional

    Line-specific discounts applied to this item.

    These are discounts that apply specifically to this line item, such as product-specific coupons or quantity discounts.

  • extra_discounts monetaryWithCurrency optional

    Additional discounts applied to this item.

    These are additional discounts that may come from order-level promotions, loyalty rewards, or other sources beyond standard line discounts.

  • product ProductPublic2 optional

    Product associated with this line item, if known.

    Contains identifying information about the product (internal and external IDs, title, SKU, image URL). Will be omitted if the product is not found or not applicable.

  • variant ProductVariantPublic2 optional

    Product variant associated with this line item, if known.

    Contains identifying information about the specific variant (internal and external IDs, title, SKU). Will be omitted if the line item has no variant or the variant is not found.

Previous
OrderAssetDetails1