Order API

Write Call

UpdateProducts3

Pushes new or updated product and collections data to Bubblehouse.

Kind Write API call
Method POST
URL https://app.bubblehouse.com/api/v20230601/<shop>/UpdateProducts3
Authentication Shop Token

This API supports multiple ways to specify product-collection associations:

  1. Preferred approach: Send products with collection_ids field and collections without product information. This gives you explicit control over which collections each product belongs to.
  2. Send products with collections array - useful when you want to create/update collections while associating products.
  3. Send products without collection data, and send collections with product_ids field - useful when managing collections and want to specify their members.
  4. Send collections with products array - useful when creating/updating products and collections together.

When updating both products and collections in a single call, collection updates are processed before product updates.

This func will not return an error unless the incoming data is wildly syntactically incorrect. The actual processing may be delayed until a later time, and the errors might only be visible via error emails later. Use debug option to receive more errors immediately during development.

You should decide if you're sending collection memberships within products or within collections. Please do not send the same membership information in both places.

When pushing multiple updates, Bubblehouse will process all of them, even if some fail. This means that, if this function returns 200 OK or 4xx, you should not retry pushing the same data. If the call results in 5xx or a network error, though, retry all of them. (It is always safe to push the same updates multiple times; would be just like a no-op update.)

There is no separate deletion call, but you can delete products and collection by updating with "deleted": true flag.

Input

  • collections array of Collection2 required

    New or updated collections.

  • products array of Product2 required

    New or updated products.

  • replace_collections boolean optional

    Delete any collections not provided in this call.

  • replace_products boolean optional

    Delete any products not provided in this call.

  • debug boolean optional

    True to make it easier to debug this call

    Normally, we do not guarantee that updates are processed synchronously. We might do that, or we might return success from this function immediately and queue processing until a later time. Passing "debug": true ensures that processing is immediate and synchronous, and will also fail the call on any warnings, making it easier to diagnose problems.

    Please ensure to never enable debug mode in production, or even during high-volume testing.

Output

A successful response has no meaningful properties and only contains an ok property always set to true:
{"ok": true}

Global Errors

Status Error Reason & Examples
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.

400 invalid_global_api_version

The global API version you are trying to use has never existed.

400 obsolete_global_api_version

The global API version you are trying to use is no longer supported.

400 inaccessible_global_api_version

The global API version you are trying to use is not enabled on your account.

401 invalid_token

The provided authentication token is invalid or has expired.

Previous
UpdateOrders4