Skip to main content
GET
/
api
/
control
/
phytosanitary
/
company-records
Get raw phytosanitary records for the authenticated company
curl --request GET \
  --url https://api.hydrobit.ag/api/control/phytosanitary/company-records \
  --header 'Authorization: Bearer <token>'
{
  "status": "success",
  "range": {
    "startTime": "2026-06-01",
    "endTime": "2026-06-15"
  },
  "companyTimezone": "America/Monterrey",
  "companyId": "comp_12345",
  "totalRecords": 3,
  "records": [
    {
      "record_id": "rec_abc123",
      "created_at": "2026-06-05T14:30:00.000Z",
      "record_time": "2026-06-05T14:25:00.000Z",
      "user_id": "user_789",
      "user_name": "Juan Perez",
      "projectId": "proj_123",
      "project_name": "Rancho San Pedro",
      "sectorId": "sector_001",
      "sector_name": "Lote A-1",
      "crop": "Blueberry",
      "variety": "Biloxi",
      "latitude": 19.4326,
      "longitude": -99.1332,
      "responses": [
        {
          "response_id": "resp_001",
          "variable_name": "aphids",
          "variable_type": "pest",
          "name": "Aphids",
          "value_number": 12,
          "severity": 3
        }
      ]
    }
  ]
}

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}$

Response

Company phytosanitary records retrieved successfully.

status
enum<string>
Available options:
success
Example:

"success"

range
object
companyTimezone
string
Example:

"America/Monterrey"

companyId
string
Example:

"comp_12345"

totalRecords
integer
Example:

3

records
object[]