Service Information
Basic Info
- Domain: [x] finance [ ] iam [ ] hr [ ] it [ ] Other: _______
- Service Name: CostProductMasterService, CostProductRequestService
- Entity Name: CostProductMaster, CostProductRequest
Service Definition
Entity Message
// Core entity for Cost Product Master
message CostProductMaster {
string id = 1;
string code = 2;
string name = 3;
bool is_active = 4;
string erp_link_id = 5;
// Additional specs, parameters, and audit fields...
}
// Core entity for Cost Product Request
message CostProductRequest {
string id = 1;
string request_type = 2;
string status = 3; // e.g., DRAFT, ASSIGNED, RESOLVED, REJECTED, CLOSED
string assignee_id = 4;
// Request details and routing links...
}
RPC Methods
CostProductMasterService
| Method |
Description |
CreateCostProductMaster |
Creates a new cost product master record |
GetCostProductMaster |
Retrieves details of a specific product master |
UpdateCostProductMaster |
Updates existing product master details (including ERP linkage) |
DeleteCostProductMaster |
Soft-deletes or deactivates a product master |
ListCostProductMasters |
Lists product masters with rich filtering capabilities |
DuplicateCostProductMaster |
Duplicates an existing product master record |
ListCostProductMastersByRequest |
Lists products associated with a specific request |
CreateRouteFromProduct |
Generates a routing link based on product master specifications |
CostProductRequestService
| Method |
Description |
CreateCostProductRequest |
Initiates a new product cost request |
GetCostProductRequest |
Retrieves request details |
UpdateCostProductRequest |
Updates a request (when in allowed states like DRAFT) |
DeleteCostProductRequest |
Deletes a draft request |
ListCostProductRequests |
Lists requests with filters |
AssignCostProductRequest |
Assigns the request to a specific user/worker |
ResolveCostProductRequest |
Marks the request as resolved |
RejectCostProductRequest |
Rejects the request |
SearchExistingProducts |
Searches for existing products during request creation to avoid duplicates |
ReopenCostProductRequest |
Moves a terminal CLOSED request back to DRAFT state |
DuplicateRoute |
Duplicates a route within the request lifecycle |
ListLinkedRequests |
Retrieves requests linked to specific routing data |
REST Endpoints
Cost Product Master
| Method |
Path |
Description |
| POST |
/api/v1/finance/cost-product-masters |
Create product master |
| GET |
/api/v1/finance/cost-product-masters/{id} |
Get product master |
| PUT |
/api/v1/finance/cost-product-masters/{id} |
Update product master |
| DELETE |
/api/v1/finance/cost-product-masters/{id} |
Delete/Deactivate product |
| GET |
/api/v1/finance/cost-product-masters |
List product masters |
| POST |
/api/v1/finance/cost-product-masters/{id}/duplicate |
Duplicate product |
| POST |
/api/v1/finance/cost-product-masters/{id}/routes |
Create route from product |
Cost Product Request
| Method |
Path |
Description |
| POST |
/api/v1/finance/cost-product-requests |
Create request |
| GET |
/api/v1/finance/cost-product-requests/{id} |
Get request details |
| PUT |
/api/v1/finance/cost-product-requests/{id} |
Update request |
| GET |
/api/v1/finance/cost-product-requests |
List requests |
| POST |
/api/v1/finance/cost-product-requests/{id}/assign |
Assign request |
| POST |
/api/v1/finance/cost-product-requests/{id}/resolve |
Resolve request |
| POST |
/api/v1/finance/cost-product-requests/{id}/reject |
Reject request |
| POST |
/api/v1/finance/cost-product-requests/{id}/reopen |
Reopen request (CLOSED -> DRAFT) |
Validation Requirements
| Field |
Validation |
| status |
Strict state machine validation (e.g., cannot reopen unless CLOSED) |
| erp_link_id |
Optional, but must match valid ERP master data format if provided |
| code |
Required, unique, standard prefix formatting |
Dependencies
Checklist
Service Information
Basic Info
Service Definition
Entity Message
RPC Methods
CostProductMasterService
CreateCostProductMasterGetCostProductMasterUpdateCostProductMasterDeleteCostProductMasterListCostProductMastersDuplicateCostProductMasterListCostProductMastersByRequestCreateRouteFromProductCostProductRequestService
CreateCostProductRequestGetCostProductRequestUpdateCostProductRequestDeleteCostProductRequestListCostProductRequestsAssignCostProductRequestResolveCostProductRequestRejectCostProductRequestSearchExistingProductsReopenCostProductRequestDuplicateRouteListLinkedRequestsREST Endpoints
Cost Product Master
/api/v1/finance/cost-product-masters/api/v1/finance/cost-product-masters/{id}/api/v1/finance/cost-product-masters/{id}/api/v1/finance/cost-product-masters/{id}/api/v1/finance/cost-product-masters/api/v1/finance/cost-product-masters/{id}/duplicate/api/v1/finance/cost-product-masters/{id}/routesCost Product Request
/api/v1/finance/cost-product-requests/api/v1/finance/cost-product-requests/{id}/api/v1/finance/cost-product-requests/{id}/api/v1/finance/cost-product-requests/api/v1/finance/cost-product-requests/{id}/assign/api/v1/finance/cost-product-requests/{id}/resolve/api/v1/finance/cost-product-requests/{id}/reject/api/v1/finance/cost-product-requests/{id}/reopenValidation Requirements
Dependencies
cost_erp.proto,cost_route.protoChecklist
product.protoandproduct_request.proto