API — Logistics¶
The HTTP surface of the self-contained warehouse system. These controllers live in
NKO.Main/NKO.Main/WarehouseControllers/ and read and write the separate NKO_DB_Warehouse
database through WarehouseDBContext, while reusing core identity, permissions, signatures and
notifications.
Two naming traps worth remembering:
WareBaseControlleris not a base class. Despite the name it is a standalone controller serving/WareBase/*AJAX lookups.GRNReportControlleris not the procurement GRN. The coreGoodReceivedNoterecords goods received from a supplier; the warehouseGRNReportrecords assets returned into the store.
See Logistics module.
174 actions across 10 controllers
Routing, the permission model, response kinds and error behaviour are described
once in the API Overview. Unless a row says otherwise the route is
/{Controller}/{Action}, id is a GUID string, and a Details page is a
full View while Manage* / Create fragments are PartialViews loaded into a modal.
StockController¶
Consumable stock: item and specification masters, on-hand centre stock, stock movements, Stock Release Requests / delivery orders, waybills and centre-to-centre transfers.
Source: NKO.Main/NKO.Main/WarehouseControllers/StockController.cs · route prefix: /Stock · 46 actions
| Route | Verb | Parameters | Permission | Returns |
|---|---|---|---|---|
/ |
GET | string id |
Stock |
PartialView / Redirect |
/ |
POST | SRRDetail |
Stock |
PartialView / JSON |
/ |
GET | — | Stock |
View |
/ |
POST | Add |
Stock |
View / Redirect |
/ |
GET | string id, string srr |
Stock |
PartialView / Redirect |
/ |
POST | Way |
Stock |
PartialView / JSON |
/ |
POST | string id, int operation, int user, string id |
Stock |
Redirect |
/ |
GET | int? type |
Stock |
View |
/ |
POST | SRRCreate |
Stock |
View / Redirect |
/ |
GET | string id |
Stock |
View |
/ |
POST | Waybill |
Stock |
View / Redirect |
/ |
GET | string id |
Stock |
PartialView / Redirect |
/ |
POST | SRRDetail |
Stock |
PartialView / JSON |
/ |
GET | string id |
Stock |
PartialView / Redirect |
/ |
POST | Stock |
Stock |
PartialView / JSON |
/ |
GET | string id |
Stock |
PartialView / Redirect |
/ |
POST | Way |
Stock |
PartialView / JSON |
/ |
GET | string id |
Stock |
PartialView / Redirect |
/ |
POST | Waybill |
Stock |
PartialView / JSON |
/ |
GET | string id, int? filter, int? filter, string start, string end, int? date, int? op, int? op, string search, string err, int? page |
Stock |
View |
/ |
GET | int type |
Stock |
File |
/ |
GET | string id |
Stock |
PartialView / Redirect |
/ |
POST | SRRVM model |
Stock |
PartialView / JSON |
/ |
GET | string id |
Stock |
PartialView / Redirect |
/ |
POST | SRRDetail |
Stock |
PartialView / JSON |
/ |
GET | string id |
Stock |
View / Redirect |
/ |
POST | Add |
Stock |
View / Redirect |
/ |
GET | string id |
Stock |
PartialView / Redirect |
/ |
POST | Way |
Stock |
PartialView / JSON |
/ |
GET | string id |
Stock |
PartialView / Redirect |
/ |
POST | Way |
Stock |
PartialView / JSON |
/ |
GET | int? filter, int? filter, int? filter, int? Cat, int? Cat2, int? Cat3, int? Stock, int? Stock, int? donor, int? project, string search |
Stock |
Redirect |
/ |
GET | int? filter, int? filter, string start, string end, int? date, int? op, int? op, bool? Is, int? User, int? cur, string search, int? search, int? project |
Stock |
View / Redirect |
/ |
GET | string search |
Stock |
JSON |
/ |
GET | string search |
Stock |
JSON |
/ |
GET | string search, int type |
Stock |
JSON |
/ |
GET | string search, int id, int project |
Stock |
JSON |
/ |
GET | string search, string id |
Stock |
JSON |
/ |
GET | int? id, int? filter, int? filter, int? filter, int? filter, string start, string end, int? date, int? Cat, int? Cat2, int? Cat3, int? Stock, int? Stock, int? donor, int? project, int? op, string search, bool? Is, string err, int? page |
Stock |
View |
/ |
POST | string Reference, int Op |
Stock |
JSON |
/ |
GET | string Id |
Stock |
PartialView / Redirect |
/ |
POST | Release, string id |
Stock |
PartialView / JSON |
/ |
GET | int? filter, int? filter, string start, string end, int? date, int? op, int? op, bool? Is, int? User, int? cur, string search, int? search, string err, int? project, int? page |
Stock |
View |
/ |
GET | string id, int? pdf, string msg |
Stock |
View / NotFound |
/ |
GET | string id, int? pdf |
Stock |
View |
/ |
GET | string id, int? filter, int? filter, int? filter, int? filter, string start, string end, int? date, int? center, string search, string err, int? page |
Stock |
View |
AssetController¶
The fixed-asset register: registration and approval, hand-over to an employee, asset details and the employee asset card.
Source: NKO.Main/NKO.Main/WarehouseControllers/AssetController.cs · route prefix: /Asset · 40 actions · 1 ungated
| Route | Verb | Parameters | Permission | Returns |
|---|---|---|---|---|
/ |
GET | — | Asset |
View |
/ |
POST | Create |
Asset |
View / Redirect |
/ |
GET | string id |
Stock |
PartialView / Redirect |
/ |
POST | SRRDetail |
Stock |
PartialView / JSON |
/ |
POST | Asset |
Asset |
Redirect |
/ |
POST | int srr, int spec, List<, Transfer, string? attachment |
Asset |
Redirect |
/ |
POST | string id, int operation, int user, string id |
Stock |
Redirect |
/ |
GET | int? type |
Stock |
View |
/ |
POST | AHFCreate |
Stock |
View / Redirect |
/ |
GET | string id |
Asset |
PartialView / Redirect |
/ |
POST | Asset model |
Asset |
PartialView / JSON |
/ |
GET | string id, int srr |
Asset |
PartialView / Redirect |
/ |
POST | Asset |
Asset |
PartialView / JSON |
/ |
GET | string id |
Stock |
PartialView / Redirect |
/ |
POST | SRRDetail |
Stock |
PartialView / JSON |
/ |
GET | string id, string srr, int? filter, int? filter, string start, string end, int? date, int? op, int? op, string search, string err, int? page |
Asset |
View |
/ |
GET | string file, bool view |
— open | Redirect |
/ |
GET | int type |
Asset |
File |
/ |
GET | string id |
Asset |
View / Redirect |
/ |
POST | Asset model, IForm |
Asset |
View / Redirect |
/ |
GET | string id |
Stock |
View / Redirect |
/ |
POST | AHFVM model |
Stock |
PartialView / Redirect |
/ |
GET | string id |
Stock |
PartialView / Redirect |
/ |
POST | SRRDetail |
Stock |
PartialView / JSON |
/ |
GET | int? filter, int? filter, int? filter, int? Cat, int? Cat2, int? Cat3, int? Stock, int? Stock, int? User, int? Status, string search, int? search, bool? Termination, bool? finance, Date, Date, Date, int? donor, int? project |
Asset |
Redirect |
/ |
GET | int? filter, int? filter, int? filter, int? filter, string start, string end, int? date, int? op, int? op, bool? Is, int? User, int? cur, string search, int? search, int? project |
Stock |
View / Redirect |
/ |
GET | string search |
Ware |
JSON |
/ |
GET | string search |
Stock |
JSON |
/ |
GET | string search |
Stock |
JSON |
/ |
GET | string search, int type |
Stock |
JSON |
/ |
GET | string search, int id, int project |
Stock |
JSON |
/ |
GET | string search |
Asset |
JSON |
/ |
GET | int? id, int? filter, int? filter, int? filter, string start, string end, int? date, int? Cat, int? Cat2, int? Cat3, int? Stock, int? Stock, int? donor, int? project, int? User, int? Status, string search, int? search, string err, int? pdf, int? page |
Asset |
View |
/ |
POST | string Reference, int Op |
Stock |
JSON |
/ |
POST | string id, int operation, int user, string note, string extra |
Asset |
Redirect |
/ |
GET | int? filter, int? filter, string start, string end, int? date, int? op, int? op, bool? Is, int? User, int? cur, string search, int? search, string err, int? project, int? page |
Stock |
View |
/ |
GET | string id, int? pdf, string msg |
Stock |
View / NotFound |
/ |
POST | Asset, IForm |
Asset |
Redirect |
/ |
POST | Asset, IForm |
Asset |
Redirect |
/ |
GET | string id, int Spec, string err, int? page |
Asset |
View / Redirect |
MaintenanceReqController¶
Asset maintenance requests and their approval.
Source: NKO.Main/NKO.Main/WarehouseControllers/MaintenanceReqController.cs · route prefix: /MaintenanceReq · 9 actions
| Route | Verb | Parameters | Permission | Returns |
|---|---|---|---|---|
/ |
POST | string id, int operation, int user, string note |
Asset |
Redirect |
/ |
GET | — | Asset |
PartialView |
/ |
POST | Maintenance |
Asset |
PartialView / JSON |
/ |
GET | string id |
Asset |
PartialView / Redirect |
/ |
POST | Maintenance |
Asset |
PartialView / JSON |
/ |
GET | string id, int? pdf |
Asset |
View / NotFound |
/ |
GET | string id |
Asset |
PartialView / Redirect |
/ |
POST | Maintenance |
Asset |
PartialView / JSON |
/ |
GET | int? status, string search, int? page, int? warehouse |
Asset |
View |
DestructionController¶
Asset disposal / destruction requests and their approval.
Source: NKO.Main/NKO.Main/WarehouseControllers/DestructionController.cs · route prefix: /Destruction · 12 actions
| Route | Verb | Parameters | Permission | Returns |
|---|---|---|---|---|
/ |
GET | int id |
Destruction |
View |
/ |
POST | string id, int operation, int user, string note, string cancelnote |
Destruction |
Redirect |
/ |
GET | — | Destruction |
View |
/ |
POST | Destruction |
Destruction |
View / Redirect |
/ |
GET | string id, int? file |
Destruction |
PartialView |
/ |
POST | string attached, string Description, string id, int? File |
Destruction |
JSON |
/ |
GET | string id |
Destruction |
Redirect |
/ |
GET | string id, int? pdf |
Destruction |
View |
/ |
GET | int type |
Destruction |
File |
/ |
GET | int destruction |
Destruction |
Redirect |
/ |
GET | int? page |
Destruction |
View |
/ |
POST | int id, string desc |
Destruction |
JSON |
GRNReportController¶
The warehouse GRN report — assets returned into the store. A different document from the procurement GoodReceivedNote.
Source: NKO.Main/NKO.Main/WarehouseControllers/GRNReportController.cs · route prefix: /GRNReport · 9 actions
| Route | Verb | Parameters | Permission | Returns |
|---|---|---|---|---|
/ |
POST | string id, int operation, int user, string note, string cancelnote |
Ware |
Redirect |
/ |
GET | — | Ware |
PartialView |
/ |
POST | GRNReport |
Ware |
PartialView / JSON |
/ |
GET | string id |
Ware |
PartialView / Redirect |
/ |
GET | string id, int? pdf |
Ware |
View / NotFound |
/ |
GET | string id |
Ware |
PartialView / Redirect |
/ |
POST | GRNReport |
Ware |
PartialView / JSON |
/ |
GET | string search |
Ware |
JSON |
/ |
GET | int? filter, int? filter, int? filter, int? filter, int? date, int? Status, string search, int? search, string err, int? page |
Ware |
View |
ReportController¶
Warehouse reporting: stock entries and movements, employee asset cards and the exports.
Source: NKO.Main/NKO.Main/WarehouseControllers/ReportController.cs · route prefix: /Report · 10 actions · 1 ungated
| Route | Verb | Parameters | Permission | Returns |
|---|---|---|---|---|
/ |
GET | int? filter, string start, string end, int? date, string status, int? Cat, int? Stock, int? Stock, int? User, int? Center, int? project, bool? Termination, bool? Finance, int? page |
Report |
View |
/ |
GET | string err, int? pdf, int? user, int? page |
Ware |
View |
/ |
GET | int? date, int? filter, int? filter, string start, string end, int? op, int? Stock, int? Stock, int? project, string search, string err, int? page, int? pdf |
Report |
View |
/ |
GET | int? id, int? filter, int? filter, string start, string end, int? date, int? Type, int? Brand, int? Status |
Report |
View / Redirect |
/ |
GET | int? filter, int? Cat, int? Stock, int? Stock, int? User, int? Status, string search, int? search, Date, Date, Date |
Asset |
Redirect |
/ |
GET | int? filter, int? date, string start, string end, int? op, int? Stock, int? Stock, int? project, string search |
Report |
View / Redirect |
/ |
GET | string id, int? page |
Stock |
Task< |
/ |
GET | int? id, int? filter, int? filter, int? filter, int? filter, string start, string end, int? date, int? Type, int? Brand, int? Status |
— open | View / Redirect |
/ |
GET | int? id, int? filter, int? filter, int? filter, int? filter, string start, string end, int? date, int? op, int? Cat, int? Stock, int? project, int? Stock, int? User, int? Center, bool? Is, int? page |
Report |
View |
/ |
GET | int id, int? filter, int? filter, int? filter, int? filter, string start, string end, int? date, int? op, int Stock, int? User, int? Center, int? project, int? page |
Report |
View |
WareAdminController¶
The warehouse control panel — warehouses, categories (CatL1), goods, units and per-employee category permissions.
Source: NKO.Main/NKO.Main/WarehouseControllers/WareAdminController.cs · route prefix: /WareAdmin · 36 actions
| Route | Verb | Parameters | Permission | Returns |
|---|---|---|---|---|
/ |
GET | — | Stock |
PartialView |
/ |
POST | Cat1 |
Stock |
PartialView / JSON |
/ |
GET | int id |
Stock |
PartialView |
/ |
POST | Stock |
Stock |
PartialView / JSON |
/ |
GET | — | Stock |
PartialView |
/ |
POST | NKO. |
Stock |
PartialView / JSON |
/ |
GET | string search, int? page |
Stock |
View |
/ |
GET | — | Stock |
View |
/ |
POST | Create |
Stock |
View / Redirect |
/ |
GET | int id |
Stock |
PartialView / Redirect |
/ |
POST | NKO. |
Stock |
PartialView / JSON |
/ |
GET | int id |
Stock |
View |
/ |
POST | Stock model |
Stock |
View / Redirect |
/ |
GET | int id |
Stock |
PartialView |
/ |
POST | Cat1 |
Stock |
PartialView / JSON |
/ |
GET | int id |
Stock |
PartialView |
/ |
POST | Stock |
Stock |
PartialView / JSON |
/ |
GET | int id |
Stock |
PartialView |
/ |
POST | NKO. |
Stock |
PartialView / JSON |
/ |
GET | — | Stock |
View / Redirect |
/ |
GET | — | Stock |
View |
/ |
GET | — | Stock |
View |
/ |
POST | IForm, int center |
Stock |
View |
/ |
GET | — | Stock |
View |
/ |
POST | IForm |
Stock |
View |
/ |
GET | — | Stock |
View |
/ |
POST | IForm, int center |
Stock |
View |
/ |
GET | — | Stock |
View |
/ |
POST | IForm |
Stock |
View |
/ |
GET | — | Stock |
View |
/ |
POST | IForm |
Stock |
View |
/ |
GET | int? page |
Stock |
View |
/ |
GET | string search |
Stock |
JSON |
/ |
GET | int id, int? page |
Stock |
View |
/ |
GET | int id, string search, int? page |
Stock |
View |
/ |
GET | int? page, bool? is |
Stock |
View |
AttachmentsController¶
The warehouse document archive.
Source: NKO.Main/NKO.Main/WarehouseControllers/AttachmentsController.cs · route prefix: /Attachments · 5 actions
| Route | Verb | Parameters | Permission | Returns |
|---|---|---|---|---|
/ |
GET | — | Warehouse |
View |
/ |
POST | Warehouse |
Warehouse |
View / Redirect |
/ |
GET | string id |
Warehouse |
View |
/ |
POST | Warehouse |
Warehouse |
View / Redirect |
/ |
GET | string search, string desc, int? category, int? page |
Warehouse |
View |
EvidencesController¶
Warehouse evidence records and their reference codes.
Source: NKO.Main/NKO.Main/WarehouseControllers/EvidenceController.cs · route prefix: /Evidences · 2 actions · 2 ungated
| Route | Verb | Parameters | Permission | Returns |
|---|---|---|---|---|
/ |
GET | string search, int type |
— open | JSON |
/ |
GET | — | — open | View |
WareBaseController¶
Shared AJAX lookups used by the warehouse screens (stock and specification dropdowns). Not an inherited base class despite the name.
Source: NKO.Main/NKO.Main/WarehouseControllers/WareBaseController.cs · route prefix: /WareBase · 5 actions · 2 ungated
| Route | Verb | Parameters | Permission | Returns |
|---|---|---|---|---|
/ |
GET | string file, Attach, string filename |
[Authorize] |
Redirect |
/ |
GET | int id |
[Authorize] |
File |
/ |
GET | int? id |
— open | JSON |
/ |
GET | int? id |
— open | JSON |
/ |
GET | int width, int height, int id |
[Authorize] |
File |
Related¶
- Logistics module
- Warehouse database
- API Overview — routing, auth, responses and error behaviour.