Order API

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.

Properties

  • idstringoptional

    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.

    Example: "xyz101"

    Example: "xyz102"

  • productProduct2required

    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.

    Example: {"id":"P123"}

    Example: {"id":"P123","title":"Supershoe","collection_ids":["C42","C1"]}

    Example: {"id":"P124","title":"Megashoe","collection_ids":["C42"]}

  • quantityintegerrequired

    Identifies the purchased quantity product.

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

    Example: 2

    Example: 1

  • amount_fullmonetaryrequired

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

    Example: "12.00"

    Example: "20.00"

  • amount_spentmonetaryrequired

    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.

    Example: "8.00"

    Example: "20.00"

  • is_unfulfillablebooleanoptional

    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).

Examples

Minimal Order Item

{
  "product": {
    "id": "P123"
  },
  "quantity": 2,
  "amount_full": "12.00",
  "amount_spent": "8.00"
}

Typical Order Item

{
  "id": "xyz101",
  "product": {
    "id": "P123",
    "title": "Supershoe",
    "collection_ids": [
      "C42",
      "C1"
    ]
  },
  "quantity": 2,
  "amount_full": "12.00",
  "amount_spent": "8.00"
}
Previous
Order2