---
title: "Save a modifier's stock effect"
method: POST
path: "/api/public/v1/inventoryModifiers/save"
---

# Save a modifier's stock effect

`POST /api/public/v1/inventoryModifiers/save`

## Request

- Base URL: `https://app.fortuneos.ai`
- URL: `https://app.fortuneos.ai/api/public/v1/inventoryModifiers/save`
- Auth: none declared

Sets what the modifier does to stock each time it is chosen, replacing what it did: an effect (adds, removes or replaces), a product of the modifier's organization, and for adds and removes a quantity above zero, an integer string of thousandths of the product's base unit; replaces takes a null quantity and replacedStockItemId, the product it takes the place of, whose line in the item's recipe gives the quantity. stock null clears it, so the modifier takes nothing. NOT_FOUND for a modifier that does not exist, and as `stockNotFound` for a product the organization does not hold; BAD_REQUEST as `replacementUnitMismatch` for a replaced product counted in another base unit. Refused with FORBIDDEN as `inventoryDisabled` while the inventory flag is off. Refused with FORBIDDEN as `paywallLocked` when the caller is an Owner or Manager of a business the merchant Paywall locks: one with no verified subscription that has taken 5 orders while the Paywall's rollout reaches it, an order counting from its first saved line, whether or not it is paid or completed, until it is archived or cancelled before activation. Nothing is read or written; a verified subscription lifts the lock.

## Request body

- object
  - `modifierId` string, required
  - `stock` object, nullable, required
    - `effect` 'adds' | 'removes' | 'replaces', required
    - `stockItemId` string, required
    - `quantity` string, nullable, required
    - `replacedStockItemId` string, nullable

## Changes

- **2026-11-30** `959d971c60cb`: 4 info
  - added the new optional request property `stock/anyOf[subschema #1]/replacedStockItemId`
  - added the new `replaces` enum value to the request property `stock/anyOf[subschema #1]/effect`
  - request property `stock/anyOf[subschema #1]/quantity` list-of-types was widened by adding types `null` to media type `application/json`
  - removed the pattern `^\d{1,16}$` from the request property `stock/anyOf[subschema #1]/quantity`
- **2026-11-05** `afb36c84d16e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/fortis/apis/fortune-os-api/changes/api/public/v1/inventoryModifiers/save/post.md)

---

[API](https://skmtc.dev/fortis/apis/fortune-os-api.md) - [All operations](https://skmtc.dev/fortis/apis/fortune-os-api/llms.txt) - [OpenAPI document](https://skmtc.dev/fortis/apis/fortune-os-api/revisions/522f3cea550d?raw)
