Order API

Type

OrderItem2

Represents a line item on a customer order, corresponding to a certain quantity of a given product ordered.

Bubblehouse is only interested in the items corresponding to ordering of products. Depending on your ecommerce system, you might be representing other things as order items too (discounts, taxes, shipping costs); do not send those to Bubblehouse as order items.

Kind Type
Used in EstimateAccrual1, UpdateOrders4

Properties

  • id string optional

    ID of the line item in the ecommerce system

    It's totally okay if line items in your system do not have unique IDs, but in that case partial refunds and other line item updates will be matched by the position of the line item in the items array.

  • product Product2 required

    Identifies the purchased product.

    You can either pass a product ID (i.e. an object with a single id property) to reference an existing product, or a full product object to create/update the product as well.

    Note that you cannot change a product when updating a line item.

    Also note that Bubblehouse does not currently care which product variant has been ordered, so there is no way to specify that.

  • quantity integer required

    Identifies the purchased quantity product.

    At a minimum, you want to specify the id of the product.

  • amount_full monetary required

    Full (undiscounted) amount for this line item that should be attributed to this customer and product for analytics. Generally product cost multiplied by quantity.

  • amount_spent monetary required

    Fully discounted amount actually spent by the customer on this line item, as much as that is possible to compute.

    In general, this is not a very important number, and, worst case, you can just provide the same value as amount_full here.

    However, it's best if amount_spent at least takes per-product discounts into account, so that e.g. when a 100% discount on a given product is applied, the amout spent is 0.

  • is_unfulfillable boolean optional

    Whether this line item requires physical fulfillment

    Set to true for digital products, services, or other items that will not require a separate shipment/fulfillment and will not be getting an entry in fullfillments.

    If your store is configured to delay order accrual until shipment or delivery, and this field is true, the points for this item will be granted either immediately, or as soon as the first fulfillable item ships (depending on configuration).

Previous
OrderFulfillment2