Skip to content
ShopentlyLearn

Inventory

Read stock and apply controlled adjustments, sales limits and manual reservations.

Operations

List stock recordsView product stock, warehouses and internal locations. GET Create a stock adjustmentChange physical and sellable product quantities. POST Get a stock recordView product stock, warehouses and internal locations. GET Update a stock recordChange physical and sellable product quantities. PATCH Update a manual reservationChange manual reservations. For external integration operations. PATCH Update a sales limitChange sales limits. For external integration operations. PATCH Start a digital importCreate a private draft for a batch of codes or files. Creating the draft does not add stock for sale. POST Cancel an unfinished importCancel a draft that you no longer intend to receive. This operation does not withdraw an already committed delivery. DELETE Read a digital importCheck the import state, its version and the result of validation before committing the batch. GET Commit a digital deliveryCreate a warehouse delivery from the validated batch. Choose planned to receive it later, or received to make the units available in stock. POST Receive a planned digital deliveryReceive a committed planned delivery when its codes or files are ready for sale. The operation makes the existing units available without importing them again. POST Validate imported codes or filesValidate the entire batch before creating a delivery. A duplicate or invalid item rejects the batch; codes are never shortened. POST Withdraw unsold delivery itemsWithdraw only the free units from a digital delivery. Reserved and issued units remain linked to their orders. POST Read digital pool settingsRead the settings and counts before changing the pool. The response contains no codes or file contents. GET Change digital pool settingsEnable individual codes or files for a product, and choose how to store them and notify buyers. New pool sales require Professional or Enterprise. PATCH List digital stock unitsList available, reserved or issued units without revealing codes. Filter by state, warehouse_id or kind, and use the returned cursor for the next page. GET Change the allocation orderReorder available units so that purchases receive them in the chosen order. Reserved and issued units keep their assignment. POST Read an available code or fileRead the content of a free stock unit. A code returns JSON; a file returns its bytes with the correct Content-Type. GET Check available content headersCheck whether an available code or file can be read without receiving its body. HEAD Remove an available unitRemove an unsold code or file from the pool and record why it was withdrawn. Reserved or issued units are rejected. POST Replace an available code or fileReplace a free stock unit without changing its position in the allocation order. The replacement is recorded in warehouse history. POST Prepare a private digital uploadReserve storage for one file and bind it to an import or replacement unit before sending its bytes. POST Check a private digital uploadCheck whether an upload is ready before using its ID in validation or replacement. GET Upload digital file bytesSend the file itself in the file part of multipart/form-data. Use the upload ID returned by the preparation request. PUT

How it works

Stock records distinguish physical on_hand quantity, order reservations, manual reservations and the quantity available for sale. Use the returned stock identifier and version; product and variant stock are separate targets.

A sellable_limit of -1 means unlimited, while 0 means no available sales. Unlimited availability is exposed as null in available. Do not treat null as zero. Stock adjustments, sales limits and manual reservations use separate operations and permissions.