Inventory

Get Inventory Settings

GET /settings/inventory

Request

Get Inventory Settings

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • Accept in header with default of application/json - string
    required
    The MIME type of the response body.
  • channel_id in query - integer
    Channel ID to use for channel-specific settings. If omitted, you will interact with the global settings only.

example

curl --request GET \
--url 'https://api.bigcommerce.com/stores/[store_hash]/v3/settings/inventory' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: {{token}}'

Response

OK, null indicates that a particular field has not been overridden on a channel level when channel level settings are requested.

Body

object | application/json
  • data
    object

  • meta
    object

    Response metadata.

example

{
"data": {
"product_out_of_stock_behavior": "do_nothing",
"option_out_of_stock_behavior": "do_nothing",
"update_stock_behavior": "order_placed",
"edit_order_stock_adjustment": true,
"refund_order_stock_adjustment": true,
"stock_level_display": "dont_show",
"default_out_of_stock_message": "Currently out of stock",
"hide_in_product_filtering": true,
"show_pre_order_stock_levels": true,
"show_out_of_stock_message": true
},
"meta": {}
}

Update Inventory Settings

PUT /settings/inventory

Request

Update inventory settings

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • Accept in header with default of application/json - string
    required
    The MIME type of the response body.
  • Content-Type in header with default of application/json - string
    required
    The MIME type of the request body.
  • channel_id in query - integer
    Channel ID to use for channel-specific settings. If omitted, you will interact with the global settings only.
null set for a particular field removes override on a channel level and means inheritance from a global level

Body

object | application/json
  • product_out_of_stock_behavior
    string

    Describes storefront behavior when product is out of stock.

    Allowed: do_nothing | hide_product | hide_product_and_accessible | hide_product_and_redirect

  • option_out_of_stock_behavior
    string

    Describes storefront behavior when variant is out of stock.

    Allowed: do_nothing | hide_option | label_option

  • update_stock_behavior
    string

    Describes when stock levels are updated.

    Global settings apply when inventory changes through a manual order. Settings for a channel apply when inventory changes through an order in a channel. These settings affect webhooks that trigger from order-related events, including product, SKU, and inventory webhooks.

    Allowed: order_placed | order_completed_or_shipped

  • edit_order_stock_adjustment
    boolean

    Describes whether stock levels automatically adjust when you edit an order.

    Global settings apply when inventory changes through a manual order. Settings for a channel apply when inventory changes through an order in a channel. These settings affect webhooks that trigger from order-related events, including product, SKU, and inventory webhooks.

  • refund_order_stock_adjustment
    boolean

    Describes whether stock levels automatically adjust when you refund or cancel an order.

    Global settings apply when inventory changes through a manual order. Settings for a channel apply when inventory changes through an order in a channel. These settings affect webhooks that trigger from order-related events, including product, SKU, and inventory webhooks.

  • stock_level_display
    string

    Describes whether a storefront displays stock levels.

    Allowed: dont_show | show | show_when_low

  • default_out_of_stock_message
    string

    Out of stock message displayed to shoppers.
    Example: Currently out of stock
  • hide_in_product_filtering
    boolean

    Describes whether an option is hidden in product filtering. Applies when option_out_of_stock_behavior is set to label_option.
  • show_pre_order_stock_levels
    boolean

    Describes whether pre-order stock levels are shown.
    Example: true

    Default: false

  • show_out_of_stock_message
    boolean

    Describes whether out-of-stock messages are shown on product listing pages.
    Example: true

    Default: false

example

{
"product_out_of_stock_behavior": "do_nothing",
"option_out_of_stock_behavior": "do_nothing",
"update_stock_behavior": "order_placed",
"edit_order_stock_adjustment": true,
"refund_order_stock_adjustment": true,
"stock_level_display": "dont_show",
"default_out_of_stock_message": "Currently out of stock",
"hide_in_product_filtering": true,
"show_pre_order_stock_levels": true,
"show_out_of_stock_message": true
}

Response

OK, null indicates that a particular field has not been overridden on a channel level when channel level settings are requested

Body

object | application/json
  • data
    object

  • meta
    object

    Response metadata.

example

{
"data": {
"product_out_of_stock_behavior": "do_nothing",
"option_out_of_stock_behavior": "do_nothing",
"update_stock_behavior": "order_placed",
"edit_order_stock_adjustment": true,
"refund_order_stock_adjustment": true,
"stock_level_display": "dont_show",
"default_out_of_stock_message": "Currently out of stock",
"hide_in_product_filtering": true,
"show_pre_order_stock_levels": true,
"show_out_of_stock_message": true
},
"meta": {}
}
Did you find what you were looking for?