Analytics API
Read CallListDocuments3
Returns a list of uploaded receipts and documents processed by Bubblehouse.
| Kind | Read API call |
|---|---|
| Method | GET or POST |
| URL | https://app.bubblehouse.com/api/v2023061/<shop>/ListDocuments3 |
| Authentication | Shop Token |
The returned records are sorted by Bubblehouse document ID.
Use the fields filter string to choose which receipt-export fields to include. The default field set follows the legacy receipt CSV export column surface, including document, customer, moderation, line-item, seller, and extras-form columns.
In JSON and JSONL, use nested field names such as bhid, upload_time, doc_time, number, url, individual_urls, customer(...), items, spend_bucket(...), and extra(...).
In CSV, use the legacy flat export column names such as doc_bhid, upload_date, doc_date, doc_number, doc_url, customer_email, items_title, spend_bucket_min, and extra_campaign_id.
Use markets to limit results to one or more market keys, market API names, or regions. Region filters include the selected region and all descendant markets. Use ROOT for the default market.
Use campaigns to limit results to one or more receipt upload campaign API names.
The markets and campaigns inputs are convenience filters, not an authorization boundary. A shop token accepted by this method remains trusted for all receipts in the tenant.
Note that the output is in a tabular data format determined by the format parameter.
Input
-
fieldsstring optionalWhich document fields to include in the response.
Use a comma-separated filter string such as
default,bhid,status,amount,customer(default),customer(email),doc_bhid,status,customer_email, orall.For JSON and JSONL, use document field names such as
bhid,upload_time,doc_time,number,url,individual_urls,customer(...),items,spend_bucket(...),entity_seller_bhid,entity_seller_title, andextra(...).For CSV, use the legacy flat export column names such as
doc_bhid,customer_bhid,customer_id,customer_email,doc_url,items_title,spend_bucket_min,spend_bucket_max, andextra_campaign_id.The
customersubobject supports customer field names from Customer2, together with the built-in aspectsids,default,basics, andall. Thespend_bucketsubobject supportsminandmax. Theextrasubobject supports receipt extras-form field names. -
The response format you want: JSON, JSONL or CSV.
-
prettyboolean optionalIf true, pretty-prints JSON output.
-
sampleinteger optionalReturn every Nth matching document.
For example,
sample=10returns every tenth document after all other filters are applied. -
limitinteger optionalThe number of objects to return.
The default limit is 10000. You may use a very large number to stream more results, but be careful with JSON output if you expect a large response.
-
Only return documents with the specified receipt status.
-
marketsarray optionalOnly return documents from the specified markets or regions.
Each value may be a market key, market API name, or other configured market alias accepted by the shop's market configuration.
A region value includes documents from the selected region and all descendant markets.
ROOTmatches default-market documents, including legacy documents stored with a blank market key.Omitting this input or passing an empty array applies no market filter. Blank values and unknown values return Bad Request before streaming starts.
-
campaignsarray optionalOnly return documents attributed to the specified receipt upload campaigns.
Values are receipt upload campaign API names.
Omitting this input or passing an empty array applies no campaign filter. Blank values and unknown values return Bad Request before streaming starts.
-
Only return documents with Bubblehouse IDs strictly greater than this one.
-
Only return documents with Bubblehouse IDs strictly smaller than this one.
-
Only return documents uploaded strictly after this time.
-
Only return documents uploaded strictly before this time.
-
reverseboolean optionalIf true, returns matching documents in reverse Bubblehouse ID order.
Output
-
Unique ID of the document in the Bubblehouse system.
In CSV output, the corresponding flat field name is
doc_bhid. -
public_idstring required but can be emptyPublic-facing receipt or document ID, when available.
-
market_keystring optionalMarket API name associated with the document, when the document belongs to a non-default market.
For campaign-attributed documents, this uses the campaign-applied market API name after the stored non-default document market still resolves. If the stored non-default market key no longer resolves, the stored key is returned instead. Default-market documents return an empty value.
-
market_currencystring optionalCurrency configured for the document's market.
For campaign-attributed documents, this uses the campaign-applied market configuration.
-
amount_currencystring optionalCurrency used for the matched amount used by receipt processing.
-
doc_currencystring optionalCurrency extracted from the receipt or document.
-
Current moderation or processing status of the document.
-
numberstring required but can be emptyStore receipt or invoice number, when available.
In CSV output, the corresponding flat field name is
doc_number. -
When the document was uploaded to Bubblehouse.
In CSV output, the corresponding flat field name is
upload_date. -
Purchase time extracted from the document, if known.
In CSV output, the corresponding flat field name is
doc_date. -
urlstring optionalEffective full-document download URL, if available.
For single-file documents, this is the direct uploaded-file URL. For multi-file documents, this is a signed ZIP download URL for the whole document.
In CSV output, the corresponding flat field name is
doc_url. -
individual_urlsarray optionalDirect uploaded-file URLs for each file in upload order.
Available in JSON and JSONL when explicitly requested or when using
fields=all. It is not part of the default JSON/JSONL field set and is not available in CSV output. -
amountmoney optionalMatched purchase amount used for receipt processing.
-
ptsinteger requiredThe number of loyalty points assigned to this document.
-
Nested customer information for the matched customer.
Use a subfilter such as
customer(bhid,id,email),customer(email), orcustomer(default)to choose which customer fields to return.In CSV output, customer subfields are flattened with a
customer_prefix. The legacy receipt export fields includecustomer_bhid,customer_id, andcustomer_email. -
When the document was accepted, rejected, or otherwise decided, if a decision has been made.
In CSV output, the corresponding flat field name is
decision_date. -
decision_causestring optionalHow the document decision was made, such as review or automated processing.
-
decision_userstring optionalEmail address of the Bubblehouse user who made the document decision, when available.
-
itemsarray optionalLine items matched on the document, when available.
Each item contains
product_id,variant_id,title,qty, andamount.In CSV output, these values are exposed through the legacy flat columns
items_product_id,items_variant_id,items_title,items_qty, anditems_amount. -
spend_bucketobject optionalSpend-bucket range for the matched amount, when configured.
The object contains
minandmax.For campaign-attributed documents, the range uses the campaign-applied spend bucket thresholds and spend bucket currency.
In CSV output, these values are exposed as
spend_bucket_minandspend_bucket_max. -
Bubblehouse ID of the matched seller entity, when seller matching is configured and the document matched a seller.
Seller entities are commonly used for authorized dealers, retailers, stores, or other approved sellers configured for receipt validation.
In CSV output, the corresponding flat field name is also
entity_seller_bhid. -
entity_seller_titlestring optionalDisplay title of the matched seller entity, when seller matching is configured and the document matched a seller.
Seller entities are commonly used for authorized dealers, retailers, stores, or other approved sellers configured for receipt validation.
In CSV output, the corresponding flat field name is also
entity_seller_title. -
pub_commentstring optionalPublic comment associated with the document decision or review.
-
priv_notestring optionalInternal note associated with the document decision or review.
-
suspicion_reasonstring optionalReason the document was flagged as suspicious, when applicable.
-
rejection_reasonstring optionalReason the document was rejected, when applicable.
-
extraobject optionalReceipt extras-form values, when configured.
Receipt extras come from the shop's configured receipt upload form fields. Use a subfilter such as
extra(receipt_type)orextra(all).In CSV output, simple form fields are exposed as
extra_<field_api_name>. Compound form fields are flattened asextra_<field_api_name>_<subfield>.
Specific Errors
| Status | Error | Reason & Examples |
|---|---|---|
| 400 | bad_request |
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. |