Skip to main content

Update Instance

PUT 

/api/storefront/instances/:id

Update an instance's name and settings. Every field is optional — send only what changes; anything absent is left exactly as it was. Unrecognised keys are ignored rather than stored.

Not yet available to API tokens

This endpoint currently requires session authentication; Personal Access Token scope support is in progress.

The pricing and inventory settings now have a canonical nested shape. Send pricing and inventory as objects with the camelCase keys below; the older flat pricing keys still work and are translated into the same node, so both views of the setting can never disagree.

General

  • name — string, max 255, unique across every integration on the tenant (this instance excepted).
  • store_id — nullable integer, must reference an existing store. Changing it moves the sales channel.
  • order_import_start_date — nullable, Y-m-d. Must be on or after the tenant's inventory start date, otherwise 422 Date must be on or after inventory start date (m/d/Y). — an earlier date would import orders that allocate stock the ledger does not hold.
  • auto_create_products — boolean. Whether a catalogue import may CREATE a SKU.io product for a store SKU the catalogue has never seen. Opt-in, default false.
  • push_products — boolean. Whether SKU.io's catalogue is pushed out to the store.
  • low_stock_threshold — nullable integer, min 0.
  • notify_customer_on_fulfillment — boolean. Default true.
  • is_automatic_sync_enabled — boolean.
  • require_mapped_products_for_sales_order — boolean. Hold automatic sales-order creation while an order carries an unmapped line.

Pricing (canonical)

  • pricing — array/object.
  • pricing.masterOfPrice — nullable, one of sku.io, sales_channel, neither.
  • pricing.pricingTier — nullable integer, must reference an existing pricing level. The level the product push prices from.
  • pricing.compareAtPricingTier — nullable integer, must reference an existing pricing level, and must differ from pricing.pricingTier. Sent to the store as the compare-at price.
  • Cross-field rule: when masterOfPrice is present and is not neither, a level is required. An explicit "pricingTier": null alongside such a master is rejected with a pricing.pricingTier error; omitting the key entirely falls back to the level already stored. masterOfPrice: "neither" needs no level and clears the stored one.
  • Legacy flat equivalents, still accepted: product_pricing_tier_id and compare_at_pricing_tier_id (nullable integers, each must reference an existing level; the compare-at one must differ from the other). They are translated into the canonical node, and a level sent with no master stated means SKU.io prices the store.
  • Changing either the master or the level rebuilds the cached listing prices for the whole channel. An unrelated save does not.

Inventory (canonical)

  • inventory — nullable array/object. Sending it REPLACES the whole node rather than merging, so a de-selected warehouse actually disappears. Keys you omit inside it fall back to their stored values.
  • inventory.masterOfStock — nullable, sku.io or neither ONLY. sales_channel is rejected: the Store API has no inbound inventory feed, so a store can never master stock. neither stops the inventory push entirely, including a manual one.
  • inventory.selectedWarehouses — array of warehouse ids, each must exist. Empty means the product's tenant-wide available quantity.
  • inventory.selected_warehouse_ids — array of warehouse ids, each must exist. The pre-canonical spelling of the same list; accepted, stored canonically.
  • inventory.allow_backorder — boolean.
  • inventory.buffer — nullable integer, min 0. Stock held back from the store.

Permission: integrations.update.

Authentication: Bearer token (session or PAT).

Request​

Responses​

OK

Response Headers
    Content-Type