Raw Materials
The Raw Materials API allows you to manage ingredients and raw materials used in product recipes. You can create, read, update, and delete raw materials, search by name, and retrieve them formatted for select dropdowns.Endpoints
POST /api/pos/materiaprima
Create a new raw material in the system.Unit of measurement (max 10 characters)
Raw material description (max 60 characters)
Cost per unit (must be numeric)
Available quantity (must be integer)
Priority level: ‘L’ (Low) or ‘F’ (Fast/High)
Response
Generated raw material code
Success message
cURL
Example response
Example response
GET /api/pos/materiaprima
Get all raw materials with pagination.Page number for pagination (default: 1)
Response
Current page number
Number of items per page
Total count of raw materials
Array of raw material objects
cURL
Example response
Example response
GET /api/pos/materiaprima/search
Search raw materials by description.Description to search for
Page number for pagination (default: 1)
Response
Current page number
Number of items per page
Total count of matching raw materials
Array of matching raw material objects
cURL
Example response
Example response
GET /api/pos/materiaprima/type
Get raw materials formatted for select dropdowns.Response
Array of simplified raw material objects for dropdowns
cURL
Example response
Example response
GET /api/pos/materiaprima/:id
Get a specific raw material by ID.Raw material code/ID
Response
Raw material object with all details
cURL
Example response
Example response
PUT /api/pos/materiaprima/:id
Update an existing raw material.Raw material code/ID to update
Unit of measurement (max 10 characters)
Raw material description (max 60 characters)
Cost per unit (must be numeric)
Available quantity (must be integer)
Priority level: ‘L’ (Low) or ‘F’ (Fast/High)
Response
Success message
cURL
Example response
Example response
DELETE /api/pos/materiaprima/:id
Delete a raw material by ID.Raw material code/ID to delete
Response
Returns 204 No Content on success.cURL