Skip to content

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.

Authentication

  • User endpoints: Require a JWT in the Authorization header (Bearer token).

Features

  • Form management and record submission
  • Project and sector data retrieval
  • Worker management and operations
  • Production session and record management

Note: API access is available for Corporate accounts. For access or support, contact support@hydrobit.ag.

Download OpenAPI description
Overview
Languages
Servers
Mock server
https://docs.hydrobit.ag/_mock/spec/openapi/
Production server
https://api.hydrobit.ag/
IoT server
https://iot.hydrobit.ag/
MQTT over WebSocket endpoint
wss://iot.hydrobit.ag/

Forms

Endpoints for form management and record submission

Operations

Projects

Endpoints for project and sector data retrieval

Operations

Workers

Endpoints for worker management and operations

Operations

Production Sessions

Endpoints for managing production sessions (open, close, update)

Operations

Production Records

Endpoints for creating and managing production records

Operations

Create a production record

Request

Creates a new production record to add units to an open session.

Requires JWT token authentication in the Authorization header.

Key features:

  • Only the session owner can create records
  • Session must be open
  • Supports idempotency via clientEventId and optional idempotencyKey
  • Optimized for high-performance processing
Security
bearerAuth
Bodyapplication/jsonrequired
sessionIdstringrequired

Session identifier

Example: "6507f1e3c9d8e2a4b1f9c3d5"
workerIdstringrequired

Worker identifier

Example: "JS0315"
worker_namestringrequired

Worker full name

Example: "John Smith"
unitsnumber>= 0

Number of units to record (defaults to 1)

Example: 5
recordedAtUtcstring(date-time)required

Timestamp when the record was created (ISO 8601 UTC)

Example: "2025-10-19T14:30:00.000Z"
idempotencyKeystring

Idempotency key for deduplication

Example: "mobile-app-key-timestamp-123456"
clientEventIdstringrequired

Unique client-side event identifier for idempotency

Example: "evt_1234567890abcdef"
auth0Idstringrequired

User identifier (internal use, derived from JWT token)

Example: "user_123456789"
curl -i -X POST \
  https://docs.hydrobit.ag/_mock/spec/openapi/api/control/production/records \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "auth0Id": "user_123456789",
    "sessionId": "6507f1e3c9d8e2a4b1f9c3d5",
    "workerId": "JS0315",
    "worker_name": "John Smith",
    "recordedAtUtc": "2025-10-19T14:30:00.000Z",
    "clientEventId": "evt_1234567890abcdef"
  }'

Responses

Idempotent replay - record already exists

Headers
X-Idempotent-Replaystring

Set to "true" when returning idempotent response

Bodyapplication/json
statusstring
Example: "success"
dataobject
Response
application/json
{ "status": "success", "data": { "payloadPreview": { … }, "idempotent": true } }

Bulk create production records

Request

Creates multiple production records in a single request (offline sync).

Requires JWT token authentication in the Authorization header.

Each record is processed independently with full validation and idempotency. Returns multi-status response (207) with individual results.

Security
bearerAuth
Bodyapplication/jsonrequired
auth0Idstringrequired

User identifier (internal use, derived from JWT token)

Example: "user_123456789"
recordsArray of objects(ProductionRecord)required

Array of production records to create

records[].​sessionIdstringrequired

Session identifier

Example: "6507f1e3c9d8e2a4b1f9c3d5"
records[].​workerIdstringrequired

Worker identifier

Example: "JS0315"
records[].​worker_namestringrequired

Worker full name

Example: "John Smith"
records[].​unitsnumber>= 0

Number of units to record (defaults to 1)

Example: 5
records[].​recordedAtUtcstring(date-time)required

Timestamp when the record was created (ISO 8601 UTC)

Example: "2025-10-19T14:30:00.000Z"
records[].​idempotencyKeystring

Idempotency key for deduplication

Example: "mobile-app-key-timestamp-123456"
records[].​clientEventIdstringrequired

Unique client-side event identifier for idempotency

Example: "evt_1234567890abcdef"
curl -i -X POST \
  https://docs.hydrobit.ag/_mock/spec/openapi/api/control/production/records/bulk \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "auth0Id": "user_123456789",
    "records": [
      {
        "sessionId": "6507f1e3c9d8e2a4b1f9c3d5",
        "workerId": "JS0315",
        "worker_name": "John Smith",
        "units": 5,
        "recordedAtUtc": "2025-10-19T14:30:00.000Z",
        "clientEventId": "evt_1234567890abcdef"
      },
      {
        "sessionId": "6507f1e3c9d8e2a4b1f9c3d5",
        "workerId": "JS0315",
        "worker_name": "John Smith",
        "units": 3,
        "recordedAtUtc": "2025-10-19T15:00:00.000Z",
        "clientEventId": "evt_9876543210fedcba"
      }
    ]
  }'

Responses

Multi-status - records processed with individual results

Bodyapplication/json
statusstring
Example: "success"
resultsArray of objects
summaryobject
Response
application/json
{ "status": "success", "results": [ { … } ], "summary": { "ok": 2, "duplicated": 0, "failed": 0 } }

Check idempotency key

Request

Checks if an idempotency key has been used before.

Requires JWT token authentication in the Authorization header.

Returns 200 if key exists, 404 if not.

Security
bearerAuth
Query
keystringrequired

Idempotency key to check

Example: key=client:6507f1e3c9d8e2a4b1f9c3d5:JS0315:evt_1234567890abcdef
curl -i -X HEAD \
  'https://docs.hydrobit.ag/_mock/spec/openapi/api/control/production/records/check-idempotency?key=client%3A6507f1e3c9d8e2a4b1f9c3d5%3AJS0315%3Aevt_1234567890abcdef' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Idempotency key exists

Get a production record

Request

Retrieves detailed information about a specific production record.

Requires JWT token authentication in the Authorization header.

Security
bearerAuth
Path
recordIdstringrequired

Record identifier

Example: rec_1234567890abcdef
curl -i -X GET \
  https://docs.hydrobit.ag/_mock/spec/openapi/api/control/production/records/rec_1234567890abcdef \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Record retrieved successfully

Bodyapplication/json
statusstring
Example: "success"
dataobject
Response
application/json
{ "status": "success", "data": { "recordId": "rec_1234567890abcdef", "sessionId": "6507f1e3c9d8e2a4b1f9c3d5", "workerId": "JS0315", "units": 5, "state": "inserted" } }

Void a production record

Request

Voids (cancels) a production record by creating a counter-movement with negative units.

Requires JWT token authentication in the Authorization header.

Only the session owner can void records. Session must be open. Supports idempotency - voiding the same record multiple times is safe.

Security
bearerAuth
Path
recordIdstringrequired

Record identifier to void

Example: rec_1234567890abcdef
Bodyapplication/jsonrequired
auth0Idstringrequired

User identifier (internal use, derived from JWT token)

Example: "user_123456789"
reasonstringrequired

Reason for voiding the record

Example: "Duplicate entry"
curl -i -X POST \
  https://docs.hydrobit.ag/_mock/spec/openapi/api/control/production/records/rec_1234567890abcdef/void \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "auth0Id": "user_123456789",
    "reason": "Duplicate entry"
  }'

Responses

Record voided successfully

Bodyapplication/json
statusstring
Example: "success"
dataobject
Response
application/json
{ "status": "success", "data": { "payloadPreview": { … } } }

Phytosanitary

Endpoints for phytosanitary monitoring and analysis (pest/disease tracking)

Operations

Weather

Endpoints for weather and climate data retrieval

Operations

Plant

Endpoints for plant monitoring, growth, and health data

Operations

Irrigation

Endpoints for irrigation control, logs, and automation

Operations

IoT Endpoint

Endpoints for IoT devices, telemetry, and field data integration

Operations