application/json
PUT
/V1/products/{productSku}/stockItems/{itemId}
cURL (application/json)
curl \
--request PUT 'https://magento2.winkelstraat.mac/rest/all/V1/products/{productSku}/stockItems/{itemId}' \
--header "Content-Type: application/json" \
--data '{"stockItem":{"item_id":42,"product_id":42,"stock_id":42,"qty":42.0,"is_in_stock":true,"is_qty_decimal":true,"show_default_notification_message":true,"use_config_min_qty":true,"min_qty":42.0,"use_config_min_sale_qty":42,"min_sale_qty":42.0,"use_config_max_sale_qty":true,"max_sale_qty":42.0,"use_config_backorders":true,"backorders":42,"use_config_notify_stock_qty":true,"notify_stock_qty":42.0,"use_config_qty_increments":true,"qty_increments":42.0,"use_config_enable_qty_inc":true,"enable_qty_increments":true,"use_config_manage_stock":true,"manage_stock":true,"low_stock_date":"string","is_decimal_divided":true,"stock_status_changed_auto":42,"extension_attributes":{}}}'
curl \
--request PUT 'https://magento2.winkelstraat.mac/rest/all/V1/products/{productSku}/stockItems/{itemId}' \
--header "Content-Type: application/xml"
Request examples
{
"stockItem": {
"item_id": 42,
"product_id": 42,
"stock_id": 42,
"qty": 42.0,
"is_in_stock": true,
"is_qty_decimal": true,
"show_default_notification_message": true,
"use_config_min_qty": true,
"min_qty": 42.0,
"use_config_min_sale_qty": 42,
"min_sale_qty": 42.0,
"use_config_max_sale_qty": true,
"max_sale_qty": 42.0,
"use_config_backorders": true,
"backorders": 42,
"use_config_notify_stock_qty": true,
"notify_stock_qty": 42.0,
"use_config_qty_increments": true,
"qty_increments": 42.0,
"use_config_enable_qty_inc": true,
"enable_qty_increments": true,
"use_config_manage_stock": true,
"manage_stock": true,
"low_stock_date": "string",
"is_decimal_divided": true,
"stock_status_changed_auto": 42,
"extension_attributes": {}
}
}
Request examples
<?xml version="1.0" encoding="UTF-8"?>
<root>
<stockItem>
<item-id type="integer">42</item-id>
<product-id type="integer">42</product-id>
<stock-id type="integer">42</stock-id>
<qty type="float">42.0</qty>
<is-in-stock type="boolean">true</is-in-stock>
<is-qty-decimal type="boolean">true</is-qty-decimal>
<show-default-notification-message type="boolean">true</show-default-notification-message>
<use-config-min-qty type="boolean">true</use-config-min-qty>
<min-qty type="float">42.0</min-qty>
<use-config-min-sale-qty type="integer">42</use-config-min-sale-qty>
<min-sale-qty type="float">42.0</min-sale-qty>
<use-config-max-sale-qty type="boolean">true</use-config-max-sale-qty>
<max-sale-qty type="float">42.0</max-sale-qty>
<use-config-backorders type="boolean">true</use-config-backorders>
<backorders type="integer">42</backorders>
<use-config-notify-stock-qty type="boolean">true</use-config-notify-stock-qty>
<notify-stock-qty type="float">42.0</notify-stock-qty>
<use-config-qty-increments type="boolean">true</use-config-qty-increments>
<qty-increments type="float">42.0</qty-increments>
<use-config-enable-qty-inc type="boolean">true</use-config-enable-qty-inc>
<enable-qty-increments type="boolean">true</enable-qty-increments>
<use-config-manage-stock type="boolean">true</use-config-manage-stock>
<manage-stock type="boolean">true</manage-stock>
<low-stock-date>string</low-stock-date>
<is-decimal-divided type="boolean">true</is-decimal-divided>
<stock-status-changed-auto type="integer">42</stock-status-changed-auto>
<extension-attributes>
</extension-attributes>
</stockItem>
</root>
Response examples (200)
42
Response examples (200)
42
Response examples (401)
{
"message": "string",
"errors": [
{
"message": "string",
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
]
}
],
"code": 42,
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
],
"trace": "string"
}
Response examples (401)
<?xml version="1.0" encoding="UTF-8"?>
<root>
<message>string</message>
<errors type="array">
<error>
<message>string</message>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
</error>
</errors>
<code type="integer">42</code>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
<trace>string</trace>
</root>
Response examples (400)
{
"message": "string",
"errors": [
{
"message": "string",
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
]
}
],
"code": 42,
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
],
"trace": "string"
}
Response examples (400)
<?xml version="1.0" encoding="UTF-8"?>
<root>
<message>string</message>
<errors type="array">
<error>
<message>string</message>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
</error>
</errors>
<code type="integer">42</code>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
<trace>string</trace>
</root>
Response examples (default)
{
"message": "string",
"errors": [
{
"message": "string",
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
]
}
],
"code": 42,
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
],
"trace": "string"
}
Response examples (default)
<?xml version="1.0" encoding="UTF-8"?>
<root>
<message>string</message>
<errors type="array">
<error>
<message>string</message>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
</error>
</errors>
<code type="integer">42</code>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
<trace>string</trace>
</root>