POST /api/public/v1/inventory/ship

Changed on

Ships stock from a storage of the location to another storage of the organization, at this location or another, as one shipment under the client's id: each line is a remove with the reason shipment from the source, earliest expiry first at its average cost, posted at once, and the shipment stays in transit, on hand nowhere, holding the value and batches that left until the destination accepts it with receiveShipment. A shipment repeated with the same id, storages and lines 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 shipment or movement id reused for another, 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
id, string uuid required
fromStorageId, string required
toStorageId, string required
lines, object[] required

Changes