Skip to content

API — Procurement

The HTTP surface of the procurement chain — Purchase Request → RFQ → Purchase Order → Goods Received Note → Payment Order — plus the supplier registry. Each document has the same shape: an Index grid, a Details page, Create / Edit fragments, attachment actions, and a single ContextActions POST that advances its StatusId.

Shared permission family

GRNController and PaymentOrderController are gated almost entirely by PurchaseOrder* keys rather than keys of their own — 50 actions in total. That is consistent within the chain but coarse; see R3-6 in Recommendations.

See Procurement module and Procurement Cycle.

157 actions across 6 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.

PurchaseRequestController

The Purchase Request — creation, materials, budget-line selection, the SOD approval chain and the PR tracker.

Source: NKO.Main/NKO.Main/Controllers/PurchaseRequestController.cs · route prefix: /PurchaseRequest · 21 actions

Route Verb Parameters Permission Returns
/PurchaseRequest/AddComment POST IFormCollection collection PurchaseRequestAddComment JSON / Redirect
/PurchaseRequest/AddMat GET string id PurchaseRequestAddMat PartialView / Redirect
/PurchaseRequest/AddMat POST Materials model PurchaseRequestAddMat PartialView / JSON
/PurchaseRequest/ContextActions POST string id, int operationType, int userType, string idText, int? AssignedId PurchaseRequestDetails Redirect
/PurchaseRequest/Create GET — PurchaseRequestCreate View
/PurchaseRequest/Create POST PurchaseRequestVM model PurchaseRequestCreate View / Redirect
/PurchaseRequest/CreateAttachment GET string id, int? fileType PurchaseRequestAddComment PartialView
/PurchaseRequest/CreateAttachment POST string attachedFiles, string Description, string id, int? FileTypeId PurchaseRequestAddComment JSON
/PurchaseRequest/Delete GET string id PurchaseRequestDelete PartialView / Redirect
/PurchaseRequest/Delete POST PurchaseRequest model PurchaseRequestDelete PartialView / JSON
/PurchaseRequest/DeleteAttachment GET string id PurchaseRequestAddComment Redirect
/PurchaseRequest/DeleteMat GET int? id PurchaseRequestDeleteMat PartialView / Redirect
/PurchaseRequest/DeleteMat POST Materials model PurchaseRequestDeleteMat PartialView / JSON
/PurchaseRequest/Details GET string id, int? pdf, string msg PurchaseRequestDetails View / Redirect
/PurchaseRequest/Edit POST List<int> projects, List<int> donors, List<int> budgets, string prNote, bool contentEdit, bool enableEdit, PurchaseRequest model PurchaseRequestEdit Redirect
/PurchaseRequest/EditMat GET int? id PurchaseRequestEditMat PartialView / Redirect
/PurchaseRequest/EditMat POST Materials model PurchaseRequestEditMat PartialView / JSON
/PurchaseRequest/ExportTemplate GET int id PurchaseRequestDetails Task<ActionResult>
/PurchaseRequest/ImportTemplate POST string id, IFormFile file PurchaseRequestDetails Redirect
/PurchaseRequest GET string search_param, string Ssearch_param, string sortOrder, int? filterYear, string searchString, string ScurrentFilter, int? filterMonth, int? filterStatus, int? filterProject, int? page PurchaseRequest View
/PurchaseRequest/UploadFiles POST int id, string desc PurchaseRequestAddComment JSON

RFQController

Request For Quotation: supplier invitation, quotation capture, the CBA comparative analysis and technical scoring, verification tokens, and committee sign-off.

Source: NKO.Main/NKO.Main/Controllers/RFQController.cs · route prefix: /RFQ · 44 actions · 4 ungated

Route Verb Parameters Permission Returns
/RFQ/AddMat GET string id RFQCreate PartialView / Redirect
/RFQ/AddMat POST RFQMat model RFQCreate PartialView / JSON
/RFQ/AllowForTech GET string id RFQEditProvider Redirect
/RFQ/CanAllow GET int rfqId, int currentUser — open Task<bool>
/RFQ/CanAskVerification GET int rfqId, int currentUser — open Task<bool>
/RFQ/CanRemoveAllow GET int rfqId, int currentUser — open Task<bool>
/RFQ/CanWaitVerification GET int rfqId, int currentUser — open Task<bool>
/RFQ/Cancel GET string id RFQCreate Redirect
/RFQ/ChangeCommittee GET string id RFQEdit PartialView / Redirect
/RFQ/ChangeCommittee POST RFQs model RFQEdit PartialView / JSON
/RFQ/ChangeThreshold POST RFQs model RFQEdit PartialView / JSON
/RFQ/Compare GET string id, string msg, int? pdf RFQProvidersAnalyse View / Redirect
/RFQ/Compare POST string id, int autoAnalyse RFQProvidersAnalyse Redirect
/RFQ/ContextActions POST string id, int operationType, int userType, string idText, int? AssignedId RFQProvidersAnalyse Redirect
/RFQ/Create GET string id RFQCreate PartialView / JSON
/RFQ/Create POST RFQs model, List<int> procUsers, List<int> techUsers, List<int> openUsers, int? procManager, int? techManager, int? openManager RFQCreate PartialView / JSON
/RFQ/Delete GET string id RFQCreate PartialView
/RFQ/Delete POST RFQs model RFQCreate PartialView / JSON
/RFQ/DeleteAttachment GET string id PurchaseRequestAddComment Redirect
/RFQ/DeleteMat GET int? id RFQCreate PartialView / Redirect
/RFQ/DeleteMat POST RFQMat model RFQCreate PartialView / JSON
/RFQ/Details GET string id, string msg, int? pdf RFQDetails View
/RFQ/Edit GET string id RFQEdit View / Redirect
/RFQ/Edit POST RFQs model, List<int> procUsers, List<int> techUsers, List<int> openUsers, int? procManager, int? techManager, int? openManager RFQEdit PartialView / Redirect
/RFQ/EditProvider GET string id RFQEditProvider PartialView / Redirect
/RFQ/EditProvider POST RFQProvider model RFQEditProvider PartialView / JSON
/RFQ GET int? type, int? page RFQIndex View
/RFQ/JustifyOther POST ProviderModel model RFQEditProvider Redirect
/RFQ/JustifyTech POST ProviderModel model RFQEditProvider Redirect
/RFQ/Providers GET string id, string msg RFQProviders View / Redirect
/RFQ/ProvidersAnalyse GET string id, int? pdf RFQProvidersAnalyse View / Redirect
/RFQ/ProvidersDetails GET string id, string msg RFQProvidersDetails View
/RFQ/RemoveAllowForTech GET string id RFQEditProvider Redirect
/RFQ/Reset GET string id RFQEdit PartialView / Redirect
/RFQ/Reset POST RFQs model, string rfqNo RFQEdit PartialView / JSON
/RFQ/SetJustification GET string id RFQProvidersAnalyse PartialView / Redirect
/RFQ/SetJustification POST RFQs model RFQProvidersAnalyse PartialView / JSON
/RFQ/TechContextActions POST string id, int operationType, int userType, string idText RFQProvidersAnalyse Redirect
/RFQ/TechnicalAssesment GET string id, string msg, int? pdf RFQProvidersAnalyse View / Redirect
/RFQ/TechnicalReport GET string id, string msg, int? pdf RFQProvidersAnalyse View / Redirect
/RFQ/UpdateStage POST int id, bool value, int type RFQProvidersAnalyse Content
/RFQ/UploadFiles POST int id, string desc RFQProvidersAnalyse JSON
/RFQ/Verify GET string id RFQVerify Redirect
/RFQ/Verify POST string id, string passCode RFQVerify PartialView / Redirect

PurchaseOrderController

The Purchase Order raised from a winning quotation, its justification documents, the procurement tracker and the supplier-facing views.

Source: NKO.Main/NKO.Main/Controllers/PurchaseOrderController.cs · route prefix: /PurchaseOrder · 36 actions

Route Verb Parameters Permission Returns
/PurchaseOrder/AddComment POST IFormCollection collection PurchaseOrderDetails JSON / Redirect
/PurchaseOrder/AddJustificationComment POST IFormCollection collection PurchaseOrderDetails JSON / Redirect
/PurchaseOrder/ContextActions POST string id, int operationType, int userType, string idText PurchaseOrderDetails Redirect
/PurchaseOrder/Create GET string Id PurchaseOrderCreate Redirect
/PurchaseOrder/CreateAttachment GET string id, int? fileType PurchaseOrderCreate PartialView
/PurchaseOrder/CreateAttachment POST string attachedFiles, string Description, string id, int? FileTypeId PurchaseOrderCreate JSON
/PurchaseOrder/CreateJustification GET string Id PurchaseOrderCreate Redirect
/PurchaseOrder/CreateJustificationAttachment GET string id, int? fileType PurchaseOrderCreate PartialView
/PurchaseOrder/CreateJustificationAttachment POST string attachedFiles, string Description, string id, int? FileTypeId PurchaseOrderCreate JSON
/PurchaseOrder/Delete GET string id PurchaseOrderDelete PartialView / Redirect
/PurchaseOrder/Delete POST PurchaseOrder model PurchaseOrderDelete PartialView / JSON
/PurchaseOrder/DeleteAttachment GET string id PurchaseOrderCreate Redirect
/PurchaseOrder/DeleteFiles POST int id PurchaseOrderCreate JSON
/PurchaseOrder/DeleteJustification GET string id PurchaseOrderDelete PartialView / Redirect
/PurchaseOrder/DeleteJustification POST PurchaseOrder model PurchaseOrderDelete PartialView / JSON
/PurchaseOrder/DeleteJustificationAttachment GET string id PurchaseOrderCreate Redirect
/PurchaseOrder/DeleteMat GET int? id PurchaseOrderDeleteMat PartialView / Redirect
/PurchaseOrder/DeleteMat POST PurchaseOrderMat model PurchaseOrderDeleteMat PartialView / JSON
/PurchaseOrder/Details GET string id, string msg, int? pdf PurchaseOrderDetails View / Redirect
/PurchaseOrder/Edit GET string id PurchaseOrderEditMat PartialView / Redirect
/PurchaseOrder/Edit POST PurchaseOrder model PurchaseOrderEdit PartialView / JSON
/PurchaseOrder/EditJustification GET string id RFQProvidersAnalyse PartialView / Redirect
/PurchaseOrder/EditJustification POST RFQProviderJustification model, List<int> suppliers RFQProvidersAnalyse PartialView / JSON
/PurchaseOrder/EditMat GET int? id PurchaseOrderEditMat PartialView / Redirect
/PurchaseOrder/getUnits GET — [Authorize] JSON — the unit list; no view or script calls it
/PurchaseOrder/EditMat POST PurchaseOrderMat model PurchaseOrderEditMat PartialView / JSON
/PurchaseOrder GET int? filterYear, int? filterMonth, int? filterStatus, int? page PurchaseOrderIndex View
/PurchaseOrder/Justification GET string id, string msg, int? pdf RFQProvidersAnalyse View / Redirect
/PurchaseOrder/JustificationContextActions POST string id, int operationType, int userType, string idText, int? AssignedId RFQProvidersAnalyse Redirect
/PurchaseOrder/Justifications GET int? filterYear, int? filterMonth, int? filterStatus, int? page RFQProvidersAnalyse View
/PurchaseOrder/ProcTracker GET int? project, int? status, int? page PurchaseOrderProcTracker View
/PurchaseOrder/SheetEdit GET string id, string msg, int? pdf PurchaseOrderDetails View
/PurchaseOrder/Tracker GET string id PurchaseOrderIndex View
/PurchaseOrder/UpdateStage POST int id, bool value RFQProvidersAnalyse Content
/PurchaseOrder/UploadFiles POST int id, string desc PurchaseOrderCreate JSON
/PurchaseOrder/UploadJustificationFiles POST int id, string desc PurchaseOrderCreate JSON

GRNController

Goods Received Notes against a PO, and Transfer to Warehouse, which writes stock or asset rows into the separate warehouse database.

Source: NKO.Main/NKO.Main/Controllers/GRNController.cs · route prefix: /GRN · 23 actions

Route Verb Parameters Permission Returns
/GRN/AddComment POST IFormCollection collection PurchaseOrderDetails JSON / Redirect
/GRN/AddJustificationComment POST IFormCollection collection PurchaseOrderDetails JSON / Redirect
/GRN/ContextActions POST string id, int operationType, int userType, string idText PurchaseOrderDetails Redirect
/GRN/Create GET string Id PurchaseOrderCreate Redirect
/GRN/CreateAttachment GET string id, int? fileType PurchaseOrderCreate PartialView
/GRN/CreateAttachment POST string attachedFiles, string Description, string id, int? FileTypeId PurchaseOrderCreate JSON
/GRN/CreateJustificationAttachment GET string id, int? fileType PurchaseOrderCreate PartialView
/GRN/CreateJustificationAttachment POST string attachedFiles, string Description, string id, int? FileTypeId PurchaseOrderCreate JSON
/GRN/Delete GET string id PurchaseOrderDelete PartialView / Redirect
/GRN/Delete POST GoodReceivedNote model PurchaseOrderDelete PartialView / JSON
/GRN/DeleteAttachment GET string id PurchaseOrderCreate Redirect
/GRN/DeleteFiles POST int id PurchaseOrderCreate JSON
/GRN/DeleteJustificationAttachment GET string id PurchaseOrderCreate Redirect
/GRN/DeleteMat GET int? id PurchaseOrderDeleteMat PartialView / Redirect
/GRN/DeleteMat POST GoodReceivedNoteMat model PurchaseOrderDeleteMat PartialView / JSON
/GRN/Details GET string id, string msg, int? pdf PurchaseOrderDetails View / Redirect
/GRN/Edit GET string id PurchaseOrderEditMat PartialView / Redirect
/GRN/Edit POST GoodReceivedNote model PurchaseOrderEdit View / JSON
/GRN/EditMat GET int? id PurchaseOrderEditMat PartialView / Redirect
/GRN/EditMat POST GoodReceivedNoteMat model PurchaseOrderEditMat PartialView / JSON
/GRN GET int? filterYear, int? filterMonth, int? filterStatus, int? page PurchaseOrderIndex View
/GRN/TransfareToWarehouse GET string id, string msg, int? pdf PurchaseOrderDetails Redirect
/GRN/UploadFiles POST int id, string desc PurchaseOrderCreate JSON

PaymentOrderController

Payment Orders — both the GRN-derived flow and the manual direct-vendor payment — through Budget Holder, Finance, CEO and Payer.

Source: NKO.Main/NKO.Main/Controllers/PaymentOrderController.cs · route prefix: /PaymentOrder · 27 actions

Route Verb Parameters Permission Returns
/PaymentOrder/AddComment POST IFormCollection collection PurchaseOrderDetails JSON / Redirect
/PaymentOrder/AddJustificationComment POST IFormCollection collection PurchaseOrderDetails JSON / Redirect
/PaymentOrder/ContextActions POST string id, int operationType, int userType, string idText PurchaseOrderDetails Redirect
/PaymentOrder/Create GET string Id PurchaseOrderCreate Redirect
/PaymentOrder/CreateAttachment GET string id, int? fileType PurchaseOrderCreate PartialView
/PaymentOrder/CreateAttachment POST string attachedFiles, string Description, string id, int? FileTypeId PurchaseOrderCreate JSON
/PaymentOrder/CreateJustificationAttachment GET string id, int? fileType PurchaseOrderCreate PartialView
/PaymentOrder/CreateJustificationAttachment POST string attachedFiles, string Description, string id, int? FileTypeId PurchaseOrderCreate JSON
/PaymentOrder/CreateManual GET — PurchaseRequestCreate View
/PaymentOrder/CreateManual POST PaymentOrderVM model PurchaseRequestCreate View / Redirect
/PaymentOrder/Delete GET string id PurchaseOrderDelete PartialView / Redirect
/PaymentOrder/Delete POST PaymentOrder model PurchaseOrderDelete PartialView / JSON
/PaymentOrder/DeleteAttachment GET string id PurchaseOrderCreate Redirect
/PaymentOrder/DeleteFiles POST int id PurchaseOrderCreate JSON
/PaymentOrder/DeleteJustificationAttachment GET string id PurchaseOrderCreate Redirect
/PaymentOrder/DeleteMat GET int? id PurchaseOrderDeleteMat PartialView / Redirect
/PaymentOrder/DeleteMat POST GoodReceivedNoteMat model PurchaseOrderDeleteMat PartialView / JSON
/PaymentOrder/Details GET string id, string msg, int? pdf PurchaseOrderDetails View
/PaymentOrder/Edit GET string id PurchaseOrderEditMat PartialView / Redirect
/PaymentOrder/Edit POST PaymentOrder model PurchaseOrderEdit PartialView / JSON
/PaymentOrder/EditManual GET string id PurchaseOrderEditMat View / Redirect
/PaymentOrder/EditManual POST PaymentOrderVM model PurchaseOrderEdit View / Redirect
/PaymentOrder/EditMat GET int? id PurchaseOrderEditMat PartialView / Redirect
/PaymentOrder/EditMat POST PaymentOrderMat model PurchaseOrderEditMat PartialView / JSON
/PaymentOrder/GetData GET string id PurchaseOrderCreate JSON
/PaymentOrder GET int? filterYear, int? filterMonth, int? filterStatus, int? page PurchaseOrderIndex View
/PaymentOrder/UploadFiles POST int id, string desc PurchaseOrderCreate JSON

ProvidersController

The supplier registry and each supplier's quotation history.

Source: NKO.Main/NKO.Main/Controllers/ProvidersController.cs · route prefix: /Providers · 6 actions

Route Verb Parameters Permission Returns
/Providers/Details GET string id, string msg, int? pdf RFQIndex View
/Providers/EditMobile POST Provider provider RFQIndex Redirect
/Providers/ImportProviders GET — RFQIndex View
/Providers/ImportProviders POST IFormFile file RFQIndex View
/Providers GET int? type, int? page RFQIndex View
/Providers/Quotations GET string id, int? page RFQIndex View