Skip to main content
GET
/
api
/
control
/
harvest
Get harvest production sessions with per-worker breakdown
curl --request GET \
  --url https://api.hydrobit.ag/api/control/harvest \
  --header 'Authorization: Bearer <token>'
{
  "status": "success",
  "data": [
    {
      "sessionId": "665f1a2b3c4d5e6f7a8b9c0d",
      "localId": "62159da9-9a81-4085-bcd1-fff452689abf",
      "projectId": "proj_123",
      "sectorId": "sector_001",
      "sector_name": "Lote A-1",
      "crop": "Blueberry",
      "variety": "Biloxi",
      "day": "2026-06-10T00:00:00.000Z",
      "openedAt": "2026-06-10T14:29:48.675Z",
      "closedAt": "2026-06-10T21:31:40.718Z",
      "createdAt": "2026-06-10T14:29:52.134Z",
      "status": "closed",
      "closedBy": "user",
      "closedReason": "manual",
      "timezone": "America/Mexico_City",
      "unit": "box",
      "maxDurationHours": 16,
      "harvestUnitId": "harvest_unit_123",
      "harvestLotCode": "HL-20260610-C299128B",
      "workerCount": 12,
      "notes": "Initial harvest notes",
      "finalNotes": "Closed manually after final count",
      "license_plate": "ABC-123",
      "driver_name": "Juan Perez",
      "totalUnits": 320,
      "needsRecalc": false,
      "qualityBreakdownAt": "2026-06-10T21:33:10.284Z",
      "responsible": {
        "auth0Id": "auth0|697797d7095fa22599ac90bb",
        "name": "Maria Lopez",
        "email": "maria@example.com",
        "role": "supervisor",
        "picture": "https://example.com/avatar.jpg"
      },
      "qualityBreakdown": [
        {
          "qualityId": "Q1",
          "qualityName": "Primera",
          "units": 240,
          "percent": 75
        }
      ],
      "workers": [
        {
          "workerId": "W1",
          "worker_name": "Juan Perez",
          "validUnits": 120,
          "netUnits": 110,
          "recordCount": 42,
          "voidedCount": 3,
          "qualityBreakdown": [
            {
              "qualityId": "Q1",
              "qualityName": "Primera",
              "validUnits": 90,
              "recordCount": 30
            }
          ]
        }
      ]
    }
  ],
  "meta": {
    "sessionCount": 1,
    "startTime": "2026-06-01",
    "endTime": "2026-06-15"
  }
}

Authorizations

Authorization
string
header
required

Scoped API token for external B2B endpoints. Send it in the Authorization header as Bearer <keyId>.<token>.

Query Parameters

startTime
string
required

Start date in YYYY-MM-DD format.

Pattern: ^\d{4}-\d{2}-\d{2}$
endTime
string
required

End date in YYYY-MM-DD format.

Pattern: ^\d{4}-\d{2}-\d{2}$
projectId
string

Optional project filter. Must belong to the token's company.

sectorId
string

Optional sector filter. Must belong to the token's company.

Response

Harvest sessions retrieved successfully.

status
enum<string>
Available options:
success
Example:

"success"

data
object[]
meta
object