Overview
The Recursos API manages the catalog of production resources tracked within the PROD-SYS traceability system. Resources represent any material, supply, or consumable used in production processes (raw materials, chemicals, packaging materials, etc.). Resources are consumed during production and tracked via the Consumos API.Base URL
List All Resources
Response
Indicates if the request was successful
Array of resource objects
Response Example
Create Resource
MANAGE_PRODUCTION
Request Body
Unique internal code for the resource. Must be unique across all resources.
Human-readable resource name
Detailed description of the resource, including specifications or usage notes
Resource classification type. Common values:
Materia Prima- Raw materialsQuímico- Chemicals (inks, adhesives, solvents)Material de Empaque- Packaging materialsInsumo- General supplies
Unit of measurement for consumption tracking. Common values:
kg- Kilogramslitros- Litersunidades- Units/piecesmetros- Meters
Response
Returns the created resource object with the generatedid.
Indicates if the creation was successful
The created resource object including the auto-generated
idResponse Example
Data Model
Resource Schema
TheRECURSO table structure:
| Column | Type | Constraints | Description |
|---|---|---|---|
id | INTEGER | PRIMARY KEY, AUTOINCREMENT | Unique resource identifier |
codigo | TEXT | UNIQUE | Internal resource code |
nombre | TEXT | - | Resource name |
descripcion | TEXT | - | Detailed description |
tipo | TEXT | - | Resource type classification |
unidad_medida | TEXT | - | Unit of measurement |
Relationships
- Consumos: Resources are consumed in production through the
CONSUMOtable - One resource can have many consumption records
- See Consumos API for tracking resource usage
Usage Examples
Creating a New Raw Material
Creating a Chemical Resource
Listing All Resources
Error Handling
Common Error Responses
400 Bad Request
401 Unauthorized
403 Forbidden
MANAGE_PRODUCTION permission (POST endpoint only).
409 Conflict
codigo.
500 Internal Server Error
Best Practices
Resource Codes
- Use consistent naming conventions for
codigovalues - Include resource type prefix (e.g.,
PP-for polypropylene,TINTA-for inks) - Make codes human-readable and searchable
- Keep codes unique and meaningful
Resource Types
Standardizetipo values across your organization:
- Materia Prima: Raw polymers, resins, base materials
- Químico: Inks, adhesives, solvents, additives
- Material de Empaque: Packaging materials, labels, boxes
- Insumo: General supplies and consumables
Units of Measurement
Use consistent units within each resource category:- Solids/powders:
kg - Liquids:
litros - Discrete items:
unidades - Linear materials:
metros
Integration with Consumos
Resources must be created before they can be consumed. When recording production:- Create resources in the catalog (this API)
- Record consumption during production (Consumos API)
- Track consumption against specific work records (
registro_trabajo_id)
Related Endpoints
- Consumos API - Track resource consumption in production
- Registros de Trabajo - Work records where resources are consumed