Skip to main content
Inventory tracks how much of each product you hold, per warehouse. Stock moves in three ways: documents move it automatically (sales and sales returns move stock out and back in, purchases and purchase returns move it in and out), you adjust it directly through this API, or someone edits it in the dashboard.

Adjust stock

POST /v2/inventory/stock records a manual movement — a correction, an opening balance, damage, or an internal transfer:
  • actionin adds stock, out removes it
  • product_id — your item ID, the same one used in documents
  • warehouse_id — from Get all warehouses; use -1 for the default warehouse
  • record_date — optional DD-MM-YYYY backdate for the movement
Documents that would take stock below zero can fail with INSUFFICIENT_STOCK — see Error codes.

React to movements in real time

Enable the inventory webhook and Swipe calls your endpoint on every stock movement — API, dashboard, or document-driven — with the product, quantity, and direction:
partner_product_id is -1 when the product isn’t mapped to one of your IDs yet — see ID mapping.

Endpoints

Inventory stock in/out

Record a manual stock movement.

Get all warehouses

List warehouse IDs for stock operations.