The Mercado Libre Full or Amazon FBA warehouse is a branch of type mercado-full or fba. The marketplace writes its stock; Fenicia keeps its lots, which move only through events. A shipment to the marketplace warehouse is a transfer without a receiving flow: the marketplace does its own quality control.
When you register the shipment, stock goes down at your origin branch and lots are spent by FIFO (first in, first out). When the marketplace confirms reception (the inbound_reception operation in Mercado Libre), derived lots are born in the marketplace warehouse, with the cost of the source lots. What was sent and not received is a loss at the lot's cost.
Register the shipment before it leaves
Mercado Libre does not expose the list of Full shipments through its API, so the shipment is registered in Fenicia with its Mercado Libre shipment number. If an inbound_reception arrives with a shipment number Fenicia does not know, Fenicia creates the transfer at that moment and notifies the merchant. That covers the cost, not the stock: while the merchandise was in transit, your origin branch kept offering it to the channels.
The marketplace's stock load does not spend lots. If it did, a sale would be counted twice.
{ "code": "not-found", "message": "Shipment not found" }
Returns the shipment and the identifiers of the derived lots. Each derived lot keeps the originLotId of the source lot and its cost: costs of different lots are not averaged.