Endpoints for form management and record submission
Hydrobit API (2.0.0)
Comprehensive API documentation for the Hydrobit platform.
This API enables management of forms, records, workers, projects, and related data within Hydrobit.
Request
Opens a new production session for a specific project, sector, and day.
Requires JWT token authentication in the Authorization header.
Key features:
- Automatically resolves company context from authenticated user
- Resolves project timezone for day normalization
- Ensures uniqueness: only one open session per (company, project, day, sector)
- Supports custom pricing, bonuses, and duration settings
- Defaults are inherited from project configuration if not provided
User identifier (internal use, derived from JWT token)
Session opening timestamp in ISO 8601 UTC format (will be normalized to project timezone for day calculation)
- Mock serverhttps://docs.hydrobit.ag/_mock/spec/openapi/api/control/production/sessions
- Production serverhttps://api.hydrobit.ag/api/control/production/sessions
- IoT serverhttps://iot.hydrobit.ag/api/control/production/sessions
- MQTT over WebSocket endpointwss://iot.hydrobit.ag/api/control/production/sessions
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
- basicSession
- fullSession
curl -i -X POST \
https://docs.hydrobit.ag/_mock/spec/openapi/api/control/production/sessions \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"auth0Id": "user_123456789",
"projectId": "proj_123",
"openedAt": "2025-10-19T08:00:00.000Z",
"sectorId": "sector_001",
"sector_name": "Lote A-1"
}'{ "status": "success", "data": { "sessionId": "6507f1e3c9d8e2a4b1f9c3d5", "companyId": "comp_12345", "projectId": "proj_123", "auth0Id": "user_123456789", "sectorId": "sector_001", "sector_name": "Lote A-1", "timezone": "America/Mexico_City", "day": "2025-10-19T00:00:00.000Z", "status": "open", "openedAt": "2025-10-19T08:00:00.000Z", "closedAt": null, "maxDurationHours": 12, "samplingUnit": "box", "pricePerUnit": 5.5, "bonus": { … }, "totals": { … }, "notes": "Good weather conditions" } }
- Mock serverhttps://docs.hydrobit.ag/_mock/spec/openapi/api/control/production/sessions/{sessionId}
- Production serverhttps://api.hydrobit.ag/api/control/production/sessions/{sessionId}
- IoT serverhttps://iot.hydrobit.ag/api/control/production/sessions/{sessionId}
- MQTT over WebSocket endpointwss://iot.hydrobit.ag/api/control/production/sessions/{sessionId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://docs.hydrobit.ag/_mock/spec/openapi/api/control/production/sessions/6507f1e3c9d8e2a4b1f9c3d5 \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'{ "status": "success", "data": { "sessionId": "6507f1e3c9d8e2a4b1f9c3d5", "companyId": "comp_12345", "projectId": "proj_123", "auth0Id": "user_123456789", "sectorId": "sector_001", "sector_name": "Lote A-1", "timezone": "America/Mexico_City", "day": "2025-10-19T00:00:00.000Z", "status": "open", "openedAt": "2025-10-19T08:00:00.000Z", "closedAt": null, "maxDurationHours": 12, "samplingUnit": "box", "pricePerUnit": 5.5, "bonus": { … }, "totals": { … }, "notes": "Good weather conditions" } }
Request
Updates metadata of an open production session.
Requires JWT token authentication in the Authorization header.
Only the session owner can update. Session must be open.
Updatable fields: samplingUnit, pricePerUnit, bonus, notes
User identifier (internal use, derived from JWT token)
- Mock serverhttps://docs.hydrobit.ag/_mock/spec/openapi/api/control/production/sessions/{sessionId}
- Production serverhttps://api.hydrobit.ag/api/control/production/sessions/{sessionId}
- IoT serverhttps://iot.hydrobit.ag/api/control/production/sessions/{sessionId}
- MQTT over WebSocket endpointwss://iot.hydrobit.ag/api/control/production/sessions/{sessionId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PATCH \
https://docs.hydrobit.ag/_mock/spec/openapi/api/control/production/sessions/6507f1e3c9d8e2a4b1f9c3d5 \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"auth0Id": "user_123456789",
"samplingUnit": "kg",
"pricePerUnit": 6,
"bonus": {
"type": "percent",
"value": 10,
"note": "High quality bonus"
},
"notes": "Updated notes"
}'{ "status": "success", "data": { "updated": true } }
Request
Closes an open production session.
Requires JWT token authentication in the Authorization header.
Only the session owner can close it. Session must be open.
- Mock serverhttps://docs.hydrobit.ag/_mock/spec/openapi/api/control/production/sessions/{sessionId}/close
- Production serverhttps://api.hydrobit.ag/api/control/production/sessions/{sessionId}/close
- IoT serverhttps://iot.hydrobit.ag/api/control/production/sessions/{sessionId}/close
- MQTT over WebSocket endpointwss://iot.hydrobit.ag/api/control/production/sessions/{sessionId}/close
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://docs.hydrobit.ag/_mock/spec/openapi/api/control/production/sessions/6507f1e3c9d8e2a4b1f9c3d5/close \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"auth0Id": "user_123456789"
}'{ "status": "success", "data": { "sessionId": "6507f1e3c9d8e2a4b1f9c3d5", "status": "closed", "closedAt": "2025-10-19T18:00:00.000Z" } }
Request
Extends the maximum duration of an open production session.
Requires JWT token authentication in the Authorization header.
Only the session owner can extend it. Session must be open.
User identifier (internal use, derived from JWT token)
- Mock serverhttps://docs.hydrobit.ag/_mock/spec/openapi/api/control/production/sessions/{sessionId}/extend
- Production serverhttps://api.hydrobit.ag/api/control/production/sessions/{sessionId}/extend
- IoT serverhttps://iot.hydrobit.ag/api/control/production/sessions/{sessionId}/extend
- MQTT over WebSocket endpointwss://iot.hydrobit.ag/api/control/production/sessions/{sessionId}/extend
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://docs.hydrobit.ag/_mock/spec/openapi/api/control/production/sessions/6507f1e3c9d8e2a4b1f9c3d5/extend \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"auth0Id": "user_123456789",
"maxDurationHours": 18
}'{ "status": "success", "data": { "maxDurationHours": 18 } }