Put v1 products product sku stock items item

PUT /V1/products/{productSku}/stockItems/{itemId}

Path parameters

Body

Responses

  • 200 Success.

  • 401 Unauthorized

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Error details

      Hide errors attributes Show errors attributes object
    • code integer

      Error code

    • parameters array[object]

      Error parameters item

      Hide parameters attributes Show parameters attributes object
    • trace string

      Stack trace

  • 400 Bad Request

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Error details

      Hide errors attributes Show errors attributes object
    • code integer

      Error code

    • parameters array[object]

      Error parameters item

      Hide parameters attributes Show parameters attributes object
    • trace string

      Stack trace

  • Unexpected error

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Error details

      Hide errors attributes Show errors attributes object
    • code integer

      Error code

    • parameters array[object]

      Error parameters item

      Hide parameters attributes Show parameters attributes object
    • trace string

      Stack trace

PUT /V1/products/{productSku}/stockItems/{itemId}
curl \
 -X PUT https://magento2.winkelstraat.mac/rest/all/V1/products/{productSku}/stockItems/{itemId} \
 -d '{"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
{
  "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": {}
  }
}
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 (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 (default)
{
  "message": "string",
  "errors": [
    {
      "message": "string",
      "parameters": [
        {
          "resources": "string",
          "fieldName": "string",
          "fieldValue": "string"
        }
      ]
    }
  ],
  "code": 42,
  "parameters": [
    {
      "resources": "string",
      "fieldName": "string",
      "fieldValue": "string"
    }
  ],
  "trace": "string"
}