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
- Keys and access
- Requests and replies
- Company and key
- Items
- Warehouses and stock
- Stock movements
- Orders
- Errors and limits
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 access | What it can do |
|---|---|
| Read only | Everything under GET: company, items, warehouses, stock, movements, orders. |
| Read and write | Also POST and PATCH items, and POST stock movements. |
- Each company can have up to 10 keys. A key is shown once, when it's made. If it's lost, make a new one and revoke the old one.
- A key has the Administrator's access: every warehouse, costs and prices. Changes follow the same rules as the StockView screens (stock never goes below zero, item codes are unique) and are recorded under the name of the Administrator who made the key.
- A key stops working when it's revoked, when the Administrator who made it is removed or is no longer an Administrator, or when the company's plan no longer includes the API.
Requests and replies
- Replies are JSON. Send JSON bodies with
Content-Type: application/json. - Dates you send (
from,to) areYYYY-MM-DDin Malaysia time. Times in replies, such ascreated_at, are ISO 8601 in UTC (2026-10-21T01:02:03Z). Money is in RM. - Lists come as
{ "data": [...], "has_more": true, "next_offset": 100 }. Uselimit(1–500, default 100) andoffset; ask again withoffset=next_offsetuntilhas_moreisfalse. - One item comes as
{ "data": { ... } }.
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.
type | What it does |
|---|---|
in | Adds qty to the warehouse (goods received). |
out | Takes qty out (sold or used). Refused with 409 if there isn't enough on hand. |
adjust | A count: sets the quantity on hand to qty and records the difference. |
transfer | Moves 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." }.
| Code | Meaning |
|---|---|
| 400 | Something in the request is missing or not valid. |
| 401 | No key, or the key isn't valid (revoked, or its Administrator lost access). |
| 402 | The company's plan has ended, so StockView is read-only. |
| 403 | The key is read-only, or the plan doesn't include that feature. |
| 404 | Not found (including an unknown SKU or warehouse name). |
| 409 | It clashes with what's there: not enough stock, or an SKU that's already used. |
| 429 | Too many requests: up to 120 a minute per key. Wait for the time in Retry-After (seconds). |
Questions? Email wearenexvora@gmail.com.