Analytics API

Read Call

ListOrders2

Returns Bubblehouse-side loyalty facts for orders in a shop.

This call is deprecated. We strive to avoid churn and maintain backward compatibility indefinitely, so there is no rush to upgrade, but please use ListOrders3 in new code whenever possible.

Kind Read API call
Method GET or POST
URL https://app.bubblehouse.com/api/v2023061/<shop>/ListOrders2
Authentication Shop Token

This export returns loyalty facts known on the Bubblehouse side. Line items, paid amounts, and other commerce fields stay on the shop.

Compared with ListOrders3, this older contract uses bh_id, shop_id, and name instead of bhid, shopid, and short, and it does not include canceled or multiplier.

Rows are sorted by the updated cursor. The default sort is updated_desc.

Only orders that already have a non-zero update ID appear. Historical rows that were never filled into the update index, and orders whose update ID is still zero, are not returned.

Polling with updated_after follows the last saved update ID. An order that is later written without going through the order save path keeps its old update ID, so a cursor poll can miss that mutation. A full list still returns the current row.

Input

  • format TabularDataFormat1 optional

    The response format you want: JSON or JSONL.

    Use json or jsonl. Do not use CSV with this method.

  • pretty boolean optional

    If true, pretty-prints JSON output.

  • sort ExportSortOrder optional

    Sort order for the updated cursor.

    Supported values are updated_desc and updated_asc. The default is updated_desc.

  • updated_after bubbleflake optional

    Only return rows with update IDs strictly greater than this value.

  • updated_before bubbleflake optional

    Only return rows with update IDs strictly smaller than this value.

  • limit integer optional

    The number of rows to return.

    When omitted, zero, or negative, this method streams every matching order. If you picked JSON, be careful when processing a potentially huge response.

Output

The output is in a tabular data format. The exact format is determined by the format input parameter.

JSON and JSONL nest customer as an object (or null for guest orders).

  • bh_id bubbleflake required

    Unique ID of the order in the Bubblehouse system.

  • updated bubbleflake required

    Order update/version ID used for polling.

  • shop_id string required but can be empty

    The online shop's order ID.

  • name string required but can be empty

    The short name assigned to the order by the online shop, if any.

  • time time optional

    When the order was placed, if known.

  • pts_earned integer required

    Loyalty points awarded for this order.

  • pts_redeemed integer required

    Points redeemed toward this order.

    This is the sum of points used on the order. It is not the shop's order total.

  • redemption_discount_codes array of string required

    Coupon codes used to redeem points on this order.

    Always an array; empty when there are none. Sorted for a stable order.

  • customer object optional

    Compact customer view for the order, or null for guest orders.

    JSON and JSONL emit a nested object with these keys only: bhid, shopid, email, phone, first_name, last_name, deleted. Guest orders emit JSON null.

    A missing, wrong-tenant, or GDPR-deleted customer still produces an object with bhid and deleted: true, and no PII. Absent PII keys are omitted.

Global Errors

Status Error Reason & Examples
401 invalid_token

The provided authentication token is invalid or has expired.

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.