Order API
Order API
Bubblehouse needs information on the orders, customers and products defined in your ecommerce store. We have multiple methods to do that.
Built-in support
We have built-in support for pulling data from major ecommerce platforms. When running on one of those, you don't need to use this API.
Push
When integrating a customer ecommerce system via the API, it is recommended that you push data updates to Bubblehouse.
We provide UpdateOrders, UpdateCustomers and UpdateProducts funcs for that. We recommend implementing all three and pushing updates as they happen. This will ensure Bubblehouse can offer the most functionality and everything happens as fast as possible.
Push Timing
There's an importat caveat. You might find that you cannot guarantee a predictable ordering of these calls. E.g. you might be calling these from a job queue and have no way of ensuring that customer signups or updates are guaranteed to be pushed before that customer's orders.
For those cases, UpdateOrders call also accepts full data on customers, products and collections, and will create/update those as needed. We recommend that, with each order, you also push:
- all customer data
- some product data (title)
- product collection membership data
This ensures that even if Bubblehouse does yet not know about a customer, a product, or a product/collection membership change, we will still process the order correctly.
Async Processing
Note that all push funcs in this API are not guaranteed to handle your request immediately, unless you request a debug mode. Depending on the load and the volume of updates, we might queue up changes and process them in batches.
Regardless of that, all updates should be processed within seconds.
Pull
We can also pull data from external URLs to fetch order, customer and product updates in various formats, ranging from JSON to CSV. This is mostly reserved for legacy systems, however.
In some specialized cases, we can also set up a mixed webhook + pull URL approach, allowing you to send a webhook from the client side to notify us about a new order, and then provide a server-side pull URL.
Authentication
When calling from... | authenticate using... | Recommended? |
---|---|---|
Client side (web/mobile) | — | Do NOT call this API from the client side. |
Server side (backend) | shop tokens | The only way. |