StockView · NexvoraOpen StockView

StockView API

Use the StockView API to connect accounting software, an ERP, an online shop, a POS or your own system to StockView. It reads items, stock levels, stock movements and orders, and it can add and update items and record stock in, stock out, counts and transfers.

The API comes with the Pro plan and the pilot. An Administrator makes the keys in StockView under Team → API keys.

Getting started

All requests go to https://stockview.nexvora.company/api/v1 with the key in the Authorization header:

curl https://stockview.nexvora.company/api/v1/me \
  -H "Authorization: Bearer svk_your_key_here"

Send requests from your server, never from a web page or a mobile app: anyone who sees a key can use it. The API doesn't allow calls from browsers (no CORS).

Keys and access

Key accessWhat it can do
Read onlyEverything under GET: company, items, warehouses, stock, movements, orders.
Read and writeAlso POST and PATCH items, and POST stock movements.

Requests and replies

Company and key

GET /api/v1/me tells you which company the key belongs to, its plan and the features switched on.

{
  "api": "Nexvora StockView", "version": 1,
  "company": { "id": "…", "name": "Lembah Jaya Distributors Sdn Bhd" },
  "plan": { "code": "pro", "name": "Pro", "status": "active", "read_only": false },
  "key": { "name": "Online shop", "scope": "write" },
  "features": ["daily_report", "import", "transfers", "orders", "api"]
}

Items

GET /api/v1/items: all items, by SKU, with the total on hand in all warehouses. Filters: sku, category.

GET /api/v1/items/{id}: one item, with the quantity in each warehouse.

{ "data": {
  "id": "8f1c…", "sku": "LJ-1001", "name": "Milo 3-in-1 (18 x 33g)", "category": "Beverages", "unit": "ctn",
  "cost": 52.4, "price": 61, "reorder_level": 20, "on_hand": 134, "created_at": "2026-10-04T03:00:00Z",
  "stock": [ { "warehouse_id": "…", "warehouse": "Main Warehouse", "qty": 120 },
             { "warehouse_id": "…", "warehouse": "Port Klang", "qty": 14 } ]
} }

POST /api/v1/items (read and write key): adds an item. Required: sku and name. Optional: category, unit, cost, price, reorder_level. Replies 201 with the new item. New items start with nothing on hand: record a stock in or a count to add stock.

PATCH /api/v1/items/{id} (read and write key): changes only the fields you send. Quantities can't be changed here; record a movement instead.

Warehouses and stock

GET /api/v1/warehouses: id and name of each warehouse.

GET /api/v1/stock: one line per item per warehouse: item_id, sku, name, unit, reorder_level, warehouse_id, warehouse, qty. Filters: warehouse_id, item_id, sku, and below_reorder=1 for items whose total is at or under their reorder level.

Stock movements

GET /api/v1/movements?from=2026-10-01&to=2026-10-31: every movement in those dates (up to 93 days per request). Filters: type, item_id, warehouse_id. Fields: id, type (in, out, adjust for counts, transfer, import), qty (negative when stock went out), ref, item_id, sku, item_name, warehouse_id, warehouse, user_name, created_at.

POST /api/v1/movements (read and write key): records stock, as on the Stock in/out screen. Give items by item_id or sku, and warehouses by warehouse_id or warehouse (the name). ref is your document number (DO, invoice, GRN), up to 80 characters.

typeWhat it does
inAdds qty to the warehouse (goods received).
outTakes qty out (sold or used). Refused with 409 if there isn't enough on hand.
adjustA count: sets the quantity on hand to qty and records the difference.
transferMoves qty to to_warehouse_id or to_warehouse (one item at a time; needs transfers on the plan).
curl -X POST https://stockview.nexvora.company/api/v1/movements \
  -H "Authorization: Bearer svk_…" -H "Content-Type: application/json" \
  -d '{"type":"out","warehouse":"Main Warehouse","sku":"LJ-1001","qty":5,"ref":"INV-20431"}'

Several items from one document: send lines instead of one item (up to 100). All lines are saved, or none are.

{ "type": "in", "warehouse": "Main Warehouse", "ref": "GRN-0098",
  "lines": [ { "sku": "LJ-1001", "qty": 40 }, { "sku": "LJ-1002", "qty": 12 } ] }

Replies 201 with what's on hand now for the items and warehouses it touched: { "ok": true, "stock": [ { "item_id", "sku", "warehouse_id", "warehouse", "qty" } ] }. A count also returns change.

Orders

Needs orders on the plan (Pro).

GET /api/v1/orders: customer and purchase orders with their lines. Filters: type (out = customer orders, in = purchase orders), status, and from + to for the due date.

GET /api/v1/orders/{id}: one order.

{ "data": {
  "id": "…", "type": "out", "kind": "customer", "number": "SO-00042", "party": "Kedai Runcit Ah Seng",
  "warehouse_id": "…", "warehouse": "Main Warehouse", "due_date": "2026-10-23", "status": "picking", "note": "",
  "created_at": "2026-10-21T02:11:00Z", "done_at": null, "total": 610,
  "lines": [ { "item_id": "…", "sku": "LJ-1001", "name": "Milo 3-in-1 (18 x 33g)", "qty": 10, "unit_price": 61 } ]
} }

Customer order status: new, picking, ready, delivered, cancelled. Purchase order status: ordered, received, cancelled.

Errors and limits

Errors reply with { "error": "What went wrong, in plain words." }.

CodeMeaning
400Something in the request is missing or not valid.
401No key, or the key isn't valid (revoked, or its Administrator lost access).
402The company's plan has ended, so StockView is read-only.
403The key is read-only, or the plan doesn't include that feature.
404Not found (including an unknown SKU or warehouse name).
409It clashes with what's there: not enough stock, or an SKU that's already used.
429Too many requests: up to 120 a minute per key. Wait for the time in Retry-After (seconds).

Questions? Email wearenexvora@gmail.com.