POST /api/public/v1/inventory/receiveSupplierShipment

Changed on

Accepts a supplier organization's shipment in transit to the location, once, into storageId or, left out, the location's only storage. Each line names the product it stocks as and packQuantity, the base-unit thousandths one supplier item holds, and what arrived in items, in thousandths. It arrives as an add with the reason shipment of what was sent, converted through the pack, at the line's value net of VAT when the stock row is in the supplier's currency and at unknown cost otherwise, with the expiry dates it shipped with, under the organization's supplier record for that supplier, made on the first accept and linked to each product. Less received posts a remove with shortfallReason for the difference, more an add with the reason surplus at unknown cost, under the same supplier record with the earliest expiry the line shipped with. Each item's product and pack are remembered for the next shipment, and the shipment reads received. Needs inventory post at the location. NOT_FOUND as shipmentNotFound for a shipment not in transit to the location, storageNotFound for a storage it does not hold or has archived and stockNotFound for a product the organization does not hold; CONFLICT as shipmentReceived once accepted, shipmentClosed once closed, receiptIncomplete unless every line is named, shortfallReasonRequired for a line received short without a reason, storageRequired without a storage at a location with several, lineUnavailable for a line whose order line is gone 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
shipmentId, string required
storageId, string
lines, object[] required

Changes