Save a modifier's stock effect

Changed on

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.

post/api/public/v1/inventoryModifiers/save

Request

  • Base URL
    https://app.fortuneos.ai
  • Auth
    none declared

Request body

object required
modifierId, string required
stock, object nullable required

Changes

    • info

      added the new optional request property stock/anyOf[subschema #1]/replacedStockItemId

    • info

      added the new replaces enum value to the request property stock/anyOf[subschema #1]/effect

    • info

      request property stock/anyOf[subschema #1]/quantity list-of-types was widened by adding types null to media type application/json

    1 more change in this revision