catalog.stock.adjust

Adjust stock by a ± delta (receiving, stocktake, connector sync). Fails on untracked items; expectedStock = compare-and-set.

Payload

fieldtyperequirednotes
idstring (/^prd_[a-zA-Z0-9]{1,32}$/) | string (/^var_[a-zA-Z0-9]{1,32}$/)yes
deltainteger (-1000000..1000000)yes
reason"adjust" | "correction" | "return" | "import" | "sync"no
channelstring (/^[a-z0-9_]{2,24}$/, default "storefront")no
refTypestring (≤32 chars)no
refIdstring (≤64 chars)no
notestring (≤200 chars)no
expectedStockinteger (0..9007199254740991)no
allowNegativeboolean (default false)no

JSON Schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^prd_[a-zA-Z0-9]{1,32}$"
        },
        {
          "type": "string",
          "pattern": "^var_[a-zA-Z0-9]{1,32}$"
        }
      ]
    },
    "delta": {
      "type": "integer",
      "minimum": -1000000,
      "maximum": 1000000
    },
    "reason": {
      "default": "adjust",
      "type": "string",
      "enum": [
        "adjust",
        "correction",
        "return",
        "import",
        "sync"
      ]
    },
    "channel": {
      "default": "storefront",
      "type": "string",
      "pattern": "^[a-z0-9_]{2,24}$"
    },
    "refType": {
      "type": "string",
      "maxLength": 32
    },
    "refId": {
      "type": "string",
      "maxLength": 64
    },
    "note": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "expectedStock": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "allowNegative": {
      "default": false,
      "type": "boolean"
    }
  },
  "required": [
    "id",
    "delta"
  ],
  "additionalProperties": false
}
Generated from the live platform registries at build time — reference pages cannot go stale. Markdown variant: /reference/commands/catalog.stock.adjust.md