Overview
The Resources API provides endpoints for updating equipment resources including sanitary facilities, treatment plants, and storage tanks. Resources can be tracked for availability, operational status, and project assignments.Update Resource
Update Resource Equipment
POST
Request Body
ID of the resource to update
Equipment/Service name
Equipment/Service code (unique)
Equipment subtype. Valid options:
SERVIC- ServiceLVMNOS- Handwashing stationBTSNHM- Men’s sanitary batteryBTSNMJ- Women’s sanitary batteryEST4UR- Quadruple urinal stationCMPRBN- Bathroom camperPTRTAP- Potable water treatment plantPTRTAR- Wastewater treatment plantTNQAAC- Raw water storage tankTNQAAR- Wastewater storage tank
Equipment operational status:
FUNCIONANDO- WorkingDAÑADO- DamagedINCOMPLETO- IncompleteEN REPARACION- Under repair
Equipment availability status:
DISPONIBLE- AvailableRENTADO- Rented
Current physical location of the equipment
ID of the project the equipment is currently assigned to
Date when equipment was assigned (format:
YYYY-MM-DD)Date when equipment will be released (format:
YYYY-MM-DD)Reason for repair (required when status is “EN REPARACION”)
Equipment Specifications
Equipment brand
Equipment model
Serial number
Purchase date (format:
YYYY-MM-DD)Height in centimeters
Width in centimeters
Depth in centimeters
Weight in kilograms
Capacity in gallons
Component Checklist (Boolean Fields)
These fields track whether specific components are present. When updating checklist fields without explicitly settingstst_status_equipment, the status will automatically update to FUNCIONANDO if all applicable checklist items are true, or INCOMPLETO if any are false.
Sanitary Equipment Components
Foot pedal pumps (for handwashing stations)
Soap dispenser
Paper dispenser
Napkin dispenser
Paper towels
Urinals (for men’s sanitary batteries)
Toilet seat
Toilet pump
Sink pump
Toilet lid/valve
Bathroom bases
Ventilation pipe
Treatment Plant Components
Has blower
Has belt
Has blower pulley
Has motor pulley
Has electrical panel
Has motor guard
Has engine relay
Has blower relay
Has motor
Has motor guard
Potable Water Plant Components
Has UV filter
Has filtration pump
Has dosing pump
Has pressure pump
Has hydropneumatic tank
Has sand and carbon filter
Treatment Plant Details
Motor phases:
1, 2, or 3Blower brand
Blower model
Motor brand
Motor model
Belt brand
Belt model
Belt type:
A or BElectrical panel brand
Engine relay brand
Blower relay brand
Filtration pump specification
Pressure pump specification
Dosing pump specification
UV filter specification
Sand and carbon filter specification
Hydropneumatic tank specification
Response
Indicates if the operation was successful
Success or error message
Resource ID
Equipment/Service name
Equipment/Service code
Equipment subtype code
Whether the resource is active
Current operational status
Creation timestamp
Last update timestamp
List of field names that were sent but do not exist on the model (informational)
ResourceItem Model
The ResourceItem model represents equipment and service resources with the following key characteristics:Equipment Types
Resources are categorized by type with specific field sets for each:- SERVIC - Generic service (minimal fields)
- LVMNOS - Handwashing stations with foot pumps and dispensers
- BTSNHM - Men’s sanitary batteries with urinals
- BTSNMJ - Women’s sanitary batteries
- EST4UR - Quadruple urinal stations
- CMPRBN - Bathroom campers
- PTRTAP - Potable water treatment plants with filtration systems
- PTRTAR - Wastewater treatment plants with aeration systems
- TNQAAC - Raw water storage tanks
- TNQAAR - Wastewater storage tanks
Status Values
Equipment Status (stst_status_equipment)
- FUNCIONANDO - Equipment is working properly
- DAÑADO - Equipment is damaged
- INCOMPLETO - Equipment is incomplete (missing components)
- EN REPARACION - Equipment is under repair
Availability Status (stst_status_disponibility)
- DISPONIBLE - Available for assignment
- RENTADO - Currently rented/assigned to a project
Availability Tracking
Resources track their assignment status with:stst_current_location- Physical locationstst_current_project_id- Project assignmentstst_commitment_date- When assignedstst_release_date- When available again
Automatic Status Updates
When updating checklist fields (fields starting withhave_):
- If all applicable checklist items are checked, status automatically becomes
FUNCIONANDO - If any checklist items are unchecked, status automatically becomes
INCOMPLETO - This behavior is skipped if you explicitly set
stst_status_equipmentin the request
Field Validation
- Date fields accept format:
YYYY-MM-DD - DateTime fields accept formats:
YYYY-MM-DD HH:MM:SS,YYYY-MM-DDTHH:MM:SS, orYYYY-MM-DD - Unknown fields are ignored and listed in
ignored_fieldsresponse - The
idfield is required for all update operations
Error Responses
Best Practices
-
Checklist Management: When updating equipment components, update all relevant
have_*fields together to ensure accurate status calculation. -
Status Override: If you need to manually set equipment status regardless of checklist state, explicitly include
stst_status_equipmentin your request. -
Date Formats: Always use
YYYY-MM-DDformat for dates to avoid validation errors. -
Field Validation: Check the
ignored_fieldsarray in responses to catch typos or invalid field names. - Type-Specific Fields: Only send fields relevant to the equipment type. Fields not applicable to a type are safely ignored.
-
Project Assignment: When assigning equipment to a project, update all availability fields together:
stst_status_disponibility= “RENTADO”stst_current_project_id= project IDstst_current_location= project locationstst_commitment_date= assignment datestst_release_date= expected return date