stock_items

Update a stock item

Changed on

Update a stock item

patch/stock_items/{stockItemId}

Request

  • Base URL
    https://{your_organization_slug}.commercelayer.io/api
  • URL
    https://{your_organization_slug}.commercelayer.io/api/stock_items/{stockItemId}
  • Auth
    HTTP bearer

Path parameters

stockItemIdstring required

The resource's id

Request body

Example request

{
  "data": {
    "id": "XAyRWNUzyN",
    "attributes": {
      "sku_code": "TSHIRTMM000000FFFFFFXLXX",
      "quantity": 100,
      "low_quantity": 10,
      "_validate": true,
      "reference": "ANY-EXTERNAL-REFEFERNCE",
      "reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN",
      "metadata": {
        "foo": "bar"
      }
    },
    "relationships": {
      "stock_location": {
        "data": {
          "id": "XAyRWNUzyN"
        }
      },
      "sku": {
        "data": {
          "id": "XAyRWNUzyN"
        }
      }
    }
  }
}

Response

The updated stock item object

Changes

    • info

      added the new optional request property //

    • info

      added the optional property // to the response with the status

    • breaking

      added the new required request property ///

    • breaking

      added the new required request property ///

    • breaking

      request property / was restricted to a list of enum values

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • info

      added the new optional request property //

    • info

      the request property // became nullable

    • info

      the request property // became nullable

    • info

      the request property // became nullable

    • info

      the request property // became nullable

    • info

      the request property default value stock_items was removed

    • info

      added the new stock_items enum value to the request property /

    • info

      added the media type application/vnd.api+json for the response with the status