Legacy immediate move between storages; use inventory.ship.

Changed on

Deprecated: use ship, whose stock the destination accepts. Moves stock at once from a storage of the location into another storage of the organization, at this location or another: each line is a remove with the reason transfer from the source, earliest expiry first at its average cost, and an add with the same reason into the destination that names it, posted together so neither side stands alone. The valued part keeps its value and the unknown-cost part stays of unknown cost; each source batch arrives as its own batch with the same supplier, unit cost and expiry, and the add covers the destination's open shortages first. A line repeated with the same movement id, product, quantity and storages is a no-op. Needs inventory post at both locations. NOT_FOUND for a storage either location does not hold or has archived, and as stockNotFound for a product the organization does not hold; CONFLICT as insufficientStock for a line asking more than the source has on hand, movementReused for a movement id reused for another line, 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.

post/api/public/v1/inventory/transfer

Request

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

Request body

object required
locationId, string required
fromStorageId, string required
toStorageId, string required
lines, object[] required

Changes