Get Inventory Settings
GET /stores/{store_hash}/v3/settings/inventory
Request
Get Inventory Settings
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- channel_id in query - integer
Channel ID to use for channel-specific setting. If omitted, you will interact with the global setting 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: xxxxxxxxxxxxxxxxx'
Response
OK, null indicates that a particular field has not been overridden on a channel level when channel level settings are requested
Body
dataobject
metaobject
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 /stores/{store_hash}/v3/settings/inventory
Request
Update inventory settings
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- 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 setting. If omitted, you will interact with the global setting only.
null set for a particular field removes override on a channel level and means inheritance from a global level
Body
product_out_of_stock_behaviorstring
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_behaviorstring
Describes storefront behavior when variant is out of stock.
Allowed: do_nothing | hide_option | label_option
update_stock_behaviorstring
Describes when stock levels are updated.
Allowed: order_placed | order_completed_or_shipped
edit_order_stock_adjustmentboolean
Describes whether stock levels automatically adjust when you edit an order.
refund_order_stock_adjustmentboolean
Describes whether stock levels automatically adjust when you refund or cancel an order.
stock_level_displaystring
Describes whether a storefront displays stock levels.
Allowed: dont_show | show | show_when_low
default_out_of_stock_messagestring
Out of stock message displayed to shoppers.
Example: Currently out of stock
hide_in_product_filteringboolean
Describes whether an option is hidden in product filtering. Applies when
option_out_of_stock_behavior
is set tolabel_option
.show_pre_order_stock_levelsboolean
Describes whether pre-order stock levels are shown.
Example: true
Default: false
show_out_of_stock_messageboolean
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
dataobject
metaobject
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": {} }