POST /api/public/v1/inventory/moveAdd

Changed on

Moves what is left of an add posted by hand, by an import or by a move to another product at the location. A remove with the reason correction takes the batch's remaining quantity at its unit cost, and an add with the reason move brings quantity, in the target's base unit, to toStockItemId as one new batch with that value, so at that value over quantity a unit, the add's supplier and its expiry, filling the target's below-zero stock first; both reference the add. What was already used stays on the add's product, and the moved add may itself be moved back or on, or corrected. quantity may be left out when both products share a base unit, and then is what is left of the batch; across units it is required. Needs inventory post and inventoryCost update at the location (FORBIDDEN otherwise). A movement id repeated for the same move is a no-op. NOT_FOUND as stockNotFound or movementNotFound for a product or add the location does not hold; CONFLICT as movementReused for a movement id reused for anything else, notCorrectable for a movement that is not an add by hand, import or move, sameProduct for the add's own product, quantityRequired for a target in another base unit without quantity, batchEmpty for a batch with nothing left and productArchived for an archived product. 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

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

Request body

object required
locationId, string required
movementId, string required
stockItemId, string required
correctsMovementId, string required
toStockItemId, string required
quantity, string nullable

Changes