Stock line items

The stock line item object and the allowed CRUD operations on the related resource endpoint

Stock line items track the SKUs in an order's shipment.

  • If an order is not split, the stock line items correspond to all the SKUs in the order.

  • If the order is split, the line items are split into more than one shipment. A single line item can also be split into more than one stock line item.

Manual stock line items management

You can always create new stock items and modify or update existing ones (using integration API credentials), as long as the stock item quantity you choose is available for the involved product in one of the inventory stock locations belonging to the inventory model associated with the related order's market. Since the relationship with the line item is optional when creating a stock line item, you're free to create a stock line item associated with a shipment that involves a product that originally wasn't part of the order (e.g. sending an additional product as a free gift, replacing an unavailable product with another one, etc.). When you delete an existing stock line item the related stock reservation is removed and the corresponding stock is automatically released.

The available quantity validation is performed only if the stock line item is associated with a stock item (e.g. you can choose to add as free gift a do_not_track SKU with no constraint on the stock).

When you manually manage stock line items, make sure to consistently update the related stock. To do that, you can leverage some specific trigger attributes exposed at the shipment level or (if you need more granular control on the process) on each single stock line item.

Data model

Check the related ER diagram and explore the flowchart that illustrates how the stock line item resource relates to the other API entities.


Last updated