API Reference
Integrate Hivekraft into your tools and workflows. Manage apiaries, hives, inspections, treatments, and IoT sensors programmatically.
21 modules · 123 endpoints · REST · JSON
Quick Start
Get up and running with the Hivekraft API in three steps.
1. Create your account
Sign up at hivekraft.com and set up your apiaries and hives in the dashboard.
2. Generate an API key
Go to Settings > API in the dashboard. Click "Generate API Key" and copy the key. It starts with hk_live_ and is shown only once.
3. Make your first request
Use the key in the Authorization header as a Bearer token. Try listing your apiaries:
# Replace YOUR_API_KEY with the token from /dashboard/settings/api-keys
curl https://hivekraft.com/api/apiaries \
-H "Authorization: Bearer YOUR_API_KEY"Authentication
Endpoints accept a browser session cookie or a Bearer API key. If both are sent, the session takes precedence. The two IoT push endpoints are the exception: they accept only a device key in the X-API-Key header.
Session cookie
The dashboard calls the API with the signed-in browser session (cookie authjs.session-token, __Secure-authjs.session-token over HTTPS). Scripts and integrations should use an API key instead.
Bearer Token
Include your API key in every request:
Authorization: Bearer YOUR_API_KEYAPI keys start with hk_live_ and are tied to your user account. All requests are scoped to your data.
Device key (IoT push)
POST /api/iot/push and /api/iot/push/batch take only the key of the registered device in X-API-Key. A missing or unknown key returns 403 FORBIDDEN, not 401.
Authentication failures
- 401:
UNAUTHORIZED(no session or key),INVALID_API_KEY,API_KEY_REVOKED,API_KEY_EXPIRED. - 403:
INSUFFICIENT_SCOPE(missing scope; export endpoints need their explicitexport:scope even for full-access keys),PLAN_REQUIRED,EMAIL_NOT_VERIFIED,ACCOUNT_PENDING_DELETION, and for sessionsTWO_FACTOR_REQUIRED. Which codes each endpoint can return is listed in its Errors section.
Rate Limits
API key requests are rate-limited to a default of 300 requests per minute. The effective limit depends on your plan and the endpoint (expensive AI endpoints have lower limits). On API key requests, read the X-RateLimit-Limit header for the value that applies; session requests do not carry these headers. A 429 sets Retry-After when the limit gives a wait time. Device routes send neither header.
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests per window for this request (default 300, lower for AI endpoints) |
X-RateLimit-Remaining | Remaining requests in current window |
X-RateLimit-Reset | Unix timestamp when the window resets |
Best Practices
- Never expose your API key in client-side code or public repositories.
- Use environment variables to store your key.
- Rotate your API key periodically in Settings > API.
- Implement exponential backoff when you receive 429 status codes.
AI-Powered Endpoints
Some endpoints generate content using AI (chat, photo analysis, design generation, voice transcription, label suggestions). These are marked with an inline disclaimer per EU AI Act Art. 50.
This chat uses AI (external AI provider, processing also outside the EU). Answers may be inaccurate. Learn more
Error Handling
The API uses standard HTTP status codes and returns errors in a consistent JSON format.
Error Response Format
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Validation error",
"details": {
"name": ["Invalid input: expected string, received undefined"]
}
}
}details maps each field to its messages. Nested fields use a dotted path (readings.0.deviceId). Issues that belong to no single field sit under the empty string key. A message is either a stable key (for example atLeastOneSensorField) or the schema's own text, so match on code, not on message wording.
Status Codes
| Code | Error Code | Description |
|---|---|---|
200 | - | Success |
201 | - | Created |
204 | - | No Content (successful DELETE) |
400 | VALIDATION_ERROR | Invalid request body or query parameters |
400 | BAD_REQUEST | Unsafe path parameter |
401 | UNAUTHORIZED, INVALID_API_KEY, API_KEY_REVOKED, API_KEY_EXPIRED | Missing, invalid, revoked or expired credentials |
403 | FORBIDDEN, INSUFFICIENT_SCOPE, PLAN_REQUIRED, TWO_FACTOR_REQUIRED, … | Authenticated but not allowed: scope, plan, second factor, account state or quota (see each endpoint's Errors) |
404 | NOT_FOUND | Resource not found |
409 | CONFLICT | Conflicting operation (e.g. duplicate) |
429 | RATE_LIMITED | Too many requests, retry after backoff |
500 | INTERNAL_ERROR | Unexpected server error |
Response Envelope
Successful responses wrap data in a data field:
// Success (200/201)
{ "data": { "id": "clx1...", "name": "Waldbienenstand" } }
// Error (4xx/5xx)
{ "error": { "code": "NOT_FOUND", "message": "Nicht gefunden" } }Colony stock
Server-filtered colony pages and complete colony/apiary counters.
/api/hives/collectionScope: read:hivesRead a filtered colony page
Owned non-deleted colonies. Number order pages in SQL; derived filters and other sorts evaluate the whole scope in blocks before cutting the page. Exact total before the cursor, without a stock cap. Existing triage and varroa rules apply. Invalid filters (including empty numeric bounds and unknown query keys), tampered cursors or cursors for another owner/filter return 400.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
apiaryIds | string | No | Up to 50 comma-separated apiary IDs (each 1-128 URL-safe characters) |
status | string | No | living (active + inactive), active, resting (inactive), ended (dead/sold/lost/merged), all; collection default living, summary default all |
q | string | No | Trimmed colony name (case insensitive substring) or exact colony number; max 200 characters |
queen | string | No | Four-digit birth year, older (before the latest three Berlin calendar years), none (no non-deleted queen and hasUntrackedQueen is false) |
varroaLevel | string | No | urgent | attention | ok; current, non-stale assessment only |
varroaMin | number | No | Current non-stale mites/day (other units do not match); strictly greater than the value; 0-10000 |
varroaMax | number | No | Current non-stale mites/day (other units do not match); strictly less than the value; 0-10000 |
strengthMin | number | No | Strength of the last confirmed inspection; strictly greater than the value; 0-10000 |
strengthMax | number | No | Strength of the last confirmed inspection; strictly less than the value; 0-10000 |
seen | string | No | 7 | 14 | 28: last confirmed inspection older than this many days; never: no confirmed inspection |
attention | string | No | critical | attention (critical or attention), from the W3 signal status |
sort | string | No | number (default, ascending), name (German lowercase then number), urgency (critical/attention/notRecorded/planned/none then number), seen (oldest first, never first, then number), varroa (daily count descending, unavailable last, then number). ID ascending breaks ties. |
limit | integer | No | Page size 1-100, default 50 |
cursor | string | No | Signed keyset (sort value and ID), bound to owner and filters; max 2048 characters; limit may change |
Response Body
Colony collection page
| Field | Type | Description |
|---|---|---|
items | array | Returned colony rows(required) |
items[].id | string | Hive ID(required) |
items[].number | integer | Colony number(required) |
items[].name | string | Display name(required, nullable) |
items[].hiveType | string | Hive type(required, dadant | zander | zadant | dn | langstroth | warree | top_bar | layens | national_uk | bienenkiste | einraumbeute | trogbeute | flow_hive | miniplus | other) |
items[].status | string | Colony status(required, active | inactive | dead | lost | sold | merged) |
items[].quarantineActive | boolean | The colony is under quarantine(required) |
items[].apiaryId | string | Apiary ID(required) |
items[].apiaryName | string | Apiary name(required) |
items[].queenInfo | object | The attached queen(required, nullable) |
items[].queenInfo.id | string | Queen ID(required) |
items[].queenInfo.birthYear | integer | Year of birth(required, nullable) |
items[].queenInfo.markingColor | string | Marking colour(required, nullable) |
items[].lastInspectionDate | string | Date of the latest confirmed inspection of the colony; a record with only a varroa measurement is no inspection (ISO 8601 date-time)(required, nullable) |
items[].lastColonyStrength | integer | Colony strength (1-10) from the latest confirmed record that carries one; can be older than lastInspectionDate(required, nullable) |
items[].lastColonyStrengthDate | string | Date of the record behind lastColonyStrength (ISO 8601 date-time)(required, nullable) |
items[].lastVarroaCount | number | Latest confirmed varroa value in the recorded lastVarroaUnit(required, nullable) |
items[].lastVarroaMethod | string | Method of the latest varroa value(required, nullable) |
items[].lastVarroaUnit | string | Recorded unit of the latest readable varroa measurement(required, nullable, mites_per_day | mites_per_10g_bees | percent_infestation) |
items[].lastVarroaDate | string | Date of the latest varroa value (ISO 8601 date-time)(required, nullable) |
items[].lastVarroaCountDays | integer | Counting days of the latest varroa value (natural drop); null for legacy rows(required, nullable) |
items[].lastVarroaUnreadable | number | Raw value of the latest varroa measurement when it cannot be read (a value without a unit, from older data); `lastVarroaCount` is then null and the triage reports it as unclear(required, nullable) |
items[].varroaTreatments | array | Non-voided treatments started or ended in the last 18 months plus running ones and multi-day ones without an end; they decide whether the latest varroa value was influenced by a treatment(required) |
items[].varroaTreatments[].treatmentType | string | Treatment type(required, varroa_oxalic_acid | varroa_formic_acid | varroa_thymol | varroa_amitraz | varroa_pyrethroid | varroa_coumaphos | varroa_lactic_acid | varroa_oxalic_broodless | varroa_other | drone_brood_removal | total_brood_removal | brood_break | brood_break_no_trap | partial_brood_removal | hyperthermia | other) |
items[].varroaTreatments[].startDate | string | Start (ISO 8601 date-time)(required) |
items[].varroaTreatments[].endDate | string | End; null when not entered (ISO 8601 date-time)(required, nullable) |
items[].varroaTreatments[].status | string | Treatment status(required, completed | active) |
items[].queenCellType | string | Queen cell type of the latest inspection(required, nullable, none | swarm | supersedure | emergency) |
items[].queenStatus | string | Status of the attached queen(required, nullable, active | replaced | dead | missing | swarmed | lost) |
items[].queenStatusObservedAt | string | When the attached queen's status was observed; null when no queen or observation is recorded (ISO 8601 date-time)(required, nullable) |
items[].treatmentOverdue | boolean | A varroa treatment is due(required) |
items[].hasUntrackedQueen | boolean | The colony has a queen that is not kept as a queen record(required) |
items[].lastTreatmentDate | string | End of the latest completed varroa treatment (ISO 8601 date-time)(required, nullable) |
items[].inspectionCadence | object | Days after which an inspection counts as overdue, per season(required) |
items[].inspectionCadence.spring | integer | Days in spring(required) |
items[].inspectionCadence.summer | integer | Days in summer(required) |
items[].inspectionCadence.autumn | integer | Days in autumn(required) |
items[].inspectionCadence.winter | integer | Days in winter(required) |
items[].colonyType | string | Colony class(required, production | nucleus | queen_rearing) |
items[].attention | object | Compatibility triage of the colony; use signalDisplay for status presentation(required) |
items[].attention.level | string | Deprecated: use signalDisplay. green = ok or inactive, yellow = attention, red = urgent, neutral = no automatic rating(required, green | yellow | red | neutral) |
items[].attention.reasons | array | At most one reason; empty when everything is fine(required) |
items[].attention.reasons[].key | string | Message key, resolved by the client against its message bundle(required) |
items[].attention.reasons[].params | object | Values for the placeholders of the message (strings or numbers) |
items[].signalDisplay | object | Server projection of the colony's signal and observation state(required) |
items[].signalDisplay.signal | object | The selected signal; null for a checked or inactive colony(required, nullable) |
items[].signalDisplay.signal.level | string | Signal level(required, critical | today | week | info) |
items[].signalDisplay.signal.cause | string | Signal cause(required, varroa_load | varroa_acute | varroa_recheck | queen_unknown | queen_missing_observed | swarm_risk | varroa_treatment_due | inspection_due | inspection_not_recorded | queen_age_review | colony_strength_low | varroa_measurement_unclear | swarm_departure_suspected | varroa_rising | treatment_window_open | harvest_ready | harvest_window | feed_low | feed_recheck | cold_snap | sensor_battery_low | sensor_stale | device_offline | bee_robbery_suspected | starvation_risk | brood_temperature_low | brood_temperature_high | hive_humidity_high | hive_humidity_low | seasonal_reminder | varroa_emergency | varroa_urgent | treatment_ineffective | winter_treatment | post_harvest | weather_suitable | drone_frame | treatment_ending | combination_tip | resistance_warning | bloom_forecast | quarantine_followup | monthly_report | afb_suspicion | efb_suspicion | aethina_suspicion | tropilaelaps_suspicion | export_ready | invitation_accepted | quarantine_nosema_suspected | quarantine_cbpv_suspected | quarantine_vet_order | quarantine_other | quarantine_reason_unknown | health_score_review | collapse_risk_review | hive_toppled_observed | weight_change_observed | task_due | brood_break_followup_due | post_treatment_check_due | brood_observation_followup | pest_observation_followup | frost_warning | heat_warning | heavy_rain | strong_wind | official_weather_warning | billing_subscription_ended | billing_payment_failed | billing_dispute | referral_reversal_review | admin_plan_granted | admin_bloom_report_deleted | webhook_dead_letter) |
items[].signalDisplay.signal.identity | string | Producer discriminator within the cause and subjects |
items[].signalDisplay.signal.subjects | array | Affected colonies or apiaries(required) |
items[].signalDisplay.signal.subjects[].kind | string | Subject kind(required, hive | apiary) |
items[].signalDisplay.signal.subjects[].id | string | Subject ID(required) |
items[].signalDisplay.signal.basis | object | Original observation; null when no observation is recorded(required, nullable) |
items[].signalDisplay.signal.basis.source | string | Source of the observation(required) |
items[].signalDisplay.signal.basis.observedAt | string | When the observation was made (ISO 8601 date-time)(required) |
items[].signalDisplay.signal.seasonWindow | object | Inclusive season window on the Berlin calendar |
items[].signalDisplay.signal.seasonWindow.from | string | First calendar day (YYYY-MM-DD)(required) |
items[].signalDisplay.signal.seasonWindow.to | string | Last calendar day (YYYY-MM-DD)(required) |
items[].signalDisplay.signal.due | string | Due calendar day in Berlin (YYYY-MM-DD) |
items[].signalDisplay.signal.action | object | Validated signal destination |
items[].signalDisplay.signal.action.routeId | string | Signal route ID(required) |
items[].signalDisplay.signal.action.params | object | Route parameters keyed by name, with string values |
items[].signalDisplay.needsReview | boolean | The observation needs review; a past check does not prove a current all-clear(required) |
items[].signalDisplay.state | string | Observation state(required, signal | checked | inactive) |
items[].signalDisplay.basis | object | Original observation; null when no observation is recorded(required, nullable) |
items[].signalDisplay.basis.source | string | Source of the observation(required) |
items[].signalDisplay.basis.observedAt | string | When the observation was made (ISO 8601 date-time)(required) |
items[].createdAt | string | Created (ISO 8601 date-time)(required) |
items[].updatedAt | string | Last updated (ISO 8601 date-time)(required) |
items[].varroaLevel | string | Current assessment; null when stale or ended(required, nullable, urgent | attention | ok | neutral) |
items[].signalStatus | string | W3 signal status; null without an open signal(required, nullable, critical | attention | notRecorded | planned) |
items[].varroaHistory | array | All readable confirmed measurements from now minus seven days through now, ascending by date and ID, only for the returned page(required) |
items[].varroaHistory[].id | string | Inspection ID(required) |
items[].varroaHistory[].date | string | Measurement date (ISO 8601 date-time)(required) |
items[].varroaHistory[].value | number | Canonical value; natural drop divided by counting days(required) |
items[].varroaHistory[].unit | string | Recorded unit; series must remain separate by unit and method(required, mites_per_day | mites_per_10g_bees | percent_infestation) |
items[].varroaHistory[].method | string | Canonical diagnostic method(required) |
items[].varroaHistory[].countDays | integer | Counting days(required, nullable) |
total | integer | Exact matching count before cursor(required) |
hasMore | boolean | Another page exists(required) |
nextCursor | string | Signed continuation or null(required, nullable) |
complete | boolean | True on final page (!hasMore)(required) |
truncated | boolean | Always false(required) |
Success
200 application/json, wrapped as { data }
Errors
18 possible errors
Example
curl -X GET "https://hivekraft.com/api/hives/collection?strengthMax=6&limit=50" \
-H "Authorization: Bearer YOUR_API_KEY"/api/hives/summaryScope: read:hivesRead complete colony counters
One uncapped evaluation of owned non-deleted colonies. Status counts include end states; all other counters use living colonies. Only apiaryIds, status and q apply; collection row facets, cursor and limit are not summary filters.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
apiaryIds | string | No | Up to 50 comma-separated apiary IDs (each 1-128 URL-safe characters) |
status | string | No | living (active + inactive), active, resting (inactive), ended (dead/sold/lost/merged), all; collection default living, summary default all |
q | string | No | Trimmed colony name (case insensitive substring) or exact colony number; max 200 characters |
Response Body
Colony summary
| Field | Type | Description |
|---|---|---|
living | integer | Living colonies(required) |
attention | integer | Living colonies with W3 critical or attention status(required) |
openSignals | integer | Living colonies with any open signal, including info; dashboard attentionHiveCount basis(required) |
varroaUrgent | integer | Living colonies with a current non-stale urgent varroa assessment(required) |
byStatus | object | Counts by stored status; absent statuses have no key(required) |
byApiary | array | Stands with living colonies, ordered by ID(required) |
byApiary[].apiaryId | string | Stand ID(required) |
byApiary[].apiaryName | string | Stand name(required) |
byApiary[].living | integer | Living colonies(required) |
byApiary[].attention | integer | Critical/attention colonies(required) |
byQueenYear | array | Birth year descending, null last(required) |
byQueenYear[].year | integer | Birth year, null without a recorded birth year(required, nullable) |
byQueenYear[].count | integer | Living colonies(required) |
complete | boolean | Always true(required) |
truncated | boolean | Always false(required) |
Success
200 application/json, wrapped as { data }
Errors
18 possible errors
Example
curl -X GET "https://hivekraft.com/api/hives/summary" \
-H "Authorization: Bearer YOUR_API_KEY"/api/apiaries/summaryScope: read:apiariesRead complete apiary counters
Every owned non-deleted stand, including empty stands, ordered by name then ID. Living and attention counts reuse the colony summary evaluation; the existing CRUD hiveCount still includes end states. No query parameters.
Response Body
Apiary summary
| Field | Type | Description |
|---|---|---|
apiaries | array | Every live owned stand(required) |
apiaries[].apiaryId | string | Stand ID(required) |
apiaries[].name | string | Stand name(required) |
apiaries[].living | integer | Living colonies(required) |
apiaries[].attention | integer | Critical/attention colonies(required) |
apiaries[].hasCoordinates | boolean | Both latitude and longitude are set, including zero(required) |
count | integer | Number of stands(required) |
withCoordinates | integer | Stands with both coordinates(required) |
complete | boolean | Always true(required) |
truncated | boolean | Always false(required) |
Success
200 application/json, wrapped as { data }
Errors
16 possible errors
Example
curl -X GET "https://hivekraft.com/api/apiaries/summary" \
-H "Authorization: Bearer YOUR_API_KEY"Apiaries
Manage your apiary locations (Standorte). Each apiary holds one or more hives.
/api/apiariesScope: read:apiariesList all apiaries
Returns every apiary belonging to the authenticated user.
Response Body
Always a bare array (no cursor or limit), sorted by name, at most 500 entries.
e.g. [{"id":"clx1...","name":"Waldbienenstand","address":"Waldweg 12, 80331 München","imageUrl":null,"latitude":48.137,"longitude":11.576,"elevation":520,"registrationNumber":"BY-123-456","notes":null,"type":"home","bloomPlants":["raps","linde"],"hiveLayout":null,"layoutBackground":null,"occupiedFrom":null,"occupiedUntil":null,"hiveCount":8,"createdAt":"2025-03-01T09:00:00.000Z","updatedAt":"2025-06-15T08:30:00.000Z"}]
| Field | Type | Description |
|---|---|---|
[].id | string | Apiary ID(required) |
[].name | string | Apiary name(required) |
[].address | string | Street address(required, nullable) |
[].imageUrl | string | Photo path(required, nullable) |
[].latitude | number | GPS latitude(required, nullable) |
[].longitude | number | GPS longitude(required, nullable) |
[].elevation | number | Height above sea level in metres. Looked up at Open-Meteo (open-meteo.com), which receives the latitude and longitude(required, nullable) |
[].registrationNumber | string | Official registration number(required, nullable) |
[].notes | string | Free-text notes(required, nullable) |
[].type | string | Site type(required, nullable, home | raps | akazie | linde | edelkastanie | tanne | other) |
[].bloomPlants | array | Forage sources (empty when none)(required) |
[].bloomPlants[] | string | Forage source(raps | akazie | linde | obstbluete | edelkastanie | tanne | loewenzahn | klee | phacelia | wildwiese | heide | sonnenblume | sommerlinde) |
[].hiveLayout | object | Site plan: map from hive ID to `{ x, y, photo?: { x, y }, appearance? }`. Coordinates are percentages; photo positions are independent. Without photo, the initial photo position is the plan position. Layout updates preserve the previous photo position (or freeze the original plan coordinates) and paint when omitted.(required, nullable) |
[].layoutBackground | string | Background of the site plan(required, nullable, photo | photo-only | plain) |
[].occupiedFrom | string | Migratory site: first day of occupation; null = permanent site (ISO 8601 date-time)(required, nullable) |
[].occupiedUntil | string | Migratory site: last day of occupation (ISO 8601 date-time)(required, nullable) |
[].hiveCount | integer | Active (not deleted) hives of the apiary(required) |
[].createdAt | string | Created (ISO 8601 date-time)(required) |
[].updatedAt | string | Last updated (ISO 8601 date-time)(required) |
Success
200 application/json, wrapped as { data }
Errors
16 possible errors
Example
curl -X GET "https://hivekraft.com/api/apiaries" \
-H "Authorization: Bearer YOUR_API_KEY"/api/apiariesScope: write:apiariesCreate an apiary
Creates a new apiary for the authenticated user.
Request Headers
| Name | Type | Required | Description |
|---|---|---|---|
Idempotency-Key | string | No | Optional retry key, 16-128 characters from A-Z a-z 0-9 _ -. A repeat with the same key and body returns the first result instead of creating a second record; an invalid key is rejected with 400.e.g. 3f2a9c1e-7b4d-4e8a-9c21-0d5b6a7e8f90 |
Request Body
Only `name` is required. Omitted optional fields stay empty (`bloomPlants` becomes `[]`). With `latitude` and `longitude` set, both values are sent to Open-Meteo (open-meteo.com) to look up `elevation` before the apiary is saved.
| Field | Type | Description |
|---|---|---|
name | string | Apiary name, 1-100 characters(required)e.g. Waldbienenstand |
initialHives | object | Optional colony creation in the same transaction as the apiary; no colonies are created when enabled is false. When enabled, an API key also needs `write:hives` (403 `INSUFFICIENT_SCOPE` otherwise), like POST /api/hives |
initialHives.enabled | boolean | Whether to create the requested colonies(required) |
initialHives.names | array | At most 200 names; at least one is required when enabled is true. One colony per entry, numbered consecutively.(required) |
initialHives.names[] | string | Optional colony name, trimmed, max 100 characters; an empty string leaves the name unset |
initialHives.hiveType | string | Hive type for all requested colonies(required, dadant | zander | zadant | dn | langstroth | warree | top_bar | layens | national_uk | bienenkiste | einraumbeute | trogbeute | flow_hive | miniplus | other) |
initialHives.firstNumber | integer | Number of the first colony; the others follow consecutively. Without it, numbering continues after the highest reserved colony number. Any taken number in the range (deleted colonies included) answers 409 `details.reason` `hiveNumberTaken`e.g. 60 |
address | string | Street address, max 500 characters(nullable)e.g. Waldweg 12, 80331 München |
imageUrl | string | Photo path from the apiary photo upload (`/api/photos/apiary-<id>.<ext>`), max 500 characters; an empty string or null removes it(nullable) |
layoutBackground | string | Background of the site plan; null = automatic (photo if present, else plain)(nullable, photo | photo-only | plain) |
latitude | number | GPS latitude (-90..90)(nullable)e.g. 48.137 |
longitude | number | GPS longitude (-180..180)(nullable)e.g. 11.576 |
registrationNumber | string | Official registration number, max 100 characters(nullable)e.g. BY-123-456 |
notes | string | Free-text notes (max 5000 chars)(nullable) |
type | string | Site type(nullable, home | raps | akazie | linde | edelkastanie | tanne | other) |
bloomPlants | array | Forage sources, each from the list and at most 13 entries(default []) |
bloomPlants[] | string | Forage source(raps | akazie | linde | obstbluete | edelkastanie | tanne | loewenzahn | klee | phacelia | wildwiese | heide | sonnenblume | sommerlinde) |
occupiedFrom | string | Migratory site: first calendar day of occupation (YYYY-MM-DD); null = permanent site(nullable)e.g. 2027-04-12 |
occupiedUntil | string | Migratory site: last calendar day of occupation (YYYY-MM-DD)(nullable)e.g. 2027-05-24 |
Response Body
The created apiary with the selected scalar fields (no `hiveCount`)
e.g. {"id":"clx1...","userId":"clxu...","name":"Waldbienenstand","address":"Waldweg 12, 80331 München","imageUrl":null,"latitude":48.137,"longitude":11.576,"elevation":520,"registrationNumber":"BY-123-456","notes":null,"type":"home","bloomPlants":["raps","linde"],"hiveLayout":null,"layoutBackground":null,"occupiedFrom":null,"occupiedUntil":null,"createdByMemberId":null,"deletedAt":null,"createdAt":"2025-03-01T09:00:00.000Z","updatedAt":"2025-03-01T09:00:00.000Z"}
| Field | Type | Description |
|---|---|---|
id | string | Apiary ID(required) |
userId | string | Owner ID(required) |
name | string | Apiary name(required) |
address | string | Street address(required, nullable) |
imageUrl | string | Photo path(required, nullable) |
latitude | number | GPS latitude(required, nullable) |
longitude | number | GPS longitude(required, nullable) |
elevation | number | Height above sea level in metres. Looked up at Open-Meteo (open-meteo.com), which receives the latitude and longitude(required, nullable) |
registrationNumber | string | Official registration number(required, nullable) |
notes | string | Free-text notes(required, nullable) |
type | string | Site type(required, nullable, home | raps | akazie | linde | edelkastanie | tanne | other) |
bloomPlants | array | Forage sources (empty when none)(required) |
bloomPlants[] | string | Forage source(raps | akazie | linde | obstbluete | edelkastanie | tanne | loewenzahn | klee | phacelia | wildwiese | heide | sonnenblume | sommerlinde) |
hiveLayout | object | Site plan: map from hive ID to `{ x, y, photo?: { x, y }, appearance? }`. Coordinates are percentages; photo positions are independent. Without photo, the initial photo position is the plan position. Layout updates preserve the previous photo position (or freeze the original plan coordinates) and paint when omitted.(required, nullable) |
layoutBackground | string | Background of the site plan(required, nullable, photo | photo-only | plain) |
occupiedFrom | string | Migratory site: first day of occupation; null = permanent site (ISO 8601 date-time)(required, nullable) |
occupiedUntil | string | Migratory site: last day of occupation (ISO 8601 date-time)(required, nullable) |
createdByMemberId | string | Team member who created the record; null = owner(required, nullable) |
deletedAt | string | Soft-delete marker; always null here (ISO 8601 date-time)(required, nullable) |
createdAt | string | Created (ISO 8601 date-time)(required) |
updatedAt | string | Last updated (ISO 8601 date-time)(required) |
Success
201 application/json, wrapped as { data }
Errors
24 possible errors
Example
curl -X POST "https://hivekraft.com/api/apiaries" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Waldbienenstand","address":"Waldweg 12, 80331 München","latitude":48.137,"longitude":11.576,"registrationNumber":"BY-123-456","type":"home","bloomPlants":["raps","linde"]}'/api/apiaries/[id]Scope: read:apiariesGet a single apiary
Returns full details for one apiary including hive count.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Apiary IDe.g. clx1... |
Response Body
An apiary with its hive count
e.g. {"id":"clx1...","name":"Waldbienenstand","address":"Waldweg 12, 80331 München","imageUrl":null,"latitude":48.137,"longitude":11.576,"elevation":520,"registrationNumber":"BY-123-456","notes":null,"type":"home","bloomPlants":["raps","linde"],"hiveLayout":null,"layoutBackground":null,"occupiedFrom":null,"occupiedUntil":null,"hiveCount":8,"createdAt":"2025-03-01T09:00:00.000Z","updatedAt":"2025-06-15T08:30:00.000Z"}
| Field | Type | Description |
|---|---|---|
id | string | Apiary ID(required) |
name | string | Apiary name(required) |
address | string | Street address(required, nullable) |
imageUrl | string | Photo path(required, nullable) |
latitude | number | GPS latitude(required, nullable) |
longitude | number | GPS longitude(required, nullable) |
elevation | number | Height above sea level in metres. Looked up at Open-Meteo (open-meteo.com), which receives the latitude and longitude(required, nullable) |
registrationNumber | string | Official registration number(required, nullable) |
notes | string | Free-text notes(required, nullable) |
type | string | Site type(required, nullable, home | raps | akazie | linde | edelkastanie | tanne | other) |
bloomPlants | array | Forage sources (empty when none)(required) |
bloomPlants[] | string | Forage source(raps | akazie | linde | obstbluete | edelkastanie | tanne | loewenzahn | klee | phacelia | wildwiese | heide | sonnenblume | sommerlinde) |
hiveLayout | object | Site plan: map from hive ID to `{ x, y, photo?: { x, y }, appearance? }`. Coordinates are percentages; photo positions are independent. Without photo, the initial photo position is the plan position. Layout updates preserve the previous photo position (or freeze the original plan coordinates) and paint when omitted.(required, nullable) |
layoutBackground | string | Background of the site plan(required, nullable, photo | photo-only | plain) |
occupiedFrom | string | Migratory site: first day of occupation; null = permanent site (ISO 8601 date-time)(required, nullable) |
occupiedUntil | string | Migratory site: last day of occupation (ISO 8601 date-time)(required, nullable) |
hiveCount | integer | Active (not deleted) hives of the apiary(required) |
createdAt | string | Created (ISO 8601 date-time)(required) |
updatedAt | string | Last updated (ISO 8601 date-time)(required) |
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/apiaries/clx1abc" \
-H "Authorization: Bearer YOUR_API_KEY"/api/apiaries/[id]Scope: write:apiariesUpdate an apiary
Partially updates an existing apiary. Only include the fields you want to change.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Apiary ID |
Request Body
Any subset of the editable apiary fields. The create-only `initialHives` field is ignored. An omitted field stays untouched; `null` clears a nullable field. `bloomPlants` is not reset by omission. Only when the request contains `latitude` or `longitude` and the effective pair (request value, else the saved one) lands in another 0.05° grid cell, that cell is sent to Open-Meteo (open-meteo.com) to refresh `elevation`; a request without coordinates, such as a name change, or within the same cell sends nothing and leaves `elevation` as it is.
| Field | Type | Description |
|---|---|---|
name | string | Apiary name, 1-100 characterse.g. Waldbienenstand |
address | string | Street address, max 500 characters(nullable)e.g. Waldweg 12, 80331 München |
imageUrl | string | Photo path from the apiary photo upload (`/api/photos/apiary-<id>.<ext>`), max 500 characters; an empty string or null removes it(nullable) |
layoutBackground | string | Background of the site plan; null = automatic (photo if present, else plain)(nullable, photo | photo-only | plain) |
latitude | number | GPS latitude (-90..90)(nullable)e.g. 48.137 |
longitude | number | GPS longitude (-180..180)(nullable)e.g. 11.576 |
registrationNumber | string | Official registration number, max 100 characters(nullable)e.g. BY-123-456 |
notes | string | Free-text notes (max 5000 chars)(nullable) |
type | string | Site type(nullable, home | raps | akazie | linde | edelkastanie | tanne | other) |
bloomPlants | array | Forage sources, each from the list and at most 13 entries |
bloomPlants[] | string | Forage source(raps | akazie | linde | obstbluete | edelkastanie | tanne | loewenzahn | klee | phacelia | wildwiese | heide | sonnenblume | sommerlinde) |
occupiedFrom | string | Migratory site: first calendar day of occupation (YYYY-MM-DD); null = permanent site(nullable)e.g. 2027-04-12 |
occupiedUntil | string | Migratory site: last calendar day of occupation (YYYY-MM-DD)(nullable)e.g. 2027-05-24 |
expectedUpdatedAt | string | Optional optimistic lock: reject stale versions with 409 CONFLICT (APIARY_CHANGED) (ISO 8601 date-time) |
Response Body
The updated apiary with the selected scalar fields (no `hiveCount`)
e.g. {"id":"clx1...","userId":"clxu...","name":"Neuer Name","address":"Waldweg 12, 80331 München","imageUrl":null,"latitude":48.137,"longitude":11.576,"elevation":520,"registrationNumber":"BY-123-456","notes":null,"type":"home","bloomPlants":["raps","linde"],"hiveLayout":null,"layoutBackground":null,"occupiedFrom":null,"occupiedUntil":null,"createdByMemberId":null,"deletedAt":null,"createdAt":"2025-03-01T09:00:00.000Z","updatedAt":"2025-06-15T08:30:00.000Z"}
| Field | Type | Description |
|---|---|---|
id | string | Apiary ID(required) |
userId | string | Owner ID(required) |
name | string | Apiary name(required) |
address | string | Street address(required, nullable) |
imageUrl | string | Photo path(required, nullable) |
latitude | number | GPS latitude(required, nullable) |
longitude | number | GPS longitude(required, nullable) |
elevation | number | Height above sea level in metres. Looked up at Open-Meteo (open-meteo.com), which receives the latitude and longitude(required, nullable) |
registrationNumber | string | Official registration number(required, nullable) |
notes | string | Free-text notes(required, nullable) |
type | string | Site type(required, nullable, home | raps | akazie | linde | edelkastanie | tanne | other) |
bloomPlants | array | Forage sources (empty when none)(required) |
bloomPlants[] | string | Forage source(raps | akazie | linde | obstbluete | edelkastanie | tanne | loewenzahn | klee | phacelia | wildwiese | heide | sonnenblume | sommerlinde) |
hiveLayout | object | Site plan: map from hive ID to `{ x, y, photo?: { x, y }, appearance? }`. Coordinates are percentages; photo positions are independent. Without photo, the initial photo position is the plan position. Layout updates preserve the previous photo position (or freeze the original plan coordinates) and paint when omitted.(required, nullable) |
layoutBackground | string | Background of the site plan(required, nullable, photo | photo-only | plain) |
occupiedFrom | string | Migratory site: first day of occupation; null = permanent site (ISO 8601 date-time)(required, nullable) |
occupiedUntil | string | Migratory site: last day of occupation (ISO 8601 date-time)(required, nullable) |
createdByMemberId | string | Team member who created the record; null = owner(required, nullable) |
deletedAt | string | Soft-delete marker; always null here (ISO 8601 date-time)(required, nullable) |
createdAt | string | Created (ISO 8601 date-time)(required) |
updatedAt | string | Last updated (ISO 8601 date-time)(required) |
Success
200 application/json, wrapped as { data }
Errors
19 possible errors
Example
curl -X PUT "https://hivekraft.com/api/apiaries/clx1abc" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Neuer Name"}'/api/apiaries/[id]Scope: write:apiariesDelete an apiary
Soft-deletes an apiary. It will no longer appear in listings. All hives must be removed or transferred first.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Apiary ID |
Success
204 No Content (empty body)
Errors
19 possible errors
Example
curl -X DELETE "https://hivekraft.com/api/apiaries/clx1abc" \
-H "Authorization: Bearer YOUR_API_KEY"/api/apiaries/[id]/statisticsScope: read:apiariesGet apiary statistics
Returns aggregated statistics for a single apiary including hive counts, honey totals, inspection count, and average colony strength. `totalHoneyKg` sums all harvests of the apiary (lifetime); `avgHoneyPerHive` divides it by the colonies that contributed to a harvest with a weight (harvested colonies, not active ones) and is 0 when that number cannot be determined.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Apiary IDe.g. clx1... |
Response Body
Statistics of one apiary. Only confirmed inspections that are not dated in the future count.
e.g. {"apiaryId":"clx1...","apiaryName":"Waldbienenstand","hiveCount":8,"activeHiveCount":7,"totalHoneyKg":145.5,"avgHoneyPerHive":24.3,"inspectionCount":42,"lastInspectionDate":"2025-06-15T08:30:00.000Z","treatmentCount":6,"avgColonyStrength":7.5}
| Field | Type | Description |
|---|---|---|
apiaryId | string | Apiary ID(required) |
apiaryName | string | Apiary name(required) |
hiveCount | integer | Colonies of the apiary (all statuses, not deleted)(required) |
activeHiveCount | integer | Colonies with status `active`(required) |
totalHoneyKg | number | Sum of all harvest net weights of the apiary in kg, rounded to two decimals(required) |
avgHoneyPerHive | number | Honey per harvested colony in kg; 0 when it cannot be determined(required) |
inspectionCount | integer | Confirmed inspections(required) |
lastInspectionDate | string | Date of the latest confirmed inspection; null without one (ISO 8601 date-time)(required, nullable) |
treatmentCount | integer | Current treatments (corrections replace their original)(required) |
avgColonyStrength | number | Mean of each colony's latest recorded strength (1-10); null when no strength was recorded(required, nullable) |
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/apiaries/clx1abc/statistics" \
-H "Authorization: Bearer YOUR_API_KEY"/api/apiaries/[id]/forecastScope: read:apiariesGet harvest forecast (Pro)
Returns a harvest forecast for the apiary based on historical data and weather conditions. Requires Pro plan or higher.
Recommendations are based on statistical models and threshold rules (not generative AI). Please verify before applying. Learn more
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Apiary IDe.g. clx1... |
Response Body
Forecast of one apiary. With coordinates the 0.05° grid cell of `latitude` and `longitude` is sent to Bright Sky (api.brightsky.dev) for the weather factor; without them nothing is sent. Without harvest history the estimate is 0, confidence `low` and `factors` holds `forecast.noHistoricalData`.
e.g. {"apiaryId":"clx1...","estimatedKg":85,"confidence":"medium","basedOnYears":3,"trend":"up","factors":["forecast.yearsData:3","forecast.trendUp","forecast.weatherGood"]}
| Field | Type | Description |
|---|---|---|
apiaryId | string | Apiary ID(required) |
estimatedKg | number | Expected harvest in kg for the current UTC year, rounded to one decimal; after the bee-year autumn boundary, the recorded yearly total without extrapolation or weather adjustment(required) |
confidence | string | Data basis: `low` under 3 harvest years, `medium` 3-5, `high` above; `low` as an unused placeholder when the season is completed(required, low | medium | high) |
basedOnYears | integer | Number of years with harvests the estimate is based on(required) |
trend | string | Direction of the yearly totals (`stable` below 2 years or within 5 % of the mean); null after season end, when estimatedKg is the recorded result(required, nullable, up | down | stable) |
factors | array | Translation keys that explain the forecast (data basis, trend, weather), not prose(required) |
factors[] | string | Translation key, a `:<number>` suffix carries a value (for example `forecast.yearsData:3`) |
Success
200 application/json, wrapped as { data }
Errors
18 possible errors
Example
curl -X GET "https://hivekraft.com/api/apiaries/clx1abc/forecast" \
-H "Authorization: Bearer YOUR_API_KEY"Hives
Manage bee colonies (Völker). Each hive belongs to one apiary and may have a queen assigned.
/api/hivesScope: read:hivesList all hives
Returns all hives for the user. Supports filtering by apiary and status, plus cursor-based pagination. Without any pagination param the response is a bare array. As soon as you send `cursor` and/or `limit`, the response becomes a pagination object `{ items, nextCursor, hasMore }`.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
apiaryId | string | No | Filter by apiary |
status | string | No | Filter by status (active, inactive, dead, lost, sold, merged); an unknown value matches nothing |
search | string | No | Free-text search over the colony name and notes, and the colony number (exact match) |
cursor | string | No | Pagination cursor — an opaque value: pass the `nextCursor` from the previous page unchanged to fetch the next batch; do not build it yourself. An unknown or unreadable cursor returns 400 (reload the list from the first page). |
limit | number | No | Items per page (1-100, default 20). Sending this enables the paginated object response shape. A value outside 1-100 is ignored and the bare array is returned. |
Response Body
Without cursor and limit: a bare array of hives (more entries beyond the server cap are signalled by the headers `X-List-Has-More: true` and `X-List-Next-Cursor`, pass that value as `cursor`). With `cursor` and/or `limit`: a page object `{ items, nextCursor, hasMore }`. The example shows the page object.
e.g. {"items":[{"id":"clx2...","number":1,"name":"Bienchen","hiveType":"dadant","status":"active","quarantineActive":false,"apiaryId":"clx1...","apiaryName":"Waldbienenstand","queenInfo":{"id":"clx3...","birthYear":2025,"markingColor":"blau"},"lastInspectionDate":"2025-06-15T08:30:00.000Z","lastColonyStrength":8,"lastColonyStrengthDate":"2025-06-15T08:30:00.000Z","lastVarroaCount":3,"lastVarroaMethod":"sugar_shake","lastVarroaUnit":"mites_per_10g_bees","lastVarroaDate":"2025-06-15T08:30:00.000Z","lastVarroaCountDays":null,"lastVarroaUnreadable":null,"varroaTreatments":[],"queenCellType":"none","queenStatus":"active","queenStatusObservedAt":"2025-06-15T08:30:00.000Z","treatmentOverdue":false,"hasUntrackedQueen":false,"lastTreatmentDate":null,"inspectionCadence":{"spring":14,"summer":21,"autumn":14,"winter":42},"colonyType":"production","attention":{"level":"green","reasons":[]},"signalDisplay":{"signal":null,"needsReview":true,"state":"checked","basis":{"source":"inspection:clx4...","observedAt":"2025-06-15T08:30:00.000Z"}},"createdAt":"2025-03-01T09:00:00.000Z","updatedAt":"2025-06-15T08:30:00.000Z"}],"nextCursor":"k1_WzEsImNseDIuLi4iXQ","hasMore":true}
| Field | Type | Description |
|---|---|---|
items | array | The hives on this page(required) |
items[].id | string | Hive ID(required) |
items[].number | integer | Colony number(required) |
items[].name | string | Display name(required, nullable) |
items[].hiveType | string | Hive type(required, dadant | zander | zadant | dn | langstroth | warree | top_bar | layens | national_uk | bienenkiste | einraumbeute | trogbeute | flow_hive | miniplus | other) |
items[].status | string | Colony status(required, active | inactive | dead | lost | sold | merged) |
items[].quarantineActive | boolean | The colony is under quarantine(required) |
items[].apiaryId | string | Apiary ID(required) |
items[].apiaryName | string | Apiary name(required) |
items[].queenInfo | object | The attached queen(required, nullable) |
items[].queenInfo.id | string | Queen ID(required) |
items[].queenInfo.birthYear | integer | Year of birth(required, nullable) |
items[].queenInfo.markingColor | string | Marking colour(required, nullable) |
items[].lastInspectionDate | string | Date of the latest confirmed inspection of the colony; a record with only a varroa measurement is no inspection (ISO 8601 date-time)(required, nullable) |
items[].lastColonyStrength | integer | Colony strength (1-10) from the latest confirmed record that carries one; can be older than lastInspectionDate(required, nullable) |
items[].lastColonyStrengthDate | string | Date of the record behind lastColonyStrength (ISO 8601 date-time)(required, nullable) |
items[].lastVarroaCount | number | Latest confirmed varroa value in the recorded lastVarroaUnit(required, nullable) |
items[].lastVarroaMethod | string | Method of the latest varroa value(required, nullable) |
items[].lastVarroaUnit | string | Recorded unit of the latest readable varroa measurement(required, nullable, mites_per_day | mites_per_10g_bees | percent_infestation) |
items[].lastVarroaDate | string | Date of the latest varroa value (ISO 8601 date-time)(required, nullable) |
items[].lastVarroaCountDays | integer | Counting days of the latest varroa value (natural drop); null for legacy rows(required, nullable) |
items[].lastVarroaUnreadable | number | Raw value of the latest varroa measurement when it cannot be read (a value without a unit, from older data); `lastVarroaCount` is then null and the triage reports it as unclear(required, nullable) |
items[].varroaTreatments | array | Non-voided treatments started or ended in the last 18 months plus running ones and multi-day ones without an end; they decide whether the latest varroa value was influenced by a treatment(required) |
items[].varroaTreatments[].treatmentType | string | Treatment type(required, varroa_oxalic_acid | varroa_formic_acid | varroa_thymol | varroa_amitraz | varroa_pyrethroid | varroa_coumaphos | varroa_lactic_acid | varroa_oxalic_broodless | varroa_other | drone_brood_removal | total_brood_removal | brood_break | brood_break_no_trap | partial_brood_removal | hyperthermia | other) |
items[].varroaTreatments[].startDate | string | Start (ISO 8601 date-time)(required) |
items[].varroaTreatments[].endDate | string | End; null when not entered (ISO 8601 date-time)(required, nullable) |
items[].varroaTreatments[].status | string | Treatment status(required, completed | active) |
items[].queenCellType | string | Queen cell type of the latest inspection(required, nullable, none | swarm | supersedure | emergency) |
items[].queenStatus | string | Status of the attached queen(required, nullable, active | replaced | dead | missing | swarmed | lost) |
items[].queenStatusObservedAt | string | When the attached queen's status was observed; null when no queen or observation is recorded (ISO 8601 date-time)(required, nullable) |
items[].treatmentOverdue | boolean | A varroa treatment is due(required) |
items[].hasUntrackedQueen | boolean | The colony has a queen that is not kept as a queen record(required) |
items[].lastTreatmentDate | string | End of the latest completed varroa treatment (ISO 8601 date-time)(required, nullable) |
items[].inspectionCadence | object | Days after which an inspection counts as overdue, per season(required) |
items[].inspectionCadence.spring | integer | Days in spring(required) |
items[].inspectionCadence.summer | integer | Days in summer(required) |
items[].inspectionCadence.autumn | integer | Days in autumn(required) |
items[].inspectionCadence.winter | integer | Days in winter(required) |
items[].colonyType | string | Colony class(required, production | nucleus | queen_rearing) |
items[].attention | object | Compatibility triage of the colony; use signalDisplay for status presentation(required) |
items[].attention.level | string | Deprecated: use signalDisplay. green = ok or inactive, yellow = attention, red = urgent, neutral = no automatic rating(required, green | yellow | red | neutral) |
items[].attention.reasons | array | At most one reason; empty when everything is fine(required) |
items[].attention.reasons[].key | string | Message key, resolved by the client against its message bundle(required) |
items[].attention.reasons[].params | object | Values for the placeholders of the message (strings or numbers) |
items[].signalDisplay | object | Server projection of the colony's signal and observation state(required) |
items[].signalDisplay.signal | object | The selected signal; null for a checked or inactive colony(required, nullable) |
items[].signalDisplay.signal.level | string | Signal level(required, critical | today | week | info) |
items[].signalDisplay.signal.cause | string | Signal cause(required, varroa_load | varroa_acute | varroa_recheck | queen_unknown | queen_missing_observed | swarm_risk | varroa_treatment_due | inspection_due | inspection_not_recorded | queen_age_review | colony_strength_low | varroa_measurement_unclear | swarm_departure_suspected | varroa_rising | treatment_window_open | harvest_ready | harvest_window | feed_low | feed_recheck | cold_snap | sensor_battery_low | sensor_stale | device_offline | bee_robbery_suspected | starvation_risk | brood_temperature_low | brood_temperature_high | hive_humidity_high | hive_humidity_low | seasonal_reminder | varroa_emergency | varroa_urgent | treatment_ineffective | winter_treatment | post_harvest | weather_suitable | drone_frame | treatment_ending | combination_tip | resistance_warning | bloom_forecast | quarantine_followup | monthly_report | afb_suspicion | efb_suspicion | aethina_suspicion | tropilaelaps_suspicion | export_ready | invitation_accepted | quarantine_nosema_suspected | quarantine_cbpv_suspected | quarantine_vet_order | quarantine_other | quarantine_reason_unknown | health_score_review | collapse_risk_review | hive_toppled_observed | weight_change_observed | task_due | brood_break_followup_due | post_treatment_check_due | brood_observation_followup | pest_observation_followup | frost_warning | heat_warning | heavy_rain | strong_wind | official_weather_warning | billing_subscription_ended | billing_payment_failed | billing_dispute | referral_reversal_review | admin_plan_granted | admin_bloom_report_deleted | webhook_dead_letter) |
items[].signalDisplay.signal.identity | string | Producer discriminator within the cause and subjects |
items[].signalDisplay.signal.subjects | array | Affected colonies or apiaries(required) |
items[].signalDisplay.signal.subjects[].kind | string | Subject kind(required, hive | apiary) |
items[].signalDisplay.signal.subjects[].id | string | Subject ID(required) |
items[].signalDisplay.signal.basis | object | Original observation; null when no observation is recorded(required, nullable) |
items[].signalDisplay.signal.basis.source | string | Source of the observation(required) |
items[].signalDisplay.signal.basis.observedAt | string | When the observation was made (ISO 8601 date-time)(required) |
items[].signalDisplay.signal.seasonWindow | object | Inclusive season window on the Berlin calendar |
items[].signalDisplay.signal.seasonWindow.from | string | First calendar day (YYYY-MM-DD)(required) |
items[].signalDisplay.signal.seasonWindow.to | string | Last calendar day (YYYY-MM-DD)(required) |
items[].signalDisplay.signal.due | string | Due calendar day in Berlin (YYYY-MM-DD) |
items[].signalDisplay.signal.action | object | Validated signal destination |
items[].signalDisplay.signal.action.routeId | string | Signal route ID(required) |
items[].signalDisplay.signal.action.params | object | Route parameters keyed by name, with string values |
items[].signalDisplay.needsReview | boolean | The observation needs review; a past check does not prove a current all-clear(required) |
items[].signalDisplay.state | string | Observation state(required, signal | checked | inactive) |
items[].signalDisplay.basis | object | Original observation; null when no observation is recorded(required, nullable) |
items[].signalDisplay.basis.source | string | Source of the observation(required) |
items[].signalDisplay.basis.observedAt | string | When the observation was made (ISO 8601 date-time)(required) |
items[].createdAt | string | Created (ISO 8601 date-time)(required) |
items[].updatedAt | string | Last updated (ISO 8601 date-time)(required) |
nextCursor | string | Cursor for the next page, or null when there are no more results(required, nullable) |
hasMore | boolean | True when a further page is available(required) |
[].id | string | Hive ID(required) |
[].number | integer | Colony number(required) |
[].name | string | Display name(required, nullable) |
[].hiveType | string | Hive type(required, dadant | zander | zadant | dn | langstroth | warree | top_bar | layens | national_uk | bienenkiste | einraumbeute | trogbeute | flow_hive | miniplus | other) |
[].status | string | Colony status(required, active | inactive | dead | lost | sold | merged) |
[].quarantineActive | boolean | The colony is under quarantine(required) |
[].apiaryId | string | Apiary ID(required) |
[].apiaryName | string | Apiary name(required) |
[].queenInfo | object | The attached queen(required, nullable) |
[].queenInfo.id | string | Queen ID(required) |
[].queenInfo.birthYear | integer | Year of birth(required, nullable) |
[].queenInfo.markingColor | string | Marking colour(required, nullable) |
[].lastInspectionDate | string | Date of the latest confirmed inspection of the colony; a record with only a varroa measurement is no inspection (ISO 8601 date-time)(required, nullable) |
[].lastColonyStrength | integer | Colony strength (1-10) from the latest confirmed record that carries one; can be older than lastInspectionDate(required, nullable) |
[].lastColonyStrengthDate | string | Date of the record behind lastColonyStrength (ISO 8601 date-time)(required, nullable) |
[].lastVarroaCount | number | Latest confirmed varroa value in the recorded lastVarroaUnit(required, nullable) |
[].lastVarroaMethod | string | Method of the latest varroa value(required, nullable) |
[].lastVarroaUnit | string | Recorded unit of the latest readable varroa measurement(required, nullable, mites_per_day | mites_per_10g_bees | percent_infestation) |
[].lastVarroaDate | string | Date of the latest varroa value (ISO 8601 date-time)(required, nullable) |
[].lastVarroaCountDays | integer | Counting days of the latest varroa value (natural drop); null for legacy rows(required, nullable) |
[].lastVarroaUnreadable | number | Raw value of the latest varroa measurement when it cannot be read (a value without a unit, from older data); `lastVarroaCount` is then null and the triage reports it as unclear(required, nullable) |
[].varroaTreatments | array | Non-voided treatments started or ended in the last 18 months plus running ones and multi-day ones without an end; they decide whether the latest varroa value was influenced by a treatment(required) |
[].varroaTreatments[].treatmentType | string | Treatment type(required, varroa_oxalic_acid | varroa_formic_acid | varroa_thymol | varroa_amitraz | varroa_pyrethroid | varroa_coumaphos | varroa_lactic_acid | varroa_oxalic_broodless | varroa_other | drone_brood_removal | total_brood_removal | brood_break | brood_break_no_trap | partial_brood_removal | hyperthermia | other) |
[].varroaTreatments[].startDate | string | Start (ISO 8601 date-time)(required) |
[].varroaTreatments[].endDate | string | End; null when not entered (ISO 8601 date-time)(required, nullable) |
[].varroaTreatments[].status | string | Treatment status(required, completed | active) |
[].queenCellType | string | Queen cell type of the latest inspection(required, nullable, none | swarm | supersedure | emergency) |
[].queenStatus | string | Status of the attached queen(required, nullable, active | replaced | dead | missing | swarmed | lost) |
[].queenStatusObservedAt | string | When the attached queen's status was observed; null when no queen or observation is recorded (ISO 8601 date-time)(required, nullable) |
[].treatmentOverdue | boolean | A varroa treatment is due(required) |
[].hasUntrackedQueen | boolean | The colony has a queen that is not kept as a queen record(required) |
[].lastTreatmentDate | string | End of the latest completed varroa treatment (ISO 8601 date-time)(required, nullable) |
[].inspectionCadence | object | Days after which an inspection counts as overdue, per season(required) |
[].inspectionCadence.spring | integer | Days in spring(required) |
[].inspectionCadence.summer | integer | Days in summer(required) |
[].inspectionCadence.autumn | integer | Days in autumn(required) |
[].inspectionCadence.winter | integer | Days in winter(required) |
[].colonyType | string | Colony class(required, production | nucleus | queen_rearing) |
[].attention | object | Compatibility triage of the colony; use signalDisplay for status presentation(required) |
[].attention.level | string | Deprecated: use signalDisplay. green = ok or inactive, yellow = attention, red = urgent, neutral = no automatic rating(required, green | yellow | red | neutral) |
[].attention.reasons | array | At most one reason; empty when everything is fine(required) |
[].attention.reasons[].key | string | Message key, resolved by the client against its message bundle(required) |
[].attention.reasons[].params | object | Values for the placeholders of the message (strings or numbers) |
[].signalDisplay | object | Server projection of the colony's signal and observation state(required) |
[].signalDisplay.signal | object | The selected signal; null for a checked or inactive colony(required, nullable) |
[].signalDisplay.signal.level | string | Signal level(required, critical | today | week | info) |
[].signalDisplay.signal.cause | string | Signal cause(required, varroa_load | varroa_acute | varroa_recheck | queen_unknown | queen_missing_observed | swarm_risk | varroa_treatment_due | inspection_due | inspection_not_recorded | queen_age_review | colony_strength_low | varroa_measurement_unclear | swarm_departure_suspected | varroa_rising | treatment_window_open | harvest_ready | harvest_window | feed_low | feed_recheck | cold_snap | sensor_battery_low | sensor_stale | device_offline | bee_robbery_suspected | starvation_risk | brood_temperature_low | brood_temperature_high | hive_humidity_high | hive_humidity_low | seasonal_reminder | varroa_emergency | varroa_urgent | treatment_ineffective | winter_treatment | post_harvest | weather_suitable | drone_frame | treatment_ending | combination_tip | resistance_warning | bloom_forecast | quarantine_followup | monthly_report | afb_suspicion | efb_suspicion | aethina_suspicion | tropilaelaps_suspicion | export_ready | invitation_accepted | quarantine_nosema_suspected | quarantine_cbpv_suspected | quarantine_vet_order | quarantine_other | quarantine_reason_unknown | health_score_review | collapse_risk_review | hive_toppled_observed | weight_change_observed | task_due | brood_break_followup_due | post_treatment_check_due | brood_observation_followup | pest_observation_followup | frost_warning | heat_warning | heavy_rain | strong_wind | official_weather_warning | billing_subscription_ended | billing_payment_failed | billing_dispute | referral_reversal_review | admin_plan_granted | admin_bloom_report_deleted | webhook_dead_letter) |
[].signalDisplay.signal.identity | string | Producer discriminator within the cause and subjects |
[].signalDisplay.signal.subjects | array | Affected colonies or apiaries(required) |
[].signalDisplay.signal.subjects[].kind | string | Subject kind(required, hive | apiary) |
[].signalDisplay.signal.subjects[].id | string | Subject ID(required) |
[].signalDisplay.signal.basis | object | Original observation; null when no observation is recorded(required, nullable) |
[].signalDisplay.signal.basis.source | string | Source of the observation(required) |
[].signalDisplay.signal.basis.observedAt | string | When the observation was made (ISO 8601 date-time)(required) |
[].signalDisplay.signal.seasonWindow | object | Inclusive season window on the Berlin calendar |
[].signalDisplay.signal.seasonWindow.from | string | First calendar day (YYYY-MM-DD)(required) |
[].signalDisplay.signal.seasonWindow.to | string | Last calendar day (YYYY-MM-DD)(required) |
[].signalDisplay.signal.due | string | Due calendar day in Berlin (YYYY-MM-DD) |
[].signalDisplay.signal.action | object | Validated signal destination |
[].signalDisplay.signal.action.routeId | string | Signal route ID(required) |
[].signalDisplay.signal.action.params | object | Route parameters keyed by name, with string values |
[].signalDisplay.needsReview | boolean | The observation needs review; a past check does not prove a current all-clear(required) |
[].signalDisplay.state | string | Observation state(required, signal | checked | inactive) |
[].signalDisplay.basis | object | Original observation; null when no observation is recorded(required, nullable) |
[].signalDisplay.basis.source | string | Source of the observation(required) |
[].signalDisplay.basis.observedAt | string | When the observation was made (ISO 8601 date-time)(required) |
[].createdAt | string | Created (ISO 8601 date-time)(required) |
[].updatedAt | string | Last updated (ISO 8601 date-time)(required) |
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/hives?apiaryId=clx1abc&status=active" \
-H "Authorization: Bearer YOUR_API_KEY"/api/hivesScope: write:hivesCreate a hive
Creates a new hive (colony) in the specified apiary.
Request Body
apiaryId, number and hiveType are required.
| Field | Type | Description |
|---|---|---|
apiaryId | string | Apiary to place the hive in(required)e.g. clx1abc |
number | integer | Hive number, positive integer up to 2147483647, unique per account(required)e.g. 7 |
name | string | Optional display name, max 100 characters(nullable)e.g. Bienchen |
hiveType | string | dadant | zander | zadant | dn | langstroth | warree | top_bar | layens | national_uk | bienenkiste | einraumbeute | trogbeute | flow_hive | miniplus | other(required, dadant | zander | zadant | dn | langstroth | warree | top_bar | layens | national_uk | bienenkiste | einraumbeute | trogbeute | flow_hive | miniplus | other)e.g. dadant |
origin | string | purchase | swarm | split | gift | catch | other(nullable, purchase | swarm | split | gift | catch | other) |
notes | string | Free-text notes (max 5000 chars)(nullable) |
colonyType | string | Colony class that sets the varroa thresholds (production colony, nucleus, queen rearing)(default production, production | nucleus | queen_rearing) |
hasUntrackedQueen | boolean | The colony has a queen that is not kept as a queen record(default false) |
Response Body
The created colony as stored (all columns)
e.g. {"id":"clx2...","userId":"clxu...","apiaryId":"clx1abc","number":7,"name":"Bienchen","hiveType":"dadant","origin":null,"status":"active","deathCause":null,"deathDate":null,"deathNotes":null,"sourceHiveId":null,"notes":null,"deletedAt":null,"quarantineActive":false,"quarantineReason":null,"quarantineStartedAt":null,"quarantineExpectedEnd":null,"colonyType":"production","colonyTypeConfirmedAt":"2025-03-01T09:00:00.000Z","hasUntrackedQueen":false,"createdByMemberId":null,"createdAt":"2025-03-01T09:00:00.000Z","updatedAt":"2025-03-01T09:00:00.000Z"}
| Field | Type | Description |
|---|---|---|
id | string | Hive ID(required) |
userId | string | Owner ID(required, nullable) |
apiaryId | string | Apiary ID(required) |
number | integer | Hive number(required) |
name | string | Display name(required, nullable) |
hiveType | string | Hive type(required, dadant | zander | zadant | dn | langstroth | warree | top_bar | layens | national_uk | bienenkiste | einraumbeute | trogbeute | flow_hive | miniplus | other) |
origin | string | Origin of the colony(required, nullable, purchase | swarm | split | gift | catch | other) |
status | string | Colony status(required, active | inactive | dead | lost | sold | merged) |
deathCause | string | Cause of death(required, nullable, varroa | starvation | queen_loss | pesticide | disease | unknown | other) |
deathDate | string | Date of death (ISO 8601 date-time)(required, nullable) |
deathNotes | string | Notes about the death(required, nullable) |
sourceHiveId | string | Hive ID of the colony this one was split from(required, nullable) |
notes | string | Free-text notes(required, nullable) |
deletedAt | string | Soft-delete marker; always null here (ISO 8601 date-time)(required, nullable) |
quarantineActive | boolean | The colony is under quarantine(required) |
quarantineReason | string | Quarantine reason(required, nullable) |
quarantineStartedAt | string | Quarantine start (ISO 8601 date-time)(required, nullable) |
quarantineExpectedEnd | string | Expected quarantine end (ISO 8601 date-time)(required, nullable) |
colonyType | string | Colony class(required, production | nucleus | queen_rearing) |
colonyTypeConfirmedAt | string | When the colony class was confirmed; null if never (ISO 8601 date-time)(required, nullable) |
hasUntrackedQueen | boolean | The colony has a queen that is not kept as a queen record(required) |
createdByMemberId | string | Team member who created the record; null = owner(required, nullable) |
createdAt | string | Created (ISO 8601 date-time)(required) |
updatedAt | string | Last updated (ISO 8601 date-time)(required) |
Success
201 application/json, wrapped as { data }
Errors
21 possible errors
Example
curl -X POST "https://hivekraft.com/api/hives" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"apiaryId":"clx1abc","number":7,"hiveType":"dadant","name":"Bienchen"}'/api/hives/[id]Scope: read:hivesGet a single hive
Returns full details for one hive including queen and apiary info.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Hive ID |
Response Body
One colony with its queen, latest inspection, triage and quarantine state
e.g. {"id":"clx2...","number":7,"name":"Bienchen","hiveType":"dadant","origin":null,"status":"active","deathCause":null,"deathDate":null,"deathNotes":null,"sourceHiveId":null,"notes":null,"apiaryId":"clx1abc","apiaryName":"Waldbienenstand","apiaryImageUrl":null,"apiaryHiveLayout":null,"apiaryPlanHives":[{"id":"clx2...","number":7,"name":"Bienchen"}],"signalDisplay":{"signal":null,"needsReview":true,"state":"checked","basis":{"source":"inspection:clx4...","observedAt":"2025-06-15T08:30:00.000Z"}},"latestVarroa":null,"varroaTreatments":[],"queen":{"id":"clx3...","race":"carnica","birthYear":2025,"markingColor":"blau","matingStatus":"mated","status":"active","statusObservedAt":"2025-06-15T08:30:00.000Z"},"hasUntrackedQueen":false,"lastInspection":{"id":"clx4...","date":"2025-06-15T08:30:00.000Z","type":"standard","colonyStrength":8,"broodFrames":6,"openBroodFrames":null,"cappedBroodFrames":null,"broodPattern":"compact","pollenStores":"medium","honeyStores":"medium","temperament":"calm","queenSeen":true,"queenCellType":"none","afbCleared":null},"latestColonyStrength":{"value":8,"date":"2025-06-15T08:30:00.000Z","inspectionId":"clx4..."},"latestBroodFrames":{"value":6,"date":"2025-06-15T08:30:00.000Z","inspectionId":"clx4..."},"attention":{"level":"green","reasons":[]},"quarantineActive":false,"quarantineReason":null,"quarantineStartedAt":null,"quarantineExpectedEnd":null,"colonyType":"production","colonyTypeConfirmedAt":"2025-06-15T08:30:00.000Z","createdAt":"2025-03-01T09:00:00.000Z","updatedAt":"2025-06-15T08:30:00.000Z"}
| Field | Type | Description |
|---|---|---|
id | string | Hive ID(required) |
number | integer | Colony number(required) |
name | string | Display name(required, nullable) |
hiveType | string | Hive type(required, dadant | zander | zadant | dn | langstroth | warree | top_bar | layens | national_uk | bienenkiste | einraumbeute | trogbeute | flow_hive | miniplus | other) |
origin | string | Origin of the colony(required, nullable, purchase | swarm | split | gift | catch | other) |
status | string | Colony status(required, active | inactive | dead | lost | sold | merged) |
deathCause | string | Cause of death(required, nullable, varroa | starvation | queen_loss | pesticide | disease | unknown | other) |
deathDate | string | Date of death (ISO 8601 date-time)(required, nullable) |
deathNotes | string | Notes about the death(required, nullable) |
sourceHiveId | string | Hive ID of the colony this one was split from(required, nullable) |
notes | string | Free-text notes(required, nullable) |
apiaryId | string | Apiary ID(required) |
apiaryName | string | Apiary name(required) |
apiaryImageUrl | string | Photo path of the owned, live apiary(required, nullable) |
apiaryHiveLayout | object | Site plan: map from hive ID to `{ x, y, photo?: { x, y }, appearance? }`. Coordinates are percentages; photo positions are independent. Without photo, the initial photo position is the plan position. Layout updates preserve the previous photo position (or freeze the original plan coordinates) and paint when omitted.(required, nullable) |
apiaryPlanHives | array | Colonies of the apiary; empty when its plan is unavailable(required) |
apiaryPlanHives[].id | string | Hive ID(required) |
apiaryPlanHives[].number | integer | Colony number(required) |
apiaryPlanHives[].name | string | Display name(required, nullable) |
signalDisplay | object | Server projection of the colony's signal and observation state(required) |
signalDisplay.signal | object | The selected signal; null for a checked or inactive colony(required, nullable) |
signalDisplay.signal.level | string | Signal level(required, critical | today | week | info) |
signalDisplay.signal.cause | string | Signal cause(required, varroa_load | varroa_acute | varroa_recheck | queen_unknown | queen_missing_observed | swarm_risk | varroa_treatment_due | inspection_due | inspection_not_recorded | queen_age_review | colony_strength_low | varroa_measurement_unclear | swarm_departure_suspected | varroa_rising | treatment_window_open | harvest_ready | harvest_window | feed_low | feed_recheck | cold_snap | sensor_battery_low | sensor_stale | device_offline | bee_robbery_suspected | starvation_risk | brood_temperature_low | brood_temperature_high | hive_humidity_high | hive_humidity_low | seasonal_reminder | varroa_emergency | varroa_urgent | treatment_ineffective | winter_treatment | post_harvest | weather_suitable | drone_frame | treatment_ending | combination_tip | resistance_warning | bloom_forecast | quarantine_followup | monthly_report | afb_suspicion | efb_suspicion | aethina_suspicion | tropilaelaps_suspicion | export_ready | invitation_accepted | quarantine_nosema_suspected | quarantine_cbpv_suspected | quarantine_vet_order | quarantine_other | quarantine_reason_unknown | health_score_review | collapse_risk_review | hive_toppled_observed | weight_change_observed | task_due | brood_break_followup_due | post_treatment_check_due | brood_observation_followup | pest_observation_followup | frost_warning | heat_warning | heavy_rain | strong_wind | official_weather_warning | billing_subscription_ended | billing_payment_failed | billing_dispute | referral_reversal_review | admin_plan_granted | admin_bloom_report_deleted | webhook_dead_letter) |
signalDisplay.signal.identity | string | Producer discriminator within the cause and subjects |
signalDisplay.signal.subjects | array | Affected colonies or apiaries(required) |
signalDisplay.signal.subjects[].kind | string | Subject kind(required, hive | apiary) |
signalDisplay.signal.subjects[].id | string | Subject ID(required) |
signalDisplay.signal.basis | object | Original observation; null when no observation is recorded(required, nullable) |
signalDisplay.signal.basis.source | string | Source of the observation(required) |
signalDisplay.signal.basis.observedAt | string | When the observation was made (ISO 8601 date-time)(required) |
signalDisplay.signal.seasonWindow | object | Inclusive season window on the Berlin calendar |
signalDisplay.signal.seasonWindow.from | string | First calendar day (YYYY-MM-DD)(required) |
signalDisplay.signal.seasonWindow.to | string | Last calendar day (YYYY-MM-DD)(required) |
signalDisplay.signal.due | string | Due calendar day in Berlin (YYYY-MM-DD) |
signalDisplay.signal.action | object | Validated signal destination |
signalDisplay.signal.action.routeId | string | Signal route ID(required) |
signalDisplay.signal.action.params | object | Route parameters keyed by name, with string values |
signalDisplay.needsReview | boolean | The observation needs review; a past check does not prove a current all-clear(required) |
signalDisplay.state | string | Observation state(required, signal | checked | inactive) |
signalDisplay.basis | object | Original observation; null when no observation is recorded(required, nullable) |
signalDisplay.basis.source | string | Source of the observation(required) |
signalDisplay.basis.observedAt | string | When the observation was made (ISO 8601 date-time)(required) |
latestVarroa | object | Latest confirmed, readable measurement with its recorded unit(required, nullable) |
latestVarroa.value | number | Resolved measurement value; natural drop is normalized per day(required) |
latestVarroa.method | string | Diagnostic method(required, liebefeld_natural_drop | dlib_powdersugar | dlib_alcohol_wash | brood_check | flotation) |
latestVarroa.unit | string | Recorded measurement unit(required, mites_per_day | mites_per_10g_bees | percent_infestation) |
latestVarroa.date | string | Measurement date (ISO 8601 date-time)(required) |
latestVarroa.countDays | integer | Counting days; null when not applicable(required, nullable) |
varroaTreatments | array | Non-voided treatments started or ended in the last 18 months plus running ones and multi-day ones without an end; they decide whether the latest varroa value was influenced by a treatment(required) |
varroaTreatments[].treatmentType | string | Treatment type(required, varroa_oxalic_acid | varroa_formic_acid | varroa_thymol | varroa_amitraz | varroa_pyrethroid | varroa_coumaphos | varroa_lactic_acid | varroa_oxalic_broodless | varroa_other | drone_brood_removal | total_brood_removal | brood_break | brood_break_no_trap | partial_brood_removal | hyperthermia | other) |
varroaTreatments[].startDate | string | Start (ISO 8601 date-time)(required) |
varroaTreatments[].endDate | string | End; null when not entered (ISO 8601 date-time)(required, nullable) |
varroaTreatments[].status | string | Treatment status(required, completed | active) |
queen | object | The attached queen (not deleted)(required, nullable) |
queen.id | string | Queen ID(required) |
queen.race | string | Race(required, nullable) |
queen.birthYear | integer | Year of birth(required, nullable) |
queen.markingColor | string | Marking colour(required, nullable) |
queen.matingStatus | string | Mating status(required, nullable) |
queen.status | string | Queen status(required, active | replaced | dead | missing | swarmed | lost) |
queen.statusObservedAt | string | When the queen's status was observed; null for legacy records without an observation (ISO 8601 date-time)(required, nullable) |
hasUntrackedQueen | boolean | The colony has a queen that is not kept as a queen record(required) |
lastInspection | object | The latest confirmed inspection of the colony that is not dated in the future; a record with only a varroa measurement is no inspection(required, nullable) |
lastInspection.id | string | Inspection ID(required) |
lastInspection.date | string | Inspection date (ISO 8601 date-time)(required) |
lastInspection.type | string | Inspection type(required, standard | quick) |
lastInspection.colonyStrength | integer | Colony strength (1-10) of this inspection(required, nullable) |
lastInspection.broodFrames | integer | Frames with brood of this inspection(required, nullable) |
lastInspection.openBroodFrames | integer | Frames with open brood(required, nullable) |
lastInspection.cappedBroodFrames | integer | Frames with capped brood(required, nullable) |
lastInspection.broodPattern | string | Brood pattern(required, nullable) |
lastInspection.pollenStores | string | Pollen stores(required, nullable) |
lastInspection.honeyStores | string | Recorded food stores(required, nullable, low | medium | high) |
lastInspection.temperament | string | Recorded temperament(required, nullable, calm | nervous | aggressive) |
lastInspection.queenSeen | boolean | Whether the queen was seen(required, nullable) |
lastInspection.queenCellType | string | Queen cell type(required, nullable) |
lastInspection.afbCleared | boolean | American foulbrood suspicion ruled out by a vet(required, nullable) |
latestColonyStrength | object | Colony strength (1-10) from the latest confirmed record that carries one(required, nullable) |
latestColonyStrength.value | integer | Recorded value(required) |
latestColonyStrength.date | string | Date of the record; never re-dated (ISO 8601 date-time)(required) |
latestColonyStrength.inspectionId | string | Inspection ID of the record(required) |
latestBroodFrames | object | Frames with brood from the latest confirmed record that carries them(required, nullable) |
latestBroodFrames.value | integer | Recorded value(required) |
latestBroodFrames.date | string | Date of the record; never re-dated (ISO 8601 date-time)(required) |
latestBroodFrames.inspectionId | string | Inspection ID of the record(required) |
attention | object | Compatibility triage of the colony; use signalDisplay for status presentation(required) |
attention.level | string | Deprecated: use signalDisplay. green = ok or inactive, yellow = attention, red = urgent, neutral = no automatic rating(required, green | yellow | red | neutral) |
attention.reasons | array | At most one reason; empty when everything is fine(required) |
attention.reasons[].key | string | Message key, resolved by the client against its message bundle(required) |
attention.reasons[].params | object | Values for the placeholders of the message (strings or numbers) |
quarantineActive | boolean | The colony is under quarantine(required) |
quarantineReason | string | Quarantine reason(required, nullable) |
quarantineStartedAt | string | Quarantine start (ISO 8601 date-time)(required, nullable) |
quarantineExpectedEnd | string | Expected quarantine end (ISO 8601 date-time)(required, nullable) |
colonyType | string | Colony class(required, production | nucleus | queen_rearing) |
colonyTypeConfirmedAt | string | When the colony class was confirmed; null if never (ISO 8601 date-time)(required, nullable) |
createdAt | string | Created (ISO 8601 date-time)(required) |
updatedAt | string | Last updated (ISO 8601 date-time)(required) |
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/hives/clx2abc" \
-H "Authorization: Bearer YOUR_API_KEY"/api/hives/[id]Scope: write:hivesUpdate a hive
Partially updates hive details.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Hive ID |
Request Body
Any subset of the create fields. An omitted field stays untouched; `null` clears a nullable field. Changing `apiaryId` moves the colony and records the move.
| Field | Type | Description |
|---|---|---|
apiaryId | string | Apiary to move the hive to (records a move)e.g. clx1abc |
number | integer | Hive number, positive integer up to 2147483647, unique per accounte.g. 7 |
name | string | Optional display name, max 100 characters(nullable)e.g. Bienchen |
hiveType | string | dadant | zander | zadant | dn | langstroth | warree | top_bar | layens | national_uk | bienenkiste | einraumbeute | trogbeute | flow_hive | miniplus | other(dadant | zander | zadant | dn | langstroth | warree | top_bar | layens | national_uk | bienenkiste | einraumbeute | trogbeute | flow_hive | miniplus | other)e.g. dadant |
origin | string | purchase | swarm | split | gift | catch | other(nullable, purchase | swarm | split | gift | catch | other) |
notes | string | Free-text notes (max 5000 chars)(nullable) |
colonyType | string | Colony class that sets the varroa thresholds (production colony, nucleus, queen rearing)(production | nucleus | queen_rearing) |
hasUntrackedQueen | boolean | The colony has a queen that is not kept as a queen record |
Response Body
The updated colony as stored (all columns)
e.g. {"id":"clx2...","userId":"clxu...","apiaryId":"clx1abc","number":7,"name":"Neuer Name","hiveType":"dadant","origin":null,"status":"active","deathCause":null,"deathDate":null,"deathNotes":null,"sourceHiveId":null,"notes":null,"deletedAt":null,"quarantineActive":false,"quarantineReason":null,"quarantineStartedAt":null,"quarantineExpectedEnd":null,"colonyType":"production","colonyTypeConfirmedAt":"2025-06-15T08:30:00.000Z","hasUntrackedQueen":false,"createdByMemberId":null,"createdAt":"2025-03-01T09:00:00.000Z","updatedAt":"2025-06-15T08:30:00.000Z"}
| Field | Type | Description |
|---|---|---|
id | string | Hive ID(required) |
userId | string | Owner ID(required, nullable) |
apiaryId | string | Apiary ID(required) |
number | integer | Hive number(required) |
name | string | Display name(required, nullable) |
hiveType | string | Hive type(required, dadant | zander | zadant | dn | langstroth | warree | top_bar | layens | national_uk | bienenkiste | einraumbeute | trogbeute | flow_hive | miniplus | other) |
origin | string | Origin of the colony(required, nullable, purchase | swarm | split | gift | catch | other) |
status | string | Colony status(required, active | inactive | dead | lost | sold | merged) |
deathCause | string | Cause of death(required, nullable, varroa | starvation | queen_loss | pesticide | disease | unknown | other) |
deathDate | string | Date of death (ISO 8601 date-time)(required, nullable) |
deathNotes | string | Notes about the death(required, nullable) |
sourceHiveId | string | Hive ID of the colony this one was split from(required, nullable) |
notes | string | Free-text notes(required, nullable) |
deletedAt | string | Soft-delete marker; always null here (ISO 8601 date-time)(required, nullable) |
quarantineActive | boolean | The colony is under quarantine(required) |
quarantineReason | string | Quarantine reason(required, nullable) |
quarantineStartedAt | string | Quarantine start (ISO 8601 date-time)(required, nullable) |
quarantineExpectedEnd | string | Expected quarantine end (ISO 8601 date-time)(required, nullable) |
colonyType | string | Colony class(required, production | nucleus | queen_rearing) |
colonyTypeConfirmedAt | string | When the colony class was confirmed; null if never (ISO 8601 date-time)(required, nullable) |
hasUntrackedQueen | boolean | The colony has a queen that is not kept as a queen record(required) |
createdByMemberId | string | Team member who created the record; null = owner(required, nullable) |
createdAt | string | Created (ISO 8601 date-time)(required) |
updatedAt | string | Last updated (ISO 8601 date-time)(required) |
Success
200 application/json, wrapped as { data }
Errors
20 possible errors
Example
curl -X PUT "https://hivekraft.com/api/hives/clx2abc" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Neuer Name"}'/api/hives/[id]Scope: write:hivesDelete a hive
Soft-deletes a hive. It will no longer appear in listings.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Hive ID |
Success
204 No Content (empty body)
Errors
19 possible errors
Example
curl -X DELETE "https://hivekraft.com/api/hives/clx2abc" \
-H "Authorization: Bearer YOUR_API_KEY"/api/hives/[id]/healthScope: read:hivesGet hive health score
Calculates a health score (0-100) based on recent inspections, treatments, and queen status. Requires Pro plan.
Recommendations are based on statistical models and threshold rules (not generative AI). Please verify before applying. Learn more
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Hive ID |
Response Body
Health score of one colony. `factors` always lists the same weighted factors; `recommendations` are keys, not prose.
e.g. {"score":76,"level":"good","factors":[{"name":"varroa","score":100,"weight":0.2,"details":{"key":"intel.health.treatmentRecent","params":{"days":30}}},{"name":"varroaCount","score":50,"weight":0.1,"details":{"key":"intel.health.varroaCountNeutral","params":{"count":2,"unit":"mites_per_day","why":"predates_treatment"}}},{"name":"queen","score":100,"weight":0.2,"details":{"key":"intel.health.queenYoungSeen","params":{"age":0}}},{"name":"feeding","score":70,"weight":0.1,"details":{"key":"intel.health.storesMedium"}},{"name":"inspection","score":20,"weight":0.15,"details":{"key":"intel.health.inspectionOld","params":{"days":60}}},{"name":"colonyStrength","score":100,"weight":0.1,"details":{"key":"intel.health.colonyStrengthStrong","params":{"strength":8}},"observedAt":"2025-04-16T08:00:00.000Z"},{"name":"swarmRisk","score":80,"weight":0.1,"details":{"key":"intel.health.swarmRiskDetected","params":{"level":"medium"}}},{"name":"weather","score":50,"weight":0.05,"details":{"key":"intel.health.weatherUnavailable"}}],"recommendations":["varroa_monitoring","inspection_needed","weather_protection"]}
| Field | Type | Description |
|---|---|---|
score | integer | Weighted total, 0-100(required) |
level | string | Class of the score(required, critical | warning | good | excellent) |
factors | array | The weighted factors: varroa (treatment recency), varroaCount, queen, feeding, inspection, colonyStrength, swarmRisk, weather(required) |
factors[].name | string | Factor name: varroa (treatment recency), varroaCount, queen, feeding, inspection, colonyStrength, swarmRisk or weather(required) |
factors[].score | number | Points of this factor, 0-100(required) |
factors[].weight | number | Weight of the factor, 0-1(required) |
factors[].details | object | string | What the factor found, as a translation key with optional parameters(required) |
factors[].details.key | string | Message key, resolved by the client against its message bundle(required) |
factors[].details.params | object | Values for the placeholders of the message (strings or numbers) |
factors[].observedAt | string | Original strength observation date; present only for colonyStrength with a recorded value (ISO 8601 date-time) |
recommendations | array | Keys of the recommendations derived from the factors that score below 60(required) |
recommendations[] | string | Recommendation key, for example `treatment_overdue`, `queen_check` or `swarm_control` |
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/hives/clx2abc/health" \
-H "Authorization: Bearer YOUR_API_KEY"/api/hives/[id]/splitScope: write:hivesSplit a hive (Ableger)
Creates a new colony from an existing hive by splitting it.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Source hive ID |
Request Body
The new colony joins the apiary of the source colony; its origin is set to `split`.
| Field | Type | Description |
|---|---|---|
number | integer | Hive number for the new colony, positive integer, unique per account(required)e.g. 8 |
name | string | Optional display name for the new colony, max 100 characters(nullable) |
hiveType | string | dadant | zander | zadant | dn | langstroth | warree | top_bar | layens | national_uk | bienenkiste | einraumbeute | trogbeute | flow_hive | miniplus | other(required, dadant | zander | zadant | dn | langstroth | warree | top_bar | layens | national_uk | bienenkiste | einraumbeute | trogbeute | flow_hive | miniplus | other)e.g. dadant |
notes | string | Notes about the split (max 5000 chars)(nullable) |
Response Body
The newly created colony as stored (all columns)
e.g. {"id":"clx2...","userId":"clxu...","apiaryId":"clx1abc","number":8,"name":"Ableger Mai","hiveType":"dadant","origin":"split","status":"active","deathCause":null,"deathDate":null,"deathNotes":null,"sourceHiveId":"clx2abc","notes":null,"deletedAt":null,"quarantineActive":false,"quarantineReason":null,"quarantineStartedAt":null,"quarantineExpectedEnd":null,"colonyType":"production","colonyTypeConfirmedAt":null,"hasUntrackedQueen":false,"createdByMemberId":null,"createdAt":"2025-03-01T09:00:00.000Z","updatedAt":"2025-03-01T09:00:00.000Z"}
| Field | Type | Description |
|---|---|---|
id | string | Hive ID(required) |
userId | string | Owner ID(required, nullable) |
apiaryId | string | Apiary ID(required) |
number | integer | Hive number(required) |
name | string | Display name(required, nullable) |
hiveType | string | Hive type(required, dadant | zander | zadant | dn | langstroth | warree | top_bar | layens | national_uk | bienenkiste | einraumbeute | trogbeute | flow_hive | miniplus | other) |
origin | string | Origin of the colony(required, nullable, purchase | swarm | split | gift | catch | other) |
status | string | Colony status(required, active | inactive | dead | lost | sold | merged) |
deathCause | string | Cause of death(required, nullable, varroa | starvation | queen_loss | pesticide | disease | unknown | other) |
deathDate | string | Date of death (ISO 8601 date-time)(required, nullable) |
deathNotes | string | Notes about the death(required, nullable) |
sourceHiveId | string | Hive ID of the colony this one was split from(required, nullable) |
notes | string | Free-text notes(required, nullable) |
deletedAt | string | Soft-delete marker; always null here (ISO 8601 date-time)(required, nullable) |
quarantineActive | boolean | The colony is under quarantine(required) |
quarantineReason | string | Quarantine reason(required, nullable) |
quarantineStartedAt | string | Quarantine start (ISO 8601 date-time)(required, nullable) |
quarantineExpectedEnd | string | Expected quarantine end (ISO 8601 date-time)(required, nullable) |
colonyType | string | Colony class(required, production | nucleus | queen_rearing) |
colonyTypeConfirmedAt | string | When the colony class was confirmed; null if never (ISO 8601 date-time)(required, nullable) |
hasUntrackedQueen | boolean | The colony has a queen that is not kept as a queen record(required) |
createdByMemberId | string | Team member who created the record; null = owner(required, nullable) |
createdAt | string | Created (ISO 8601 date-time)(required) |
updatedAt | string | Last updated (ISO 8601 date-time)(required) |
Success
201 application/json, wrapped as { data }
Errors
21 possible errors
Example
curl -X POST "https://hivekraft.com/api/hives/clx2abc/split" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"number":8,"hiveType":"dadant","name":"Ableger Mai"}'/api/hives/[id]/transferScope: write:hivesTransfer hive to another apiary
Moves a hive from its current apiary to a different one. Records the movement.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Hive to transfer ID |
Request Headers
| Name | Type | Required | Description |
|---|---|---|---|
Idempotency-Key | string | No | Optional retry key, 16-128 characters from A-Z a-z 0-9 _ -. A repeat with the same key and body returns the first result instead of creating a second record; an invalid key is rejected with 400.e.g. 3f2a9c1e-7b4d-4e8a-9c21-0d5b6a7e8f90 |
Request Body
| Field | Type | Description |
|---|---|---|
toApiaryId | string | Target apiary ID(required)e.g. clx1xyz |
notes | string | Notes about the transfer (max 5000 chars)(nullable) |
Response Body
The moved colony as stored (all columns)
e.g. {"id":"clx2...","userId":"clxu...","apiaryId":"clx1xyz","number":7,"name":"Bienchen","hiveType":"dadant","origin":null,"status":"active","deathCause":null,"deathDate":null,"deathNotes":null,"sourceHiveId":null,"notes":null,"deletedAt":null,"quarantineActive":false,"quarantineReason":null,"quarantineStartedAt":null,"quarantineExpectedEnd":null,"colonyType":"production","colonyTypeConfirmedAt":"2025-06-15T08:30:00.000Z","hasUntrackedQueen":false,"createdByMemberId":null,"createdAt":"2025-03-01T09:00:00.000Z","updatedAt":"2025-06-15T08:30:00.000Z"}
| Field | Type | Description |
|---|---|---|
id | string | Hive ID(required) |
userId | string | Owner ID(required, nullable) |
apiaryId | string | Apiary ID(required) |
number | integer | Hive number(required) |
name | string | Display name(required, nullable) |
hiveType | string | Hive type(required, dadant | zander | zadant | dn | langstroth | warree | top_bar | layens | national_uk | bienenkiste | einraumbeute | trogbeute | flow_hive | miniplus | other) |
origin | string | Origin of the colony(required, nullable, purchase | swarm | split | gift | catch | other) |
status | string | Colony status(required, active | inactive | dead | lost | sold | merged) |
deathCause | string | Cause of death(required, nullable, varroa | starvation | queen_loss | pesticide | disease | unknown | other) |
deathDate | string | Date of death (ISO 8601 date-time)(required, nullable) |
deathNotes | string | Notes about the death(required, nullable) |
sourceHiveId | string | Hive ID of the colony this one was split from(required, nullable) |
notes | string | Free-text notes(required, nullable) |
deletedAt | string | Soft-delete marker; always null here (ISO 8601 date-time)(required, nullable) |
quarantineActive | boolean | The colony is under quarantine(required) |
quarantineReason | string | Quarantine reason(required, nullable) |
quarantineStartedAt | string | Quarantine start (ISO 8601 date-time)(required, nullable) |
quarantineExpectedEnd | string | Expected quarantine end (ISO 8601 date-time)(required, nullable) |
colonyType | string | Colony class(required, production | nucleus | queen_rearing) |
colonyTypeConfirmedAt | string | When the colony class was confirmed; null if never (ISO 8601 date-time)(required, nullable) |
hasUntrackedQueen | boolean | The colony has a queen that is not kept as a queen record(required) |
createdByMemberId | string | Team member who created the record; null = owner(required, nullable) |
createdAt | string | Created (ISO 8601 date-time)(required) |
updatedAt | string | Last updated (ISO 8601 date-time)(required) |
Success
200 application/json, wrapped as { data }
Errors
22 possible errors
Example
curl -X POST "https://hivekraft.com/api/hives/clx2abc/transfer" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"toApiaryId":"clx1xyz"}'/api/hives/[id]/mark-deadScope: write:hivesMark a hive as dead
Marks a colony as dead with optional cause, date, and notes. Sets the hive status to 'dead'.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Hive ID |
Request Body
All fields are optional, but the body must be valid JSON (`{}` is accepted). A colony that already has a death or loss date keeps it; otherwise `deathDate` counts, and without it today.
| Field | Type | Description |
|---|---|---|
deathCause | string | Cause of death(nullable, varroa | starvation | queen_loss | pesticide | disease | unknown | other) |
deathDate | string | Date of death (ISO date, not in the future)(nullable)e.g. 2025-12-15 |
deathNotes | string | Notes about the death (max 5000 chars)(nullable) |
Response Body
The colony as stored with status `dead`, plus the result of closing its open treatments
e.g. {"id":"clx2...","userId":"clxu...","apiaryId":"clx1abc","number":7,"name":"Bienchen","hiveType":"dadant","origin":null,"status":"dead","deathCause":"varroa","deathDate":"2025-12-15T00:00:00.000Z","deathNotes":"Weak colony in autumn","sourceHiveId":null,"notes":null,"deletedAt":null,"quarantineActive":false,"quarantineReason":null,"quarantineStartedAt":null,"quarantineExpectedEnd":null,"colonyType":"production","colonyTypeConfirmedAt":"2025-06-15T08:30:00.000Z","hasUntrackedQueen":false,"createdByMemberId":null,"createdAt":"2025-03-01T09:00:00.000Z","updatedAt":"2025-06-15T08:30:00.000Z","treatmentClosure":{"cancelledIds":[],"completedIds":[],"incompleteActiveIds":[]}}
| Field | Type | Description |
|---|---|---|
id | string | Hive ID(required) |
userId | string | Owner ID(required, nullable) |
apiaryId | string | Apiary ID(required) |
number | integer | Hive number(required) |
name | string | Display name(required, nullable) |
hiveType | string | Hive type(required, dadant | zander | zadant | dn | langstroth | warree | top_bar | layens | national_uk | bienenkiste | einraumbeute | trogbeute | flow_hive | miniplus | other) |
origin | string | Origin of the colony(required, nullable, purchase | swarm | split | gift | catch | other) |
status | string | Colony status(required, active | inactive | dead | lost | sold | merged) |
deathCause | string | Cause of death(required, nullable, varroa | starvation | queen_loss | pesticide | disease | unknown | other) |
deathDate | string | Date of death (ISO 8601 date-time)(required, nullable) |
deathNotes | string | Notes about the death(required, nullable) |
sourceHiveId | string | Hive ID of the colony this one was split from(required, nullable) |
notes | string | Free-text notes(required, nullable) |
deletedAt | string | Soft-delete marker; always null here (ISO 8601 date-time)(required, nullable) |
quarantineActive | boolean | The colony is under quarantine(required) |
quarantineReason | string | Quarantine reason(required, nullable) |
quarantineStartedAt | string | Quarantine start (ISO 8601 date-time)(required, nullable) |
quarantineExpectedEnd | string | Expected quarantine end (ISO 8601 date-time)(required, nullable) |
colonyType | string | Colony class(required, production | nucleus | queen_rearing) |
colonyTypeConfirmedAt | string | When the colony class was confirmed; null if never (ISO 8601 date-time)(required, nullable) |
hasUntrackedQueen | boolean | The colony has a queen that is not kept as a queen record(required) |
createdByMemberId | string | Team member who created the record; null = owner(required, nullable) |
createdAt | string | Created (ISO 8601 date-time)(required) |
updatedAt | string | Last updated (ISO 8601 date-time)(required) |
treatmentClosure | object | Open treatments of the colony that were closed(required) |
treatmentClosure.cancelledIds | array | Planned treatments that were cancelled(required) |
treatmentClosure.cancelledIds[] | string | Treatment ID |
treatmentClosure.completedIds | array | Active treatments that were completed and locked(required) |
treatmentClosure.completedIds[] | string | Treatment ID |
treatmentClosure.incompleteActiveIds | array | Active treatments that could not be completed (required details missing) and stay active(required) |
treatmentClosure.incompleteActiveIds[] | string | Treatment ID |
Success
200 application/json, wrapped as { data }
Errors
20 possible errors
Example
curl -X POST "https://hivekraft.com/api/hives/clx2abc/mark-dead" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"deathCause":"varroa","deathDate":"2025-12-15","deathNotes":"Weak colony in autumn"}'/api/hives/health-overviewScope: read:hivesGet health overview for all hives
Returns health scores and swarm risk levels for all active hives. Includes score (0-100), risk level, and top contributing factor.
Recommendations are based on statistical models and threshold rules (not generative AI). Please verify before applying. Learn more
Response Body
One entry per active colony, worst `level` first. Always a bare array.
e.g. [{"hiveId":"clx2...","hiveName":"Bienchen","hiveNumber":1,"apiaryName":"Waldbienenstand","score":90,"level":"excellent","topFactor":{"key":"intel.health.varroaCountNeutral","params":{"count":2,"unit":"mites_per_day","why":"treatment_influenced"}},"swarmRiskLevel":"low","swarmRiskScore":15}]
| Field | Type | Description |
|---|---|---|
[].hiveId | string | Hive ID(required) |
[].hiveName | string | Colony name; null when it has none(required, nullable) |
[].hiveNumber | integer | Colony number(required) |
[].apiaryName | string | Apiary name(required) |
[].score | integer | Health score, 0-100(required) |
[].level | string | Class of the health score(required, critical | warning | good | excellent) |
[].topFactor | object | string | Explanation of the lowest-scoring factor as a translation key with optional parameters(required) |
[].topFactor.key | string | Message key, resolved by the client against its message bundle(required) |
[].topFactor.params | object | Values for the placeholders of the message (strings or numbers) |
[].swarmRiskLevel | string | Class of the swarm risk(required, low | medium | high | critical) |
[].swarmRiskScore | integer | Swarm risk score, 0-100(required) |
Success
200 application/json, wrapped as { data }
Errors
16 possible errors
Example
curl -X GET "https://hivekraft.com/api/hives/health-overview" \
-H "Authorization: Bearer YOUR_API_KEY"/api/intelligence/swarm-riskScope: any read:* scopeGet swarm risk assessment
Returns swarm risk scores for all active hives, derived from recent inspection data, colony strength trend, queen age, season and hive-scale signals. Requires the Pro plan and is rate limited.
Recommendations are based on statistical models and threshold rules (not generative AI). Please verify before applying. Learn more
Response Body
One entry per colony, highest `score` first. Always a bare array (a list, not an object). For every apiary with coordinates the call sends `latitude` and `longitude` to Bright Sky (api.brightsky.dev; Open-Meteo as fallback) for weather and to Open-Meteo (open-meteo.com) for the elevation; the entries do not contain these weather or elevation values.
e.g. [{"hiveId":"clx2...","hiveName":"Bienchen","hiveNumber":1,"apiaryName":"Waldbienenstand","score":45,"level":"warning","trend":"stable","factors":[{"name":"queenCells","score":20,"weight":1,"description":{"key":"intel.swarm.queenCells.detected","params":{"detail":"20"}}},{"name":"colonyStrength","score":15,"weight":1,"description":{"key":"intel.swarm.colonyStrength.strong"}},{"name":"honeyStores","score":10,"weight":1,"description":{"key":"intel.swarm.honeyStores.high"}},{"name":"temperament","score":0,"weight":1,"description":{"key":"intel.swarm.temperament.calm"}},{"name":"season","score":0,"weight":1,"description":{"key":"intel.swarm.season.outside"}},{"name":"strengthTrend","score":0,"weight":1,"description":{"key":"intel.swarm.strengthTrend.stable"}},{"name":"iotWeight","score":0,"weight":1,"description":{"key":"intel.swarm.iotWeight.normal"}},{"name":"weightSlope","score":0,"weight":1,"description":{"key":"intel.swarm.weightSlope.normal"}},{"name":"queenAge","score":0,"weight":1,"description":{"key":"intel.swarm.queenAge.normal"}}],"recommendations":[{"priority":"high","category":"swarm","title":{"key":"intel.swarm.rec.warning.title"},"description":{"key":"intel.swarm.rec.warning.description"}},{"priority":"medium","category":"swarm","title":{"key":"intel.swarm.rec.makeSpace.title"},"description":{"key":"intel.swarm.rec.makeSpace.description"}}],"comparedToCommunity":null,"riskFactors":[{"key":"intel.swarm.risk.swarmCellsFew"},{"key":"intel.swarm.risk.strongColony"},{"key":"intel.swarm.risk.highStores"}]}]
| Field | Type | Description |
|---|---|---|
[].hiveId | string | Hive ID(required) |
[].hiveName | string | Colony name; a colony without a name appears as `#<number>`(required) |
[].hiveNumber | integer | Colony number(required) |
[].apiaryName | string | Apiary name(required) |
[].score | integer | Swarm risk score, 0-100 (0 = no risk)(required) |
[].level | string | Class of the score (the vocabulary of the health levels)(required, critical | warning | good | excellent) |
[].trend | string | Direction of the colony strength(required, rising | stable | declining | unknown) |
[].factors | array | The weighted factors(required) |
[].factors[].name | string | Factor name: queenCells, colonyStrength, honeyStores, temperament, season, strengthTrend, iotWeight, weightSlope or queenAge(required) |
[].factors[].score | integer | Points of this factor(required) |
[].factors[].weight | number | Weight of the factor(required) |
[].factors[].description | object | What the factor found, as a translation key with optional parameters(required) |
[].factors[].description.key | string | Message key, resolved by the client against its message bundle(required) |
[].factors[].description.params | object | Values for the placeholders of the message (strings or numbers) |
[].recommendations | array | Recommended actions(required) |
[].recommendations[].priority | string | Urgency(required, high | medium | low) |
[].recommendations[].category | string | Category, for example `swarm`(required) |
[].recommendations[].title | object | Title as a translation key(required) |
[].recommendations[].title.key | string | Message key, resolved by the client against its message bundle(required) |
[].recommendations[].title.params | object | Values for the placeholders of the message (strings or numbers) |
[].recommendations[].description | object | Text as a translation key(required) |
[].recommendations[].description.key | string | Message key, resolved by the client against its message bundle(required) |
[].recommendations[].description.params | object | Values for the placeholders of the message (strings or numbers) |
[].recommendations[].actionUrl | string | Deep link into the app |
[].recommendations[].dueDate | string | Due date (ISO string) |
[].comparedToCommunity | number | Difference to the community average; currently always null(required, nullable) |
[].riskFactors | array | Reasons that raised the score(required) |
[].riskFactors[].key | string | Message key, resolved by the client against its message bundle(required) |
[].riskFactors[].params | object | Values for the placeholders of the message (strings or numbers) |
Success
200 application/json, wrapped as { data }
Errors
16 possible errors
Example
curl -X GET "https://hivekraft.com/api/intelligence/swarm-risk" \
-H "Authorization: Bearer YOUR_API_KEY"Queens
Track queens (Königinnen) with lineage, traits, and assignment to hives.
/api/queensScope: read:queensList all queens
Returns all queens. Supports filtering by hive and status.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
hiveId | string | No | Filter by assigned hive |
status | string | No | Filter by status (active | replaced | dead | missing | swarmed | lost) |
search | string | No | Free-text search over name, race, breeder, notes, hive name and birth year |
cursor | string | No | Pagination cursor — an opaque value: pass the `nextCursor` from the previous page unchanged to fetch the next batch; do not build it yourself. An unknown or unreadable cursor returns 400 (reload the list from the first page). |
limit | number | No | Items per page (1-100, default 20). Sending this enables the paginated object response shape. A value outside 1-100 is ignored and the bare array is returned. |
Response Body
Without cursor and limit: a bare array of queens (more entries beyond the server cap are signalled by the headers `X-List-Has-More: true` and `X-List-Next-Cursor`, pass that value as `cursor`). With `cursor` and/or `limit`: a page object `{ items, nextCursor, hasMore }`. The example shows the page object.
e.g. {"items":[{"id":"clx3...","name":"Carnica 2025","race":"carnica","birthYear":2025,"birthDate":null,"markedAt":null,"deathDate":null,"replacedAt":null,"replacedReason":null,"markingColor":"blau","origin":"purchase","breeder":"Belegstelle Hochalm","breedingLine":null,"parentage":null,"matingStatus":"mated","status":"active","statusObservedAt":"2025-06-15T08:30:00.000Z","rating":null,"hiveId":"clx2abc","hiveName":"Bienchen","hiveNumber":7,"notes":null,"gentleness":4,"calmOnComb":null,"swarmTendency":null,"honeyProduction":null,"queenBroodPattern":null,"winterHardiness":null,"springBuildUp":null,"hygienicBehavior":null,"combConstruction":null,"motherQueenId":null,"motherQueenLabel":null,"motherQueen":null,"daughterCount":0,"createdAt":"2025-04-01T09:00:00.000Z","updatedAt":"2025-06-15T08:30:00.000Z"}],"nextCursor":"k1_W3siZCI6IjIwMjUtMDQtMDFUMDk6MDA6MDAuMDAwWiJ9LCJjbHgzLi4uIl0","hasMore":true}
| Field | Type | Description |
|---|---|---|
items | array | The queens on this page(required) |
items[].id | string | Queen ID(required) |
items[].name | string | Free-text name(required, nullable) |
items[].race | string | Race(required, nullable, carnica | buckfast | ligustica | mellifera | caucasica | cerana | iberica | russian | saskatraz | other) |
items[].birthYear | integer | Year of birth(required, nullable) |
items[].birthDate | string | Exact hatching date (ISO 8601 date-time)(required, nullable) |
items[].markedAt | string | Date the queen was marked (ISO 8601 date-time)(required, nullable) |
items[].deathDate | string | Date of death (ISO 8601 date-time)(required, nullable) |
items[].replacedAt | string | Latest replacement calendar day (UTC midnight); null when not recorded (ISO 8601 date-time)(required, nullable) |
items[].replacedReason | string | Latest replacement reason; not duplicated into the free-text notes(required, nullable, alter | sanftmut | wabensitz | schwarm | leistung | drohnen | sonst) |
items[].markingColor | string | Marking colour(required, nullable) |
items[].origin | string | Origin(required, nullable, purchase | own_breeding | swarm | gift | other) |
items[].breeder | string | Breeder(required, nullable) |
items[].breedingLine | string | Breeding line(required, nullable) |
items[].parentage | string | Parentage(required, nullable) |
items[].matingStatus | string | Mating status(required, nullable, mated | naturally_mated | instrumentally_inseminated | unmated | drone_layer) |
items[].status | string | Queen status(required, active | replaced | dead | missing | swarmed | lost) |
items[].statusObservedAt | string | When the queen's status was observed; null for legacy records without an observation (ISO 8601 date-time)(required, nullable) |
items[].rating | integer | Overall rating derived from the trait ratings(required, nullable) |
items[].hiveId | string | Hive the queen is attached to (not deleted)(required, nullable) |
items[].hiveName | string | Name of that hive(required, nullable) |
items[].hiveNumber | integer | Number of that hive(required, nullable) |
items[].notes | string | Free-text notes(required, nullable) |
items[].gentleness | integer | Gentleness, rating 1-5(required, nullable) |
items[].calmOnComb | integer | Calmness on the comb, rating 1-5(required, nullable) |
items[].swarmTendency | integer | Swarm tendency, rating 1-5(required, nullable) |
items[].honeyProduction | integer | Honey production, rating 1-5(required, nullable) |
items[].queenBroodPattern | integer | Brood pattern, rating 1-5(required, nullable) |
items[].winterHardiness | integer | Winter hardiness, rating 1-5(required, nullable) |
items[].springBuildUp | integer | Spring build-up, rating 1-5(required, nullable) |
items[].hygienicBehavior | integer | Hygienic behaviour, rating 1-5(required, nullable) |
items[].combConstruction | integer | Comb construction, rating 1-5(required, nullable) |
items[].motherQueenId | string | ID of the mother queen(required, nullable) |
items[].motherQueenLabel | string | Display label of the mother queen (name, race, birth year)(required, nullable) |
items[].motherQueen | object | The mother queen (not deleted)(required, nullable) |
items[].motherQueen.id | string | Queen ID(required) |
items[].motherQueen.name | string | Free-text name(required, nullable) |
items[].motherQueen.race | string | Race(required, nullable) |
items[].motherQueen.birthYear | integer | Year of birth(required, nullable) |
items[].daughterCount | integer | Daughters of this queen (not deleted)(required) |
items[].createdAt | string | Created (ISO 8601 date-time)(required) |
items[].updatedAt | string | Last updated (ISO 8601 date-time)(required) |
nextCursor | string | Cursor for the next page, or null when there are no more results(required, nullable) |
hasMore | boolean | True when a further page is available(required) |
[].id | string | Queen ID(required) |
[].name | string | Free-text name(required, nullable) |
[].race | string | Race(required, nullable, carnica | buckfast | ligustica | mellifera | caucasica | cerana | iberica | russian | saskatraz | other) |
[].birthYear | integer | Year of birth(required, nullable) |
[].birthDate | string | Exact hatching date (ISO 8601 date-time)(required, nullable) |
[].markedAt | string | Date the queen was marked (ISO 8601 date-time)(required, nullable) |
[].deathDate | string | Date of death (ISO 8601 date-time)(required, nullable) |
[].replacedAt | string | Latest replacement calendar day (UTC midnight); null when not recorded (ISO 8601 date-time)(required, nullable) |
[].replacedReason | string | Latest replacement reason; not duplicated into the free-text notes(required, nullable, alter | sanftmut | wabensitz | schwarm | leistung | drohnen | sonst) |
[].markingColor | string | Marking colour(required, nullable) |
[].origin | string | Origin(required, nullable, purchase | own_breeding | swarm | gift | other) |
[].breeder | string | Breeder(required, nullable) |
[].breedingLine | string | Breeding line(required, nullable) |
[].parentage | string | Parentage(required, nullable) |
[].matingStatus | string | Mating status(required, nullable, mated | naturally_mated | instrumentally_inseminated | unmated | drone_layer) |
[].status | string | Queen status(required, active | replaced | dead | missing | swarmed | lost) |
[].statusObservedAt | string | When the queen's status was observed; null for legacy records without an observation (ISO 8601 date-time)(required, nullable) |
[].rating | integer | Overall rating derived from the trait ratings(required, nullable) |
[].hiveId | string | Hive the queen is attached to (not deleted)(required, nullable) |
[].hiveName | string | Name of that hive(required, nullable) |
[].hiveNumber | integer | Number of that hive(required, nullable) |
[].notes | string | Free-text notes(required, nullable) |
[].gentleness | integer | Gentleness, rating 1-5(required, nullable) |
[].calmOnComb | integer | Calmness on the comb, rating 1-5(required, nullable) |
[].swarmTendency | integer | Swarm tendency, rating 1-5(required, nullable) |
[].honeyProduction | integer | Honey production, rating 1-5(required, nullable) |
[].queenBroodPattern | integer | Brood pattern, rating 1-5(required, nullable) |
[].winterHardiness | integer | Winter hardiness, rating 1-5(required, nullable) |
[].springBuildUp | integer | Spring build-up, rating 1-5(required, nullable) |
[].hygienicBehavior | integer | Hygienic behaviour, rating 1-5(required, nullable) |
[].combConstruction | integer | Comb construction, rating 1-5(required, nullable) |
[].motherQueenId | string | ID of the mother queen(required, nullable) |
[].motherQueenLabel | string | Display label of the mother queen (name, race, birth year)(required, nullable) |
[].motherQueen | object | The mother queen (not deleted)(required, nullable) |
[].motherQueen.id | string | Queen ID(required) |
[].motherQueen.name | string | Free-text name(required, nullable) |
[].motherQueen.race | string | Race(required, nullable) |
[].motherQueen.birthYear | integer | Year of birth(required, nullable) |
[].daughterCount | integer | Daughters of this queen (not deleted)(required) |
[].createdAt | string | Created (ISO 8601 date-time)(required) |
[].updatedAt | string | Last updated (ISO 8601 date-time)(required) |
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/queens?status=active" \
-H "Authorization: Bearer YOUR_API_KEY"/api/queensScope: write:queensCreate a queen
Registers a new queen. Optionally assign to a hive and record lineage.
Request Body
Fields are optional except conditional replacement requirements: replacement fields need `replacesQueenId`; `moved` needs a distinct `replacementHiveId`. Replacement records the predecessor's day, reason and disposition and assigns the successor atomically. `markingColor` is derived from the birth year when omitted; an inactive `status` detaches the queen from `hiveId`.
| Field | Type | Description |
|---|---|---|
hiveId | string | Assign to this hive (optional); ignored for an inactive status(nullable) |
expectedUpdatedAt | string | The `updatedAt` the client last saw (ISO datetime). On update this guards the edited queen; on create with `replacesQueenId` it guards the predecessor. A different stored value is rejected with 409 `STALE_QUEEN` |
race | string | Race(nullable, carnica | buckfast | ligustica | mellifera | caucasica | cerana | iberica | russian | saskatraz | other)e.g. carnica |
birthYear | integer | Year of birth, 2000 up to the current year(nullable)e.g. 2025 |
birthDate | string | Exact hatching date (ISO), between 2000 and today; takes precedence over `birthYear`(nullable) |
markedAt | string | Date the queen was marked (ISO, not in the future, not before the birth)(nullable) |
deathDate | string | Date of death (ISO, not in the future, not before the birth)(nullable) |
markingColor | string | Marking colour; common English/German names are normalised (green, blue, grün). Derived from the birth year when omitted on create, and on update when the birth year changes(nullable, weiss | gelb | rot | gruen | blau)e.g. blau |
origin | string | purchase | own_breeding | swarm | gift | other(nullable, purchase | own_breeding | swarm | gift | other) |
name | string | Free-text name, max 200 characters(nullable) |
breeder | string | Breeder name, max 200 characters(nullable)e.g. Belegstelle Hochalm |
breedingLine | string | Breeding line, max 200 characters(nullable) |
parentage | string | Parentage, max 200 characters(nullable) |
matingStatus | string | Mating status(nullable, mated | naturally_mated | instrumentally_inseminated | unmated | drone_layer) |
status | string | active | replaced | dead | missing | swarmed | lost(default active, active | replaced | dead | missing | swarmed | lost) |
statusObservedAt | string | When the status was observed: ISO, not more than 24h in the future (timezone tolerance). An explicit value confirms even an unchanged status. When omitted, create and status changes use the current time (`deathDate` for `dead` when supplied); other updates keep it, except a corrected `deathDate` for a dead queen |
rating | integer | Accepted for compatibility but ignored: the stored rating is derived from the trait ratings(nullable) |
notes | string | Free-text notes (max 5000 chars)(nullable) |
gentleness | integer | Gentleness, rating 1-5(nullable) |
calmOnComb | integer | Calmness on the comb, rating 1-5(nullable) |
swarmTendency | integer | Swarm tendency, rating 1-5(nullable) |
honeyProduction | integer | Honey production, rating 1-5(nullable) |
queenBroodPattern | integer | Brood pattern, rating 1-5(nullable) |
winterHardiness | integer | Winter hardiness, rating 1-5(nullable) |
springBuildUp | integer | Spring build-up, rating 1-5(nullable) |
hygienicBehavior | integer | Hygienic behaviour, rating 1-5(nullable) |
combConstruction | integer | Comb construction, rating 1-5(nullable) |
motherQueenId | string | ID of the mother queen for lineage tracking(nullable) |
replacesQueenId | string | Queen of the same hive to replace atomically (requires `hiveId` and an active successor). Only used on create(nullable) |
replacedAt | string | Replacement calendar day (ISO YYYY-MM-DD, not in the future or before the predecessor's birth); defaults to today in Europe/Berlin. Requires `replacesQueenId` |
replacedReason | string | Optional reason stored on the predecessor; the display reads this field beside her notes. Requires `replacesQueenId`(nullable, alter | sanftmut | wabensitz | schwarm | leistung | drohnen | sonst) |
replacementDisposition | string | Predecessor: replaced and detached (default when replacing), moved and active in another hive, or dead with deathDate set to replacedAt. Requires `replacesQueenId`(replaced | moved | dead) |
replacementHiveId | string | Owned, non-deleted, open and queenless destination hive; required only for `moved`, and must differ from `hiveId`(nullable) |
Response Body
A queen (every queen operation returns this entry; only get-queen adds `assignedAt`, `lastSightingAt` and `rearingTaskOpen`)
e.g. {"id":"clx3...","name":null,"race":"carnica","birthYear":2025,"birthDate":null,"markedAt":null,"deathDate":null,"replacedAt":null,"replacedReason":null,"markingColor":"blau","origin":null,"breeder":null,"breedingLine":null,"parentage":null,"matingStatus":null,"status":"active","statusObservedAt":"2025-04-01T09:00:00.000Z","rating":null,"hiveId":"clx2abc","hiveName":"Bienchen","hiveNumber":7,"notes":null,"gentleness":null,"calmOnComb":null,"swarmTendency":null,"honeyProduction":null,"queenBroodPattern":null,"winterHardiness":null,"springBuildUp":null,"hygienicBehavior":null,"combConstruction":null,"motherQueenId":null,"motherQueenLabel":null,"motherQueen":null,"daughterCount":0,"createdAt":"2025-04-01T09:00:00.000Z","updatedAt":"2025-04-01T09:00:00.000Z"}
| Field | Type | Description |
|---|---|---|
id | string | Queen ID(required) |
name | string | Free-text name(required, nullable) |
race | string | Race(required, nullable, carnica | buckfast | ligustica | mellifera | caucasica | cerana | iberica | russian | saskatraz | other) |
birthYear | integer | Year of birth(required, nullable) |
birthDate | string | Exact hatching date (ISO 8601 date-time)(required, nullable) |
markedAt | string | Date the queen was marked (ISO 8601 date-time)(required, nullable) |
deathDate | string | Date of death (ISO 8601 date-time)(required, nullable) |
replacedAt | string | Latest replacement calendar day (UTC midnight); null when not recorded (ISO 8601 date-time)(required, nullable) |
replacedReason | string | Latest replacement reason; not duplicated into the free-text notes(required, nullable, alter | sanftmut | wabensitz | schwarm | leistung | drohnen | sonst) |
markingColor | string | Marking colour(required, nullable) |
origin | string | Origin(required, nullable, purchase | own_breeding | swarm | gift | other) |
breeder | string | Breeder(required, nullable) |
breedingLine | string | Breeding line(required, nullable) |
parentage | string | Parentage(required, nullable) |
matingStatus | string | Mating status(required, nullable, mated | naturally_mated | instrumentally_inseminated | unmated | drone_layer) |
status | string | Queen status(required, active | replaced | dead | missing | swarmed | lost) |
statusObservedAt | string | When the queen's status was observed; null for legacy records without an observation (ISO 8601 date-time)(required, nullable) |
rating | integer | Overall rating derived from the trait ratings(required, nullable) |
hiveId | string | Hive the queen is attached to (not deleted)(required, nullable) |
hiveName | string | Name of that hive(required, nullable) |
hiveNumber | integer | Number of that hive(required, nullable) |
notes | string | Free-text notes(required, nullable) |
gentleness | integer | Gentleness, rating 1-5(required, nullable) |
calmOnComb | integer | Calmness on the comb, rating 1-5(required, nullable) |
swarmTendency | integer | Swarm tendency, rating 1-5(required, nullable) |
honeyProduction | integer | Honey production, rating 1-5(required, nullable) |
queenBroodPattern | integer | Brood pattern, rating 1-5(required, nullable) |
winterHardiness | integer | Winter hardiness, rating 1-5(required, nullable) |
springBuildUp | integer | Spring build-up, rating 1-5(required, nullable) |
hygienicBehavior | integer | Hygienic behaviour, rating 1-5(required, nullable) |
combConstruction | integer | Comb construction, rating 1-5(required, nullable) |
motherQueenId | string | ID of the mother queen(required, nullable) |
motherQueenLabel | string | Display label of the mother queen (name, race, birth year)(required, nullable) |
motherQueen | object | The mother queen (not deleted)(required, nullable) |
motherQueen.id | string | Queen ID(required) |
motherQueen.name | string | Free-text name(required, nullable) |
motherQueen.race | string | Race(required, nullable) |
motherQueen.birthYear | integer | Year of birth(required, nullable) |
daughterCount | integer | Daughters of this queen (not deleted)(required) |
createdAt | string | Created (ISO 8601 date-time)(required) |
updatedAt | string | Last updated (ISO 8601 date-time)(required) |
Success
201 application/json, wrapped as { data }
Errors
21 possible errors
Example
curl -X POST "https://hivekraft.com/api/queens" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"race":"carnica","birthYear":2025,"markingColor":"blau","hiveId":"clx2abc","statusObservedAt":"2025-04-01T09:00:00.000Z"}'/api/queens/[id]Scope: read:queensGet a single queen
Returns full details including trait ratings and lineage.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Queen ID |
Response Body
A queen with the date she was assigned to her current hive, when she was last seen and whether a rearing task is scheduled
e.g. {"id":"clx3...","name":"Carnica 2025","race":"carnica","birthYear":2025,"birthDate":null,"markedAt":null,"deathDate":null,"replacedAt":null,"replacedReason":null,"markingColor":"blau","origin":"purchase","breeder":"Belegstelle Hochalm","breedingLine":null,"parentage":null,"matingStatus":"mated","status":"active","statusObservedAt":"2025-06-15T08:30:00.000Z","rating":null,"hiveId":"clx2abc","hiveName":"Bienchen","hiveNumber":7,"notes":null,"gentleness":4,"calmOnComb":null,"swarmTendency":null,"honeyProduction":null,"queenBroodPattern":null,"winterHardiness":null,"springBuildUp":null,"hygienicBehavior":null,"combConstruction":null,"motherQueenId":null,"motherQueenLabel":null,"motherQueen":null,"daughterCount":0,"createdAt":"2025-04-01T09:00:00.000Z","updatedAt":"2025-06-15T08:30:00.000Z","assignedAt":"2025-04-02T09:00:00.000Z","lastSightingAt":"2025-06-14T10:00:00.000Z","rearingTaskOpen":false}
| Field | Type | Description |
|---|---|---|
id | string | Queen ID(required) |
name | string | Free-text name(required, nullable) |
race | string | Race(required, nullable, carnica | buckfast | ligustica | mellifera | caucasica | cerana | iberica | russian | saskatraz | other) |
birthYear | integer | Year of birth(required, nullable) |
birthDate | string | Exact hatching date (ISO 8601 date-time)(required, nullable) |
markedAt | string | Date the queen was marked (ISO 8601 date-time)(required, nullable) |
deathDate | string | Date of death (ISO 8601 date-time)(required, nullable) |
replacedAt | string | Latest replacement calendar day (UTC midnight); null when not recorded (ISO 8601 date-time)(required, nullable) |
replacedReason | string | Latest replacement reason; not duplicated into the free-text notes(required, nullable, alter | sanftmut | wabensitz | schwarm | leistung | drohnen | sonst) |
markingColor | string | Marking colour(required, nullable) |
origin | string | Origin(required, nullable, purchase | own_breeding | swarm | gift | other) |
breeder | string | Breeder(required, nullable) |
breedingLine | string | Breeding line(required, nullable) |
parentage | string | Parentage(required, nullable) |
matingStatus | string | Mating status(required, nullable, mated | naturally_mated | instrumentally_inseminated | unmated | drone_layer) |
status | string | Queen status(required, active | replaced | dead | missing | swarmed | lost) |
statusObservedAt | string | When the queen's status was observed; null for legacy records without an observation (ISO 8601 date-time)(required, nullable) |
rating | integer | Overall rating derived from the trait ratings(required, nullable) |
hiveId | string | Hive the queen is attached to (not deleted)(required, nullable) |
hiveName | string | Name of that hive(required, nullable) |
hiveNumber | integer | Number of that hive(required, nullable) |
notes | string | Free-text notes(required, nullable) |
gentleness | integer | Gentleness, rating 1-5(required, nullable) |
calmOnComb | integer | Calmness on the comb, rating 1-5(required, nullable) |
swarmTendency | integer | Swarm tendency, rating 1-5(required, nullable) |
honeyProduction | integer | Honey production, rating 1-5(required, nullable) |
queenBroodPattern | integer | Brood pattern, rating 1-5(required, nullable) |
winterHardiness | integer | Winter hardiness, rating 1-5(required, nullable) |
springBuildUp | integer | Spring build-up, rating 1-5(required, nullable) |
hygienicBehavior | integer | Hygienic behaviour, rating 1-5(required, nullable) |
combConstruction | integer | Comb construction, rating 1-5(required, nullable) |
motherQueenId | string | ID of the mother queen(required, nullable) |
motherQueenLabel | string | Display label of the mother queen (name, race, birth year)(required, nullable) |
motherQueen | object | The mother queen (not deleted)(required, nullable) |
motherQueen.id | string | Queen ID(required) |
motherQueen.name | string | Free-text name(required, nullable) |
motherQueen.race | string | Race(required, nullable) |
motherQueen.birthYear | integer | Year of birth(required, nullable) |
daughterCount | integer | Daughters of this queen (not deleted)(required) |
createdAt | string | Created (ISO 8601 date-time)(required) |
updatedAt | string | Last updated (ISO 8601 date-time)(required) |
assignedAt | string | When the queen was assigned to her current hive, read from the audit trail; null when unknown (ISO 8601 date-time)(required, nullable) |
lastSightingAt | string | Date of the latest confirmed inspection of her current hive with the queen seen, since she joined it; null when none (ISO 8601 date-time)(required, nullable) |
rearingTaskOpen | boolean | A scheduled rearing task for this queen exists and is not completed (skipped ones count)(required) |
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/queens/clx3abc" \
-H "Authorization: Bearer YOUR_API_KEY"/api/queens/[id]Scope: write:queensUpdate a queen
Partially updates queen details including trait ratings.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Queen ID |
Request Body
Any subset of the fields below; create-only replacement fields are ignored here. `expectedUpdatedAt` adds an optimistic lock. An omitted field stays untouched; `null` clears a nullable field. Exceptions: a `birthDate` or `birthYear` that changes the birth year also sets `birthYear` and, when `markingColor` is omitted, `markingColor` from the new year; an inactive `status` (also the stored one) detaches the queen from her colony even without `hiveId` in the payload.
| Field | Type | Description |
|---|---|---|
hiveId | string | Assign to this hive (optional); ignored for an inactive status(nullable) |
expectedUpdatedAt | string | The `updatedAt` the client last saw (ISO datetime). On update this guards the edited queen; on create with `replacesQueenId` it guards the predecessor. A different stored value is rejected with 409 `STALE_QUEEN` |
race | string | Race(nullable, carnica | buckfast | ligustica | mellifera | caucasica | cerana | iberica | russian | saskatraz | other)e.g. carnica |
birthYear | integer | Year of birth, 2000 up to the current year(nullable)e.g. 2025 |
birthDate | string | Exact hatching date (ISO), between 2000 and today; takes precedence over `birthYear`(nullable) |
markedAt | string | Date the queen was marked (ISO, not in the future, not before the birth)(nullable) |
deathDate | string | Date of death (ISO, not in the future, not before the birth)(nullable) |
markingColor | string | Marking colour; common English/German names are normalised (green, blue, grün). Derived from the birth year when omitted on create, and on update when the birth year changes(nullable, weiss | gelb | rot | gruen | blau)e.g. blau |
origin | string | purchase | own_breeding | swarm | gift | other(nullable, purchase | own_breeding | swarm | gift | other) |
name | string | Free-text name, max 200 characters(nullable) |
breeder | string | Breeder name, max 200 characters(nullable)e.g. Belegstelle Hochalm |
breedingLine | string | Breeding line, max 200 characters(nullable) |
parentage | string | Parentage, max 200 characters(nullable) |
matingStatus | string | Mating status(nullable, mated | naturally_mated | instrumentally_inseminated | unmated | drone_layer) |
status | string | active | replaced | dead | missing | swarmed | lost(active | replaced | dead | missing | swarmed | lost) |
statusObservedAt | string | When the status was observed: ISO, not more than 24h in the future (timezone tolerance). An explicit value confirms even an unchanged status. When omitted, create and status changes use the current time (`deathDate` for `dead` when supplied); other updates keep it, except a corrected `deathDate` for a dead queen |
rating | integer | Accepted for compatibility but ignored: the stored rating is derived from the trait ratings(nullable) |
notes | string | Free-text notes (max 5000 chars)(nullable) |
gentleness | integer | Gentleness, rating 1-5(nullable) |
calmOnComb | integer | Calmness on the comb, rating 1-5(nullable) |
swarmTendency | integer | Swarm tendency, rating 1-5(nullable) |
honeyProduction | integer | Honey production, rating 1-5(nullable) |
queenBroodPattern | integer | Brood pattern, rating 1-5(nullable) |
winterHardiness | integer | Winter hardiness, rating 1-5(nullable) |
springBuildUp | integer | Spring build-up, rating 1-5(nullable) |
hygienicBehavior | integer | Hygienic behaviour, rating 1-5(nullable) |
combConstruction | integer | Comb construction, rating 1-5(nullable) |
motherQueenId | string | ID of the mother queen for lineage tracking(nullable) |
Response Body
A queen (every queen operation returns this entry; only get-queen adds `assignedAt`, `lastSightingAt` and `rearingTaskOpen`)
e.g. {"id":"clx3...","name":"Carnica 2025","race":"carnica","birthYear":2025,"birthDate":null,"markedAt":null,"deathDate":null,"replacedAt":null,"replacedReason":null,"markingColor":"blau","origin":"purchase","breeder":"Belegstelle Hochalm","breedingLine":null,"parentage":null,"matingStatus":"mated","status":"replaced","statusObservedAt":"2025-06-15T08:30:00.000Z","rating":null,"hiveId":null,"hiveName":null,"hiveNumber":null,"notes":null,"gentleness":4,"calmOnComb":null,"swarmTendency":null,"honeyProduction":null,"queenBroodPattern":null,"winterHardiness":null,"springBuildUp":null,"hygienicBehavior":null,"combConstruction":null,"motherQueenId":null,"motherQueenLabel":null,"motherQueen":null,"daughterCount":0,"createdAt":"2025-04-01T09:00:00.000Z","updatedAt":"2025-06-15T08:30:00.000Z"}
| Field | Type | Description |
|---|---|---|
id | string | Queen ID(required) |
name | string | Free-text name(required, nullable) |
race | string | Race(required, nullable, carnica | buckfast | ligustica | mellifera | caucasica | cerana | iberica | russian | saskatraz | other) |
birthYear | integer | Year of birth(required, nullable) |
birthDate | string | Exact hatching date (ISO 8601 date-time)(required, nullable) |
markedAt | string | Date the queen was marked (ISO 8601 date-time)(required, nullable) |
deathDate | string | Date of death (ISO 8601 date-time)(required, nullable) |
replacedAt | string | Latest replacement calendar day (UTC midnight); null when not recorded (ISO 8601 date-time)(required, nullable) |
replacedReason | string | Latest replacement reason; not duplicated into the free-text notes(required, nullable, alter | sanftmut | wabensitz | schwarm | leistung | drohnen | sonst) |
markingColor | string | Marking colour(required, nullable) |
origin | string | Origin(required, nullable, purchase | own_breeding | swarm | gift | other) |
breeder | string | Breeder(required, nullable) |
breedingLine | string | Breeding line(required, nullable) |
parentage | string | Parentage(required, nullable) |
matingStatus | string | Mating status(required, nullable, mated | naturally_mated | instrumentally_inseminated | unmated | drone_layer) |
status | string | Queen status(required, active | replaced | dead | missing | swarmed | lost) |
statusObservedAt | string | When the queen's status was observed; null for legacy records without an observation (ISO 8601 date-time)(required, nullable) |
rating | integer | Overall rating derived from the trait ratings(required, nullable) |
hiveId | string | Hive the queen is attached to (not deleted)(required, nullable) |
hiveName | string | Name of that hive(required, nullable) |
hiveNumber | integer | Number of that hive(required, nullable) |
notes | string | Free-text notes(required, nullable) |
gentleness | integer | Gentleness, rating 1-5(required, nullable) |
calmOnComb | integer | Calmness on the comb, rating 1-5(required, nullable) |
swarmTendency | integer | Swarm tendency, rating 1-5(required, nullable) |
honeyProduction | integer | Honey production, rating 1-5(required, nullable) |
queenBroodPattern | integer | Brood pattern, rating 1-5(required, nullable) |
winterHardiness | integer | Winter hardiness, rating 1-5(required, nullable) |
springBuildUp | integer | Spring build-up, rating 1-5(required, nullable) |
hygienicBehavior | integer | Hygienic behaviour, rating 1-5(required, nullable) |
combConstruction | integer | Comb construction, rating 1-5(required, nullable) |
motherQueenId | string | ID of the mother queen(required, nullable) |
motherQueenLabel | string | Display label of the mother queen (name, race, birth year)(required, nullable) |
motherQueen | object | The mother queen (not deleted)(required, nullable) |
motherQueen.id | string | Queen ID(required) |
motherQueen.name | string | Free-text name(required, nullable) |
motherQueen.race | string | Race(required, nullable) |
motherQueen.birthYear | integer | Year of birth(required, nullable) |
daughterCount | integer | Daughters of this queen (not deleted)(required) |
createdAt | string | Created (ISO 8601 date-time)(required) |
updatedAt | string | Last updated (ISO 8601 date-time)(required) |
Success
200 application/json, wrapped as { data }
Errors
21 possible errors
Example
curl -X PUT "https://hivekraft.com/api/queens/clx3abc" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"status":"replaced"}'/api/queens/[id]Scope: write:queensDelete a queen
Soft-deletes a queen record.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Queen ID |
Success
204 No Content (empty body)
Errors
18 possible errors
Example
curl -X DELETE "https://hivekraft.com/api/queens/clx3abc" \
-H "Authorization: Bearer YOUR_API_KEY"/api/queens/[id]/assignScope: write:queensAssign queen to a hive
Assigns a queen to a hive or unassigns it (pass null). Any previously assigned queen on the target hive is automatically unassigned.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Queen ID |
Request Body
`hiveId` must be present; null unassigns. An existing queen on the target hive is not replaced automatically.
| Field | Type | Description |
|---|---|---|
hiveId | string | Hive ID to assign to, or null to unassign(required, nullable)e.g. clx2abc |
expectedHiveId | string | Previously read colony ID, or null if unassigned(nullable) |
expectedUpdatedAt | string | Previously read queen version (ISO datetime); a mismatch returns 409 STALE_QUEEN |
Response Body
A queen (every queen operation returns this entry; only get-queen adds `assignedAt`, `lastSightingAt` and `rearingTaskOpen`)
e.g. {"id":"clx3...","name":"Carnica 2025","race":"carnica","birthYear":2025,"birthDate":null,"markedAt":null,"deathDate":null,"replacedAt":null,"replacedReason":null,"markingColor":"blau","origin":"purchase","breeder":"Belegstelle Hochalm","breedingLine":null,"parentage":null,"matingStatus":"mated","status":"active","statusObservedAt":"2025-06-15T08:30:00.000Z","rating":null,"hiveId":"clx2abc","hiveName":"Bienchen","hiveNumber":7,"notes":null,"gentleness":4,"calmOnComb":null,"swarmTendency":null,"honeyProduction":null,"queenBroodPattern":null,"winterHardiness":null,"springBuildUp":null,"hygienicBehavior":null,"combConstruction":null,"motherQueenId":null,"motherQueenLabel":null,"motherQueen":null,"daughterCount":0,"createdAt":"2025-04-01T09:00:00.000Z","updatedAt":"2025-06-15T08:30:00.000Z"}
| Field | Type | Description |
|---|---|---|
id | string | Queen ID(required) |
name | string | Free-text name(required, nullable) |
race | string | Race(required, nullable, carnica | buckfast | ligustica | mellifera | caucasica | cerana | iberica | russian | saskatraz | other) |
birthYear | integer | Year of birth(required, nullable) |
birthDate | string | Exact hatching date (ISO 8601 date-time)(required, nullable) |
markedAt | string | Date the queen was marked (ISO 8601 date-time)(required, nullable) |
deathDate | string | Date of death (ISO 8601 date-time)(required, nullable) |
replacedAt | string | Latest replacement calendar day (UTC midnight); null when not recorded (ISO 8601 date-time)(required, nullable) |
replacedReason | string | Latest replacement reason; not duplicated into the free-text notes(required, nullable, alter | sanftmut | wabensitz | schwarm | leistung | drohnen | sonst) |
markingColor | string | Marking colour(required, nullable) |
origin | string | Origin(required, nullable, purchase | own_breeding | swarm | gift | other) |
breeder | string | Breeder(required, nullable) |
breedingLine | string | Breeding line(required, nullable) |
parentage | string | Parentage(required, nullable) |
matingStatus | string | Mating status(required, nullable, mated | naturally_mated | instrumentally_inseminated | unmated | drone_layer) |
status | string | Queen status(required, active | replaced | dead | missing | swarmed | lost) |
statusObservedAt | string | When the queen's status was observed; null for legacy records without an observation (ISO 8601 date-time)(required, nullable) |
rating | integer | Overall rating derived from the trait ratings(required, nullable) |
hiveId | string | Hive the queen is attached to (not deleted)(required, nullable) |
hiveName | string | Name of that hive(required, nullable) |
hiveNumber | integer | Number of that hive(required, nullable) |
notes | string | Free-text notes(required, nullable) |
gentleness | integer | Gentleness, rating 1-5(required, nullable) |
calmOnComb | integer | Calmness on the comb, rating 1-5(required, nullable) |
swarmTendency | integer | Swarm tendency, rating 1-5(required, nullable) |
honeyProduction | integer | Honey production, rating 1-5(required, nullable) |
queenBroodPattern | integer | Brood pattern, rating 1-5(required, nullable) |
winterHardiness | integer | Winter hardiness, rating 1-5(required, nullable) |
springBuildUp | integer | Spring build-up, rating 1-5(required, nullable) |
hygienicBehavior | integer | Hygienic behaviour, rating 1-5(required, nullable) |
combConstruction | integer | Comb construction, rating 1-5(required, nullable) |
motherQueenId | string | ID of the mother queen(required, nullable) |
motherQueenLabel | string | Display label of the mother queen (name, race, birth year)(required, nullable) |
motherQueen | object | The mother queen (not deleted)(required, nullable) |
motherQueen.id | string | Queen ID(required) |
motherQueen.name | string | Free-text name(required, nullable) |
motherQueen.race | string | Race(required, nullable) |
motherQueen.birthYear | integer | Year of birth(required, nullable) |
daughterCount | integer | Daughters of this queen (not deleted)(required) |
createdAt | string | Created (ISO 8601 date-time)(required) |
updatedAt | string | Last updated (ISO 8601 date-time)(required) |
Success
200 application/json, wrapped as { data }
Errors
21 possible errors
Example
curl -X POST "https://hivekraft.com/api/queens/clx3abc/assign" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"hiveId":"clx2abc"}'Inspections
Record hive inspections (Durchsichten) with colony strength, brood pattern, varroa counts, and more.
/api/inspectionsScope: read:inspectionsList inspections
Returns inspections with optional filtering and cursor-based pagination. Without any pagination param the response is a bare array. As soon as you send `cursor` and/or `limit`, the response becomes a pagination object `{ items, nextCursor, hasMore }`.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
hiveId | string | No | Filter by hive |
apiaryId | string | No | Filter by apiary |
type | string | No | standard | quick |
status | string | No | confirmed | pending_compliance | archived; another value returns 400 |
withVarroa | boolean | No | Only inspections with a varroa measurement |
withFindings | boolean | No | Only inspections with queen cells or a pest finding |
dateFrom | string | No | Date lower bound, YYYY-MM-DD as a Europe/Berlin calendar day (inclusive)e.g. 2025-01-01 |
dateTo | string | No | Date upper bound, YYYY-MM-DD as a Europe/Berlin calendar day (the whole day is included)e.g. 2025-12-31 |
search | string | No | Free-text search over notes and hive name, max 100 characters |
cursor | string | No | Pagination cursor — an opaque value: pass the `nextCursor` from the previous page unchanged to fetch the next batch; do not build it yourself. An unknown or unreadable cursor returns 400 (reload the list from the first page). |
limit | number | No | Items per page (1-100, default 20). Sending this enables the paginated object response shape. A value outside 1-100 is ignored and the bare array is returned. |
Response Body
Without cursor and limit: a bare array of inspections (more entries beyond the server cap are signalled by the headers `X-List-Has-More: true` and `X-List-Next-Cursor`, pass that value as `cursor`). With `cursor` and/or `limit`: a page object `{ items, nextCursor, hasMore, total, complete, truncated }`. The example shows the page object.
e.g. {"items":[{"id":"clx4...","hiveId":"clx2abc","hiveNumber":7,"hiveName":"Bienchen","date":"2025-06-15T00:00:00.000Z","type":"standard","status":"confirmed","source":"manual","confirmedAt":null,"confirmedBy":null,"colonyStrength":8,"queenSeen":true,"eggsSeen":null,"temperament":"calm","queenCells":null,"diagnosticMethod":"dlib_powdersugar","measurementValue":3,"measurementUnit":"mites_per_10g_bees","measurementDays":null,"measurementSource":null,"measurementDaysAssumed":null,"measurementPhotoId":null,"varroaMeasurement":{"value":3,"unit":"mites_per_10g_bees","method":"dlib_powdersugar"},"honeyStores":"medium","broodPattern":"good","actions":null,"notes":null,"afbCleared":false,"pests":[],"mood":null,"flightActivity":null,"queenCellCount":null,"queenCellType":null,"queenCellStage":null,"queenCellAction":null,"broodFrames":null,"openBroodFrames":null,"cappedBroodFrames":null,"broodCompactness":null,"pollenStores":null,"queenMarked":null,"layingPattern":null,"weatherTemp":null,"weatherCondition":null,"inspectionDuration":null,"templateId":null,"customFieldValues":null,"autoTags":[],"replaceBlockedBy":"details","createdAt":"2025-06-15T08:30:00.000Z","updatedAt":"2025-06-15T08:30:00.000Z"}],"nextCursor":"k1_W3siZCI6IjIwMjUtMDYtMTVUMDA6MDA6MDAuMDAwWiJ9LCJjbHg0Li4uIl0","hasMore":true,"total":57,"complete":false,"truncated":false}
| Field | Type | Description |
|---|---|---|
items | array | The inspections on this page(required) |
items[].id | string | Inspection ID(required) |
items[].hiveId | string | Hive ID(required) |
items[].hiveNumber | integer | Colony number(required) |
items[].hiveName | string | Colony name(required, nullable) |
items[].date | string | Inspection date (ISO 8601 date-time)(required) |
items[].type | string | Inspection type(required, standard | quick) |
items[].status | string | Lifecycle status(required, confirmed | pending_compliance | archived) |
items[].source | string | Where the entry came from(required, manual | voice | import | api | photo_ai) |
items[].confirmedAt | string | When the entry was confirmed (ISO 8601 date-time)(required, nullable) |
items[].confirmedBy | string | Who confirmed the entry(required, nullable) |
items[].colonyStrength | integer | Strength rating 1-10(required, nullable) |
items[].queenSeen | boolean | Was the queen spotted?(required, nullable) |
items[].eggsSeen | boolean | Were eggs visible?(required, nullable) |
items[].temperament | string | Temperament(required, nullable, calm | nervous | aggressive) |
items[].queenCells | string | Legacy free text about queen cells(required, nullable) |
items[].diagnosticMethod | string | Varroa diagnostic method(required, nullable, liebefeld_natural_drop | dlib_powdersugar | dlib_alcohol_wash | brood_check | flotation) |
items[].measurementValue | number | Varroa measurement(required, nullable) |
items[].measurementUnit | string | Unit of the measurement(required, nullable, mites_per_day | mites_per_10g_bees | percent_infestation) |
items[].measurementDays | integer | Counting days of a natural-drop measurement(required, nullable) |
items[].measurementSource | string | Where the count comes from; `null` = not recorded(required, nullable, manual | photo | photo_assisted) |
items[].measurementDaysAssumed | boolean | `true` = the counting days are the prefilled 7, not entered; `null` = not recorded or not a natural drop(required, nullable) |
items[].measurementPhotoId | string | Record photo of the count: ID of a photo of this inspection, set only by `POST /api/inspections/[id]/photos` with `measurementEvidence=1`. No foreign key: valid only if `GET /api/inspections/[id]/photos` lists it; cleared when that photo is deleted or the count changes(required, nullable) |
items[].varroaMeasurement | object | The resolved varroa measurement (new fields preferred, legacy count as fallback; natural drop normalised to mites per day)(required, nullable) |
items[].varroaMeasurement.value | number | Measured value(required) |
items[].varroaMeasurement.unit | string | Unit(required, mites_per_day | mites_per_10g_bees | percent_infestation) |
items[].varroaMeasurement.method | string | Method(required, liebefeld_natural_drop | dlib_powdersugar | dlib_alcohol_wash | brood_check | flotation) |
items[].honeyStores | string | Honey stores(required, nullable, low | medium | high) |
items[].broodPattern | string | Brood pattern(required, nullable, good | spotty | poor | none) |
items[].actions | string | Actions taken(required, nullable) |
items[].notes | string | Free-text notes(required, nullable) |
items[].afbCleared | boolean | American foulbrood suspicion ruled out by a vet(required) |
items[].pests | array | Observed pests(required) |
items[].pests[] | string | Pest type(varroa | wax_moth | hive_beetle | aethina_tumida | tropilaelaps_mercedesae | nosema | foulbrood | chalkbrood | other) |
items[].mood | string | Mood of the colony(required, nullable, calm | alert | defensive | aggressive) |
items[].flightActivity | string | Flight activity(required, nullable, none | low | normal | high) |
items[].queenCellCount | integer | Number of queen cells(required, nullable) |
items[].queenCellType | string | Queen cell type(required, nullable, none | swarm | supersedure | emergency) |
items[].queenCellStage | string | Queen cell stage(required, nullable, cup | egg | larva | capped | emerged) |
items[].queenCellAction | string | Action taken on the queen cells(required, nullable, left | removed | marked) |
items[].broodFrames | integer | Frames with brood(required, nullable) |
items[].openBroodFrames | integer | Frames with open brood(required, nullable) |
items[].cappedBroodFrames | integer | Frames with capped brood(required, nullable) |
items[].broodCompactness | string | Brood compactness(required, nullable, compact | semi_compact | scattered) |
items[].pollenStores | string | Pollen stores(required, nullable, none | low | medium | high) |
items[].queenMarked | boolean | Is the queen marked?(required, nullable) |
items[].layingPattern | string | Laying pattern(required, nullable, excellent | good | fair | poor) |
items[].weatherTemp | number | Temperature in °C(required, nullable) |
items[].weatherCondition | string | Weather(required, nullable, sunny | cloudy | overcast | rainy | windy) |
items[].inspectionDuration | integer | Duration in minutes(required, nullable) |
items[].templateId | string | ID of the inspection template(required, nullable) |
items[].customFieldValues | string | Values of custom template fields as a JSON string(required, nullable) |
items[].autoTags | array | Tags derived from the notes (get, create and update only; empty in lists)(required) |
items[].autoTags[] | string | Tag |
items[].replaceBlockedBy | string | Why the voice roundup may not replace this inspection: `team` = recorded by a team member, `details` = holds photos, pests, notes or actions, heard signs or a measurement; `null` = may be replaced. `DELETE /api/inspections/[id]?replace=roundup` checks the same and answers 409 `INSPECTION_NOT_REPLACEABLE` otherwise(required, nullable, team | details) |
items[].createdAt | string | Created (ISO 8601 date-time)(required) |
items[].updatedAt | string | Last updated (ISO 8601 date-time)(required) |
nextCursor | string | Cursor for the next page, or null when there are no more results(required, nullable) |
hasMore | boolean | True when a further page is available(required) |
total | number | All matching inspections for the active filters, across all pages(required) |
complete | boolean | True on the last page(required) |
truncated | boolean | False: ordinary pagination does not discard further pages(required) |
[].id | string | Inspection ID(required) |
[].hiveId | string | Hive ID(required) |
[].hiveNumber | integer | Colony number(required) |
[].hiveName | string | Colony name(required, nullable) |
[].date | string | Inspection date (ISO 8601 date-time)(required) |
[].type | string | Inspection type(required, standard | quick) |
[].status | string | Lifecycle status(required, confirmed | pending_compliance | archived) |
[].source | string | Where the entry came from(required, manual | voice | import | api | photo_ai) |
[].confirmedAt | string | When the entry was confirmed (ISO 8601 date-time)(required, nullable) |
[].confirmedBy | string | Who confirmed the entry(required, nullable) |
[].colonyStrength | integer | Strength rating 1-10(required, nullable) |
[].queenSeen | boolean | Was the queen spotted?(required, nullable) |
[].eggsSeen | boolean | Were eggs visible?(required, nullable) |
[].temperament | string | Temperament(required, nullable, calm | nervous | aggressive) |
[].queenCells | string | Legacy free text about queen cells(required, nullable) |
[].diagnosticMethod | string | Varroa diagnostic method(required, nullable, liebefeld_natural_drop | dlib_powdersugar | dlib_alcohol_wash | brood_check | flotation) |
[].measurementValue | number | Varroa measurement(required, nullable) |
[].measurementUnit | string | Unit of the measurement(required, nullable, mites_per_day | mites_per_10g_bees | percent_infestation) |
[].measurementDays | integer | Counting days of a natural-drop measurement(required, nullable) |
[].measurementSource | string | Where the count comes from; `null` = not recorded(required, nullable, manual | photo | photo_assisted) |
[].measurementDaysAssumed | boolean | `true` = the counting days are the prefilled 7, not entered; `null` = not recorded or not a natural drop(required, nullable) |
[].measurementPhotoId | string | Record photo of the count: ID of a photo of this inspection, set only by `POST /api/inspections/[id]/photos` with `measurementEvidence=1`. No foreign key: valid only if `GET /api/inspections/[id]/photos` lists it; cleared when that photo is deleted or the count changes(required, nullable) |
[].varroaMeasurement | object | The resolved varroa measurement (new fields preferred, legacy count as fallback; natural drop normalised to mites per day)(required, nullable) |
[].varroaMeasurement.value | number | Measured value(required) |
[].varroaMeasurement.unit | string | Unit(required, mites_per_day | mites_per_10g_bees | percent_infestation) |
[].varroaMeasurement.method | string | Method(required, liebefeld_natural_drop | dlib_powdersugar | dlib_alcohol_wash | brood_check | flotation) |
[].honeyStores | string | Honey stores(required, nullable, low | medium | high) |
[].broodPattern | string | Brood pattern(required, nullable, good | spotty | poor | none) |
[].actions | string | Actions taken(required, nullable) |
[].notes | string | Free-text notes(required, nullable) |
[].afbCleared | boolean | American foulbrood suspicion ruled out by a vet(required) |
[].pests | array | Observed pests(required) |
[].pests[] | string | Pest type(varroa | wax_moth | hive_beetle | aethina_tumida | tropilaelaps_mercedesae | nosema | foulbrood | chalkbrood | other) |
[].mood | string | Mood of the colony(required, nullable, calm | alert | defensive | aggressive) |
[].flightActivity | string | Flight activity(required, nullable, none | low | normal | high) |
[].queenCellCount | integer | Number of queen cells(required, nullable) |
[].queenCellType | string | Queen cell type(required, nullable, none | swarm | supersedure | emergency) |
[].queenCellStage | string | Queen cell stage(required, nullable, cup | egg | larva | capped | emerged) |
[].queenCellAction | string | Action taken on the queen cells(required, nullable, left | removed | marked) |
[].broodFrames | integer | Frames with brood(required, nullable) |
[].openBroodFrames | integer | Frames with open brood(required, nullable) |
[].cappedBroodFrames | integer | Frames with capped brood(required, nullable) |
[].broodCompactness | string | Brood compactness(required, nullable, compact | semi_compact | scattered) |
[].pollenStores | string | Pollen stores(required, nullable, none | low | medium | high) |
[].queenMarked | boolean | Is the queen marked?(required, nullable) |
[].layingPattern | string | Laying pattern(required, nullable, excellent | good | fair | poor) |
[].weatherTemp | number | Temperature in °C(required, nullable) |
[].weatherCondition | string | Weather(required, nullable, sunny | cloudy | overcast | rainy | windy) |
[].inspectionDuration | integer | Duration in minutes(required, nullable) |
[].templateId | string | ID of the inspection template(required, nullable) |
[].customFieldValues | string | Values of custom template fields as a JSON string(required, nullable) |
[].autoTags | array | Tags derived from the notes (get, create and update only; empty in lists)(required) |
[].autoTags[] | string | Tag |
[].replaceBlockedBy | string | Why the voice roundup may not replace this inspection: `team` = recorded by a team member, `details` = holds photos, pests, notes or actions, heard signs or a measurement; `null` = may be replaced. `DELETE /api/inspections/[id]?replace=roundup` checks the same and answers 409 `INSPECTION_NOT_REPLACEABLE` otherwise(required, nullable, team | details) |
[].createdAt | string | Created (ISO 8601 date-time)(required) |
[].updatedAt | string | Last updated (ISO 8601 date-time)(required) |
Success
200 application/json, wrapped as { data }
Errors
18 possible errors
Example
curl -X GET "https://hivekraft.com/api/inspections?hiveId=clx2abc&dateFrom=2025-01-01" \
-H "Authorization: Bearer YOUR_API_KEY"/api/inspectionsScope: write:inspectionsCreate an inspection
Records a new hive inspection with details about colony health, brood, varroa, and weather.
Request Headers
| Name | Type | Required | Description |
|---|---|---|---|
Idempotency-Key | string | No | Optional retry key, 16-128 characters from A-Z a-z 0-9 _ -. A repeat with the same key and body returns the first result instead of creating a second record; an invalid key is rejected with 400.e.g. 3f2a9c1e-7b4d-4e8a-9c21-0d5b6a7e8f90 |
Request Body
hiveId, date and type are required. A varroa measurement is all or nothing: value, `measurementUnit` and a matching `diagnosticMethod` (or a `varroaCount`/`varroaMethod`, stored as such a measurement); a partial one (for example only `diagnosticMethod`) is rejected with 400. A `liebefeld_natural_drop` measurement without `measurementDays` (omitted or `null`) is stored with 7 days. The response can carry `afbEscalationFailed: true` when a foulbrood suspicion in `pests` or `notes` could not be escalated.
| Field | Type | Description |
|---|---|---|
hiveId | string | Hive to inspect(required)e.g. clx2abc |
date | string | Inspection date (ISO date or date-time)(required)e.g. 2025-06-15 |
type | string | Inspection type(required, standard | quick)e.g. standard |
colonyStrength | integer | Strength rating 1-10(nullable)e.g. 8 |
queenSeen | boolean | Was the queen spotted?(nullable)e.g. true |
eggsSeen | boolean | Were eggs visible?(nullable) |
temperament | string | Temperament(nullable, calm | nervous | aggressive) |
honeyStores | string | Honey stores(nullable, low | medium | high) |
broodPattern | string | Brood pattern(nullable, good | spotty | poor | none) |
mood | string | Mood of the colony(nullable, calm | alert | defensive | aggressive) |
notes | string | Free-text notes (max 5000 chars)(nullable) |
queenCells | string | Legacy free text about queen cells, max 500 characters(nullable) |
varroaCount | integer | Varroa count, 0-10000 (the limit of `measurementValue`; lowered from 100000 with RP-151), input alias only: stored as a measurement (natural drop per day with 1 counting day, or the sample method below) and checked like one. It replaces all four measurement fields: `measurementValue`, `measurementUnit` and `measurementDays` sent alongside are dropped, `diagnosticMethod` only chooses the method when `varroaMethod` is missing; on update without `varroaMethod` the stored method, and its unit if it fits, is kept. Changed with the removal of the legacy column (migration 20261016000000): responses no longer contain `varroaCount` or `varroaMethod`; read `varroaMeasurement` or the measurement fields. An explicit `null` alone changes nothing(nullable)e.g. 3 |
varroaMethod | string | Method of the varroa count, input alias only and only the three legacy names (new methods go into `diagnosticMethod`): becomes `diagnosticMethod` when the request sends none; not returned. Without a value (sent or stored) the measurement is incomplete and the request is rejected with 400(nullable, natural_drop | sugar_shake | alcohol_wash) |
actions | string | Actions taken, max 2000 characters(nullable) |
diagnosticMethod | string | Varroa diagnostic method; must match `measurementUnit`(nullable, liebefeld_natural_drop | dlib_powdersugar | dlib_alcohol_wash | brood_check | flotation) |
measurementValue | number | Varroa measurement, 0-10000. A request that writes any of the four measurement fields must leave, merged with the stored row, either no measurement (all four `null`) or a complete and consistent one: value, `measurementUnit`, a `diagnosticMethod` that matches the unit, and for natural drop the days; otherwise 400 `VALIDATION_ERROR` with the field. A `varroaCount` or `varroaMethod` in the request counts as written measurement fields. On create the request itself must pair a value with `measurementUnit`; on update only the merged row decides, so `{ "measurementValue": 28 }` on a row with a complete measurement is valid(nullable) |
measurementUnit | string | Unit of the measurement; must match `diagnosticMethod`(nullable, mites_per_day | mites_per_10g_bees | percent_infestation) |
measurementDays | integer | Counting days of a natural-drop measurement, 1-60. With `diagnosticMethod` `liebefeld_natural_drop` plus `measurementValue` and `measurementUnit` and no days (omitted or `null`, on update also none stored), the server stores 7(nullable) |
measurementSource | string | Where the count comes from: typed by hand, counted on the photo or an assisted photo suggestion checked by you (`photo_assisted`, N4). Read only when the request writes a measurement field; then it is stored anew, and without it the origin becomes `null` (unknown). An emptied measurement clears it. Never used for calculation, rating or forecast(nullable, manual | photo | photo_assisted) |
measurementDaysAssumed | boolean | Natural drop only: `true` when the counting days are the prefilled 7, not entered. Read only with a written measurement field; days sent without it are stored as `false`, days the server fills in (7) as `true`; other methods store `null`. Never used for calculation, rating or forecast(nullable) |
status | string | Lifecycle status; unconfirmed entries need a separate confirmation(default confirmed, confirmed | pending_compliance | archived) |
source | string | Where the entry came from(default manual, manual | voice | import | api | photo_ai) |
afbCleared | boolean | American foulbrood suspicion ruled out by a vet |
pests | array | Observed pests, at most 20; duplicates are dropped |
pests[] | string | Pest type. A suspected small hive beetle is `aethina_tumida`; `hive_beetle` is a legacy value; rejected on create, kept on update only if already stored, and triggers nothing(varroa | wax_moth | hive_beetle | aethina_tumida | tropilaelaps_mercedesae | nosema | foulbrood | chalkbrood | other) |
flightActivity | string | Flight activity(nullable, none | low | normal | high) |
queenCellCount | integer | Number of queen cells, 0-50(nullable) |
queenCellType | string | Queen cell type(nullable, none | swarm | supersedure | emergency) |
queenCellStage | string | Queen cell stage(nullable, cup | egg | larva | capped | emerged) |
queenCellAction | string | Action taken on the queen cells(nullable, left | removed | marked) |
broodFrames | integer | Frames with brood, 0-30(nullable) |
openBroodFrames | integer | Frames with open brood, 0-30(nullable) |
cappedBroodFrames | integer | Frames with capped brood, 0-30(nullable) |
broodCompactness | string | Brood compactness(nullable, compact | semi_compact | scattered) |
pollenStores | string | Pollen stores(nullable, none | low | medium | high) |
queenMarked | boolean | Is the queen marked?(nullable) |
layingPattern | string | Laying pattern(nullable, excellent | good | fair | poor) |
weatherTemp | number | Temperature in °C, -30 to 60(nullable) |
weatherCondition | string | Weather(nullable, sunny | cloudy | overcast | rainy | windy) |
inspectionDuration | integer | Duration in minutes, 0-600(nullable) |
templateId | string | ID of the inspection template, max 50 characters(nullable) |
customFieldValues | string | Values of custom template fields as a JSON string, max 10000 characters(nullable) |
Response Body
An inspection (create, get, update and list return the same entry; the list leaves `autoTags` empty)
e.g. {"id":"clx4...","hiveId":"clx2abc","hiveNumber":7,"hiveName":"Bienchen","date":"2025-06-15T00:00:00.000Z","type":"standard","status":"confirmed","source":"manual","confirmedAt":null,"confirmedBy":null,"colonyStrength":8,"queenSeen":true,"eggsSeen":null,"temperament":"calm","queenCells":null,"diagnosticMethod":"dlib_powdersugar","measurementValue":3,"measurementUnit":"mites_per_10g_bees","measurementDays":null,"measurementSource":null,"measurementDaysAssumed":null,"measurementPhotoId":null,"varroaMeasurement":{"value":3,"unit":"mites_per_10g_bees","method":"dlib_powdersugar"},"honeyStores":"medium","broodPattern":"good","actions":null,"notes":null,"afbCleared":false,"pests":[],"mood":null,"flightActivity":null,"queenCellCount":null,"queenCellType":null,"queenCellStage":null,"queenCellAction":null,"broodFrames":null,"openBroodFrames":null,"cappedBroodFrames":null,"broodCompactness":null,"pollenStores":null,"queenMarked":null,"layingPattern":null,"weatherTemp":null,"weatherCondition":null,"inspectionDuration":null,"templateId":null,"customFieldValues":null,"autoTags":[],"replaceBlockedBy":"details","createdAt":"2025-06-15T08:30:00.000Z","updatedAt":"2025-06-15T08:30:00.000Z"}
| Field | Type | Description |
|---|---|---|
id | string | Inspection ID(required) |
hiveId | string | Hive ID(required) |
hiveNumber | integer | Colony number(required) |
hiveName | string | Colony name(required, nullable) |
date | string | Inspection date (ISO 8601 date-time)(required) |
type | string | Inspection type(required, standard | quick) |
status | string | Lifecycle status(required, confirmed | pending_compliance | archived) |
source | string | Where the entry came from(required, manual | voice | import | api | photo_ai) |
confirmedAt | string | When the entry was confirmed (ISO 8601 date-time)(required, nullable) |
confirmedBy | string | Who confirmed the entry(required, nullable) |
colonyStrength | integer | Strength rating 1-10(required, nullable) |
queenSeen | boolean | Was the queen spotted?(required, nullable) |
eggsSeen | boolean | Were eggs visible?(required, nullable) |
temperament | string | Temperament(required, nullable, calm | nervous | aggressive) |
queenCells | string | Legacy free text about queen cells(required, nullable) |
diagnosticMethod | string | Varroa diagnostic method(required, nullable, liebefeld_natural_drop | dlib_powdersugar | dlib_alcohol_wash | brood_check | flotation) |
measurementValue | number | Varroa measurement(required, nullable) |
measurementUnit | string | Unit of the measurement(required, nullable, mites_per_day | mites_per_10g_bees | percent_infestation) |
measurementDays | integer | Counting days of a natural-drop measurement(required, nullable) |
measurementSource | string | Where the count comes from; `null` = not recorded(required, nullable, manual | photo | photo_assisted) |
measurementDaysAssumed | boolean | `true` = the counting days are the prefilled 7, not entered; `null` = not recorded or not a natural drop(required, nullable) |
measurementPhotoId | string | Record photo of the count: ID of a photo of this inspection, set only by `POST /api/inspections/[id]/photos` with `measurementEvidence=1`. No foreign key: valid only if `GET /api/inspections/[id]/photos` lists it; cleared when that photo is deleted or the count changes(required, nullable) |
varroaMeasurement | object | The resolved varroa measurement (new fields preferred, legacy count as fallback; natural drop normalised to mites per day)(required, nullable) |
varroaMeasurement.value | number | Measured value(required) |
varroaMeasurement.unit | string | Unit(required, mites_per_day | mites_per_10g_bees | percent_infestation) |
varroaMeasurement.method | string | Method(required, liebefeld_natural_drop | dlib_powdersugar | dlib_alcohol_wash | brood_check | flotation) |
honeyStores | string | Honey stores(required, nullable, low | medium | high) |
broodPattern | string | Brood pattern(required, nullable, good | spotty | poor | none) |
actions | string | Actions taken(required, nullable) |
notes | string | Free-text notes(required, nullable) |
afbCleared | boolean | American foulbrood suspicion ruled out by a vet(required) |
pests | array | Observed pests(required) |
pests[] | string | Pest type(varroa | wax_moth | hive_beetle | aethina_tumida | tropilaelaps_mercedesae | nosema | foulbrood | chalkbrood | other) |
mood | string | Mood of the colony(required, nullable, calm | alert | defensive | aggressive) |
flightActivity | string | Flight activity(required, nullable, none | low | normal | high) |
queenCellCount | integer | Number of queen cells(required, nullable) |
queenCellType | string | Queen cell type(required, nullable, none | swarm | supersedure | emergency) |
queenCellStage | string | Queen cell stage(required, nullable, cup | egg | larva | capped | emerged) |
queenCellAction | string | Action taken on the queen cells(required, nullable, left | removed | marked) |
broodFrames | integer | Frames with brood(required, nullable) |
openBroodFrames | integer | Frames with open brood(required, nullable) |
cappedBroodFrames | integer | Frames with capped brood(required, nullable) |
broodCompactness | string | Brood compactness(required, nullable, compact | semi_compact | scattered) |
pollenStores | string | Pollen stores(required, nullable, none | low | medium | high) |
queenMarked | boolean | Is the queen marked?(required, nullable) |
layingPattern | string | Laying pattern(required, nullable, excellent | good | fair | poor) |
weatherTemp | number | Temperature in °C(required, nullable) |
weatherCondition | string | Weather(required, nullable, sunny | cloudy | overcast | rainy | windy) |
inspectionDuration | integer | Duration in minutes(required, nullable) |
templateId | string | ID of the inspection template(required, nullable) |
customFieldValues | string | Values of custom template fields as a JSON string(required, nullable) |
autoTags | array | Tags derived from the notes (get, create and update only; empty in lists)(required) |
autoTags[] | string | Tag |
replaceBlockedBy | string | Why the voice roundup may not replace this inspection: `team` = recorded by a team member, `details` = holds photos, pests, notes or actions, heard signs or a measurement; `null` = may be replaced. `DELETE /api/inspections/[id]?replace=roundup` checks the same and answers 409 `INSPECTION_NOT_REPLACEABLE` otherwise(required, nullable, team | details) |
createdAt | string | Created (ISO 8601 date-time)(required) |
updatedAt | string | Last updated (ISO 8601 date-time)(required) |
afbEscalationFailed | boolean | Present and true only when a disease suspicion (foulbrood, small hive beetle, Tropilaelaps) was detected but quarantine or notice could not be set for at least one reason; the inspection itself is saved |
Success
201 application/json, wrapped as { data }
Errors
24 possible errors
Example
curl -X POST "https://hivekraft.com/api/inspections" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"hiveId":"clx2abc","date":"2025-06-15","type":"standard","colonyStrength":8,"queenSeen":true,"temperament":"calm","varroaCount":3,"varroaMethod":"sugar_shake","honeyStores":"medium","broodPattern":"good"}'/api/inspections/[id]Scope: read:inspectionsGet a single inspection
Returns full inspection details including pest observations.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Inspection ID |
Response Body
An inspection (create, get, update and list return the same entry; the list leaves `autoTags` empty)
e.g. {"id":"clx4...","hiveId":"clx2abc","hiveNumber":7,"hiveName":"Bienchen","date":"2025-06-15T00:00:00.000Z","type":"standard","status":"confirmed","source":"manual","confirmedAt":null,"confirmedBy":null,"colonyStrength":8,"queenSeen":true,"eggsSeen":null,"temperament":"calm","queenCells":null,"diagnosticMethod":"dlib_powdersugar","measurementValue":3,"measurementUnit":"mites_per_10g_bees","measurementDays":null,"measurementSource":null,"measurementDaysAssumed":null,"measurementPhotoId":null,"varroaMeasurement":{"value":3,"unit":"mites_per_10g_bees","method":"dlib_powdersugar"},"honeyStores":"medium","broodPattern":"good","actions":null,"notes":null,"afbCleared":false,"pests":[],"mood":null,"flightActivity":null,"queenCellCount":null,"queenCellType":null,"queenCellStage":null,"queenCellAction":null,"broodFrames":null,"openBroodFrames":null,"cappedBroodFrames":null,"broodCompactness":null,"pollenStores":null,"queenMarked":null,"layingPattern":null,"weatherTemp":null,"weatherCondition":null,"inspectionDuration":null,"templateId":null,"customFieldValues":null,"autoTags":[],"replaceBlockedBy":"details","createdAt":"2025-06-15T08:30:00.000Z","updatedAt":"2025-06-15T08:30:00.000Z"}
| Field | Type | Description |
|---|---|---|
id | string | Inspection ID(required) |
hiveId | string | Hive ID(required) |
hiveNumber | integer | Colony number(required) |
hiveName | string | Colony name(required, nullable) |
date | string | Inspection date (ISO 8601 date-time)(required) |
type | string | Inspection type(required, standard | quick) |
status | string | Lifecycle status(required, confirmed | pending_compliance | archived) |
source | string | Where the entry came from(required, manual | voice | import | api | photo_ai) |
confirmedAt | string | When the entry was confirmed (ISO 8601 date-time)(required, nullable) |
confirmedBy | string | Who confirmed the entry(required, nullable) |
colonyStrength | integer | Strength rating 1-10(required, nullable) |
queenSeen | boolean | Was the queen spotted?(required, nullable) |
eggsSeen | boolean | Were eggs visible?(required, nullable) |
temperament | string | Temperament(required, nullable, calm | nervous | aggressive) |
queenCells | string | Legacy free text about queen cells(required, nullable) |
diagnosticMethod | string | Varroa diagnostic method(required, nullable, liebefeld_natural_drop | dlib_powdersugar | dlib_alcohol_wash | brood_check | flotation) |
measurementValue | number | Varroa measurement(required, nullable) |
measurementUnit | string | Unit of the measurement(required, nullable, mites_per_day | mites_per_10g_bees | percent_infestation) |
measurementDays | integer | Counting days of a natural-drop measurement(required, nullable) |
measurementSource | string | Where the count comes from; `null` = not recorded(required, nullable, manual | photo | photo_assisted) |
measurementDaysAssumed | boolean | `true` = the counting days are the prefilled 7, not entered; `null` = not recorded or not a natural drop(required, nullable) |
measurementPhotoId | string | Record photo of the count: ID of a photo of this inspection, set only by `POST /api/inspections/[id]/photos` with `measurementEvidence=1`. No foreign key: valid only if `GET /api/inspections/[id]/photos` lists it; cleared when that photo is deleted or the count changes(required, nullable) |
varroaMeasurement | object | The resolved varroa measurement (new fields preferred, legacy count as fallback; natural drop normalised to mites per day)(required, nullable) |
varroaMeasurement.value | number | Measured value(required) |
varroaMeasurement.unit | string | Unit(required, mites_per_day | mites_per_10g_bees | percent_infestation) |
varroaMeasurement.method | string | Method(required, liebefeld_natural_drop | dlib_powdersugar | dlib_alcohol_wash | brood_check | flotation) |
honeyStores | string | Honey stores(required, nullable, low | medium | high) |
broodPattern | string | Brood pattern(required, nullable, good | spotty | poor | none) |
actions | string | Actions taken(required, nullable) |
notes | string | Free-text notes(required, nullable) |
afbCleared | boolean | American foulbrood suspicion ruled out by a vet(required) |
pests | array | Observed pests(required) |
pests[] | string | Pest type(varroa | wax_moth | hive_beetle | aethina_tumida | tropilaelaps_mercedesae | nosema | foulbrood | chalkbrood | other) |
mood | string | Mood of the colony(required, nullable, calm | alert | defensive | aggressive) |
flightActivity | string | Flight activity(required, nullable, none | low | normal | high) |
queenCellCount | integer | Number of queen cells(required, nullable) |
queenCellType | string | Queen cell type(required, nullable, none | swarm | supersedure | emergency) |
queenCellStage | string | Queen cell stage(required, nullable, cup | egg | larva | capped | emerged) |
queenCellAction | string | Action taken on the queen cells(required, nullable, left | removed | marked) |
broodFrames | integer | Frames with brood(required, nullable) |
openBroodFrames | integer | Frames with open brood(required, nullable) |
cappedBroodFrames | integer | Frames with capped brood(required, nullable) |
broodCompactness | string | Brood compactness(required, nullable, compact | semi_compact | scattered) |
pollenStores | string | Pollen stores(required, nullable, none | low | medium | high) |
queenMarked | boolean | Is the queen marked?(required, nullable) |
layingPattern | string | Laying pattern(required, nullable, excellent | good | fair | poor) |
weatherTemp | number | Temperature in °C(required, nullable) |
weatherCondition | string | Weather(required, nullable, sunny | cloudy | overcast | rainy | windy) |
inspectionDuration | integer | Duration in minutes(required, nullable) |
templateId | string | ID of the inspection template(required, nullable) |
customFieldValues | string | Values of custom template fields as a JSON string(required, nullable) |
autoTags | array | Tags derived from the notes (get, create and update only; empty in lists)(required) |
autoTags[] | string | Tag |
replaceBlockedBy | string | Why the voice roundup may not replace this inspection: `team` = recorded by a team member, `details` = holds photos, pests, notes or actions, heard signs or a measurement; `null` = may be replaced. `DELETE /api/inspections/[id]?replace=roundup` checks the same and answers 409 `INSPECTION_NOT_REPLACEABLE` otherwise(required, nullable, team | details) |
createdAt | string | Created (ISO 8601 date-time)(required) |
updatedAt | string | Last updated (ISO 8601 date-time)(required) |
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/inspections/clx4abc" \
-H "Authorization: Bearer YOUR_API_KEY"/api/inspections/[id]Scope: write:inspectionsUpdate an inspection
Partially updates inspection data.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Inspection ID |
Request Body
Any subset of the create fields except `status` and `source` (a status change goes through the confirmation). An omitted field stays untouched; `null` clears a nullable field. Exception `measurementDays`: when the resulting measurement is a complete `liebefeld_natural_drop` one and has no days, the server stores 7, so `null` or an omitted field does not clear it. An update that writes a measurement field (also through `varroaCount` or `varroaMethod`) must leave a complete and consistent measurement merged with the stored row, or none (all four `null`); otherwise 400 with the field, also for a partial update that only clears `measurementUnit` (changed in RP-151: such updates used to be stored). The request body is not checked on its own for the measurement, so `{ "measurementValue": 28 }` on a row with a complete measurement is valid.
| Field | Type | Description |
|---|---|---|
hiveId | string | Hive to inspecte.g. clx2abc |
date | string | Inspection date (ISO date or date-time)e.g. 2025-06-15 |
type | string | Inspection type(standard | quick)e.g. standard |
colonyStrength | integer | Strength rating 1-10(nullable)e.g. 8 |
queenSeen | boolean | Was the queen spotted?(nullable)e.g. true |
eggsSeen | boolean | Were eggs visible?(nullable) |
temperament | string | Temperament(nullable, calm | nervous | aggressive) |
honeyStores | string | Honey stores(nullable, low | medium | high) |
broodPattern | string | Brood pattern(nullable, good | spotty | poor | none) |
mood | string | Mood of the colony(nullable, calm | alert | defensive | aggressive) |
notes | string | Free-text notes (max 5000 chars)(nullable) |
queenCells | string | Legacy free text about queen cells, max 500 characters(nullable) |
varroaCount | integer | Varroa count, 0-10000 (the limit of `measurementValue`; lowered from 100000 with RP-151), input alias only: stored as a measurement (natural drop per day with 1 counting day, or the sample method below) and checked like one. It replaces all four measurement fields: `measurementValue`, `measurementUnit` and `measurementDays` sent alongside are dropped, `diagnosticMethod` only chooses the method when `varroaMethod` is missing; on update without `varroaMethod` the stored method, and its unit if it fits, is kept. Changed with the removal of the legacy column (migration 20261016000000): responses no longer contain `varroaCount` or `varroaMethod`; read `varroaMeasurement` or the measurement fields. An explicit `null` alone changes nothing(nullable)e.g. 3 |
varroaMethod | string | Method of the varroa count, input alias only and only the three legacy names (new methods go into `diagnosticMethod`): becomes `diagnosticMethod` when the request sends none; not returned. Without a value (sent or stored) the measurement is incomplete and the request is rejected with 400(nullable, natural_drop | sugar_shake | alcohol_wash) |
actions | string | Actions taken, max 2000 characters(nullable) |
diagnosticMethod | string | Varroa diagnostic method; must match `measurementUnit`(nullable, liebefeld_natural_drop | dlib_powdersugar | dlib_alcohol_wash | brood_check | flotation) |
measurementValue | number | Varroa measurement, 0-10000. A request that writes any of the four measurement fields must leave, merged with the stored row, either no measurement (all four `null`) or a complete and consistent one: value, `measurementUnit`, a `diagnosticMethod` that matches the unit, and for natural drop the days; otherwise 400 `VALIDATION_ERROR` with the field. A `varroaCount` or `varroaMethod` in the request counts as written measurement fields. On create the request itself must pair a value with `measurementUnit`; on update only the merged row decides, so `{ "measurementValue": 28 }` on a row with a complete measurement is valid(nullable) |
measurementUnit | string | Unit of the measurement; must match `diagnosticMethod`(nullable, mites_per_day | mites_per_10g_bees | percent_infestation) |
measurementDays | integer | Counting days of a natural-drop measurement, 1-60. With `diagnosticMethod` `liebefeld_natural_drop` plus `measurementValue` and `measurementUnit` and no days (omitted or `null`, on update also none stored), the server stores 7(nullable) |
measurementSource | string | Where the count comes from: typed by hand, counted on the photo or an assisted photo suggestion checked by you (`photo_assisted`, N4). Read only when the request writes a measurement field; then it is stored anew, and without it the origin becomes `null` (unknown). An emptied measurement clears it. Never used for calculation, rating or forecast(nullable, manual | photo | photo_assisted) |
measurementDaysAssumed | boolean | Natural drop only: `true` when the counting days are the prefilled 7, not entered. Read only with a written measurement field; days sent without it are stored as `false`, days the server fills in (7) as `true`; other methods store `null`. Never used for calculation, rating or forecast(nullable) |
afbCleared | boolean | American foulbrood suspicion ruled out by a vet |
pests | array | Observed pests, at most 20; duplicates are dropped |
pests[] | string | Pest type. A suspected small hive beetle is `aethina_tumida`; `hive_beetle` is a legacy value; rejected on create, kept on update only if already stored, and triggers nothing(varroa | wax_moth | hive_beetle | aethina_tumida | tropilaelaps_mercedesae | nosema | foulbrood | chalkbrood | other) |
flightActivity | string | Flight activity(nullable, none | low | normal | high) |
queenCellCount | integer | Number of queen cells, 0-50(nullable) |
queenCellType | string | Queen cell type(nullable, none | swarm | supersedure | emergency) |
queenCellStage | string | Queen cell stage(nullable, cup | egg | larva | capped | emerged) |
queenCellAction | string | Action taken on the queen cells(nullable, left | removed | marked) |
broodFrames | integer | Frames with brood, 0-30(nullable) |
openBroodFrames | integer | Frames with open brood, 0-30(nullable) |
cappedBroodFrames | integer | Frames with capped brood, 0-30(nullable) |
broodCompactness | string | Brood compactness(nullable, compact | semi_compact | scattered) |
pollenStores | string | Pollen stores(nullable, none | low | medium | high) |
queenMarked | boolean | Is the queen marked?(nullable) |
layingPattern | string | Laying pattern(nullable, excellent | good | fair | poor) |
weatherTemp | number | Temperature in °C, -30 to 60(nullable) |
weatherCondition | string | Weather(nullable, sunny | cloudy | overcast | rainy | windy) |
inspectionDuration | integer | Duration in minutes, 0-600(nullable) |
templateId | string | ID of the inspection template, max 50 characters(nullable) |
customFieldValues | string | Values of custom template fields as a JSON string, max 10000 characters(nullable) |
base | object | Version the changed fields were based on. Only fields that differ from the server since then and were changed differently return 409 `INSPECTION_CONFLICT`; the keys must match the changed fields exactly. Not combinable with `varroaCount`/`varroaMethod`. |
base.updatedAt | string | Server `updatedAt` the edit started from (ISO 8601 date-time)(required) |
base.fields | object | Base value of every changed field, keyed by field name(required) |
Response Body
An inspection (create, get, update and list return the same entry; the list leaves `autoTags` empty)
e.g. {"id":"clx4...","hiveId":"clx2abc","hiveNumber":7,"hiveName":"Bienchen","date":"2025-06-15T00:00:00.000Z","type":"standard","status":"confirmed","source":"manual","confirmedAt":null,"confirmedBy":null,"colonyStrength":9,"queenSeen":true,"eggsSeen":null,"temperament":"calm","queenCells":null,"diagnosticMethod":"dlib_powdersugar","measurementValue":3,"measurementUnit":"mites_per_10g_bees","measurementDays":null,"measurementSource":null,"measurementDaysAssumed":null,"measurementPhotoId":null,"varroaMeasurement":{"value":3,"unit":"mites_per_10g_bees","method":"dlib_powdersugar"},"honeyStores":"medium","broodPattern":"good","actions":null,"notes":null,"afbCleared":false,"pests":[],"mood":null,"flightActivity":null,"queenCellCount":null,"queenCellType":null,"queenCellStage":null,"queenCellAction":null,"broodFrames":null,"openBroodFrames":null,"cappedBroodFrames":null,"broodCompactness":null,"pollenStores":null,"queenMarked":null,"layingPattern":null,"weatherTemp":null,"weatherCondition":null,"inspectionDuration":null,"templateId":null,"customFieldValues":null,"autoTags":[],"replaceBlockedBy":"details","createdAt":"2025-06-15T08:30:00.000Z","updatedAt":"2025-06-15T08:30:00.000Z"}
| Field | Type | Description |
|---|---|---|
id | string | Inspection ID(required) |
hiveId | string | Hive ID(required) |
hiveNumber | integer | Colony number(required) |
hiveName | string | Colony name(required, nullable) |
date | string | Inspection date (ISO 8601 date-time)(required) |
type | string | Inspection type(required, standard | quick) |
status | string | Lifecycle status(required, confirmed | pending_compliance | archived) |
source | string | Where the entry came from(required, manual | voice | import | api | photo_ai) |
confirmedAt | string | When the entry was confirmed (ISO 8601 date-time)(required, nullable) |
confirmedBy | string | Who confirmed the entry(required, nullable) |
colonyStrength | integer | Strength rating 1-10(required, nullable) |
queenSeen | boolean | Was the queen spotted?(required, nullable) |
eggsSeen | boolean | Were eggs visible?(required, nullable) |
temperament | string | Temperament(required, nullable, calm | nervous | aggressive) |
queenCells | string | Legacy free text about queen cells(required, nullable) |
diagnosticMethod | string | Varroa diagnostic method(required, nullable, liebefeld_natural_drop | dlib_powdersugar | dlib_alcohol_wash | brood_check | flotation) |
measurementValue | number | Varroa measurement(required, nullable) |
measurementUnit | string | Unit of the measurement(required, nullable, mites_per_day | mites_per_10g_bees | percent_infestation) |
measurementDays | integer | Counting days of a natural-drop measurement(required, nullable) |
measurementSource | string | Where the count comes from; `null` = not recorded(required, nullable, manual | photo | photo_assisted) |
measurementDaysAssumed | boolean | `true` = the counting days are the prefilled 7, not entered; `null` = not recorded or not a natural drop(required, nullable) |
measurementPhotoId | string | Record photo of the count: ID of a photo of this inspection, set only by `POST /api/inspections/[id]/photos` with `measurementEvidence=1`. No foreign key: valid only if `GET /api/inspections/[id]/photos` lists it; cleared when that photo is deleted or the count changes(required, nullable) |
varroaMeasurement | object | The resolved varroa measurement (new fields preferred, legacy count as fallback; natural drop normalised to mites per day)(required, nullable) |
varroaMeasurement.value | number | Measured value(required) |
varroaMeasurement.unit | string | Unit(required, mites_per_day | mites_per_10g_bees | percent_infestation) |
varroaMeasurement.method | string | Method(required, liebefeld_natural_drop | dlib_powdersugar | dlib_alcohol_wash | brood_check | flotation) |
honeyStores | string | Honey stores(required, nullable, low | medium | high) |
broodPattern | string | Brood pattern(required, nullable, good | spotty | poor | none) |
actions | string | Actions taken(required, nullable) |
notes | string | Free-text notes(required, nullable) |
afbCleared | boolean | American foulbrood suspicion ruled out by a vet(required) |
pests | array | Observed pests(required) |
pests[] | string | Pest type(varroa | wax_moth | hive_beetle | aethina_tumida | tropilaelaps_mercedesae | nosema | foulbrood | chalkbrood | other) |
mood | string | Mood of the colony(required, nullable, calm | alert | defensive | aggressive) |
flightActivity | string | Flight activity(required, nullable, none | low | normal | high) |
queenCellCount | integer | Number of queen cells(required, nullable) |
queenCellType | string | Queen cell type(required, nullable, none | swarm | supersedure | emergency) |
queenCellStage | string | Queen cell stage(required, nullable, cup | egg | larva | capped | emerged) |
queenCellAction | string | Action taken on the queen cells(required, nullable, left | removed | marked) |
broodFrames | integer | Frames with brood(required, nullable) |
openBroodFrames | integer | Frames with open brood(required, nullable) |
cappedBroodFrames | integer | Frames with capped brood(required, nullable) |
broodCompactness | string | Brood compactness(required, nullable, compact | semi_compact | scattered) |
pollenStores | string | Pollen stores(required, nullable, none | low | medium | high) |
queenMarked | boolean | Is the queen marked?(required, nullable) |
layingPattern | string | Laying pattern(required, nullable, excellent | good | fair | poor) |
weatherTemp | number | Temperature in °C(required, nullable) |
weatherCondition | string | Weather(required, nullable, sunny | cloudy | overcast | rainy | windy) |
inspectionDuration | integer | Duration in minutes(required, nullable) |
templateId | string | ID of the inspection template(required, nullable) |
customFieldValues | string | Values of custom template fields as a JSON string(required, nullable) |
autoTags | array | Tags derived from the notes (get, create and update only; empty in lists)(required) |
autoTags[] | string | Tag |
replaceBlockedBy | string | Why the voice roundup may not replace this inspection: `team` = recorded by a team member, `details` = holds photos, pests, notes or actions, heard signs or a measurement; `null` = may be replaced. `DELETE /api/inspections/[id]?replace=roundup` checks the same and answers 409 `INSPECTION_NOT_REPLACEABLE` otherwise(required, nullable, team | details) |
createdAt | string | Created (ISO 8601 date-time)(required) |
updatedAt | string | Last updated (ISO 8601 date-time)(required) |
afbEscalationFailed | boolean | Present and true only when a disease suspicion (foulbrood, small hive beetle, Tropilaelaps) was detected but quarantine or notice could not be set for at least one reason; the update itself is saved |
Success
200 application/json, wrapped as { data }
Errors
21 possible errors
Example
curl -X PUT "https://hivekraft.com/api/inspections/clx4abc" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"colonyStrength":9}'/api/inspections/[id]Scope: write:inspectionsDelete an inspection
Permanently removes an inspection record.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Inspection ID |
Success
204 No Content (empty body)
Errors
18 possible errors
Example
curl -X DELETE "https://hivekraft.com/api/inspections/clx4abc" \
-H "Authorization: Bearer YOUR_API_KEY"/api/inspections/[id]/photosScope: read:inspectionsGet inspection photos
Returns all photos attached to an inspection.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Inspection ID |
Response Body
Stored photos only (upload completed), in display order, at most 20.
e.g. [{"id":"clxp...","inspectionId":"clx4abc","url":"/api/photos/clx4abc-1750000000000.jpg","caption":"Good brood pattern","photoType":"brood","sortOrder":0,"uploadStatus":"completed","createdAt":"2025-06-15T08:31:00.000Z"}]
| Field | Type | Description |
|---|---|---|
[].id | string | Photo ID(required) |
[].inspectionId | string | Inspection ID(required) |
[].url | string | Photo path under `/api/photos/`(required) |
[].caption | string | Caption(required, nullable) |
[].photoType | string | Photo type(required, nullable) |
[].sortOrder | integer | Position among the photos of the inspection(required) |
[].uploadStatus | string | `completed` once the file is stored(required, nullable) |
[].createdAt | string | Created (ISO 8601 date-time)(required) |
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/inspections/clx4abc/photos" \
-H "Authorization: Bearer YOUR_API_KEY"/api/inspections/[id]/photosScope: write:inspectionsUpload an inspection photo
Uploads a photo to an inspection. Uses multipart/form-data with fields: photo (file), photoType (string), caption (string).
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Inspection ID |
Request Body
Content-Type: multipart/form-data
multipart/form-data. The photo is stored without EXIF data and re-encoded to at most 2048 px. After the upload a background analysis of the photo always starts. It needs the consent `ai-photo-analysis`: without it the analysis is skipped silently (internally a 403 `CONSENT_REQUIRED`) and nothing leaves the system. With consent the image, the photo type and an analysis prompt are sent to an external vision service; the prompt carries the season derived from the inspection date and, if recorded, the colony strength, but neither the hive name nor the inspection date. A finding can trigger the foulbrood hook. The upload response is 201 in every case; analysis failures never fail the upload.
| Field | Type | Description |
|---|---|---|
photo | file | Image file: JPEG, PNG or WebP, at most 5 MB(required) |
photoType | string | Photo type; an unknown value is stored as `general`(general | frame | queen | brood | disease | varroa | colony_strength | honey | equipment | other) |
caption | string | Photo caption, cut to 500 characters |
locale | string | Language of the background photo analysis (the Referer path is the fallback, then `de`)(de | en) |
measurementEvidence | string | Mark the board photo as evidence of the count; only with `photoType=varroa` and `measurementEvidenceValue`. Other values are ignored(1) |
measurementEvidenceValue | integer | Raw count captured on this board photo, 0-10000. With `measurementEvidence=1`, links only if the stored count still matches, the method is `liebefeld_natural_drop`, the unit is `mites_per_day`, the source is `photo` or `photo_assisted` and no record photo is linked. Completion and linking commit atomically with Serializable retry. Missing, invalid or stale counts leave only a gallery photo |
Response Body
The created photo record (201 Created)
e.g. {"id":"clxp...","inspectionId":"clx4abc","url":"/api/photos/clx4abc-1750000000000.jpg","caption":"Good brood pattern","photoType":"brood","sortOrder":0,"uploadStatus":"completed","createdAt":"2025-06-15T08:31:00.000Z"}
| Field | Type | Description |
|---|---|---|
id | string | Photo ID(required) |
inspectionId | string | Inspection ID(required) |
url | string | Photo path under `/api/photos/`(required) |
caption | string | Caption(required, nullable) |
photoType | string | Photo type(required, nullable) |
sortOrder | integer | Position among the photos of the inspection(required) |
uploadStatus | string | `completed` once the file is stored(required, nullable) |
createdAt | string | Created (ISO 8601 date-time)(required) |
Success
201 application/json, wrapped as { data }
Errors
21 possible errors
Example
curl -X POST "https://hivekraft.com/api/inspections/clx4abc/photos" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "photo=@brood.jpg" \
-F "photoType=brood" \
-F "caption=Good brood pattern"/api/inspections/[id]/photosScope: write:inspectionsDelete an inspection photo
Deletes a specific photo from an inspection. Pass the photoId as a query parameter.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Inspection ID |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
photoId | string | Yes | Photo ID to delete |
Success
204 No Content (empty body)
Errors
20 possible errors
Example
curl -X DELETE "https://hivekraft.com/api/inspections/clx4abc/photos?photoId=clxpabc" \
-H "Authorization: Bearer YOUR_API_KEY"Treatments
Record varroa treatments (Behandlungen) with EU 2019/6 compliance fields for the colony record book.
/api/treatmentsScope: read:treatmentsList treatments
Returns treatments with optional filters for hive, type, status, and date range.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
hiveId | string | No | Filter by hive |
apiaryId | string | No | Filter by apiary |
treatmentType | string | No | varroa_oxalic_acid | varroa_formic_acid | varroa_thymol | varroa_amitraz | varroa_pyrethroid | varroa_coumaphos | varroa_lactic_acid | varroa_oxalic_broodless | varroa_other | drone_brood_removal | total_brood_removal | brood_break | brood_break_no_trap | partial_brood_removal | hyperthermia | other |
status | string | No | planned | active | completed | pending_compliance |
dateFrom | string | No | Start date lower bound (ISO, Europe/Berlin calendar day, inclusive)e.g. 2025-01-01 |
dateTo | string | No | Start date upper bound (ISO, Europe/Berlin calendar day, the whole day is included)e.g. 2025-12-31 |
limit | number | No | Page size, 1-500. A value of 1-100 enables the paginated object response, a value above 100 returns a bare array of at most that many entries. |
cursor | string | No | Pagination cursor — pass the `nextCursor` from the previous page to fetch the next batch |
Response Body
Without cursor and limit: a bare array of treatments (more entries beyond the server cap are signalled by the headers `X-List-Has-More: true` and `X-List-Next-Cursor`, pass that value as `cursor`). With `cursor` and/or `limit`: a page object `{ items, nextCursor, hasMore, total, complete, truncated }`. The example shows the page object.
e.g. {"items":[{"id":"clx5...","userId":"clxu...","hiveId":"clx2abc","treatmentGroupId":null,"treatmentType":"varroa_oxalic_acid","method":"drip","startDate":"2025-12-01T00:00:00.000Z","endDate":"2025-12-01T00:00:00.000Z","dose":5,"unit":"ml","status":"completed","notes":null,"varroaCountBefore":null,"varroaCountAfter":null,"effectiveness":null,"waitPeriodEnd":"2025-12-01T00:00:00.000Z","batchNumber":null,"supplier":"Imkereibedarf Muster","supplierInvoice":null,"withdrawalPeriodDays":null,"withdrawalPeriodDaysHoney":null,"withdrawalPeriodDaysWax":null,"treatingPerson":"Max Muster","veterinarian":null,"prescriptionNumber":null,"deletedAt":null,"lockedAt":"2025-12-01T11:00:00.000Z","correctionOf":null,"correctedBy":null,"typeInferred":false,"createdByMemberId":null,"voidedAt":null,"voidedById":null,"voidReason":null,"voidNote":null,"voidDuplicateOfId":null,"createdAt":"2025-12-01T11:00:00.000Z","updatedAt":"2025-12-01T11:00:00.000Z","hive":{"id":"clx2abc","number":7,"name":"Bienchen","apiary":{"id":"clx1abc","name":"Waldbienenstand"}}}],"nextCursor":"clx5...","hasMore":true,"total":57,"complete":false,"truncated":false}
| Field | Type | Description |
|---|---|---|
items | array | The treatments on this page(required) |
items[].id | string | Treatment ID(required) |
items[].userId | string | Owner ID(required) |
items[].hiveId | string | Hive ID(required) |
items[].treatmentGroupId | string | Group of a multi-colony treatment(required, nullable) |
items[].treatmentType | string | Treatment type(required, varroa_oxalic_acid | varroa_formic_acid | varroa_thymol | varroa_amitraz | varroa_pyrethroid | varroa_coumaphos | varroa_lactic_acid | varroa_oxalic_broodless | varroa_other | drone_brood_removal | total_brood_removal | brood_break | brood_break_no_trap | partial_brood_removal | hyperthermia | other) |
items[].method | string | Application method(required, nullable, evaporator | drip | spray | sublimation | strips | other) |
items[].startDate | string | Start (ISO 8601 date-time)(required) |
items[].endDate | string | End (ISO 8601 date-time)(required, nullable) |
items[].dose | number | Dosage amount(required, nullable) |
items[].unit | string | Dosage unit(required, nullable, ml | g | strips) |
items[].status | string | Status(required, planned | active | completed | pending_compliance) |
items[].notes | string | Free-text notes(required, nullable) |
items[].varroaCountBefore | integer | Varroa count before the treatment(required, nullable) |
items[].varroaCountAfter | integer | Varroa count after the treatment(required, nullable) |
items[].effectiveness | string | Observed effectiveness(required, nullable, high | medium | low | none) |
items[].waitPeriodEnd | string | End of the withdrawal period (ISO 8601 date-time)(required, nullable) |
items[].batchNumber | string | Batch number of the medication(required, nullable) |
items[].supplier | string | Supplier(required, nullable) |
items[].supplierInvoice | string | Invoice or delivery note number(required, nullable) |
items[].withdrawalPeriodDays | integer | Deprecated withdrawal days(required, nullable) |
items[].withdrawalPeriodDaysHoney | integer | Withdrawal period for honey in days(required, nullable) |
items[].withdrawalPeriodDaysWax | integer | Withdrawal period for wax in days(required, nullable) |
items[].treatingPerson | string | Person who treated(required, nullable) |
items[].veterinarian | string | Veterinarian(required, nullable) |
items[].prescriptionNumber | string | Prescription number(required, nullable) |
items[].deletedAt | string | Soft-delete marker; always null here (ISO 8601 date-time)(required, nullable) |
items[].lockedAt | string | When the record became immutable; null while it can still be edited (ISO 8601 date-time)(required, nullable) |
items[].correctionOf | string | ID of the treatment this record corrects(required, nullable) |
items[].correctedBy | string | ID of the correction that replaces this record(required, nullable) |
items[].typeInferred | boolean | The treatment type was inferred by the system(required) |
items[].createdByMemberId | string | Team member who created the record; null = owner(required, nullable) |
items[].voidedAt | string | When the record was voided; null = not voided. Voiding preserves the stored status and excludes the record from metrics, follow-up and colony assessments (ISO 8601 date-time)(required, nullable) |
items[].voidedById | string | Who voided the record(required, nullable) |
items[].voidReason | string | Reason for voiding(required, nullable, duplicate | never_applied | other) |
items[].voidNote | string | Note on the voiding(required, nullable) |
items[].voidDuplicateOfId | string | ID of the treatment this record duplicates(required, nullable) |
items[].createdAt | string | Created (ISO 8601 date-time)(required) |
items[].updatedAt | string | Last updated (ISO 8601 date-time)(required) |
items[].hive | object | The colony of the record (reference)(required) |
items[].hive.id | string | Hive ID(required) |
items[].hive.number | integer | Colony number(required) |
items[].hive.name | string | Colony name(required, nullable) |
items[].hive.apiary | object | Its apiary(required) |
items[].hive.apiary.id | string | Apiary ID(required) |
items[].hive.apiary.name | string | Apiary name(required) |
nextCursor | string | Cursor for the next page, or null when there are no more results(required, nullable) |
hasMore | boolean | True when a further page is available(required) |
total | number | All matching treatments for the active filters, across all pages(required) |
complete | boolean | True on the last page(required) |
truncated | boolean | False: ordinary pagination does not discard further pages(required) |
[].id | string | Treatment ID(required) |
[].userId | string | Owner ID(required) |
[].hiveId | string | Hive ID(required) |
[].treatmentGroupId | string | Group of a multi-colony treatment(required, nullable) |
[].treatmentType | string | Treatment type(required, varroa_oxalic_acid | varroa_formic_acid | varroa_thymol | varroa_amitraz | varroa_pyrethroid | varroa_coumaphos | varroa_lactic_acid | varroa_oxalic_broodless | varroa_other | drone_brood_removal | total_brood_removal | brood_break | brood_break_no_trap | partial_brood_removal | hyperthermia | other) |
[].method | string | Application method(required, nullable, evaporator | drip | spray | sublimation | strips | other) |
[].startDate | string | Start (ISO 8601 date-time)(required) |
[].endDate | string | End (ISO 8601 date-time)(required, nullable) |
[].dose | number | Dosage amount(required, nullable) |
[].unit | string | Dosage unit(required, nullable, ml | g | strips) |
[].status | string | Status(required, planned | active | completed | pending_compliance) |
[].notes | string | Free-text notes(required, nullable) |
[].varroaCountBefore | integer | Varroa count before the treatment(required, nullable) |
[].varroaCountAfter | integer | Varroa count after the treatment(required, nullable) |
[].effectiveness | string | Observed effectiveness(required, nullable, high | medium | low | none) |
[].waitPeriodEnd | string | End of the withdrawal period (ISO 8601 date-time)(required, nullable) |
[].batchNumber | string | Batch number of the medication(required, nullable) |
[].supplier | string | Supplier(required, nullable) |
[].supplierInvoice | string | Invoice or delivery note number(required, nullable) |
[].withdrawalPeriodDays | integer | Deprecated withdrawal days(required, nullable) |
[].withdrawalPeriodDaysHoney | integer | Withdrawal period for honey in days(required, nullable) |
[].withdrawalPeriodDaysWax | integer | Withdrawal period for wax in days(required, nullable) |
[].treatingPerson | string | Person who treated(required, nullable) |
[].veterinarian | string | Veterinarian(required, nullable) |
[].prescriptionNumber | string | Prescription number(required, nullable) |
[].deletedAt | string | Soft-delete marker; always null here (ISO 8601 date-time)(required, nullable) |
[].lockedAt | string | When the record became immutable; null while it can still be edited (ISO 8601 date-time)(required, nullable) |
[].correctionOf | string | ID of the treatment this record corrects(required, nullable) |
[].correctedBy | string | ID of the correction that replaces this record(required, nullable) |
[].typeInferred | boolean | The treatment type was inferred by the system(required) |
[].createdByMemberId | string | Team member who created the record; null = owner(required, nullable) |
[].voidedAt | string | When the record was voided; null = not voided. Voiding preserves the stored status and excludes the record from metrics, follow-up and colony assessments (ISO 8601 date-time)(required, nullable) |
[].voidedById | string | Who voided the record(required, nullable) |
[].voidReason | string | Reason for voiding(required, nullable, duplicate | never_applied | other) |
[].voidNote | string | Note on the voiding(required, nullable) |
[].voidDuplicateOfId | string | ID of the treatment this record duplicates(required, nullable) |
[].createdAt | string | Created (ISO 8601 date-time)(required) |
[].updatedAt | string | Last updated (ISO 8601 date-time)(required) |
[].hive | object | The colony of the record (reference)(required) |
[].hive.id | string | Hive ID(required) |
[].hive.number | integer | Colony number(required) |
[].hive.name | string | Colony name(required, nullable) |
[].hive.apiary | object | Its apiary(required) |
[].hive.apiary.id | string | Apiary ID(required) |
[].hive.apiary.name | string | Apiary name(required) |
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/treatments?treatmentType=varroa_oxalic_acid" \
-H "Authorization: Bearer YOUR_API_KEY"/api/treatmentsScope: write:treatmentsCreate a treatment
Records a new varroa treatment. hiveId, treatmentType, startDate and treatingPerson are required. Includes optional EU 2019/6 compliance fields (batchNumber, supplier, veterinarian).
Request Body
hiveId, treatmentType, startDate and treatingPerson are required. Medicinal types additionally need dose with unit and supplier or supplierInvoice; prescription-only types need veterinarian with prescriptionNumber; a honey withdrawal above 0 days needs endDate, and so does a medicinal type with status `completed` (also the default; a single application ends on its start date). A treatment with status `completed` is locked at once.
| Field | Type | Description |
|---|---|---|
hiveId | string | Hive ID(required)e.g. clx2abc |
treatmentType | string | varroa_oxalic_acid | varroa_formic_acid | varroa_thymol | varroa_amitraz | varroa_pyrethroid | varroa_coumaphos | varroa_lactic_acid | varroa_oxalic_broodless | varroa_other | drone_brood_removal | total_brood_removal | brood_break | brood_break_no_trap | partial_brood_removal | hyperthermia | other(required, varroa_oxalic_acid | varroa_formic_acid | varroa_thymol | varroa_amitraz | varroa_pyrethroid | varroa_coumaphos | varroa_lactic_acid | varroa_oxalic_broodless | varroa_other | drone_brood_removal | total_brood_removal | brood_break | brood_break_no_trap | partial_brood_removal | hyperthermia | other)e.g. varroa_oxalic_acid |
method | string | evaporator | drip | spray | sublimation | strips | other(nullable, evaporator | drip | spray | sublimation | strips | other) |
startDate | string | Start date (ISO date or date-time)(required)e.g. 2025-12-01 |
endDate | string | End date (ISO, not before `startDate`); required when the honey withdrawal period is above 0 days, and for a medicinal type entering `completed` |
dose | number | Dosage amount, positive, at most 10000; with `unit` required for medicinal treatment typese.g. 5 |
unit | string | ml | g | strips(nullable, ml | g | strips) |
status | string | planned | active | completed(default completed, planned | active | completed)e.g. completed |
notes | string | Free-text notes (max 5000 chars); on a locked record only extendable via `notesAddendum` |
varroaCountBefore | integer | Varroa count before the treatment, 0-100000 |
varroaCountAfter | integer | Varroa count after the treatment, 0-100000 |
effectiveness | string | Observed effectiveness(nullable, high | medium | low | none) |
waitPeriodEnd | string | End of the withdrawal period (ISO). The server derives a floor from the end date and the withdrawal days (without a stored period: the precautionary product default of the treatment type); an earlier value is raised to it, a later one is kept |
batchNumber | string | Batch number of the medication, max 100 characters (recommended) |
supplier | string | Supplier name, max 500 characters; medicinal treatment types need `supplier` or `supplierInvoice` |
supplierInvoice | string | Invoice or delivery note number, max 100 characters |
withdrawalPeriodDays | integer | Deprecated: use `withdrawalPeriodDaysHoney`. 0-365 days; on create it mirrors an explicitly sent honey value, otherwise stays empty |
withdrawalPeriodDaysHoney | integer | Withdrawal period for honey in days, 0-3650. Omitted on create: stays empty (null); without a stored period the server computes `waitPeriodEnd` with the precautionary product default of the treatment type; null: explicitly unknown(nullable) |
withdrawalPeriodDaysWax | integer | Withdrawal period for wax in days, 0-3650. Omitted on create: stays empty (null); null: explicitly unknown(nullable) |
typeInferred | boolean | Marks a treatment type that the system inferred instead of the user choosing it; leave unset |
treatingPerson | string | Name of the person who treated, 1-200 characters(required)e.g. Max Muster |
veterinarian | string | Veterinarian, max 500 characters; required with `prescriptionNumber` for prescription-only types |
prescriptionNumber | string | Prescription number, max 100 characters; required with `veterinarian` for prescription-only types |
Response Body
The created treatment with its colony
e.g. {"id":"clx5...","userId":"clxu...","hiveId":"clx2abc","treatmentGroupId":null,"treatmentType":"varroa_oxalic_acid","method":"drip","startDate":"2025-12-01T00:00:00.000Z","endDate":"2025-12-01T00:00:00.000Z","dose":5,"unit":"ml","status":"completed","notes":null,"varroaCountBefore":null,"varroaCountAfter":null,"effectiveness":null,"waitPeriodEnd":"2025-12-01T00:00:00.000Z","batchNumber":null,"supplier":"Imkereibedarf Muster","supplierInvoice":null,"withdrawalPeriodDays":null,"withdrawalPeriodDaysHoney":null,"withdrawalPeriodDaysWax":null,"treatingPerson":"Max Muster","veterinarian":null,"prescriptionNumber":null,"deletedAt":null,"lockedAt":"2025-12-01T11:00:00.000Z","correctionOf":null,"correctedBy":null,"typeInferred":false,"createdByMemberId":null,"voidedAt":null,"voidedById":null,"voidReason":null,"voidNote":null,"voidDuplicateOfId":null,"createdAt":"2025-12-01T11:00:00.000Z","updatedAt":"2025-12-01T11:00:00.000Z","hive":{"id":"clx2abc","number":7,"name":"Bienchen","apiary":{"id":"clx1abc","name":"Waldbienenstand"}}}
| Field | Type | Description |
|---|---|---|
id | string | Treatment ID(required) |
userId | string | Owner ID(required) |
hiveId | string | Hive ID(required) |
treatmentGroupId | string | Group of a multi-colony treatment(required, nullable) |
treatmentType | string | Treatment type(required, varroa_oxalic_acid | varroa_formic_acid | varroa_thymol | varroa_amitraz | varroa_pyrethroid | varroa_coumaphos | varroa_lactic_acid | varroa_oxalic_broodless | varroa_other | drone_brood_removal | total_brood_removal | brood_break | brood_break_no_trap | partial_brood_removal | hyperthermia | other) |
method | string | Application method(required, nullable, evaporator | drip | spray | sublimation | strips | other) |
startDate | string | Start (ISO 8601 date-time)(required) |
endDate | string | End (ISO 8601 date-time)(required, nullable) |
dose | number | Dosage amount(required, nullable) |
unit | string | Dosage unit(required, nullable, ml | g | strips) |
status | string | Status(required, planned | active | completed | pending_compliance) |
notes | string | Free-text notes(required, nullable) |
varroaCountBefore | integer | Varroa count before the treatment(required, nullable) |
varroaCountAfter | integer | Varroa count after the treatment(required, nullable) |
effectiveness | string | Observed effectiveness(required, nullable, high | medium | low | none) |
waitPeriodEnd | string | End of the withdrawal period (ISO 8601 date-time)(required, nullable) |
batchNumber | string | Batch number of the medication(required, nullable) |
supplier | string | Supplier(required, nullable) |
supplierInvoice | string | Invoice or delivery note number(required, nullable) |
withdrawalPeriodDays | integer | Deprecated withdrawal days(required, nullable) |
withdrawalPeriodDaysHoney | integer | Withdrawal period for honey in days(required, nullable) |
withdrawalPeriodDaysWax | integer | Withdrawal period for wax in days(required, nullable) |
treatingPerson | string | Person who treated(required, nullable) |
veterinarian | string | Veterinarian(required, nullable) |
prescriptionNumber | string | Prescription number(required, nullable) |
deletedAt | string | Soft-delete marker; always null here (ISO 8601 date-time)(required, nullable) |
lockedAt | string | When the record became immutable; null while it can still be edited (ISO 8601 date-time)(required, nullable) |
correctionOf | string | ID of the treatment this record corrects(required, nullable) |
correctedBy | string | ID of the correction that replaces this record(required, nullable) |
typeInferred | boolean | The treatment type was inferred by the system(required) |
createdByMemberId | string | Team member who created the record; null = owner(required, nullable) |
voidedAt | string | When the record was voided; null = not voided. Voiding preserves the stored status and excludes the record from metrics, follow-up and colony assessments (ISO 8601 date-time)(required, nullable) |
voidedById | string | Who voided the record(required, nullable) |
voidReason | string | Reason for voiding(required, nullable, duplicate | never_applied | other) |
voidNote | string | Note on the voiding(required, nullable) |
voidDuplicateOfId | string | ID of the treatment this record duplicates(required, nullable) |
createdAt | string | Created (ISO 8601 date-time)(required) |
updatedAt | string | Last updated (ISO 8601 date-time)(required) |
hive | object | The colony of the record (reference)(required) |
hive.id | string | Hive ID(required) |
hive.number | integer | Colony number(required) |
hive.name | string | Colony name(required, nullable) |
hive.apiary | object | Its apiary(required) |
hive.apiary.id | string | Apiary ID(required) |
hive.apiary.name | string | Apiary name(required) |
Success
201 application/json, wrapped as { data }
Errors
21 possible errors
Example
curl -X POST "https://hivekraft.com/api/treatments" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"hiveId":"clx2abc","treatmentType":"varroa_oxalic_acid","method":"drip","startDate":"2025-12-01","endDate":"2025-12-01","dose":5,"unit":"ml","status":"completed","supplier":"Imkereibedarf Muster","treatingPerson":"Max Muster"}'/api/treatments/[id]Scope: read:treatmentsGet a single treatment
Returns full treatment details including compliance fields.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Treatment ID |
Response Body
A treatment with its colony and the reason it cannot be deleted
e.g. {"id":"clx5...","userId":"clxu...","hiveId":"clx2abc","treatmentGroupId":null,"treatmentType":"varroa_oxalic_acid","method":"drip","startDate":"2025-12-01T00:00:00.000Z","endDate":"2025-12-01T00:00:00.000Z","dose":5,"unit":"ml","status":"completed","notes":null,"varroaCountBefore":null,"varroaCountAfter":null,"effectiveness":null,"waitPeriodEnd":"2025-12-01T00:00:00.000Z","batchNumber":null,"supplier":"Imkereibedarf Muster","supplierInvoice":null,"withdrawalPeriodDays":null,"withdrawalPeriodDaysHoney":null,"withdrawalPeriodDaysWax":null,"treatingPerson":"Max Muster","veterinarian":null,"prescriptionNumber":null,"deletedAt":null,"lockedAt":"2025-12-01T11:00:00.000Z","correctionOf":null,"correctedBy":null,"typeInferred":false,"createdByMemberId":null,"voidedAt":null,"voidedById":null,"voidReason":null,"voidNote":null,"voidDuplicateOfId":null,"createdAt":"2025-12-01T11:00:00.000Z","updatedAt":"2025-12-01T11:00:00.000Z","hive":{"id":"clx2abc","number":7,"name":"Bienchen","apiary":{"id":"clx1abc","name":"Waldbienenstand"}},"deleteBlockedReason":"treatmentRetention"}
| Field | Type | Description |
|---|---|---|
id | string | Treatment ID(required) |
userId | string | Owner ID(required) |
hiveId | string | Hive ID(required) |
treatmentGroupId | string | Group of a multi-colony treatment(required, nullable) |
treatmentType | string | Treatment type(required, varroa_oxalic_acid | varroa_formic_acid | varroa_thymol | varroa_amitraz | varroa_pyrethroid | varroa_coumaphos | varroa_lactic_acid | varroa_oxalic_broodless | varroa_other | drone_brood_removal | total_brood_removal | brood_break | brood_break_no_trap | partial_brood_removal | hyperthermia | other) |
method | string | Application method(required, nullable, evaporator | drip | spray | sublimation | strips | other) |
startDate | string | Start (ISO 8601 date-time)(required) |
endDate | string | End (ISO 8601 date-time)(required, nullable) |
dose | number | Dosage amount(required, nullable) |
unit | string | Dosage unit(required, nullable, ml | g | strips) |
status | string | Status(required, planned | active | completed | pending_compliance) |
notes | string | Free-text notes(required, nullable) |
varroaCountBefore | integer | Varroa count before the treatment(required, nullable) |
varroaCountAfter | integer | Varroa count after the treatment(required, nullable) |
effectiveness | string | Observed effectiveness(required, nullable, high | medium | low | none) |
waitPeriodEnd | string | End of the withdrawal period (ISO 8601 date-time)(required, nullable) |
batchNumber | string | Batch number of the medication(required, nullable) |
supplier | string | Supplier(required, nullable) |
supplierInvoice | string | Invoice or delivery note number(required, nullable) |
withdrawalPeriodDays | integer | Deprecated withdrawal days(required, nullable) |
withdrawalPeriodDaysHoney | integer | Withdrawal period for honey in days(required, nullable) |
withdrawalPeriodDaysWax | integer | Withdrawal period for wax in days(required, nullable) |
treatingPerson | string | Person who treated(required, nullable) |
veterinarian | string | Veterinarian(required, nullable) |
prescriptionNumber | string | Prescription number(required, nullable) |
deletedAt | string | Soft-delete marker; always null here (ISO 8601 date-time)(required, nullable) |
lockedAt | string | When the record became immutable; null while it can still be edited (ISO 8601 date-time)(required, nullable) |
correctionOf | string | ID of the treatment this record corrects(required, nullable) |
correctedBy | string | ID of the correction that replaces this record(required, nullable) |
typeInferred | boolean | The treatment type was inferred by the system(required) |
createdByMemberId | string | Team member who created the record; null = owner(required, nullable) |
voidedAt | string | When the record was voided; null = not voided. Voiding preserves the stored status and excludes the record from metrics, follow-up and colony assessments (ISO 8601 date-time)(required, nullable) |
voidedById | string | Who voided the record(required, nullable) |
voidReason | string | Reason for voiding(required, nullable, duplicate | never_applied | other) |
voidNote | string | Note on the voiding(required, nullable) |
voidDuplicateOfId | string | ID of the treatment this record duplicates(required, nullable) |
createdAt | string | Created (ISO 8601 date-time)(required) |
updatedAt | string | Last updated (ISO 8601 date-time)(required) |
hive | object | The colony of the record (reference)(required) |
hive.id | string | Hive ID(required) |
hive.number | integer | Colony number(required) |
hive.name | string | Colony name(required, nullable) |
hive.apiary | object | Its apiary(required) |
hive.apiary.id | string | Apiary ID(required) |
hive.apiary.name | string | Apiary name(required) |
deleteBlockedReason | string | `treatmentRetention` while the record lies within the retention period and cannot be deleted; null otherwise(required, nullable) |
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/treatments/clx5abc" \
-H "Authorization: Bearer YOUR_API_KEY"/api/treatments/[id]Scope: write:treatmentsUpdate a treatment
Partially updates an existing treatment record. All fields are optional; an omitted field stays untouched. Send null for method, unit or effectiveness to clear the column. Includes EU 2019/6 compliance fields.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Treatment ID |
Request Body
Any subset of treatment fields. An omitted field stays untouched; `null` clears method, unit, effectiveness and the nullable withdrawal fields. `null` on `unit` is rejected for a medicinal type. A locked record only accepts `notesAddendum`, the completion from a non-final status, and filling `varroaCountAfter` or `effectiveness` while empty, and `endDate` while empty and the status is not `completed` or `cancelled`; everything else, also other empty fields such as `supplier`, needs a correction entry.
| Field | Type | Description |
|---|---|---|
hiveId | string | Hive IDe.g. clx2abc |
treatmentType | string | varroa_oxalic_acid | varroa_formic_acid | varroa_thymol | varroa_amitraz | varroa_pyrethroid | varroa_coumaphos | varroa_lactic_acid | varroa_oxalic_broodless | varroa_other | drone_brood_removal | total_brood_removal | brood_break | brood_break_no_trap | partial_brood_removal | hyperthermia | other(varroa_oxalic_acid | varroa_formic_acid | varroa_thymol | varroa_amitraz | varroa_pyrethroid | varroa_coumaphos | varroa_lactic_acid | varroa_oxalic_broodless | varroa_other | drone_brood_removal | total_brood_removal | brood_break | brood_break_no_trap | partial_brood_removal | hyperthermia | other)e.g. varroa_oxalic_acid |
method | string | evaporator | drip | spray | sublimation | strips | other — null clears the field(nullable, evaporator | drip | spray | sublimation | strips | other) |
startDate | string | Start date (ISO date or date-time)e.g. 2025-12-01 |
endDate | string | End date (ISO, not before `startDate`); required when the honey withdrawal period is above 0 days, and for a medicinal type entering `completed` |
dose | number | Dosage amount, positive, at most 10000; with `unit` required for medicinal treatment typese.g. 5 |
unit | string | ml | g | strips — null clears the field, except on a medicinal treatment type (400, dose and unit stay required)(nullable, ml | g | strips) |
status | string | planned | active | completed | pending_compliance(planned | active | completed | pending_compliance) |
notes | string | Free-text notes (max 5000 chars); on a locked record only extendable via `notesAddendum` |
varroaCountBefore | integer | Varroa count before the treatment, 0-100000 |
varroaCountAfter | integer | Varroa count after the treatment, 0-100000 |
effectiveness | string | Observed effectiveness — null clears the field(nullable, high | medium | low | none) |
waitPeriodEnd | string | End of the withdrawal period (ISO). The server derives a floor from the end date and the withdrawal days (without a stored period: the precautionary product default of the treatment type); an earlier value is raised to it, a later one is kept |
batchNumber | string | Batch number of the medication, max 100 characters (recommended) |
supplier | string | Supplier name, max 500 characters; medicinal treatment types need `supplier` or `supplierInvoice` |
supplierInvoice | string | Invoice or delivery note number, max 100 characters |
withdrawalPeriodDays | integer | Deprecated: use `withdrawalPeriodDaysHoney`. 0-365 days; on create it mirrors an explicitly sent honey value, otherwise stays empty |
withdrawalPeriodDaysHoney | integer | Withdrawal period for honey in days, 0-3650. Omitted on create: stays empty (null); without a stored period the server computes `waitPeriodEnd` with the precautionary product default of the treatment type; null: explicitly unknown(nullable) |
withdrawalPeriodDaysWax | integer | Withdrawal period for wax in days, 0-3650. Omitted on create: stays empty (null); null: explicitly unknown(nullable) |
typeInferred | boolean | Marks a treatment type that the system inferred instead of the user choosing it; leave unset |
treatingPerson | string | Name of the person who treated, 1-200 characterse.g. Max Muster |
veterinarian | string | Veterinarian, max 500 characters; required with `prescriptionNumber` for prescription-only types |
prescriptionNumber | string | Prescription number, max 100 characters; required with `veterinarian` for prescription-only types |
notesAddendum | string | Update only: a dated addendum that is appended to the notes, 1-2000 characters; the only way to extend a locked record's notes |
Response Body
The updated treatment with its colony
e.g. {"id":"clx5...","userId":"clxu...","hiveId":"clx2abc","treatmentGroupId":null,"treatmentType":"varroa_oxalic_acid","method":"drip","startDate":"2025-12-01T00:00:00.000Z","endDate":"2025-12-01T00:00:00.000Z","dose":5,"unit":"ml","status":"completed","notes":null,"varroaCountBefore":null,"varroaCountAfter":3,"effectiveness":"high","waitPeriodEnd":"2025-12-01T00:00:00.000Z","batchNumber":null,"supplier":"Imkereibedarf Muster","supplierInvoice":null,"withdrawalPeriodDays":null,"withdrawalPeriodDaysHoney":null,"withdrawalPeriodDaysWax":null,"treatingPerson":"Max Muster","veterinarian":null,"prescriptionNumber":null,"deletedAt":null,"lockedAt":"2025-12-01T11:00:00.000Z","correctionOf":null,"correctedBy":null,"typeInferred":false,"createdByMemberId":null,"voidedAt":null,"voidedById":null,"voidReason":null,"voidNote":null,"voidDuplicateOfId":null,"createdAt":"2025-12-01T11:00:00.000Z","updatedAt":"2025-12-01T11:00:00.000Z","hive":{"id":"clx2abc","number":7,"name":"Bienchen","apiary":{"id":"clx1abc","name":"Waldbienenstand"}}}
| Field | Type | Description |
|---|---|---|
id | string | Treatment ID(required) |
userId | string | Owner ID(required) |
hiveId | string | Hive ID(required) |
treatmentGroupId | string | Group of a multi-colony treatment(required, nullable) |
treatmentType | string | Treatment type(required, varroa_oxalic_acid | varroa_formic_acid | varroa_thymol | varroa_amitraz | varroa_pyrethroid | varroa_coumaphos | varroa_lactic_acid | varroa_oxalic_broodless | varroa_other | drone_brood_removal | total_brood_removal | brood_break | brood_break_no_trap | partial_brood_removal | hyperthermia | other) |
method | string | Application method(required, nullable, evaporator | drip | spray | sublimation | strips | other) |
startDate | string | Start (ISO 8601 date-time)(required) |
endDate | string | End (ISO 8601 date-time)(required, nullable) |
dose | number | Dosage amount(required, nullable) |
unit | string | Dosage unit(required, nullable, ml | g | strips) |
status | string | Status(required, planned | active | completed | pending_compliance) |
notes | string | Free-text notes(required, nullable) |
varroaCountBefore | integer | Varroa count before the treatment(required, nullable) |
varroaCountAfter | integer | Varroa count after the treatment(required, nullable) |
effectiveness | string | Observed effectiveness(required, nullable, high | medium | low | none) |
waitPeriodEnd | string | End of the withdrawal period (ISO 8601 date-time)(required, nullable) |
batchNumber | string | Batch number of the medication(required, nullable) |
supplier | string | Supplier(required, nullable) |
supplierInvoice | string | Invoice or delivery note number(required, nullable) |
withdrawalPeriodDays | integer | Deprecated withdrawal days(required, nullable) |
withdrawalPeriodDaysHoney | integer | Withdrawal period for honey in days(required, nullable) |
withdrawalPeriodDaysWax | integer | Withdrawal period for wax in days(required, nullable) |
treatingPerson | string | Person who treated(required, nullable) |
veterinarian | string | Veterinarian(required, nullable) |
prescriptionNumber | string | Prescription number(required, nullable) |
deletedAt | string | Soft-delete marker; always null here (ISO 8601 date-time)(required, nullable) |
lockedAt | string | When the record became immutable; null while it can still be edited (ISO 8601 date-time)(required, nullable) |
correctionOf | string | ID of the treatment this record corrects(required, nullable) |
correctedBy | string | ID of the correction that replaces this record(required, nullable) |
typeInferred | boolean | The treatment type was inferred by the system(required) |
createdByMemberId | string | Team member who created the record; null = owner(required, nullable) |
voidedAt | string | When the record was voided; null = not voided. Voiding preserves the stored status and excludes the record from metrics, follow-up and colony assessments (ISO 8601 date-time)(required, nullable) |
voidedById | string | Who voided the record(required, nullable) |
voidReason | string | Reason for voiding(required, nullable, duplicate | never_applied | other) |
voidNote | string | Note on the voiding(required, nullable) |
voidDuplicateOfId | string | ID of the treatment this record duplicates(required, nullable) |
createdAt | string | Created (ISO 8601 date-time)(required) |
updatedAt | string | Last updated (ISO 8601 date-time)(required) |
hive | object | The colony of the record (reference)(required) |
hive.id | string | Hive ID(required) |
hive.number | integer | Colony number(required) |
hive.name | string | Colony name(required, nullable) |
hive.apiary | object | Its apiary(required) |
hive.apiary.id | string | Apiary ID(required) |
hive.apiary.name | string | Apiary name(required) |
Success
200 application/json, wrapped as { data }
Errors
22 possible errors
Example
curl -X PUT "https://hivekraft.com/api/treatments/clx5abc" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"status":"completed","varroaCountAfter":3,"effectiveness":"high"}'/api/treatments/[id]Scope: write:treatmentsDelete a treatment
Permanently removes a treatment record.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Treatment ID |
Success
204 No Content (empty body)
Errors
20 possible errors
Example
curl -X DELETE "https://hivekraft.com/api/treatments/clx5abc" \
-H "Authorization: Bearer YOUR_API_KEY"Feedings
Track colony feedings (Fütterungen) with feed type and amounts.
/api/feedingsScope: read:feedingsList feedings
Returns all feeding records for the user.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
hiveId | string | No | Filter by hive |
apiaryId | string | No | Filter by apiary |
feedType | string | No | Filter by feed type (sugar_syrup, fondant, honey, pollen_substitute, api_invert, other) |
search | string | No | Free-text search over hive name, hive number (exact), feed type and notes |
dateFrom | string | No | Feeding date lower bound (ISO, inclusive)e.g. 2025-01-01 |
dateTo | string | No | Feeding date upper bound (ISO, the whole day is included)e.g. 2025-12-31 |
limit | number | No | Page size, 1-500. A value of 1-100 enables the paginated object response, a value above 100 returns a bare array of at most that many entries. |
cursor | string | No | Pagination cursor — an opaque value: pass the `nextCursor` from the previous page unchanged to fetch the next batch; do not build it yourself. An unknown or unreadable cursor returns 400 (reload the list from the first page). |
Response Body
Without cursor and limit: a bare array of feedings (more entries beyond the server cap are signalled by the headers `X-List-Has-More: true` and `X-List-Next-Cursor`, pass that value as `cursor`). With `cursor` and/or `limit`: a page object `{ items, nextCursor, hasMore }`. The example shows the page object.
e.g. {"items":[{"id":"clx6...","userId":"clxu...","hiveId":"clx2abc","feedingGroupId":null,"feedType":"sugar_syrup","amount":2.5,"date":"2025-09-01T00:00:00.000Z","notes":null,"feedUnit":"kg","concentration":"3:2","createdByMemberId":null,"reviewState":null,"reviewedByMemberId":null,"reviewedAt":null,"reviewNote":null,"createdAt":"2025-09-01T10:05:00.000Z","updatedAt":"2025-09-01T10:05:00.000Z","deletedAt":null,"hive":{"id":"clx2abc","number":7,"name":"Bienchen","apiary":{"id":"clx1abc","name":"Waldbienenstand"}}}],"nextCursor":"k1_W3siZCI6IjIwMjUtMDktMDFUMDA6MDA6MDAuMDAwWiJ9LCJjbHg2Li4uIl0","hasMore":true}
| Field | Type | Description |
|---|---|---|
items | array | The feedings on this page(required) |
items[].id | string | Feeding ID(required) |
items[].userId | string | Owner ID(required) |
items[].hiveId | string | Hive ID(required) |
items[].feedingGroupId | string | Group of a multi-colony feeding(required, nullable) |
items[].feedType | string | Feed type(required, sugar_syrup | fondant | honey | pollen_substitute | api_invert | other) |
items[].amount | number | Amount in `feedUnit` (kg when `feedUnit` is null)(required) |
items[].date | string | Feeding date (ISO 8601 date-time)(required) |
items[].notes | string | Free-text notes(required, nullable) |
items[].feedUnit | string | Unit of `amount`; null counts as kg(required, nullable, kg | liter | ml) |
items[].concentration | string | Sugar ratio(required, nullable) |
items[].createdByMemberId | string | Team member who created the record; null = owner(required, nullable) |
items[].reviewState | string | Review state for team records; null = no review required(required, nullable) |
items[].reviewedByMemberId | string | Team member who reviewed the record(required, nullable) |
items[].reviewedAt | string | When the record was reviewed (ISO 8601 date-time)(required, nullable) |
items[].reviewNote | string | Review note(required, nullable) |
items[].createdAt | string | Created (ISO 8601 date-time)(required) |
items[].updatedAt | string | Last updated (ISO 8601 date-time)(required) |
items[].deletedAt | string | Soft-delete marker; always null here (ISO 8601 date-time)(required, nullable) |
items[].hive | object | The colony of the record (reference)(required) |
items[].hive.id | string | Hive ID(required) |
items[].hive.number | integer | Colony number(required) |
items[].hive.name | string | Colony name(required, nullable) |
items[].hive.apiary | object | Its apiary(required) |
items[].hive.apiary.id | string | Apiary ID(required) |
items[].hive.apiary.name | string | Apiary name(required) |
nextCursor | string | Cursor for the next page, or null when there are no more results(required, nullable) |
hasMore | boolean | True when a further page is available(required) |
[].id | string | Feeding ID(required) |
[].userId | string | Owner ID(required) |
[].hiveId | string | Hive ID(required) |
[].feedingGroupId | string | Group of a multi-colony feeding(required, nullable) |
[].feedType | string | Feed type(required, sugar_syrup | fondant | honey | pollen_substitute | api_invert | other) |
[].amount | number | Amount in `feedUnit` (kg when `feedUnit` is null)(required) |
[].date | string | Feeding date (ISO 8601 date-time)(required) |
[].notes | string | Free-text notes(required, nullable) |
[].feedUnit | string | Unit of `amount`; null counts as kg(required, nullable, kg | liter | ml) |
[].concentration | string | Sugar ratio(required, nullable) |
[].createdByMemberId | string | Team member who created the record; null = owner(required, nullable) |
[].reviewState | string | Review state for team records; null = no review required(required, nullable) |
[].reviewedByMemberId | string | Team member who reviewed the record(required, nullable) |
[].reviewedAt | string | When the record was reviewed (ISO 8601 date-time)(required, nullable) |
[].reviewNote | string | Review note(required, nullable) |
[].createdAt | string | Created (ISO 8601 date-time)(required) |
[].updatedAt | string | Last updated (ISO 8601 date-time)(required) |
[].deletedAt | string | Soft-delete marker; always null here (ISO 8601 date-time)(required, nullable) |
[].hive | object | The colony of the record (reference)(required) |
[].hive.id | string | Hive ID(required) |
[].hive.number | integer | Colony number(required) |
[].hive.name | string | Colony name(required, nullable) |
[].hive.apiary | object | Its apiary(required) |
[].hive.apiary.id | string | Apiary ID(required) |
[].hive.apiary.name | string | Apiary name(required) |
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/feedings?hiveId=clx2abc" \
-H "Authorization: Bearer YOUR_API_KEY"/api/feedingsScope: write:feedingsCreate a feeding
Records a new feeding event for a colony.
Request Body
hiveId, feedType, amount and date are required.
| Field | Type | Description |
|---|---|---|
hiveId | string | Hive ID(required)e.g. clx2abc |
feedType | string | Feed type(required, sugar_syrup | fondant | honey | pollen_substitute | api_invert | other)e.g. sugar_syrup |
amount | number | Amount in `feedUnit` (kg when omitted), positive, at most 100000(required)e.g. 2.5 |
feedUnit | string | Unit of `amount`; an omitted unit counts as kg(kg | liter | ml) |
concentration | string | Sugar ratio such as 1:1, 3:2, 2:1, 1:0, max 10 characters (free text) |
date | string | Feeding date (ISO date or date-time)(required)e.g. 2025-09-01 |
notes | string | Free-text notes (max 5000 chars) |
Response Body
The created feeding with its colony
e.g. {"id":"clx6...","userId":"clxu...","hiveId":"clx2abc","feedingGroupId":null,"feedType":"sugar_syrup","amount":2.5,"date":"2025-09-01T00:00:00.000Z","notes":null,"feedUnit":"kg","concentration":"3:2","createdByMemberId":null,"reviewState":null,"reviewedByMemberId":null,"reviewedAt":null,"reviewNote":null,"createdAt":"2025-09-01T10:05:00.000Z","updatedAt":"2025-09-01T10:05:00.000Z","deletedAt":null,"hive":{"id":"clx2abc","number":7,"name":"Bienchen","apiary":{"id":"clx1abc","name":"Waldbienenstand"}}}
| Field | Type | Description |
|---|---|---|
id | string | Feeding ID(required) |
userId | string | Owner ID(required) |
hiveId | string | Hive ID(required) |
feedingGroupId | string | Group of a multi-colony feeding(required, nullable) |
feedType | string | Feed type(required, sugar_syrup | fondant | honey | pollen_substitute | api_invert | other) |
amount | number | Amount in `feedUnit` (kg when `feedUnit` is null)(required) |
date | string | Feeding date (ISO 8601 date-time)(required) |
notes | string | Free-text notes(required, nullable) |
feedUnit | string | Unit of `amount`; null counts as kg(required, nullable, kg | liter | ml) |
concentration | string | Sugar ratio(required, nullable) |
createdByMemberId | string | Team member who created the record; null = owner(required, nullable) |
reviewState | string | Review state for team records; null = no review required(required, nullable) |
reviewedByMemberId | string | Team member who reviewed the record(required, nullable) |
reviewedAt | string | When the record was reviewed (ISO 8601 date-time)(required, nullable) |
reviewNote | string | Review note(required, nullable) |
createdAt | string | Created (ISO 8601 date-time)(required) |
updatedAt | string | Last updated (ISO 8601 date-time)(required) |
deletedAt | string | Soft-delete marker; always null here (ISO 8601 date-time)(required, nullable) |
hive | object | The colony of the record (reference)(required) |
hive.id | string | Hive ID(required) |
hive.number | integer | Colony number(required) |
hive.name | string | Colony name(required, nullable) |
hive.apiary | object | Its apiary(required) |
hive.apiary.id | string | Apiary ID(required) |
hive.apiary.name | string | Apiary name(required) |
Success
201 application/json, wrapped as { data }
Errors
21 possible errors
Example
curl -X POST "https://hivekraft.com/api/feedings" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"hiveId":"clx2abc","feedType":"sugar_syrup","amount":2.5,"date":"2025-09-01","feedUnit":"kg","concentration":"3:2"}'/api/feedings/[id]Scope: read:feedingsGet a single feeding
Returns full details of a feeding record.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Feeding ID |
Response Body
A feeding with its colony
e.g. {"id":"clx6...","userId":"clxu...","hiveId":"clx2abc","feedingGroupId":null,"feedType":"sugar_syrup","amount":2.5,"date":"2025-09-01T00:00:00.000Z","notes":null,"feedUnit":"kg","concentration":"3:2","createdByMemberId":null,"reviewState":null,"reviewedByMemberId":null,"reviewedAt":null,"reviewNote":null,"createdAt":"2025-09-01T10:05:00.000Z","updatedAt":"2025-09-01T10:05:00.000Z","deletedAt":null,"hive":{"id":"clx2abc","number":7,"name":"Bienchen","apiary":{"id":"clx1abc","name":"Waldbienenstand"}}}
| Field | Type | Description |
|---|---|---|
id | string | Feeding ID(required) |
userId | string | Owner ID(required) |
hiveId | string | Hive ID(required) |
feedingGroupId | string | Group of a multi-colony feeding(required, nullable) |
feedType | string | Feed type(required, sugar_syrup | fondant | honey | pollen_substitute | api_invert | other) |
amount | number | Amount in `feedUnit` (kg when `feedUnit` is null)(required) |
date | string | Feeding date (ISO 8601 date-time)(required) |
notes | string | Free-text notes(required, nullable) |
feedUnit | string | Unit of `amount`; null counts as kg(required, nullable, kg | liter | ml) |
concentration | string | Sugar ratio(required, nullable) |
createdByMemberId | string | Team member who created the record; null = owner(required, nullable) |
reviewState | string | Review state for team records; null = no review required(required, nullable) |
reviewedByMemberId | string | Team member who reviewed the record(required, nullable) |
reviewedAt | string | When the record was reviewed (ISO 8601 date-time)(required, nullable) |
reviewNote | string | Review note(required, nullable) |
createdAt | string | Created (ISO 8601 date-time)(required) |
updatedAt | string | Last updated (ISO 8601 date-time)(required) |
deletedAt | string | Soft-delete marker; always null here (ISO 8601 date-time)(required, nullable) |
hive | object | The colony of the record (reference)(required) |
hive.id | string | Hive ID(required) |
hive.number | integer | Colony number(required) |
hive.name | string | Colony name(required, nullable) |
hive.apiary | object | Its apiary(required) |
hive.apiary.id | string | Apiary ID(required) |
hive.apiary.name | string | Apiary name(required) |
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/feedings/clx6abc" \
-H "Authorization: Bearer YOUR_API_KEY"/api/feedings/[id]Scope: write:feedingsUpdate a feeding
Partially updates an existing feeding record. All fields are optional.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Feeding ID |
Request Body
Any subset of feeding fields; `expectedUpdatedAt` adds an optimistic lock. An omitted field stays untouched; `null` clears feedUnit, concentration and notes.
| Field | Type | Description |
|---|---|---|
hiveId | string | Hive IDe.g. clx2abc |
feedType | string | Feed type(sugar_syrup | fondant | honey | pollen_substitute | api_invert | other)e.g. sugar_syrup |
amount | number | Amount in `feedUnit` (the stored unit when omitted), positive, at most 100000e.g. 2.5 |
feedUnit | string | Unit of `amount`; an omitted field keeps the stored unit (a stored empty unit counts as kg); null clears the field(nullable, kg | liter | ml) |
concentration | string | Sugar ratio such as 1:1, 3:2, 2:1, 1:0, max 10 characters (free text)(nullable) |
date | string | Feeding date (ISO date or date-time)e.g. 2025-09-01 |
notes | string | Free-text notes (max 5000 chars)(nullable) |
expectedUpdatedAt | string | Optimistic lock: the `updatedAt` the client last saw (ISO datetime). A different stored value is rejected with 409 (`details.reason` `feeding_changed`) |
Response Body
The updated feeding with its colony
e.g. {"id":"clx6...","userId":"clxu...","hiveId":"clx2abc","feedingGroupId":null,"feedType":"sugar_syrup","amount":3,"date":"2025-09-01T00:00:00.000Z","notes":"Increased dose","feedUnit":"kg","concentration":"3:2","createdByMemberId":null,"reviewState":null,"reviewedByMemberId":null,"reviewedAt":null,"reviewNote":null,"createdAt":"2025-09-01T10:05:00.000Z","updatedAt":"2025-09-01T10:05:00.000Z","deletedAt":null,"hive":{"id":"clx2abc","number":7,"name":"Bienchen","apiary":{"id":"clx1abc","name":"Waldbienenstand"}}}
| Field | Type | Description |
|---|---|---|
id | string | Feeding ID(required) |
userId | string | Owner ID(required) |
hiveId | string | Hive ID(required) |
feedingGroupId | string | Group of a multi-colony feeding(required, nullable) |
feedType | string | Feed type(required, sugar_syrup | fondant | honey | pollen_substitute | api_invert | other) |
amount | number | Amount in `feedUnit` (kg when `feedUnit` is null)(required) |
date | string | Feeding date (ISO 8601 date-time)(required) |
notes | string | Free-text notes(required, nullable) |
feedUnit | string | Unit of `amount`; null counts as kg(required, nullable, kg | liter | ml) |
concentration | string | Sugar ratio(required, nullable) |
createdByMemberId | string | Team member who created the record; null = owner(required, nullable) |
reviewState | string | Review state for team records; null = no review required(required, nullable) |
reviewedByMemberId | string | Team member who reviewed the record(required, nullable) |
reviewedAt | string | When the record was reviewed (ISO 8601 date-time)(required, nullable) |
reviewNote | string | Review note(required, nullable) |
createdAt | string | Created (ISO 8601 date-time)(required) |
updatedAt | string | Last updated (ISO 8601 date-time)(required) |
deletedAt | string | Soft-delete marker; always null here (ISO 8601 date-time)(required, nullable) |
hive | object | The colony of the record (reference)(required) |
hive.id | string | Hive ID(required) |
hive.number | integer | Colony number(required) |
hive.name | string | Colony name(required, nullable) |
hive.apiary | object | Its apiary(required) |
hive.apiary.id | string | Apiary ID(required) |
hive.apiary.name | string | Apiary name(required) |
Success
200 application/json, wrapped as { data }
Errors
22 possible errors
Example
curl -X PUT "https://hivekraft.com/api/feedings/clx6abc" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"amount":3.0,"notes":"Increased dose"}'/api/feedings/[id]Scope: write:feedingsDelete a feeding
Permanently removes a feeding record.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Feeding ID |
Success
204 No Content (empty body)
Errors
18 possible errors
Example
curl -X DELETE "https://hivekraft.com/api/feedings/clx6abc" \
-H "Authorization: Bearer YOUR_API_KEY"Harvests
Record honey harvests (Ernten) with weight, water content, and honey type.
/api/harvestsScope: read:harvestsList harvests
Returns all harvests for the authenticated user.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
apiaryId | string | No | Filter by apiary |
honeyType | string | No | spring | summer | blossom | forest | linden | rapeseed | acacia | heather | sunflower | phacelia | buckwheat | chestnut | clover | mixed | other |
year | integer | No | Harvest year (UTC), 2000 up to five years aheade.g. 2025 |
hiveId | string | No | Only harvests this colony took part in |
search | string | No | Free-text search over notes, apiary name, colony name, and colony number (exact); "12 Berta" matches number and name of one colony |
honeyTypes | string | No | Comma-separated honey types that are added to the matches of `search`; unknown values are ignored |
cursor | string | No | Pagination cursor — an opaque value: pass the `nextCursor` from the previous page unchanged to fetch the next batch; do not build it yourself. An unknown or unreadable cursor returns 400 (reload the list from the first page). |
limit | number | No | Items per page (1-100, default 20). Sending this enables the paginated object response shape. A value outside 1-100 is ignored and the bare array is returned. |
Response Body
Without cursor and limit: a bare array of harvests (more entries beyond the server cap are signalled by the headers `X-List-Has-More: true` and `X-List-Next-Cursor`, pass that value as `cursor`). With `cursor` and/or `limit`: a page object `{ items, nextCursor, hasMore }`. The example shows the page object.
e.g. {"items":[{"id":"clx7...","userId":"clxu...","apiaryId":"clx1abc","harvestDate":"2025-07-10T00:00:00.000Z","honeyType":"rapeseed","netWeight":22.5,"waterContent":17.2,"batchNumber":"2025-001","notes":null,"harvestMethod":"extractor","frameCount":10,"directToJar":false,"aromaScore":null,"tasteScore":null,"consistencyScore":null,"createdByMemberId":null,"reviewState":null,"reviewedByMemberId":null,"reviewedAt":null,"reviewNote":null,"deletedAt":null,"createdAt":"2025-07-10T16:00:00.000Z","updatedAt":"2025-07-10T16:00:00.000Z","apiary":{"id":"clx1abc","name":"Waldbienenstand","deletedAt":null},"harvestHives":[{"hive":{"id":"clx2abc","number":7,"name":"Bienchen"}}],"_count":{"harvestHives":1},"bottlingHarvests":[],"participantHiveIds":["clx2abc"]}],"nextCursor":"k1_W3siZCI6IjIwMjUtMDctMTBUMDA6MDA6MDAuMDAwWiJ9LCJjbHg3Li4uIl0","hasMore":true}
| Field | Type | Description |
|---|---|---|
items | array | The harvests on this page(required) |
items[].id | string | Harvest ID(required) |
items[].userId | string | Owner ID(required) |
items[].apiaryId | string | Apiary ID(required, nullable) |
items[].harvestDate | string | Harvest date (ISO 8601 date-time)(required) |
items[].honeyType | string | Honey type(required, nullable, spring | summer | blossom | forest | linden | rapeseed | acacia | heather | sunflower | phacelia | buckwheat | chestnut | clover | mixed | other) |
items[].netWeight | number | Net weight in kg(required) |
items[].waterContent | number | Water content in percent(required, nullable) |
items[].batchNumber | string | Batch number `<year>-<serial>`, assigned by the server(required) |
items[].notes | string | Free-text notes(required, nullable) |
items[].harvestMethod | string | Extraction method(required, nullable, extractor | flow_frame | press | cut_comb | drip | other) |
items[].frameCount | integer | Number of frames harvested(required, nullable) |
items[].directToJar | boolean | Honey was filled straight from the comb into jars(required, nullable) |
items[].aromaScore | integer | Aroma score 1-10(required, nullable) |
items[].tasteScore | integer | Taste score 1-10(required, nullable) |
items[].consistencyScore | integer | Consistency score 1-10(required, nullable) |
items[].createdByMemberId | string | Team member who created the record; null = owner(required, nullable) |
items[].reviewState | string | Review state for team records; null = no review required(required, nullable) |
items[].reviewedByMemberId | string | Team member who reviewed the record(required, nullable) |
items[].reviewedAt | string | When the record was reviewed (ISO 8601 date-time)(required, nullable) |
items[].reviewNote | string | Review note(required, nullable) |
items[].deletedAt | string | Soft-delete marker; always null here (ISO 8601 date-time)(required, nullable) |
items[].createdAt | string | Created (ISO 8601 date-time)(required) |
items[].updatedAt | string | Last updated (ISO 8601 date-time)(required) |
items[].apiary | object | Its apiary(required, nullable) |
items[].apiary.id | string | Apiary ID(required) |
items[].apiary.name | string | Apiary name(required) |
items[].apiary.deletedAt | string | Set when the apiary was deleted (ISO 8601 date-time)(required, nullable) |
items[].harvestHives | array | Participating colonies that still exist(required) |
items[].harvestHives[].hive | object | The colony(required) |
items[].harvestHives[].hive.id | string | Hive ID(required) |
items[].harvestHives[].hive.number | integer | Colony number(required) |
items[].harvestHives[].hive.name | string | Colony name(required, nullable) |
items[]._count | object | Counts(required) |
items[]._count.harvestHives | integer | All participating colonies including deleted ones(required) |
items[].bottlingHarvests | array | Bottling batches fed by this harvest(required) |
items[].bottlingHarvests[].weight | number | Allocated weight in g(required) |
items[].bottlingHarvests[].bottlingBatch | object | The batch(required) |
items[].bottlingHarvests[].bottlingBatch.id | string | Bottling batch ID(required) |
items[].participantHiveIds | array | IDs of all participating colonies, including deleted ones (get and list only)(required) |
items[].participantHiveIds[] | string | Hive ID |
nextCursor | string | Cursor for the next page, or null when there are no more results(required, nullable) |
hasMore | boolean | True when a further page is available(required) |
[].id | string | Harvest ID(required) |
[].userId | string | Owner ID(required) |
[].apiaryId | string | Apiary ID(required, nullable) |
[].harvestDate | string | Harvest date (ISO 8601 date-time)(required) |
[].honeyType | string | Honey type(required, nullable, spring | summer | blossom | forest | linden | rapeseed | acacia | heather | sunflower | phacelia | buckwheat | chestnut | clover | mixed | other) |
[].netWeight | number | Net weight in kg(required) |
[].waterContent | number | Water content in percent(required, nullable) |
[].batchNumber | string | Batch number `<year>-<serial>`, assigned by the server(required) |
[].notes | string | Free-text notes(required, nullable) |
[].harvestMethod | string | Extraction method(required, nullable, extractor | flow_frame | press | cut_comb | drip | other) |
[].frameCount | integer | Number of frames harvested(required, nullable) |
[].directToJar | boolean | Honey was filled straight from the comb into jars(required, nullable) |
[].aromaScore | integer | Aroma score 1-10(required, nullable) |
[].tasteScore | integer | Taste score 1-10(required, nullable) |
[].consistencyScore | integer | Consistency score 1-10(required, nullable) |
[].createdByMemberId | string | Team member who created the record; null = owner(required, nullable) |
[].reviewState | string | Review state for team records; null = no review required(required, nullable) |
[].reviewedByMemberId | string | Team member who reviewed the record(required, nullable) |
[].reviewedAt | string | When the record was reviewed (ISO 8601 date-time)(required, nullable) |
[].reviewNote | string | Review note(required, nullable) |
[].deletedAt | string | Soft-delete marker; always null here (ISO 8601 date-time)(required, nullable) |
[].createdAt | string | Created (ISO 8601 date-time)(required) |
[].updatedAt | string | Last updated (ISO 8601 date-time)(required) |
[].apiary | object | Its apiary(required, nullable) |
[].apiary.id | string | Apiary ID(required) |
[].apiary.name | string | Apiary name(required) |
[].apiary.deletedAt | string | Set when the apiary was deleted (ISO 8601 date-time)(required, nullable) |
[].harvestHives | array | Participating colonies that still exist(required) |
[].harvestHives[].hive | object | The colony(required) |
[].harvestHives[].hive.id | string | Hive ID(required) |
[].harvestHives[].hive.number | integer | Colony number(required) |
[].harvestHives[].hive.name | string | Colony name(required, nullable) |
[]._count | object | Counts(required) |
[]._count.harvestHives | integer | All participating colonies including deleted ones(required) |
[].bottlingHarvests | array | Bottling batches fed by this harvest(required) |
[].bottlingHarvests[].weight | number | Allocated weight in g(required) |
[].bottlingHarvests[].bottlingBatch | object | The batch(required) |
[].bottlingHarvests[].bottlingBatch.id | string | Bottling batch ID(required) |
[].participantHiveIds | array | IDs of all participating colonies, including deleted ones (get and list only)(required) |
[].participantHiveIds[] | string | Hive ID |
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/harvests" \
-H "Authorization: Bearer YOUR_API_KEY"/api/harvestsScope: write:harvestsCreate a harvest
Records a new honey harvest. Hive assignment is required — without `hiveIds` the quarantine, withdrawal-period and honey-regulation checks cannot run, so the request is rejected with 409 HIVE_LINK_REQUIRED unless you explicitly set `confirmNoHiveLink: true`.
Request Headers
| Name | Type | Required | Description |
|---|---|---|---|
Idempotency-Key | string | No | Optional retry key, 16-128 characters from A-Z a-z 0-9 _ -. A repeat with the same key and body returns the first result instead of creating a second record; an invalid key is rejected with 400.e.g. 3f2a9c1e-7b4d-4e8a-9c21-0d5b6a7e8f90 |
Request Body
harvestDate and netWeight are required; hiveIds is required unless confirmNoHiveLink is true. The batch number is assigned by the server.
| Field | Type | Description |
|---|---|---|
apiaryId | string | Associated apiary |
harvestDate | string | Harvest date (ISO, not more than 24 hours in the future)(required)e.g. 2025-07-10 |
honeyType | string | spring | summer | blossom | forest | linden | rapeseed | acacia | heather | sunflower | phacelia | buckwheat | chestnut | clover | mixed | other(spring | summer | blossom | forest | linden | rapeseed | acacia | heather | sunflower | phacelia | buckwheat | chestnut | clover | mixed | other)e.g. rapeseed |
harvestMethod | string | Extraction method(extractor | flow_frame | press | cut_comb | drip | other) |
netWeight | number | Net weight in kg, positive, at most 100000(required)e.g. 22.5 |
waterContent | number | Water content % (0-30)e.g. 17.2 |
frameCount | integer | Number of frames harvested, 1-50 |
directToJar | boolean | Honey was filled straight from the comb into jars |
hiveIds | array | Array of hive IDs that contributed, at most 200 (required unless confirmNoHiveLink is true) |
hiveIds[] | string | Hive ID |
notes | string | Free-text notes (max 5000 chars) |
confirmHoneySource | boolean | Confirm that the honey was stored before a sugar feeding of the last 60 days; logged for the auditor |
confirmNoHiveLink | boolean | Explicitly confirm a harvest without hive assignment — logged for the auditore.g. false |
aromaScore | integer | Aroma score 1-10(nullable) |
tasteScore | integer | Taste score 1-10(nullable) |
consistencyScore | integer | Consistency score 1-10(nullable) |
Response Body
The created harvest with apiary, colonies and bottling allocations
e.g. {"id":"clx7...","userId":"clxu...","apiaryId":"clx1abc","harvestDate":"2025-07-10T00:00:00.000Z","honeyType":"rapeseed","netWeight":22.5,"waterContent":17.2,"batchNumber":"2025-001","notes":null,"harvestMethod":"extractor","frameCount":10,"directToJar":false,"aromaScore":null,"tasteScore":null,"consistencyScore":null,"createdByMemberId":null,"reviewState":null,"reviewedByMemberId":null,"reviewedAt":null,"reviewNote":null,"deletedAt":null,"createdAt":"2025-07-10T16:00:00.000Z","updatedAt":"2025-07-10T16:00:00.000Z","apiary":{"id":"clx1abc","name":"Waldbienenstand","deletedAt":null},"harvestHives":[{"hive":{"id":"clx2abc","number":7,"name":"Bienchen"}}],"_count":{"harvestHives":1},"bottlingHarvests":[]}
| Field | Type | Description |
|---|---|---|
id | string | Harvest ID(required) |
userId | string | Owner ID(required) |
apiaryId | string | Apiary ID(required, nullable) |
harvestDate | string | Harvest date (ISO 8601 date-time)(required) |
honeyType | string | Honey type(required, nullable, spring | summer | blossom | forest | linden | rapeseed | acacia | heather | sunflower | phacelia | buckwheat | chestnut | clover | mixed | other) |
netWeight | number | Net weight in kg(required) |
waterContent | number | Water content in percent(required, nullable) |
batchNumber | string | Batch number `<year>-<serial>`, assigned by the server(required) |
notes | string | Free-text notes(required, nullable) |
harvestMethod | string | Extraction method(required, nullable, extractor | flow_frame | press | cut_comb | drip | other) |
frameCount | integer | Number of frames harvested(required, nullable) |
directToJar | boolean | Honey was filled straight from the comb into jars(required, nullable) |
aromaScore | integer | Aroma score 1-10(required, nullable) |
tasteScore | integer | Taste score 1-10(required, nullable) |
consistencyScore | integer | Consistency score 1-10(required, nullable) |
createdByMemberId | string | Team member who created the record; null = owner(required, nullable) |
reviewState | string | Review state for team records; null = no review required(required, nullable) |
reviewedByMemberId | string | Team member who reviewed the record(required, nullable) |
reviewedAt | string | When the record was reviewed (ISO 8601 date-time)(required, nullable) |
reviewNote | string | Review note(required, nullable) |
deletedAt | string | Soft-delete marker; always null here (ISO 8601 date-time)(required, nullable) |
createdAt | string | Created (ISO 8601 date-time)(required) |
updatedAt | string | Last updated (ISO 8601 date-time)(required) |
apiary | object | Its apiary(required, nullable) |
apiary.id | string | Apiary ID(required) |
apiary.name | string | Apiary name(required) |
apiary.deletedAt | string | Set when the apiary was deleted (ISO 8601 date-time)(required, nullable) |
harvestHives | array | Participating colonies that still exist(required) |
harvestHives[].hive | object | The colony(required) |
harvestHives[].hive.id | string | Hive ID(required) |
harvestHives[].hive.number | integer | Colony number(required) |
harvestHives[].hive.name | string | Colony name(required, nullable) |
_count | object | Counts(required) |
_count.harvestHives | integer | All participating colonies including deleted ones(required) |
bottlingHarvests | array | Bottling batches fed by this harvest(required) |
bottlingHarvests[].weight | number | Allocated weight in g(required) |
bottlingHarvests[].bottlingBatch | object | The batch(required) |
bottlingHarvests[].bottlingBatch.id | string | Bottling batch ID(required) |
Success
201 application/json, wrapped as { data }
Errors
27 possible errors
Example
curl -X POST "https://hivekraft.com/api/harvests" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"apiaryId":"clx1abc","harvestDate":"2025-07-10","honeyType":"rapeseed","harvestMethod":"extractor","netWeight":22.5,"waterContent":17.2,"frameCount":10,"directToJar":false,"hiveIds":["clx2abc"]}'/api/harvests/[id]Scope: read:harvestsGet a single harvest
Returns full details for one harvest record.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Harvest ID |
Response Body
A harvest with apiary, colonies and bottling allocations
e.g. {"id":"clx7...","userId":"clxu...","apiaryId":"clx1abc","harvestDate":"2025-07-10T00:00:00.000Z","honeyType":"rapeseed","netWeight":22.5,"waterContent":17.2,"batchNumber":"2025-001","notes":null,"harvestMethod":"extractor","frameCount":10,"directToJar":false,"aromaScore":null,"tasteScore":null,"consistencyScore":null,"createdByMemberId":null,"reviewState":null,"reviewedByMemberId":null,"reviewedAt":null,"reviewNote":null,"deletedAt":null,"createdAt":"2025-07-10T16:00:00.000Z","updatedAt":"2025-07-10T16:00:00.000Z","apiary":{"id":"clx1abc","name":"Waldbienenstand","deletedAt":null},"harvestHives":[{"hive":{"id":"clx2abc","number":7,"name":"Bienchen"}}],"_count":{"harvestHives":1},"bottlingHarvests":[],"participantHiveIds":["clx2abc"]}
| Field | Type | Description |
|---|---|---|
id | string | Harvest ID(required) |
userId | string | Owner ID(required) |
apiaryId | string | Apiary ID(required, nullable) |
harvestDate | string | Harvest date (ISO 8601 date-time)(required) |
honeyType | string | Honey type(required, nullable, spring | summer | blossom | forest | linden | rapeseed | acacia | heather | sunflower | phacelia | buckwheat | chestnut | clover | mixed | other) |
netWeight | number | Net weight in kg(required) |
waterContent | number | Water content in percent(required, nullable) |
batchNumber | string | Batch number `<year>-<serial>`, assigned by the server(required) |
notes | string | Free-text notes(required, nullable) |
harvestMethod | string | Extraction method(required, nullable, extractor | flow_frame | press | cut_comb | drip | other) |
frameCount | integer | Number of frames harvested(required, nullable) |
directToJar | boolean | Honey was filled straight from the comb into jars(required, nullable) |
aromaScore | integer | Aroma score 1-10(required, nullable) |
tasteScore | integer | Taste score 1-10(required, nullable) |
consistencyScore | integer | Consistency score 1-10(required, nullable) |
createdByMemberId | string | Team member who created the record; null = owner(required, nullable) |
reviewState | string | Review state for team records; null = no review required(required, nullable) |
reviewedByMemberId | string | Team member who reviewed the record(required, nullable) |
reviewedAt | string | When the record was reviewed (ISO 8601 date-time)(required, nullable) |
reviewNote | string | Review note(required, nullable) |
deletedAt | string | Soft-delete marker; always null here (ISO 8601 date-time)(required, nullable) |
createdAt | string | Created (ISO 8601 date-time)(required) |
updatedAt | string | Last updated (ISO 8601 date-time)(required) |
apiary | object | Its apiary(required, nullable) |
apiary.id | string | Apiary ID(required) |
apiary.name | string | Apiary name(required) |
apiary.deletedAt | string | Set when the apiary was deleted (ISO 8601 date-time)(required, nullable) |
harvestHives | array | Participating colonies that still exist(required) |
harvestHives[].hive | object | The colony(required) |
harvestHives[].hive.id | string | Hive ID(required) |
harvestHives[].hive.number | integer | Colony number(required) |
harvestHives[].hive.name | string | Colony name(required, nullable) |
_count | object | Counts(required) |
_count.harvestHives | integer | All participating colonies including deleted ones(required) |
bottlingHarvests | array | Bottling batches fed by this harvest(required) |
bottlingHarvests[].weight | number | Allocated weight in g(required) |
bottlingHarvests[].bottlingBatch | object | The batch(required) |
bottlingHarvests[].bottlingBatch.id | string | Bottling batch ID(required) |
participantHiveIds | array | IDs of all participating colonies, including deleted ones (get and list only)(required) |
participantHiveIds[] | string | Hive ID |
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/harvests/clx7abc" \
-H "Authorization: Bearer YOUR_API_KEY"/api/harvests/[id]Scope: write:harvestsUpdate a harvest
Partially updates an existing harvest record. All fields are optional.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Harvest ID |
Request Body
Any subset of harvest fields. An omitted field stays untouched; `null` clears the nullable fields.
| Field | Type | Description |
|---|---|---|
apiaryId | string | Associated apiary(nullable) |
harvestDate | string | Harvest date (ISO, not more than 24 hours in the future)e.g. 2025-07-10 |
honeyType | string | spring | summer | blossom | forest | linden | rapeseed | acacia | heather | sunflower | phacelia | buckwheat | chestnut | clover | mixed | other(nullable, spring | summer | blossom | forest | linden | rapeseed | acacia | heather | sunflower | phacelia | buckwheat | chestnut | clover | mixed | other)e.g. rapeseed |
harvestMethod | string | Extraction method(nullable, extractor | flow_frame | press | cut_comb | drip | other) |
netWeight | number | Net weight in kg, positive, at most 100000e.g. 22.5 |
waterContent | number | Water content % (0-30)(nullable)e.g. 17.2 |
frameCount | integer | Number of frames harvested, 1-50(nullable) |
directToJar | boolean | Honey was filled straight from the comb into jars(nullable) |
hiveIds | array | Array of hive IDs contributing to the harvest, at most 200; replaces the links of living colonies. Sending `[]` while colonies are linked needs `confirmNoHiveLink` |
hiveIds[] | string | Hive ID |
notes | string | Free-text notes (max 5000 chars)(nullable) |
confirmHoneySource | boolean | Confirm that the honey was stored before a sugar feeding of the last 60 days; logged for the auditor |
confirmNoHiveLink | boolean | Explicitly confirm removing all colony links — logged for the auditore.g. false |
aromaScore | integer | Aroma score 1-10(nullable) |
tasteScore | integer | Taste score 1-10(nullable) |
consistencyScore | integer | Consistency score 1-10(nullable) |
Response Body
The updated harvest with apiary, colonies and bottling allocations
e.g. {"id":"clx7...","userId":"clxu...","apiaryId":"clx1abc","harvestDate":"2025-07-10T00:00:00.000Z","honeyType":"rapeseed","netWeight":24,"waterContent":16.8,"batchNumber":"2025-001","notes":null,"harvestMethod":"extractor","frameCount":10,"directToJar":false,"aromaScore":null,"tasteScore":null,"consistencyScore":null,"createdByMemberId":null,"reviewState":null,"reviewedByMemberId":null,"reviewedAt":null,"reviewNote":null,"deletedAt":null,"createdAt":"2025-07-10T16:00:00.000Z","updatedAt":"2025-07-10T16:00:00.000Z","apiary":{"id":"clx1abc","name":"Waldbienenstand","deletedAt":null},"harvestHives":[{"hive":{"id":"clx2abc","number":7,"name":"Bienchen"}}],"_count":{"harvestHives":1},"bottlingHarvests":[]}
| Field | Type | Description |
|---|---|---|
id | string | Harvest ID(required) |
userId | string | Owner ID(required) |
apiaryId | string | Apiary ID(required, nullable) |
harvestDate | string | Harvest date (ISO 8601 date-time)(required) |
honeyType | string | Honey type(required, nullable, spring | summer | blossom | forest | linden | rapeseed | acacia | heather | sunflower | phacelia | buckwheat | chestnut | clover | mixed | other) |
netWeight | number | Net weight in kg(required) |
waterContent | number | Water content in percent(required, nullable) |
batchNumber | string | Batch number `<year>-<serial>`, assigned by the server(required) |
notes | string | Free-text notes(required, nullable) |
harvestMethod | string | Extraction method(required, nullable, extractor | flow_frame | press | cut_comb | drip | other) |
frameCount | integer | Number of frames harvested(required, nullable) |
directToJar | boolean | Honey was filled straight from the comb into jars(required, nullable) |
aromaScore | integer | Aroma score 1-10(required, nullable) |
tasteScore | integer | Taste score 1-10(required, nullable) |
consistencyScore | integer | Consistency score 1-10(required, nullable) |
createdByMemberId | string | Team member who created the record; null = owner(required, nullable) |
reviewState | string | Review state for team records; null = no review required(required, nullable) |
reviewedByMemberId | string | Team member who reviewed the record(required, nullable) |
reviewedAt | string | When the record was reviewed (ISO 8601 date-time)(required, nullable) |
reviewNote | string | Review note(required, nullable) |
deletedAt | string | Soft-delete marker; always null here (ISO 8601 date-time)(required, nullable) |
createdAt | string | Created (ISO 8601 date-time)(required) |
updatedAt | string | Last updated (ISO 8601 date-time)(required) |
apiary | object | Its apiary(required, nullable) |
apiary.id | string | Apiary ID(required) |
apiary.name | string | Apiary name(required) |
apiary.deletedAt | string | Set when the apiary was deleted (ISO 8601 date-time)(required, nullable) |
harvestHives | array | Participating colonies that still exist(required) |
harvestHives[].hive | object | The colony(required) |
harvestHives[].hive.id | string | Hive ID(required) |
harvestHives[].hive.number | integer | Colony number(required) |
harvestHives[].hive.name | string | Colony name(required, nullable) |
_count | object | Counts(required) |
_count.harvestHives | integer | All participating colonies including deleted ones(required) |
bottlingHarvests | array | Bottling batches fed by this harvest(required) |
bottlingHarvests[].weight | number | Allocated weight in g(required) |
bottlingHarvests[].bottlingBatch | object | The batch(required) |
bottlingHarvests[].bottlingBatch.id | string | Bottling batch ID(required) |
Success
200 application/json, wrapped as { data }
Errors
25 possible errors
Example
curl -X PUT "https://hivekraft.com/api/harvests/clx7abc" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"netWeight":24.0,"waterContent":16.8}'/api/harvests/[id]Scope: write:harvestsDelete a harvest
Soft-deletes an unallocated harvest record; an allocated harvest returns 409 with `details.reason`, `details.batchNumber` and `details.bottlingBatchId`.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Harvest ID |
Success
204 No Content (empty body)
Errors
19 possible errors
Example
curl -X DELETE "https://hivekraft.com/api/harvests/clx7abc" \
-H "Authorization: Bearer YOUR_API_KEY"Bottling
Manage honey bottling batches (Abfüllung) with jar sizes, counts, and harvest traceability.
/api/bottlingScope: read:harvestsList bottling batches
Returns all bottling batches for the user.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
honeyType | string | No | spring | summer | blossom | forest | linden | rapeseed | acacia | heather | sunflower | phacelia | buckwheat | chestnut | clover | mixed | other |
year | integer | No | Bottling year (Europe/Berlin), 2000–2100 inclusivee.g. 2025 |
cursor | string | No | Pagination cursor — an opaque value: pass the `nextCursor` from the previous page unchanged to fetch the next batch; do not build it yourself. An unknown or unreadable cursor returns 400 (reload the list from the first page). |
limit | number | No | Items per page (1-100, default 20). Sending this enables the paginated object response shape. A value outside 1-100 is ignored and the bare array is returned. |
Response Body
Without cursor and limit: a bare array of bottling batches (more entries beyond the server cap are signalled by the headers `X-List-Has-More: true` and `X-List-Next-Cursor`, pass that value as `cursor`). With `cursor` and/or `limit`: a page object `{ items, nextCursor, hasMore }`. The example shows the page object.
e.g. {"items":[{"id":"clx8...","userId":"clxu...","batchNumber":"AB-2025-001","bottlingDate":"2025-07-15T00:00:00.000Z","honeyType":"rapeseed","totalWeight":20000,"jarSize":500,"jarCount":40,"jarsSold":0,"pricePerJarCents":null,"origin":"Waldbienenstand, München","description":null,"bestBefore":null,"notes":null,"status":"ready","readyAt":"2025-07-15T00:00:00.000Z","waterContent":17.2,"isPublic":false,"publicAsBakingHoney":false,"hmf":null,"electricalConductivity":null,"dlgScore":null,"purchaseSupplier":null,"purchaseInvoiceRef":null,"purchasedWeight":null,"secondJarSize":null,"secondJarCount":null,"createdByMemberId":null,"createdAt":"2025-07-15T16:00:00.000Z","updatedAt":"2025-07-15T16:00:00.000Z","harvests":[{"harvestId":"clx7...","weight":20000,"harvest":{"id":"clx7...","batchNumber":"2025-001","harvestDate":"2025-07-10T00:00:00.000Z","honeyType":"rapeseed","netWeight":22.5,"aromaScore":null,"tasteScore":null,"consistencyScore":null}}]}],"nextCursor":"k1_W3siZCI6IjIwMjUtMDctMTVUMDA6MDA6MDAuMDAwWiJ9LCJjbHg4Li4uIl0","hasMore":true}
| Field | Type | Description |
|---|---|---|
items | array | The bottling batches on this page(required) |
items[].id | string | Bottling batch ID(required) |
items[].userId | string | Owner ID(required) |
items[].batchNumber | string | Batch number `AB-<year>-<serial>`, assigned by the server(required) |
items[].bottlingDate | string | Bottling date (ISO 8601 date-time)(required) |
items[].honeyType | string | Honey type(required, nullable, spring | summer | blossom | forest | linden | rapeseed | acacia | heather | sunflower | phacelia | buckwheat | chestnut | clover | mixed | other) |
items[].totalWeight | number | Total weight in g(required) |
items[].jarSize | integer | Jar size in g(required) |
items[].jarCount | integer | Number of jars(required) |
items[].jarsSold | integer | Jars sold(required) |
items[].pricePerJarCents | integer | Price per jar in cents(required, nullable) |
items[].origin | string | Origin label text(required, nullable) |
items[].description | string | Public description(required, nullable) |
items[].bestBefore | string | Best-before date (ISO 8601 date-time)(required, nullable) |
items[].notes | string | Free-text notes(required, nullable) |
items[].status | string | `ready` for new batches; older batches may still be `ripening`(required) |
items[].readyAt | string | When the batch became ready; for a `ready` batch a corrected `bottlingDate` sets it to the same date, a `ripening` batch keeps it (ISO 8601 date-time)(required, nullable) |
items[].waterContent | number | Water content in percent(required, nullable) |
items[].isPublic | boolean | Legacy flag as stored; it does not publish a honey page(required) |
items[].publicAsBakingHoney | boolean | Published as baking honey, not as table honey(required) |
items[].hmf | number | Hydroxymethylfurfural in mg/kg(required, nullable) |
items[].electricalConductivity | number | Electrical conductivity in mS/cm(required, nullable) |
items[].dlgScore | string | DLG award(required, nullable, gold | silber | bronze) |
items[].purchaseSupplier | string | Supplier of purchased honey(required, nullable) |
items[].purchaseInvoiceRef | string | Invoice reference of the purchase(required, nullable) |
items[].purchasedWeight | number | Purchased weight in g(required, nullable) |
items[].secondJarSize | integer | Second jar size in g(required, nullable) |
items[].secondJarCount | integer | Number of jars of the second size(required, nullable) |
items[].createdByMemberId | string | Team member who created the record; null = owner(required, nullable) |
items[].createdAt | string | Created (ISO 8601 date-time)(required) |
items[].updatedAt | string | Last updated (ISO 8601 date-time)(required) |
items[].harvests | array | Allocated harvests(required) |
items[].harvests[].harvestId | string | Harvest ID(required) |
items[].harvests[].weight | number | Allocated weight in g(required) |
items[].harvests[].harvest | object | The harvest(required) |
items[].harvests[].harvest.id | string | Harvest ID(required) |
items[].harvests[].harvest.batchNumber | string | Harvest batch number(required) |
items[].harvests[].harvest.harvestDate | string | Harvest date (ISO 8601 date-time)(required) |
items[].harvests[].harvest.honeyType | string | Honey type(required, nullable) |
items[].harvests[].harvest.netWeight | number | Net weight in kg(required) |
items[].harvests[].harvest.aromaScore | integer | Aroma score 1-10(required, nullable) |
items[].harvests[].harvest.tasteScore | integer | Taste score 1-10(required, nullable) |
items[].harvests[].harvest.consistencyScore | integer | Consistency score 1-10(required, nullable) |
nextCursor | string | Cursor for the next page, or null when there are no more results(required, nullable) |
hasMore | boolean | True when a further page is available(required) |
[].id | string | Bottling batch ID(required) |
[].userId | string | Owner ID(required) |
[].batchNumber | string | Batch number `AB-<year>-<serial>`, assigned by the server(required) |
[].bottlingDate | string | Bottling date (ISO 8601 date-time)(required) |
[].honeyType | string | Honey type(required, nullable, spring | summer | blossom | forest | linden | rapeseed | acacia | heather | sunflower | phacelia | buckwheat | chestnut | clover | mixed | other) |
[].totalWeight | number | Total weight in g(required) |
[].jarSize | integer | Jar size in g(required) |
[].jarCount | integer | Number of jars(required) |
[].jarsSold | integer | Jars sold(required) |
[].pricePerJarCents | integer | Price per jar in cents(required, nullable) |
[].origin | string | Origin label text(required, nullable) |
[].description | string | Public description(required, nullable) |
[].bestBefore | string | Best-before date (ISO 8601 date-time)(required, nullable) |
[].notes | string | Free-text notes(required, nullable) |
[].status | string | `ready` for new batches; older batches may still be `ripening`(required) |
[].readyAt | string | When the batch became ready; for a `ready` batch a corrected `bottlingDate` sets it to the same date, a `ripening` batch keeps it (ISO 8601 date-time)(required, nullable) |
[].waterContent | number | Water content in percent(required, nullable) |
[].isPublic | boolean | Legacy flag as stored; it does not publish a honey page(required) |
[].publicAsBakingHoney | boolean | Published as baking honey, not as table honey(required) |
[].hmf | number | Hydroxymethylfurfural in mg/kg(required, nullable) |
[].electricalConductivity | number | Electrical conductivity in mS/cm(required, nullable) |
[].dlgScore | string | DLG award(required, nullable, gold | silber | bronze) |
[].purchaseSupplier | string | Supplier of purchased honey(required, nullable) |
[].purchaseInvoiceRef | string | Invoice reference of the purchase(required, nullable) |
[].purchasedWeight | number | Purchased weight in g(required, nullable) |
[].secondJarSize | integer | Second jar size in g(required, nullable) |
[].secondJarCount | integer | Number of jars of the second size(required, nullable) |
[].createdByMemberId | string | Team member who created the record; null = owner(required, nullable) |
[].createdAt | string | Created (ISO 8601 date-time)(required) |
[].updatedAt | string | Last updated (ISO 8601 date-time)(required) |
[].harvests | array | Allocated harvests(required) |
[].harvests[].harvestId | string | Harvest ID(required) |
[].harvests[].weight | number | Allocated weight in g(required) |
[].harvests[].harvest | object | The harvest(required) |
[].harvests[].harvest.id | string | Harvest ID(required) |
[].harvests[].harvest.batchNumber | string | Harvest batch number(required) |
[].harvests[].harvest.harvestDate | string | Harvest date (ISO 8601 date-time)(required) |
[].harvests[].harvest.honeyType | string | Honey type(required, nullable) |
[].harvests[].harvest.netWeight | number | Net weight in kg(required) |
[].harvests[].harvest.aromaScore | integer | Aroma score 1-10(required, nullable) |
[].harvests[].harvest.tasteScore | integer | Taste score 1-10(required, nullable) |
[].harvests[].harvest.consistencyScore | integer | Consistency score 1-10(required, nullable) |
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/bottling" \
-H "Authorization: Bearer YOUR_API_KEY"/api/bottlingScope: write:harvestsCreate a bottling batch
Records a new bottling batch, optionally linking to harvests for traceability.
Request Body
bottlingDate, totalWeight (g), jarSize (g) and jarCount are required. The batch number is assigned by the server; new batches start as `ready` with 0 jars sold.
| Field | Type | Description |
|---|---|---|
bottlingDate | string | Bottling date (ISO, not more than 24 hours in the future)(required)e.g. 2025-07-15 |
honeyType | string | spring | summer | blossom | forest | linden | rapeseed | acacia | heather | sunflower | phacelia | buckwheat | chestnut | clover | mixed | other(spring | summer | blossom | forest | linden | rapeseed | acacia | heather | sunflower | phacelia | buckwheat | chestnut | clover | mixed | other)e.g. rapeseed |
totalWeight | number | Total weight in g, positive, at most 100000(required)e.g. 20000 |
jarSize | integer | Jar size in g, one of 50, 125, 250, 500, 1000(required, 50 | 125 | 250 | 500 | 1000)e.g. 500 |
jarCount | integer | Number of jars, positive, at most 100000(required)e.g. 40 |
pricePerJarCents | integer | Price per jar in cents, 0-1000000(nullable) |
origin | string | Origin label text, max 200 characterse.g. Waldbienenstand, München |
description | string | Public description, max 2000 characters |
bestBefore | string | Best-before date (ISO); not before the bottling day |
notes | string | Free-text notes (max 5000 chars) |
waterContent | number | Water content in percent, 13-30(nullable) |
isPublic | boolean | Legacy flag, stored as sent; with `true` the batch must be marketable and count against the plan's public-page limit. It publishes no honey page: that needs the separate publication through the presence module(default false) |
hmf | number | Hydroxymethylfurfural in mg/kg, 0-1000(nullable) |
electricalConductivity | number | Electrical conductivity in mS/cm, 0-10(nullable) |
dlgScore | string | DLG award(nullable, gold | silber | bronze) |
harvests | array | Array of {harvestId, weight in g} for traceability, at most 100; no harvest twice |
harvests[].harvestId | string | Harvest ID(required) |
harvests[].weight | number | Allocated weight in g, positive, at most 100000(required) |
Response Body
The created bottling batch with its allocated harvests
e.g. {"id":"clx8...","userId":"clxu...","batchNumber":"AB-2025-001","bottlingDate":"2025-07-15T00:00:00.000Z","honeyType":"rapeseed","totalWeight":20000,"jarSize":500,"jarCount":40,"jarsSold":0,"pricePerJarCents":null,"origin":"Waldbienenstand, München","description":null,"bestBefore":null,"notes":null,"status":"ready","readyAt":"2025-07-15T00:00:00.000Z","waterContent":17.2,"isPublic":false,"publicAsBakingHoney":false,"hmf":null,"electricalConductivity":null,"dlgScore":null,"purchaseSupplier":null,"purchaseInvoiceRef":null,"purchasedWeight":null,"secondJarSize":null,"secondJarCount":null,"createdByMemberId":null,"createdAt":"2025-07-15T16:00:00.000Z","updatedAt":"2025-07-15T16:00:00.000Z","harvests":[{"harvestId":"clx7...","weight":20000,"harvest":{"id":"clx7...","batchNumber":"2025-001","harvestDate":"2025-07-10T00:00:00.000Z","honeyType":"rapeseed","netWeight":22.5,"aromaScore":null,"tasteScore":null,"consistencyScore":null}}]}
| Field | Type | Description |
|---|---|---|
id | string | Bottling batch ID(required) |
userId | string | Owner ID(required) |
batchNumber | string | Batch number `AB-<year>-<serial>`, assigned by the server(required) |
bottlingDate | string | Bottling date (ISO 8601 date-time)(required) |
honeyType | string | Honey type(required, nullable, spring | summer | blossom | forest | linden | rapeseed | acacia | heather | sunflower | phacelia | buckwheat | chestnut | clover | mixed | other) |
totalWeight | number | Total weight in g(required) |
jarSize | integer | Jar size in g(required) |
jarCount | integer | Number of jars(required) |
jarsSold | integer | Jars sold(required) |
pricePerJarCents | integer | Price per jar in cents(required, nullable) |
origin | string | Origin label text(required, nullable) |
description | string | Public description(required, nullable) |
bestBefore | string | Best-before date (ISO 8601 date-time)(required, nullable) |
notes | string | Free-text notes(required, nullable) |
status | string | `ready` for new batches; older batches may still be `ripening`(required) |
readyAt | string | When the batch became ready; for a `ready` batch a corrected `bottlingDate` sets it to the same date, a `ripening` batch keeps it (ISO 8601 date-time)(required, nullable) |
waterContent | number | Water content in percent(required, nullable) |
isPublic | boolean | Legacy flag as stored; it does not publish a honey page(required) |
publicAsBakingHoney | boolean | Published as baking honey, not as table honey(required) |
hmf | number | Hydroxymethylfurfural in mg/kg(required, nullable) |
electricalConductivity | number | Electrical conductivity in mS/cm(required, nullable) |
dlgScore | string | DLG award(required, nullable, gold | silber | bronze) |
purchaseSupplier | string | Supplier of purchased honey(required, nullable) |
purchaseInvoiceRef | string | Invoice reference of the purchase(required, nullable) |
purchasedWeight | number | Purchased weight in g(required, nullable) |
secondJarSize | integer | Second jar size in g(required, nullable) |
secondJarCount | integer | Number of jars of the second size(required, nullable) |
createdByMemberId | string | Team member who created the record; null = owner(required, nullable) |
createdAt | string | Created (ISO 8601 date-time)(required) |
updatedAt | string | Last updated (ISO 8601 date-time)(required) |
harvests | array | Allocated harvests(required) |
harvests[].harvestId | string | Harvest ID(required) |
harvests[].weight | number | Allocated weight in g(required) |
harvests[].harvest | object | The harvest(required) |
harvests[].harvest.id | string | Harvest ID(required) |
harvests[].harvest.batchNumber | string | Harvest batch number(required) |
harvests[].harvest.harvestDate | string | Harvest date (ISO 8601 date-time)(required) |
harvests[].harvest.honeyType | string | Honey type(required, nullable) |
harvests[].harvest.netWeight | number | Net weight in kg(required) |
harvests[].harvest.aromaScore | integer | Aroma score 1-10(required, nullable) |
harvests[].harvest.tasteScore | integer | Taste score 1-10(required, nullable) |
harvests[].harvest.consistencyScore | integer | Consistency score 1-10(required, nullable) |
Success
201 application/json, wrapped as { data }
Errors
24 possible errors
Example
curl -X POST "https://hivekraft.com/api/bottling" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"bottlingDate":"2025-07-15","honeyType":"rapeseed","totalWeight":20000,"jarSize":500,"jarCount":40,"origin":"Waldbienenstand, München","waterContent":17.2,"harvests":[{"harvestId":"clx7...","weight":20000}]}'/api/bottling/[id]Scope: read:harvestsGet a bottling batch
Returns full bottling details including linked harvests.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Bottling ID |
Response Body
A bottling batch with its allocated harvests
e.g. {"id":"clx8...","userId":"clxu...","batchNumber":"AB-2025-001","bottlingDate":"2025-07-15T00:00:00.000Z","honeyType":"rapeseed","totalWeight":20000,"jarSize":500,"jarCount":40,"jarsSold":0,"pricePerJarCents":null,"origin":"Waldbienenstand, München","description":null,"bestBefore":null,"notes":null,"status":"ready","readyAt":"2025-07-15T00:00:00.000Z","waterContent":17.2,"isPublic":false,"publicAsBakingHoney":false,"hmf":null,"electricalConductivity":null,"dlgScore":null,"purchaseSupplier":null,"purchaseInvoiceRef":null,"purchasedWeight":null,"secondJarSize":null,"secondJarCount":null,"createdByMemberId":null,"createdAt":"2025-07-15T16:00:00.000Z","updatedAt":"2025-07-15T16:00:00.000Z","harvests":[{"harvestId":"clx7...","weight":20000,"harvest":{"id":"clx7...","batchNumber":"2025-001","harvestDate":"2025-07-10T00:00:00.000Z","honeyType":"rapeseed","netWeight":22.5,"aromaScore":null,"tasteScore":null,"consistencyScore":null}}]}
| Field | Type | Description |
|---|---|---|
id | string | Bottling batch ID(required) |
userId | string | Owner ID(required) |
batchNumber | string | Batch number `AB-<year>-<serial>`, assigned by the server(required) |
bottlingDate | string | Bottling date (ISO 8601 date-time)(required) |
honeyType | string | Honey type(required, nullable, spring | summer | blossom | forest | linden | rapeseed | acacia | heather | sunflower | phacelia | buckwheat | chestnut | clover | mixed | other) |
totalWeight | number | Total weight in g(required) |
jarSize | integer | Jar size in g(required) |
jarCount | integer | Number of jars(required) |
jarsSold | integer | Jars sold(required) |
pricePerJarCents | integer | Price per jar in cents(required, nullable) |
origin | string | Origin label text(required, nullable) |
description | string | Public description(required, nullable) |
bestBefore | string | Best-before date (ISO 8601 date-time)(required, nullable) |
notes | string | Free-text notes(required, nullable) |
status | string | `ready` for new batches; older batches may still be `ripening`(required) |
readyAt | string | When the batch became ready; for a `ready` batch a corrected `bottlingDate` sets it to the same date, a `ripening` batch keeps it (ISO 8601 date-time)(required, nullable) |
waterContent | number | Water content in percent(required, nullable) |
isPublic | boolean | Legacy flag as stored; it does not publish a honey page(required) |
publicAsBakingHoney | boolean | Published as baking honey, not as table honey(required) |
hmf | number | Hydroxymethylfurfural in mg/kg(required, nullable) |
electricalConductivity | number | Electrical conductivity in mS/cm(required, nullable) |
dlgScore | string | DLG award(required, nullable, gold | silber | bronze) |
purchaseSupplier | string | Supplier of purchased honey(required, nullable) |
purchaseInvoiceRef | string | Invoice reference of the purchase(required, nullable) |
purchasedWeight | number | Purchased weight in g(required, nullable) |
secondJarSize | integer | Second jar size in g(required, nullable) |
secondJarCount | integer | Number of jars of the second size(required, nullable) |
createdByMemberId | string | Team member who created the record; null = owner(required, nullable) |
createdAt | string | Created (ISO 8601 date-time)(required) |
updatedAt | string | Last updated (ISO 8601 date-time)(required) |
harvests | array | Allocated harvests(required) |
harvests[].harvestId | string | Harvest ID(required) |
harvests[].weight | number | Allocated weight in g(required) |
harvests[].harvest | object | The harvest(required) |
harvests[].harvest.id | string | Harvest ID(required) |
harvests[].harvest.batchNumber | string | Harvest batch number(required) |
harvests[].harvest.harvestDate | string | Harvest date (ISO 8601 date-time)(required) |
harvests[].harvest.honeyType | string | Honey type(required, nullable) |
harvests[].harvest.netWeight | number | Net weight in kg(required) |
harvests[].harvest.aromaScore | integer | Aroma score 1-10(required, nullable) |
harvests[].harvest.tasteScore | integer | Taste score 1-10(required, nullable) |
harvests[].harvest.consistencyScore | integer | Consistency score 1-10(required, nullable) |
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/bottling/clx8abc" \
-H "Authorization: Bearer YOUR_API_KEY"/api/bottling/[id]Scope: write:harvestsUpdate a bottling batch
Partially updates an existing bottling batch. All fields are optional.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Bottling ID |
Request Body
Any subset of bottling fields. An omitted field stays untouched; `null` clears the nullable fields. `harvests` replaces the allocations. `isPublic` is rejected here. For a batch with status `ready`, a changed `bottlingDate` also sets `readyAt` to that date; a `ripening` batch keeps its `readyAt`.
| Field | Type | Description |
|---|---|---|
bottlingDate | string | Bottling date (ISO, not more than 24 hours in the future)e.g. 2025-07-15 |
honeyType | string | spring | summer | blossom | forest | linden | rapeseed | acacia | heather | sunflower | phacelia | buckwheat | chestnut | clover | mixed | other(nullable, spring | summer | blossom | forest | linden | rapeseed | acacia | heather | sunflower | phacelia | buckwheat | chestnut | clover | mixed | other)e.g. rapeseed |
totalWeight | number | Total weight in g, positive, at most 100000e.g. 20000 |
jarSize | integer | Jar size in g, one of 50, 125, 250, 500, 1000(50 | 125 | 250 | 500 | 1000)e.g. 500 |
jarCount | integer | Number of jars, positive, at most 100000e.g. 40 |
jarsSold | integer | Jars sold, 0-100000; not above `jarCount` |
pricePerJarCents | integer | Price per jar in cents, 0-1000000(nullable) |
origin | string | Origin label text, max 200 characters(nullable)e.g. Waldbienenstand, München |
description | string | Public description, max 2000 characters(nullable) |
bestBefore | string | Best-before date (ISO); not before the bottling day(nullable) |
notes | string | Free-text notes (max 5000 chars)(nullable) |
waterContent | number | Water content in percent, 13-30(nullable) |
isPublic | boolean | Not accepted on update: any value is rejected with 400 (`isPublicOnlyViaPublishAction`); publish through the publish action |
hmf | number | Hydroxymethylfurfural in mg/kg, 0-1000(nullable) |
electricalConductivity | number | Electrical conductivity in mS/cm, 0-10(nullable) |
dlgScore | string | DLG award(nullable, gold | silber | bronze) |
harvests | array | Allocations of harvests to this batch (harvestId, weight in g), at most 100; replaces the existing allocations |
harvests[].harvestId | string | Harvest ID(required) |
harvests[].weight | number | Allocated weight in g, positive, at most 100000(required) |
Response Body
The updated bottling batch with its allocated harvests
e.g. {"id":"clx8...","userId":"clxu...","batchNumber":"AB-2025-001","bottlingDate":"2025-07-15T00:00:00.000Z","honeyType":"rapeseed","totalWeight":22500,"jarSize":500,"jarCount":45,"jarsSold":0,"pricePerJarCents":null,"origin":"Waldbienenstand, München","description":null,"bestBefore":null,"notes":null,"status":"ready","readyAt":"2025-07-15T00:00:00.000Z","waterContent":17.2,"isPublic":false,"publicAsBakingHoney":false,"hmf":null,"electricalConductivity":null,"dlgScore":null,"purchaseSupplier":null,"purchaseInvoiceRef":null,"purchasedWeight":null,"secondJarSize":null,"secondJarCount":null,"createdByMemberId":null,"createdAt":"2025-07-15T16:00:00.000Z","updatedAt":"2025-07-15T16:00:00.000Z","harvests":[{"harvestId":"clx7...","weight":22500,"harvest":{"id":"clx7...","batchNumber":"2025-001","harvestDate":"2025-07-10T00:00:00.000Z","honeyType":"rapeseed","netWeight":22.5,"aromaScore":null,"tasteScore":null,"consistencyScore":null}}]}
| Field | Type | Description |
|---|---|---|
id | string | Bottling batch ID(required) |
userId | string | Owner ID(required) |
batchNumber | string | Batch number `AB-<year>-<serial>`, assigned by the server(required) |
bottlingDate | string | Bottling date (ISO 8601 date-time)(required) |
honeyType | string | Honey type(required, nullable, spring | summer | blossom | forest | linden | rapeseed | acacia | heather | sunflower | phacelia | buckwheat | chestnut | clover | mixed | other) |
totalWeight | number | Total weight in g(required) |
jarSize | integer | Jar size in g(required) |
jarCount | integer | Number of jars(required) |
jarsSold | integer | Jars sold(required) |
pricePerJarCents | integer | Price per jar in cents(required, nullable) |
origin | string | Origin label text(required, nullable) |
description | string | Public description(required, nullable) |
bestBefore | string | Best-before date (ISO 8601 date-time)(required, nullable) |
notes | string | Free-text notes(required, nullable) |
status | string | `ready` for new batches; older batches may still be `ripening`(required) |
readyAt | string | When the batch became ready; for a `ready` batch a corrected `bottlingDate` sets it to the same date, a `ripening` batch keeps it (ISO 8601 date-time)(required, nullable) |
waterContent | number | Water content in percent(required, nullable) |
isPublic | boolean | Legacy flag as stored; it does not publish a honey page(required) |
publicAsBakingHoney | boolean | Published as baking honey, not as table honey(required) |
hmf | number | Hydroxymethylfurfural in mg/kg(required, nullable) |
electricalConductivity | number | Electrical conductivity in mS/cm(required, nullable) |
dlgScore | string | DLG award(required, nullable, gold | silber | bronze) |
purchaseSupplier | string | Supplier of purchased honey(required, nullable) |
purchaseInvoiceRef | string | Invoice reference of the purchase(required, nullable) |
purchasedWeight | number | Purchased weight in g(required, nullable) |
secondJarSize | integer | Second jar size in g(required, nullable) |
secondJarCount | integer | Number of jars of the second size(required, nullable) |
createdByMemberId | string | Team member who created the record; null = owner(required, nullable) |
createdAt | string | Created (ISO 8601 date-time)(required) |
updatedAt | string | Last updated (ISO 8601 date-time)(required) |
harvests | array | Allocated harvests(required) |
harvests[].harvestId | string | Harvest ID(required) |
harvests[].weight | number | Allocated weight in g(required) |
harvests[].harvest | object | The harvest(required) |
harvests[].harvest.id | string | Harvest ID(required) |
harvests[].harvest.batchNumber | string | Harvest batch number(required) |
harvests[].harvest.harvestDate | string | Harvest date (ISO 8601 date-time)(required) |
harvests[].harvest.honeyType | string | Honey type(required, nullable) |
harvests[].harvest.netWeight | number | Net weight in kg(required) |
harvests[].harvest.aromaScore | integer | Aroma score 1-10(required, nullable) |
harvests[].harvest.tasteScore | integer | Taste score 1-10(required, nullable) |
harvests[].harvest.consistencyScore | integer | Consistency score 1-10(required, nullable) |
Success
200 application/json, wrapped as { data }
Errors
22 possible errors
Example
curl -X PUT "https://hivekraft.com/api/bottling/clx8abc" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"jarCount":45,"totalWeight":22500,"harvests":[{"harvestId":"clx7...","weight":22500}]}'/api/bottling/[id]Scope: write:harvestsDelete a bottling batch
Permanently removes a bottling batch.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Bottling ID |
Success
204 No Content (empty body)
Errors
19 possible errors
Example
curl -X DELETE "https://hivekraft.com/api/bottling/clx8abc" \
-H "Authorization: Bearer YOUR_API_KEY"Inventory Items
Track beekeeping equipment and supplies (Inventar) with stock levels and minimum thresholds.
/api/inventory/itemsScope: any read:* scopeList inventory items
Returns all inventory items across all storage locations. Without pagination: the existing bare array. With cursor/limit: a page sorted by category (default) or location ID, then name and ID; server total and shown counts cover the filtered stock. complete indicates the last page; truncated is false for normal cursor pagination.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
cursor | string | No | Pagination cursor — an opaque value: pass the `nextCursor` from the previous page unchanged to fetch the next batch; do not build it yourself. An unknown or unreadable cursor returns 400 (reload the list from the first page). |
limit | integer | No | Page size, 1–100 (default 20) |
view | string | No | Grouping: category (default) or location |
search | string | No | Item name search |
category | string | No | Exact category |
locationId | string | No | Storage location ID |
lowStock | boolean | No | Only items at or below minimum stock |
Response Body
e.g. [{"id":"clx9...","name":"Dadant-Rähmchen","category":"frames","quantity":120,"minStock":50}]
| Field | Type | Description |
|---|---|---|
items | array | Items on this page(required) |
items[] | object | Inventory item |
nextCursor | string | Opaque cursor for the next page (pass it unchanged as `cursor`), or null(required, nullable) |
hasMore | boolean | Another page exists(required) |
total | integer | All matching active owned items(required) |
shown | integer | Matching items up to the last returned item in server order(required) |
complete | boolean | No further page(required) |
truncated | boolean | False: ordinary pagination does not discard further pages(required) |
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/inventory/items" \
-H "Authorization: Bearer YOUR_API_KEY"/api/inventory/summaryScope: any read:* scopeInventory totals and facets
Counts all active items owned by the authenticated user, independently of cursor pages and filters. Low stock includes quantity equal to minimum stock. Empty storage locations are included.
Response Body
e.g. {"items":120,"lowStock":3,"locationCount":1,"categories":{"frames":120},"locations":[{"id":"clxabc","name":"Keller","items":120}]}
| Field | Type | Description |
|---|---|---|
items | integer | Total active items(required) |
lowStock | integer | Items with quantity at or below a non-null minimum stock(required) |
locationCount | integer | Total owned storage locations(required) |
categories | object | Item counts keyed by category(required) |
locations | array | All owned locations with active item counts(required) |
locations[].id | string | Storage location ID(required) |
locations[].name | string | Storage location name(required) |
locations[].items | integer | Active item count at this location(required) |
Success
200 application/json, wrapped as { data }
Errors
16 possible errors
Example
curl -X GET "https://hivekraft.com/api/inventory/summary" \
-H "Authorization: Bearer YOUR_API_KEY"/api/inventory/itemsScope: full-access keyCreate an inventory item
Adds a new item to the inventory.
Request Body
| Field | Type | Description |
|---|---|---|
locationId | string | Storage location ID(required)e.g. clxa... |
name | string | Item name, 1-200 characters(required)e.g. Dadant-Rähmchen |
category | string | Item category(required, frames | boxes | jars | lids | labels | treatments | feed | tools | other)e.g. frames |
quantity | integer | Current stock count, 0-1000000000(default 0)e.g. 120 |
unit | string | Unit, max 50 characters (the app offers piece, kg, liter, pack)(nullable)e.g. piece |
minStock | integer | Minimum stock alert threshold, 0-1000000000(nullable)e.g. 50 |
purchaseUrl | string | Where to reorder: an http(s) URL, max 2000 characters; an empty string or null means none(nullable) |
unitPrice | integer | Price per unit in cents, 0-100000000(nullable)e.g. 45 |
notes | string | Free-text notes, max 2000 characters |
Success
200 application/json, wrapped as { data }
Errors
18 possible errors
Example
curl -X POST "https://hivekraft.com/api/inventory/items" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"locationId":"clxabc","name":"Dadant-Rähmchen","category":"frames","quantity":120,"minStock":50}'/api/inventory/items/[id]Scope: any read:* scopeGet an inventory item
Returns full item details.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Item ID |
Success
200 application/json, wrapped as { data }
Errors
16 possible errors
Example
curl -X GET "https://hivekraft.com/api/inventory/items/clx9abc" \
-H "Authorization: Bearer YOUR_API_KEY"/api/inventory/items/[id]Scope: full-access keyUpdate an inventory item
Partially updates item details.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Item ID |
Request Body
Any subset of the create fields except `quantity`: a sent `quantity` is rejected with 400 (`quantityOnlyViaAdjust`), stock changes go through `POST /api/inventory/items/[id]/adjust`. An omitted field stays untouched; `null` clears a nullable field.
| Field | Type | Description |
|---|---|---|
locationId | string | Storage location IDe.g. clxa... |
name | string | Item name, 1-200 characterse.g. Dadant-Rähmchen |
category | string | Item category(frames | boxes | jars | lids | labels | treatments | feed | tools | other)e.g. frames |
unit | string | Unit, max 50 characters (the app offers piece, kg, liter, pack)(nullable)e.g. piece |
minStock | integer | Minimum stock alert threshold, 0-1000000000(nullable)e.g. 50 |
purchaseUrl | string | Where to reorder: an http(s) URL, max 2000 characters; an empty string or null means none(nullable) |
unitPrice | integer | Price per unit in cents, 0-100000000(nullable)e.g. 45 |
notes | string | Free-text notes, max 2000 characters; null clears them(nullable) |
Success
200 application/json, wrapped as { data }
Errors
18 possible errors
Example
curl -X PUT "https://hivekraft.com/api/inventory/items/clx9abc" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"minStock":40}'/api/inventory/items/[id]Scope: full-access keyDelete an inventory item
Removes an inventory item. For 10 minutes it can be brought back with `POST /api/inventory/items/[id]/restore`.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Item ID |
Success
204 No Content (empty body)
Errors
17 possible errors
Example
curl -X DELETE "https://hivekraft.com/api/inventory/items/clx9abc" \
-H "Authorization: Bearer YOUR_API_KEY"/api/inventory/items/[id]/restoreScope: full-access keyRestore a deleted inventory item
Undoes a delete within 10 minutes.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Item ID |
Success
200 application/json, wrapped as { data }
Errors
19 possible errors
Example
curl -X POST "https://hivekraft.com/api/inventory/items/clx9abc/restore" \
-H "Authorization: Bearer YOUR_API_KEY"Inventory Locations
Manage storage locations (Lagerorte) for your beekeeping equipment.
/api/inventory/locationsScope: any read:* scopeList storage locations
Returns all storage locations.
Response Body
e.g. [{"id":"clxa...","name":"Werkstatt","type":"workshop"}]
Success
200 application/json, wrapped as { data }
Errors
16 possible errors
Example
curl -X GET "https://hivekraft.com/api/inventory/locations" \
-H "Authorization: Bearer YOUR_API_KEY"/api/inventory/locationsScope: full-access keyCreate a storage location
Adds a new storage location.
Request Body
| Field | Type | Description |
|---|---|---|
name | string | Location name, 1-100 characters(required)e.g. Werkstatt |
type | string | Location type(required, warehouse | workshop | apiary | vehicle | other)e.g. workshop |
notes | string | Free-text notes, max 2000 characters |
Success
200 application/json, wrapped as { data }
Errors
18 possible errors
Example
curl -X POST "https://hivekraft.com/api/inventory/locations" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Werkstatt","type":"workshop"}'/api/inventory/locations/[id]Scope: any read:* scopeGet a storage location
Returns location details including item count.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Location ID |
Success
200 application/json, wrapped as { data }
Errors
16 possible errors
Example
curl -X GET "https://hivekraft.com/api/inventory/locations/clxaabc" \
-H "Authorization: Bearer YOUR_API_KEY"/api/inventory/locations/[id]Scope: full-access keyUpdate a storage location
Partially updates a storage location. All fields are optional.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Location ID |
Request Body
Any subset of location fields
| Field | Type | Description |
|---|---|---|
name | string | Location name, 1-100 characterse.g. Werkstatt |
type | string | Location type(warehouse | workshop | apiary | vehicle | other)e.g. workshop |
notes | string | Free-text notes, max 2000 characters; null clears them(nullable) |
Success
200 application/json, wrapped as { data }
Errors
18 possible errors
Example
curl -X PUT "https://hivekraft.com/api/inventory/locations/clxaabc" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Neue Werkstatt","type":"workshop"}'/api/inventory/locations/[id]Scope: full-access keyDelete a storage location
Removes a storage location. Must be empty first.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Location ID |
Success
204 No Content (empty body)
Errors
17 possible errors
Example
curl -X DELETE "https://hivekraft.com/api/inventory/locations/clxaabc" \
-H "Authorization: Bearer YOUR_API_KEY"Finance
Track beekeeping income and expenses (Finanzen) with categories and yearly overview.
/api/financeScope: read:financeGet financial overview
Returns income, expenses, and balance for the specified year.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
year | integer | No | Filter by year (defaults to current year)e.g. 2025 |
Response Body
e.g. {"entries":[],"totalIncome":1250,"totalExpenses":480,"balance":770,"activeHiveCount":12,"availableYears":[2024,2025]}
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/finance?year=2025" \
-H "Authorization: Bearer YOUR_API_KEY"/api/financeScope: write:financeCreate a finance entry
Records a new income or expense entry.
Request Body
| Field | Type | Description |
|---|---|---|
type | string | Income or expense(required, income | expense)e.g. income |
category | string | Category; it must fit the type (income: honey_sales, wax, other; expense: equipment, treatment, feeding, other)(required, honey_sales | wax | equipment | treatment | feeding | other)e.g. honey_sales |
amount | number | Positive amount, 0.01-999999.99(required)e.g. 350 |
description | string | Description, 1-500 characters after trimming(required)e.g. Rapshonig Verkauf 15 Gläser |
date | string | Booking date (ISO date), not later than today (24 h tolerance)(required)e.g. 2025-07-20 |
Success
200 application/json, wrapped as { data }
Errors
18 possible errors
Example
curl -X POST "https://hivekraft.com/api/finance" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"type":"income","category":"honey_sales","amount":350,"description":"Rapshonig Verkauf","date":"2025-07-20"}'/api/financeScope: write:financeDelete a finance entry
Deletes a finance entry by ID passed as a query parameter.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
entryId | string | Yes | Finance entry ID to delete |
Success
204 No Content (empty body)
Errors
18 possible errors
Example
curl -X DELETE "https://hivekraft.com/api/finance?entryId=clxfabc" \
-H "Authorization: Bearer YOUR_API_KEY"Tasks
Manage beekeeping tasks (Aufgaben) with priorities and due dates.
/api/tasksScope: read:tasksList tasks
Returns tasks with optional filtering by status, type, and priority.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
status | string | No | pending | in_progress | completed | skipped |
type | string | No | inspection | treatment | feeding | harvest | custom | seasonal | order |
priority | string | No | low | medium | high | urgent |
Response Body
e.g. [{"id":"clxb...","title":"Varroabehandlung Volk 3","type":"treatment","priority":"high","status":"pending"}]
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/tasks?status=pending&priority=high" \
-H "Authorization: Bearer YOUR_API_KEY"/api/tasks/collectionScope: read:tasksRead a page of tasks
Keyset list over the whole owned stock. Excludes tasks with foreign or deleted references. Order: due date ascending (empty last), priority descending, creation descending, ID ascending. Invalid filters or a foreign, changed-filter or tampered cursor return 400.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
type | string | No | inspection | treatment | feeding | harvest | custom | seasonal | order |
priority | string | No | low | medium | high | urgent |
apiaryId | string | No | Owned live stand, linked directly or through the colony |
hiveId | string | No | Owned live colony |
due | string | No | overdue | today | thisWeek | later | undated; Berlin civil days; thisWeek means tomorrow through day +7 |
q | string | No | Literal case-insensitive title search, trimmed, at most 200 characters |
assignee | string | No | none: only tasks without a recorded team assignee |
status | string | No | open (default: pending or in_progress) | done (completed) | skipped | all |
limit | integer | No | Page size, default 50, range 1-100 |
cursor | string | No | Opaque signed continuation; bound to owner and filters, and to the Berlin day for relative due filters |
Response Body
A task page, never a capped whole-stock array
| Field | Type | Description |
|---|---|---|
items | array | Tasks in semantic order(required) |
items[] | object | Public task fields and owned live hive/apiary references; dates are ISO strings; dedupKey is never exposed |
nextCursor | string | Continuation, or null on the final page(required, nullable) |
hasMore | boolean | Another page exists(required) |
total | integer | Exact matching count before the cursor(required) |
complete | boolean | True on the final page (!hasMore)(required) |
truncated | boolean | Always false; pagination does not discard matches(required) |
Success
200 application/json, wrapped as { data }
Errors
18 possible errors
Example
curl -X GET "https://hivekraft.com/api/tasks/collection?status=open&limit=50" \
-H "Authorization: Bearer YOUR_API_KEY"/api/tasks/summaryScope: read:tasksRead task counters and open tasks per stand
Uncapped server aggregates with the same semantic filters and ownership/live-reference scope as the task collection. Does not take status, cursor or limit. A direct stand takes precedence over the colony stand when grouping; null identifies tasks without a stand.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
type | string | No | inspection | treatment | feeding | harvest | custom | seasonal | order |
priority | string | No | low | medium | high | urgent |
apiaryId | string | No | Owned live stand, linked directly or through the colony |
hiveId | string | No | Owned live colony |
due | string | No | overdue | today | thisWeek | later | undated; Berlin civil days; thisWeek means tomorrow through day +7 |
q | string | No | Literal case-insensitive title search, trimmed, at most 200 characters |
assignee | string | No | none: only tasks without a recorded team assignee |
Response Body
Whole-stock task summary
| Field | Type | Description |
|---|---|---|
total | integer | Matching tasks across all statuses(required) |
open | integer | Pending and in-progress tasks(required) |
overdue | integer | Open tasks due before the Berlin day(required) |
dueToday | integer | Open tasks due today or overdue, preserving the existing KPI meaning(required) |
dueThisWeek | integer | Open tasks due tomorrow through Berlin day +7(required) |
dueLater | integer | Open tasks due after Berlin day +7(required) |
undated | integer | Open tasks without a due date(required) |
completed30d | integer | Completed today through day -30, completedAt falling back to dueDate(required) |
unassigned | integer | Open tasks without a recorded team assignee(required) |
byApiary | array | Every stand with open tasks, including the no-stand group(required) |
byApiary[].apiaryId | string | Stand ID, null for no stand(required, nullable) |
byApiary[].name | string | Stand name(required, nullable) |
byApiary[].open | integer | Open count(required) |
byApiary[].nextTask | object | Most urgent task in collection order(required) |
byApiary[].nextTask.id | string | Task ID(required) |
byApiary[].nextTask.title | string | Stored task title(required) |
byApiary[].nextTask.dueDate | string | Due date (ISO 8601 date-time)(required, nullable) |
complete | boolean | Always true(required) |
truncated | boolean | Always false(required) |
Success
200 application/json, wrapped as { data }
Errors
18 possible errors
Example
curl -X GET "https://hivekraft.com/api/tasks/summary" \
-H "Authorization: Bearer YOUR_API_KEY"/api/tasksScope: write:tasksCreate a task
Creates a new beekeeping task, optionally linked to a hive or apiary.
Request Body
| Field | Type | Description |
|---|---|---|
title | string | Task title, 1-200 characters(required)e.g. Varroabehandlung Volk 3 |
description | string | Detailed description, max 2000 characters(nullable) |
hiveId | string | Link to a hive(nullable) |
apiaryId | string | Link to an apiary(nullable) |
type | string | Task type(default custom, inspection | treatment | feeding | harvest | custom | seasonal | order)e.g. treatment |
priority | string | Priority(default medium, low | medium | high | urgent)e.g. high |
status | string | Status(default pending, pending | in_progress | completed | skipped) |
dueDate | string | Due calendar day (ISO date or date-time); date-only input uses Berlin noon, timestamps are accepted for compatibility and exported as Berlin all-day dates(nullable)e.g. 2025-08-01 |
url | string | Related link: an http(s) URL, max 2000 characters; an empty string or null means none(nullable) |
Success
200 application/json, wrapped as { data }
Errors
18 possible errors
Example
curl -X POST "https://hivekraft.com/api/tasks" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title":"Varroabehandlung Volk 3","type":"treatment","priority":"high","dueDate":"2025-08-01"}'/api/tasks/[id]Scope: write:tasksUpdate a task
Partially updates a task. Use this to mark tasks as completed.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Task ID |
Request Body
Any subset of the create fields; `expectedUpdatedAt` adds an optimistic lock. An omitted field stays untouched (no default is applied); `null` clears a nullable field.
| Field | Type | Description |
|---|---|---|
title | string | Task title, 1-200 characterse.g. Varroabehandlung Volk 3 |
description | string | Detailed description, max 2000 characters(nullable) |
hiveId | string | Link to a hive(nullable) |
apiaryId | string | Link to an apiary(nullable) |
type | string | Task type(inspection | treatment | feeding | harvest | custom | seasonal | order)e.g. treatment |
priority | string | Priority(low | medium | high | urgent)e.g. high |
status | string | Status(pending | in_progress | completed | skipped) |
dueDate | string | Due calendar day (ISO date or date-time); date-only input uses Berlin noon, timestamps are accepted for compatibility and exported as Berlin all-day dates(nullable)e.g. 2025-08-01 |
url | string | Related link: an http(s) URL, max 2000 characters; an empty string or null means none(nullable) |
expectedUpdatedAt | string | Optimistic lock: the `updatedAt` the client last saw (ISO datetime). A different stored value is rejected with 409 (`details.reason` `task_changed`) |
Success
200 application/json, wrapped as { data }
Errors
19 possible errors
Example
curl -X PUT "https://hivekraft.com/api/tasks/clxbabc" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"status":"completed"}'/api/tasks/[id]Scope: read:tasksGet a single task
Returns full details for one task.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Task ID |
Response Body
e.g. {"id":"clxb...","title":"Varroabehandlung Volk 3","type":"treatment","priority":"high","status":"pending"}
Success
200 application/json, wrapped as { data }
Errors
16 possible errors
Example
curl -X GET "https://hivekraft.com/api/tasks/clxbabc" \
-H "Authorization: Bearer YOUR_API_KEY"/api/tasks/[id]Scope: write:tasksDelete a task
Permanently removes a task.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Task ID |
Success
204 No Content (empty body)
Errors
17 possible errors
Example
curl -X DELETE "https://hivekraft.com/api/tasks/clxbabc" \
-H "Authorization: Bearer YOUR_API_KEY"/api/tasks/seasonalScope: write:tasksGenerate seasonal tasks
Auto-generates seasonal beekeeping tasks based on the current date, location, and colony status. Returns the list of newly created tasks.
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X POST "https://hivekraft.com/api/tasks/seasonal" \
-H "Authorization: Bearer YOUR_API_KEY"IoT Devices
Manage IoT sensor devices (hive scales, temperature sensors) and their readings.
/api/iot/devicesScope: read:iotList IoT devices
Returns all IoT devices with optional filtering.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
status | string | No | active | offline | maintenance |
deviceType | string | No | scale | temp_sensor | bee_counter | gps_tracker |
hiveId | string | No | Filter by assigned hive |
dataSource | string | No | direct | thingspeak | csv |
Response Body
e.g. [{"id":"clxc...","name":"Waage Volk 1","deviceType":"scale","status":"active"}]
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/iot/devices?status=active" \
-H "Authorization: Bearer YOUR_API_KEY"/api/iot/exportScope: read:iotExport sensor readings as CSV
Downloads daily values for all devices owned by the account. With deviceId, downloads that device's retained raw readings and daily values. Requires csv_export (Plus or Pro); limited to 5 exports per 5 minutes per user and 20 per 5 minutes per IP. Responses stream in bounded database pages. Reimporting a HiveKraft backup uses raw readings only; daily aggregates remain in the CSV for reference. Raw timestamps use Europe/Berlin; weights are included only for scales. CSV cells protect against spreadsheet formulas.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
deviceId | string | No | Owned device ID; omit for daily values of all devices |
locale | string | No | en for English labels and decimal points; otherwise German labels and decimal commase.g. en |
Success
200 application/pdf (binary, no data envelope)
Errors
19 possible errors
Example
curl -X GET "https://hivekraft.com/api/iot/export?deviceId=clxcabc&locale=en" \
-H "Authorization: Bearer YOUR_API_KEY"/api/iot/devicesScope: write:iotCreate an IoT device
Registers a new IoT device. Supports direct push, ThingSpeak, and CSV data sources. Device limits: Free=3, Pro=10, Business=unlimited.
Request Body
With `dataSource` `thingspeak` the fields `thingspeakChannelId`, `thingspeakReadKey` and `thingspeakFieldMap` are required as well; the other sources ignore the ThingSpeak fields.
| Field | Type | Description |
|---|---|---|
name | string | Device name, 1-100 characters(required)e.g. Waage Volk 1 |
deviceType | string | Device type(required, scale | temp_sensor | bee_counter | gps_tracker)e.g. scale |
dataSource | string | Where the readings come from: pushed by the device (`direct`), synced from ThingSpeak or imported from CSV(required, direct | thingspeak | csv)e.g. direct |
manufacturer | string | Manufacturer name, max 100 characterse.g. HiveTool |
hiveId | string | Assign to a hive |
readingIntervalMinutes | integer | Expected reading interval in minutes, 1-1440(default 15)e.g. 15 |
thingspeakChannelId | string | ThingSpeak channel ID, 1-10 digits; required for `thingspeak` |
thingspeakReadKey | string | ThingSpeak read API key, 1-50 characters; required for `thingspeak` |
thingspeakFieldMap | object | Which sensor value each ThingSpeak field carries, at least one field; required for `thingspeak` |
thingspeakFieldMap.field1 | string | Sensor value of field1(weight | temperature | tempInner | humidity | batteryVoltage) |
thingspeakFieldMap.field2 | string | Sensor value of field2(weight | temperature | tempInner | humidity | batteryVoltage) |
thingspeakFieldMap.field3 | string | Sensor value of field3(weight | temperature | tempInner | humidity | batteryVoltage) |
thingspeakFieldMap.field4 | string | Sensor value of field4(weight | temperature | tempInner | humidity | batteryVoltage) |
thingspeakFieldMap.field5 | string | Sensor value of field5(weight | temperature | tempInner | humidity | batteryVoltage) |
thingspeakFieldMap.field6 | string | Sensor value of field6(weight | temperature | tempInner | humidity | batteryVoltage) |
thingspeakFieldMap.field7 | string | Sensor value of field7(weight | temperature | tempInner | humidity | batteryVoltage) |
thingspeakFieldMap.field8 | string | Sensor value of field8(weight | temperature | tempInner | humidity | batteryVoltage) |
syncIntervalMinutes | integer | Sync interval in minutes, 15-1440; only for `thingspeak`(default 30) |
Success
200 application/json, wrapped as { data }
Errors
18 possible errors
Example
curl -X POST "https://hivekraft.com/api/iot/devices" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Waage Volk 1","deviceType":"scale","dataSource":"direct"}'/api/iot/devices/[id]Scope: read:iotGet an IoT device
Returns device details including latest reading.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Device ID |
Success
200 application/json, wrapped as { data }
Errors
16 possible errors
Example
curl -X GET "https://hivekraft.com/api/iot/devices/clxcabc" \
-H "Authorization: Bearer YOUR_API_KEY"/api/iot/devices/[id]Scope: write:iotUpdate an IoT device
Updates device configuration. ThingSpeak field mapping and sync interval can change; data source, channel ID and read API key cannot.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Device ID |
Request Body
Any subset of the update fields
| Field | Type | Description |
|---|---|---|
expectedUpdatedAt | string | Optimistic lock: the previously read updatedAt as an ISO datetime with timezone. A different stored version returns 409 DEVICE_CHANGED; reload before retrying |
syncIntervalMinutes | integer | Sync interval in minutes, 15-1440; only for an existing ThingSpeak device |
thingspeakFieldMap | object | Which sensor value each ThingSpeak field carries, at least one field; only for an existing ThingSpeak device. Replaces the complete mapping without changing the sync watermark |
thingspeakFieldMap.field1 | string | Sensor value of field1(weight | temperature | tempInner | humidity | batteryVoltage) |
thingspeakFieldMap.field2 | string | Sensor value of field2(weight | temperature | tempInner | humidity | batteryVoltage) |
thingspeakFieldMap.field3 | string | Sensor value of field3(weight | temperature | tempInner | humidity | batteryVoltage) |
thingspeakFieldMap.field4 | string | Sensor value of field4(weight | temperature | tempInner | humidity | batteryVoltage) |
thingspeakFieldMap.field5 | string | Sensor value of field5(weight | temperature | tempInner | humidity | batteryVoltage) |
thingspeakFieldMap.field6 | string | Sensor value of field6(weight | temperature | tempInner | humidity | batteryVoltage) |
thingspeakFieldMap.field7 | string | Sensor value of field7(weight | temperature | tempInner | humidity | batteryVoltage) |
thingspeakFieldMap.field8 | string | Sensor value of field8(weight | temperature | tempInner | humidity | batteryVoltage) |
name | string | Device name, 1-100 characters |
deviceType | string | Device type(scale | temp_sensor | bee_counter | gps_tracker) |
manufacturer | string | Manufacturer name, max 100 characters |
hiveId | string | Hive to assign; null unassigns the device(nullable)e.g. clx2xyz |
readingIntervalMinutes | integer | Expected reading interval in minutes, 1-1440 |
status | string | Device status(active | offline | maintenance) |
Success
200 application/json, wrapped as { data }
Errors
19 possible errors
Example
curl -X PUT "https://hivekraft.com/api/iot/devices/clxcabc" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Waage Volk 2","hiveId":"clx2xyz"}'/api/iot/devices/[id]Scope: write:iotDelete an IoT device
Removes an IoT device and all its readings.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Device ID |
Success
204 No Content (empty body)
Errors
17 possible errors
Example
curl -X DELETE "https://hivekraft.com/api/iot/devices/clxcabc" \
-H "Authorization: Bearer YOUR_API_KEY"/api/iot/devices/[id]/readingsScope: read:iotGet device readings
Returns sensor readings for a device with optional time range filtering and daily aggregation. Without cursor the response is a bare array (chronologically ascending; X-List-Has-More / X-List-Next-Cursor headers signal further pages). With cursor the response is an object { items, nextCursor, hasMore } with items newest-first (keyset pagination).
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Device ID |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
from | string | No | Start date (ISO)e.g. 2025-06-01 |
to | string | No | End date (ISO)e.g. 2025-06-30 |
limit | integer | No | Max readings to return (default 500, max 2000) |
cursor | string | No | Keyset cursor: pass the nextCursor of the previous page. Switches the response to { items, nextCursor, hasMore } |
offset | integer | No | Deprecated — use cursor instead (ignored when cursor is set) |
aggregate | string | No | Set to "daily" for daily aggregates |
Response Body
e.g. [{"timestamp":"2025-06-15T12:00:00Z","weight":42.3,"temperature":35.1,"humidity":62}]
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/iot/devices/clxcabc/readings?from=2025-06-01&to=2025-06-30&aggregate=daily" \
-H "Authorization: Bearer YOUR_API_KEY"/api/iot/devices/[id]/syncScope: write:iotSync ThingSpeak device
Manually triggers a data sync for a ThingSpeak-connected device.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Device ID |
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X POST "https://hivekraft.com/api/iot/devices/clxcabc/sync" \
-H "Authorization: Bearer YOUR_API_KEY"/api/iot/devices/[id]/assignScope: write:iotAssign device to a hive
Assigns an IoT device to a hive or unassigns it (pass null).
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Device ID |
Request Body
| Field | Type | Description |
|---|---|---|
hiveId | string | Hive ID to assign to, or null to unassign(required, nullable)e.g. clx2abc |
Success
200 application/json, wrapped as { data }
Errors
18 possible errors
Example
curl -X POST "https://hivekraft.com/api/iot/devices/clxcabc/assign" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"hiveId":"clx2abc"}'/api/iot/devices/[id]/importScope: write:iotImport CSV readings
Imports sensor readings from a CSV file (max 5 MB). Uses multipart/form-data with a file and a JSON config for column mapping.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Device ID |
Request Body
Content-Type: multipart/form-data
| Field | Type | Description |
|---|---|---|
file | file | CSV file, max 5 MB(required) |
config | object | Import settings, sent as a JSON string in the form field `config`(required) |
config.mapping | object | Column per value; besides `timestamp` at least one sensor column is required(required) |
config.mapping.timestamp | integer | 0-based column index of the timestamp(required) |
config.mapping.weight | integer | 0-based column index of the weight |
config.mapping.temperature | integer | 0-based column index of the outer temperature |
config.mapping.tempInner | integer | 0-based column index of the inner temperature |
config.mapping.humidity | integer | 0-based column index of the humidity |
config.mapping.batteryVoltage | integer | 0-based column index of the battery voltage |
config.timestampFormat | string | Format of the timestamp column(default iso, iso | unix | european | american) |
config.timezoneOffset | integer | Fixed fallback offset in minutes, -720..720, with Date#getTimezoneOffset semantics (UTC minus local; e.g. -60 for UTC+1)(default 0) |
config.timezone | string | IANA time zone of local timestamps (e.g. Europe/Berlin), 1-100 characters |
Response Body
e.g. {"imported":150,"skipped":2,"errors":[]}
Success
200 application/json, wrapped as { data }
Errors
18 possible errors
Example
curl -X POST "https://hivekraft.com/api/iot/devices/clxcabc/import" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@readings.csv" \
-F 'config={"mapping":{"timestamp":0,"weight":1,"temperature":2},"timestampFormat":"iso"}'/api/iot/alertsScope: read:iotList IoT alerts
Returns IoT device alerts (e.g. weight drop, temperature anomaly). Optionally filter to unread only.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
unread | boolean | No | Filter to unread alerts only (default: false) |
Response Body
e.g. [{"id":"clxa...","alertType":"weight_drop","deviceId":"clxc...","message":"Sudden weight drop detected","isRead":false}]
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/iot/alerts?unread=true" \
-H "Authorization: Bearer YOUR_API_KEY"/api/iot/alertsScope: write:iotUpdate an IoT alert
Marks an alert as read or resolves it.
Request Body
| Field | Type | Description |
|---|---|---|
alertId | string | Alert ID; required for `read` and `resolve`e.g. clxaabc |
action | string | `read` marks one alert as read, `resolve` resolves it, `read_all` marks every unread alert of one device as read(required, read | resolve | read_all)e.g. read |
deviceId | string | Device ID; required for `read_all` |
Success
200 application/json, wrapped as { data }
Errors
18 possible errors
Example
curl -X PATCH "https://hivekraft.com/api/iot/alerts" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"alertId":"clxaabc","action":"resolve"}'/api/iot/syncScope: write:iotSync all ThingSpeak devices
Triggers a data sync for all ThingSpeak-connected devices belonging to the user.
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X POST "https://hivekraft.com/api/iot/sync" \
-H "Authorization: Bearer YOUR_API_KEY"IoT Push
Push sensor data from IoT devices. Uses device-specific X-API-Key header instead of Bearer token.
/api/iot/pushScope: write:iotPush a sensor reading
Pushes a single sensor reading from a device. Authenticates via X-API-Key header (device API key, not user API key). Rate limit: 60 requests/minute.
Request Body
At least one of `weight`, `temperature`, `tempInner`, `humidity` or `batteryVoltage` is required. A timestamp before 2020 (null, 0 or Unix seconds) is rejected.
| Field | Type | Description |
|---|---|---|
deviceId | string | Device ID(required)e.g. clxcabc |
timestamp | string | Reading time (ISO 8601), at most 1 hour in the future; omitted = server timee.g. 2025-06-15T12:00:00Z |
weight | number | Weight in kg, 0-500e.g. 42.3 |
temperature | number | Outer temperature in °C, -50 to 80e.g. 24.5 |
tempInner | number | Inner hive temperature in °C, -20 to 60e.g. 35.1 |
humidity | number | Humidity in %, 0-100e.g. 62 |
batteryVoltage | number | Battery voltage in V, 0-30e.g. 3.7 |
Success
201 application/json, wrapped as { data }
Errors
5 possible errors
Example
curl -X POST "https://hivekraft.com/api/iot/push" \
-H "X-API-Key: device_api_key_here" \
-H "Content-Type: application/json" \
-d '{"deviceId":"clxcabc","weight":42.3,"temperature":24.5,"humidity":62}'/api/iot/push/batchScope: write:iotPush a batch of readings
Pushes up to 100 sensor readings at once. Useful for buffered devices that go offline. Rate limit: 10 requests/minute.
Request Body
e.g. {"readings":[{"deviceId":"clxcabc","timestamp":"2025-06-15T12:00:00Z","weight":42.3},{"deviceId":"clxcabc","timestamp":"2025-06-15T12:15:00Z","weight":42.4}]}
| Field | Type | Description |
|---|---|---|
readings | array | 1-100 readings; a reading without any sensor value is skipped, not rejected(required) |
readings[].deviceId | string | Device ID(required)e.g. clxcabc |
readings[].timestamp | string | Reading time (ISO 8601), at most 1 hour in the future; omitted = server timee.g. 2025-06-15T12:00:00Z |
readings[].weight | number | Weight in kg, 0-500e.g. 42.3 |
readings[].temperature | number | Outer temperature in °C, -50 to 80e.g. 24.5 |
readings[].tempInner | number | Inner hive temperature in °C, -20 to 60e.g. 35.1 |
readings[].humidity | number | Humidity in %, 0-100e.g. 62 |
readings[].batteryVoltage | number | Battery voltage in V, 0-30e.g. 3.7 |
Success
201 application/json, wrapped as { data }
Errors
5 possible errors
Example
curl -X POST "https://hivekraft.com/api/iot/push/batch" \
-H "X-API-Key: device_api_key_here" \
-H "Content-Type: application/json" \
-d '{"readings":[{"deviceId":"clxcabc","weight":42.3},{"deviceId":"clxcabc","weight":42.4}]}'Compliance
EU 2019/6 colony record book (Bestandsbuch) compliance checks, history, and exports.
/api/compliance/checksScope: read:treatmentsGet compliance status
Returns the latest compliance check result or full check history.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
history | boolean | No | Set to "true" to get full history |
Response Body
e.g. {"status":"compliant","score":95,"issues":[]}
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/compliance/checks" \
-H "Authorization: Bearer YOUR_API_KEY"/api/compliance/exportScope: export:csvExport compliance data
Exports compliance entries as JSON or CSV. CSV export requires Pro plan.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
format | string | No | json | csv; without it the response is JSON |
hiveId | string | No | Filter by hive |
apiaryId | string | No | Filter by apiary |
startDate | string | No | Date range start (ISO date or date-time) |
endDate | string | No | Date range end (ISO date or date-time, not before startDate); a plain date includes the whole day |
locale | string | No | Language of the CSV headings and labels: de | en (default: de) |
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/compliance/export?format=csv&startDate=2025-01-01" \
-H "Authorization: Bearer YOUR_API_KEY"/api/compliance/pdfScope: export:csvExport as PDF (Bestandsbuch)
Generates a bilingual PDF colony record book. Free plan: 3 PDFs/month and 6/year (shared cap). Pro/Business: unlimited.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
year | integer | No | Year to export, 2000-2100 (default: current year)e.g. 2025 |
locale | string | No | de | en (default: de) |
apiaryId | string | No | Only the colonies of this apiary |
Success
200 application/pdf (binary, no data envelope)
Errors
18 possible errors
Example
curl -X GET "https://hivekraft.com/api/compliance/pdf?year=2025&locale=de" \
-H "Authorization: Bearer YOUR_API_KEY" -o Bestandsbuch-2025.pdf/api/complianceScope: read:treatmentsList compliance entries
Returns one page of compliance-relevant treatment entries with all EU required fields. `total` counts all matching entries with the same filter; `complete` is true when no further page exists; pass `nextCursor` as `cursor` for the next page. `truncated` is always false.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
hiveId | string | No | Filter by hive |
apiaryId | string | No | Filter by apiary |
startDate | string | No | Date range start |
endDate | string | No | Date range end |
excludeBiological | boolean | No | Set to "true" to hide biotechnical methods |
cursor | string | No | nextCursor of the previous page |
limit | integer | No | Page size, 1-500 (default: 500) |
Response Body
e.g. {"items":[],"total":0,"complete":true,"truncated":false,"nextCursor":null}
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/compliance?apiaryId=clx1abc" \
-H "Authorization: Bearer YOUR_API_KEY"/api/compliance/retention-endScope: read:treatmentsRetention end of the record book
Returns the last day all filtered treatment records must be kept (EU 2019/6 Art. 108): 31 December of the fifth year after the treatment date, but at least until the fifth anniversary of the entry's creation. Computed over all matching entries, not one page of the list. `lastDay` is null without entries.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
hiveId | string | No | Filter by hive |
apiaryId | string | No | Filter by apiary |
startDate | string | No | Date range start |
endDate | string | No | Date range end |
Response Body
e.g. {"lastDay":"2031-10-14"}
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/compliance/retention-end?startDate=2025-01-01&endDate=2025-12-31" \
-H "Authorization: Bearer YOUR_API_KEY"/api/compliance/previewScope: read:treatmentsPreview the record book layout
Returns the first three HTML layout pages, the shared document header and total page count. Uses the PDF loader and pagination without PDF output or quota reservation. Rate limited with the scope endpoint to 20 requests per minute. A font request returns the same embedded TTF face for the paper preview instead of layout JSON.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
year | integer | No | Year, 2000-2100; required for layout requestse.g. 2026 |
apiaryId | string | No | Historical apiary assignment, as in the PDF export |
locale | string | No | de | en (default: de) |
font | string | No | normal | bold | italic; returns font/ttf instead of layout data |
Response Body
e.g. {"header":{"business":"Example","title":"Bestandsbuch 2026","created":"29.10.2026","footer":"{page}","page":"{page} / {pages}"},"pages":[{"blocks":[]}],"totalPages":1}
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/compliance/preview?year=2026" \
-H "Authorization: Bearer YOUR_API_KEY"/api/compliance/scopeScope: read:treatmentsScope of the record book outputs
Says per output (bestandsbuch_pdf, bestandsbuch_csv, vet_report_pdf) what it would contain for the year, apiary and language: rows, the colonies it prints (the record book PDF only colonies with entries in the year, the vet report only colonies with treatments; removed colonies with `removed` and the export suffix; `label` uses the CSV notation `#3 (Name)`), included treatment statuses, and which screen filters apply or are `not_applicable`. Read-only: no PDF quota, no document, no audit entry. Rate limited to 20 requests per minute.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
year | integer | Yes | Year, 2000-2100e.g. 2025 |
apiaryId | string | No | Only the colonies of this apiary (the vet report ignores it) |
locale | string | No | de | en (default: de) |
Response Body
e.g. {"year":2025,"apiaryId":null,"locale":"de","documents":[{"document":"bestandsbuch_csv","rows":{"treatments":2},"hives":[{"number":3,"name":null,"label":"#3 (entfernt)","removed":true}],"statuses":["planned","active","completed","cancelled"],"filters":{"year":"applies","apiaryId":"applies","locale":"applies","completeness":"not_applicable","excludeBiological":"not_applicable"}}]}
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/compliance/scope?year=2025" \
-H "Authorization: Bearer YOUR_API_KEY"/api/compliance/checksScope: write:treatmentsRun a compliance check
Triggers a full EU 2019/6 compliance check across all colonies and returns the result with score and issues.
Response Body
e.g. {"status":"compliant","score":95,"issues":[],"checkedAt":"2025-06-15T10:00:00Z"}
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X POST "https://hivekraft.com/api/compliance/checks" \
-H "Authorization: Bearer YOUR_API_KEY"/api/compliance/vet-reportScope: read:treatmentsExport veterinary report PDF
Generates a bilingual veterinary report PDF with all treatment data for the specified year.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
year | integer | No | Year to export, 2000-2100 (default: current year)e.g. 2025 |
locale | string | No | de | en (default: de) |
Success
200 application/pdf (binary, no data envelope)
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/compliance/vet-report?year=2025&locale=de" \
-H "Authorization: Bearer YOUR_API_KEY" -o Veterinaerbericht-2025.pdf/api/treatments/accept-pendingScope: write:treatmentsAccept complete unreviewed treatments into the record book
Moves treatments in status `pending_compliance` (from import, voice round and chat) to `completed` and locks them, one at a time through the same completion check as PUT /api/treatments/[id]. A treatment is accepted only if that check passes, the year-balance mandatory fields are filled (an explicitly chosen `other`/`varroa_other` counts as medicinal), no mandatory text field holds a placeholder (`-`, `VR-PENDING`) and it does not start after today (Europe/Berlin); the conditions are checked again inside the write transaction. Each request reads one page of at most 100 pending treatments, ordered by id; while `cursor` is set, call again with it as `after`. Rate limit: 20 requests per minute per user.
Request Body
| Field | Type | Description |
|---|---|---|
reviewed | boolean | Must be `true`: the holder confirms having reviewed these entries. Accepted entries are locked afterwards and can only be changed through a correction.(required, true)e.g. true |
after | string | Cursor from the previous response; omit it to start at the first pending treatment.e.g. clx5abc |
Response Body
Counts for this page
e.g. {"accepted":98,"needsDetails":2,"skipped":0,"cursor":"clx5xyz"}
| Field | Type | Description |
|---|---|---|
accepted | integer | Accepted on this page: now `completed` and locked(required) |
needsDetails | integer | Left pending on this page: mandatory details missing or placeholder values(required) |
skipped | integer | Left pending on this page: starts after today, the colony is under quarantine, or the treatment was accepted, replaced or deleted elsewhere in the meantime(required) |
cursor | string | Pass as `after` to read the next page; null when no further pending treatments follow(required, nullable) |
Success
200 application/json, wrapped as { data }
Errors
20 possible errors
Example
curl -X POST "https://hivekraft.com/api/treatments/accept-pending" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"reviewed":true}'Phenology
Growing degree days (GTS), bloom reports, treatment windows, and harvest timing based on phenological data.
/api/phenology/gtsScope: read:weatherGet GTS dashboard data
Returns growing degree sum (Grünland-Temperatursumme) for all apiaries with phenological phase indicators.
Response Body
e.g. {"apiaries":[{"apiaryId":"clx1...","gts":245.3,"phase":"early_spring"}]}
Success
200 application/json, wrapped as { data }
Errors
16 possible errors
Example
curl -X GET "https://hivekraft.com/api/phenology/gts" \
-H "Authorization: Bearer YOUR_API_KEY"/api/phenology/bloom-reportsScope: read:weatherGet regional bloom reports
Returns bloom reports from the community near the given coordinates.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
lat | number | Yes | Latitudee.g. 48.137 |
lng | number | Yes | Longitudee.g. 11.576 |
radius | number | No | Search radius in km (0.1-500)e.g. 25 |
Response Body
e.g. [{"plantName":"Raps","bloomStage":"full_bloom","reportDate":"2025-05-10"}]
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/phenology/bloom-reports?lat=48.137&lng=11.576&radius=25" \
-H "Authorization: Bearer YOUR_API_KEY"/api/phenology/bloom-reportsScope: write:weatherSubmit a bloom report
Reports a plant bloom observation at your location. Notes are AI-moderated.
Request Body
| Field | Type | Description |
|---|---|---|
plantType | string | Plant in bloom(required, hazel | willow | forsythia | dandelion | cherry | apple | rapeseed | acacia | chestnut | clover | linden | sunflower | heather | ivy | other)e.g. rapeseed |
customPlantName | string | Plant name, max 100 characters; required when `plantType` is `other` |
status | string | Bloom stage(default blooming, budding | blooming | fading)e.g. blooming |
latitude | number | Observation latitude (-90..90)(required)e.g. 48.137 |
longitude | number | Observation longitude (-180..180)(required)e.g. 11.576 |
apiaryId | string | Apiary the observation belongs to |
photoUrl | string | URL of a photo of the plant |
note | string | Observation note, max 500 characters |
Success
200 application/json, wrapped as { data }
Errors
18 possible errors
Example
curl -X POST "https://hivekraft.com/api/phenology/bloom-reports" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"plantType":"rapeseed","status":"blooming","latitude":48.137,"longitude":11.576}'/api/phenology/treatment-windowsScope: read:weatherGet treatment windows
Returns recommended treatment windows based on phenological conditions.
Success
200 application/json, wrapped as { data }
Errors
16 possible errors
Example
curl -X GET "https://hivekraft.com/api/phenology/treatment-windows" \
-H "Authorization: Bearer YOUR_API_KEY"/api/phenology/harvest-timingScope: read:weatherGet harvest timing
Returns harvest timing based on bloom data and weather conditions. Active honey withdrawal blocks and active or unknown quarantine override readiness; quarantine takes precedence.
Response Body
| Field | Type | Description |
|---|---|---|
[].hiveId | string | Colony ID(required) |
[].hiveName | string | Colony name or number(required) |
[].status | string | Harvest status; blocked colonies cannot be ready or approaching(required, not_ready | approaching | optimal | urgent | too_late | blocked) |
[].blockReason | string | Present when blocked; quarantine includes an unknown quarantine state and takes precedence over withdrawal(quarantine | withdrawal) |
[].blockedUntil | string | Present when blocked: last blocked calendar day in Europe/Berlin (YYYY-MM-DD, inclusive); null for quarantine or a running medicine without an end date(nullable) |
[].reason | object | string | Status explanation as a translation key with optional parameters(required) |
[].reason.key | string | Message key, resolved by the client against its message bundle(required) |
[].reason.params | object | Values for the placeholders of the message (strings or numbers) |
[].estimatedYieldKg | number | Estimated honey yield in kg; null when blocked or unavailable(required, nullable) |
[].trachtSource | string | Translation key for the nectar source; null when blocked or unavailable(required, nullable) |
[].sortenhonigWarning | object | string | Varietal honey warning; null when blocked or not applicable(required, nullable) |
[].sortenhonigWarning.key | string | Message key, resolved by the client against its message bundle(required) |
[].sortenhonigWarning.params | object | Values for the placeholders of the message (strings or numbers) |
[].weatherWindow | array | Weather forecast; empty when blocked or unavailable(required) |
[].weatherWindow[].date | string | Calendar date (YYYY-MM-DD)(required) |
[].weatherWindow[].suitable | boolean | Dry and warm enough for harvest(required) |
Success
200 application/json, wrapped as { data }
Errors
16 possible errors
Example
curl -X GET "https://hivekraft.com/api/phenology/harvest-timing" \
-H "Authorization: Bearer YOUR_API_KEY"/api/phenology/todayScope: read:weatherGet daily phenology tasks
Returns phenology-based daily tasks and recommendations for the current date. Cached for 1 hour.
Success
200 application/json, wrapped as { data }
Errors
16 possible errors
Example
curl -X GET "https://hivekraft.com/api/phenology/today" \
-H "Authorization: Bearer YOUR_API_KEY"/api/phenology/bloom/[apiaryId]Scope: read:weatherGet bloom data for an apiary
Returns current bloom data (flowering plants, nectar flow) for a specific apiary location.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
apiaryId | string | Yes | Apiary ID |
Success
200 application/json, wrapped as { data }
Errors
16 possible errors
Example
curl -X GET "https://hivekraft.com/api/phenology/bloom/clx1abc" \
-H "Authorization: Bearer YOUR_API_KEY"/api/phenology/anomaliesScope: read:weatherDetect phenological anomalies
Analyzes phenological data to detect anomalies such as unusual bloom timing, temperature deviations, or unexpected nectar flow patterns.
Success
200 application/json, wrapped as { data }
Errors
16 possible errors
Example
curl -X GET "https://hivekraft.com/api/phenology/anomalies" \
-H "Authorization: Bearer YOUR_API_KEY"/api/apiaries/check-locationScope: write:apiariesEvaluate local land cover without creating an apiary
Evaluates an arbitrary WGS84 point using the same local raster contract as apiary-forage-area. No stand lookup or creation and no external request. Coordinates are in the JSON body; private, no-store response. Shares are fractions; missing datasets return no_data, never zero shares. Limited to 20 requests per minute per user, sharing the weather-forecast bucket.
Request Body
| Field | Type | Description |
|---|---|---|
latitude | number | WGS84 latitude from -90 through 90(required) |
longitude | number | WGS84 longitude from -180 through 180(required) |
Response Body
ForageArea: state, reason, datasets, cumulative 1/2/3 km rings and schematic grid; same contract as GET /api/apiaries/[id]/forage-area.
e.g. {"state":"no_data","reason":"not_configured","datasets":[],"rings":[],"grid":null}
Success
200 application/json, wrapped as { data }
Errors
18 possible errors
Example
curl -X POST "https://hivekraft.com/api/apiaries/check-location" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"latitude":48,"longitude":11}'/api/apiaries/[id]/forage-areaScope: read:apiariesLocal land cover within flight range
Evaluates local downloaded raster data in cumulative 1, 2 and 3 km circles. Coordinates are rounded to 0.001 degrees for both calculation and cache. No external location request. Missing data remains unknown; missing coordinates return no_location. Foreign or deleted apiaries return 404.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Apiary IDe.g. clx1... |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
latitude | number | No | Expected stand latitude, together with longitude |
longitude | number | No | Expected stand longitude, together with latitude |
Response Body
e.g. {"state":"no_data","reason":"not_configured","datasets":[],"rings":[],"grid":null}
| Field | Type | Description |
|---|---|---|
state | string | Coverage state(required, ok | partial | unknown | no_data | no_location) |
reason | string | Missing-data reason(required, nullable, not_configured | unavailable_dataset | missing_tiles | outside_coverage | unclassified_cells) |
datasets | array | Manifest source, year, provisional status, licence, attribution and version(required) |
datasets[] | object | Dataset manifest entry |
rings | array | Cumulative circles: radiusM, areaHa, groups and classes with areaHa/share, unknownShare; shares are fractions. Empty without data/location.(required) |
rings[] | object | Circle evaluation |
grid | object | Schematic 31 by 31 raster: size, cellSizeM (200), cells in north-to-south order; null cells lie outside the circle.(required, nullable) |
Success
200 application/json, wrapped as { data }
Errors
19 possible errors
Example
curl -X GET "https://hivekraft.com/api/apiaries/clx1abc/forage-area" \
-H "Authorization: Bearer YOUR_API_KEY"Weather
Weather forecasts and alerts for your apiary locations. Powered by DWD (Bright Sky).
/api/weather/[apiaryId]Scope: read:weatherGet weather forecast
Returns the weather forecast for a specific apiary based on its GPS coordinates.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
apiaryId | string | Yes | Apiary ID (must have GPS coordinates) |
Response Body
e.g. {"current":{"temperature":22.4,"humidity":55,"condition":"partly_cloudy"},"forecast":[]}
Success
200 application/json, wrapped as { data }
Errors
16 possible errors
Example
curl -X GET "https://hivekraft.com/api/weather/clx1abc" \
-H "Authorization: Bearer YOUR_API_KEY"/api/weather/alertsScope: read:weatherGet weather alerts
Returns active weather alerts (frost, heat, heavy rain, strong wind) for all apiaries.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
locale | string | No | de | en (default: de) |
Response Body
e.g. [{"type":"frost","severity":"warning","apiaryName":"Waldbienenstand","message":"Frost erwartet: -2°C"}]
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/weather/alerts" \
-H "Authorization: Bearer YOUR_API_KEY"/api/weather/official-warningsScope: read:weatherRead cached official weather warnings
Reads cached national warning feeds and local warning-cell assignments. Never fetches a provider or writes data. Missing approval, geometry or source coverage is explicit; at most 500 owned live apiaries, with truncation reported.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
apiaryIds | string | No | Optional comma-separated apiary IDs, 1 to 500 entries |
latitude | number | No | Expected stand latitude, together with longitude; only with exactly one apiaryIds entry |
longitude | number | No | Expected stand longitude, together with latitude; only with exactly one apiaryIds entry |
Response Body
e.g. {"apiaries":[],"truncated":false,"sources":{"DE":{"status":"unavailable","reason":"not_approved"},"AT":{"status":"unavailable","reason":"source_not_connected"},"CH":{"status":"unavailable","reason":"source_not_connected"}}}
| Field | Type | Description |
|---|---|---|
apiaries | array | Results per owned live apiary(required) |
apiaries[].apiaryId | string | Apiary ID(required) |
apiaries[].status | string | Warning availability(required, ok | none | unknown | unavailable) |
apiaries[].reason | string | Optional machine-readable reason |
apiaries[].lastSuccessAt | string | Optional last successful source fetch, ISO timestamp |
apiaries[].warnings | array | Unchanged source text by language, raw and normalized level, source, event, region IDs and validity(required) |
apiaries[].warnings[] | object | OfficialWarning |
apiaries[].officialEvents | array | Official event kinds per Berlin day, today and the next two days(required) |
apiaries[].officialEvents[] | object | day and event |
truncated | boolean | More than 500 apiaries matched(required) |
sources | object | Availability and optional reason/lastSuccessAt for DE, AT and CH(required) |
Success
200 application/json, wrapped as { data }
Errors
18 possible errors
Example
curl -X GET "https://hivekraft.com/api/weather/official-warnings" \
-H "Authorization: Bearer YOUR_API_KEY"Varroa
Varroa mite monitoring data, trend analysis, and treatment effectiveness tracking.
/api/varroaScope: read:treatmentsGet varroa data
Returns varroa monitoring data across all hives.
Success
200 application/json, wrapped as { data }
Errors
16 possible errors
Example
curl -X GET "https://hivekraft.com/api/varroa" \
-H "Authorization: Bearer YOUR_API_KEY"/api/varroa/trendsScope: read:treatmentsGet varroa trends
Returns varroa count trends over time for all hives.
Success
200 application/json, wrapped as { data }
Errors
16 possible errors
Example
curl -X GET "https://hivekraft.com/api/varroa/trends" \
-H "Authorization: Bearer YOUR_API_KEY"/api/varroa/effectivenessScope: read:treatmentsGet treatment effectiveness
Analyzes the effectiveness of past varroa treatments.
Success
200 application/json, wrapped as { data }
Errors
16 possible errors
Example
curl -X GET "https://hivekraft.com/api/varroa/effectiveness" \
-H "Authorization: Bearer YOUR_API_KEY"Dashboard read models
Complete server-side counts with bounded previews for Today and Insights.
/api/dashboard/todayScope: any read:* scopeGet Today signal groups
Groups authorized notification and inventory signals by cause and apiary. Counts cover the full inventory. Each group includes at most five hive and evidence previews. attention.preview independently selects the strongest critical or today reason per colony before group truncation, sorted by level and colony ID, with at most six colonies. Unknown observation dates remain null. Cursors expire on the next Berlin calendar day or dashboard invalidation. snoozedHives excludes colonies with non-snoozable reasons.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
limit | integer | No | Group page size, 1–50; default 20 |
cursor | string | No | Continuation cursor returned by nextCursor; at most 512 characters |
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/dashboard/today?limit=20" \
-H "Authorization: Bearer YOUR_API_KEY"/api/dashboard/projectionsScope: any read:* scopeGet visible widget projections
Loads shared request data once for the requested widgets. Supported IDs: rounds, food, treatment-followup, withdrawal, varroa-apiaries, inspections-due, glance and varroa-hive. Metrics include their unit, denominator, observation age and completeness. Missing data remains incomplete. Varroa means are separated by unit and have no warning tone or threshold. varroa-hive returns eight weeks of one owned colony with that colony's seasonal threshold; a colony outside the account is unavailable. metricId is null until the metric register is available.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
ids | string | Yes | Comma-separated list of supported IDs; duplicates are merged |
hive | string | No | Colony for varroa-hive; without it the most urgent colony is chosen |
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/dashboard/projections?ids=food,withdrawal" \
-H "Authorization: Bearer YOUR_API_KEY"/api/dashboard/insightsScope: any read:* scopeGet Insights aggregates
Returns live inventory, attention counts, the existing year comparison, confirmed inspections in the requested window and since the start of the beekeeping season (`inspections.season`: first Berlin day, count, inspections of live colonies per live colony), weekly varroa series separated by unit, and harvest/treatment previews by apiary (harvest by apiary name; treatments overdue, then open, then the rest, each by name). A harvest counts for its saved `Harvest.apiaryId` when that apiary belongs to the user and is not deleted; without it, or for any other apiary, it stays unallocated (weight and count). A colony's current apiary is never used and no weight split is inferred. There is no attention week comparison source yet.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
days | integer | No | Inspection and measurement lookback, 7–366 days; default 30 |
year | integer | No | Harvest comparison year, 2020–2030; default current UTC year |
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/dashboard/insights?days=30&year=2026" \
-H "Authorization: Bearer YOUR_API_KEY"Object lookups
Bounded server searches for object selection controls.
/api/hives/lookupScope: read:hivesSearch colony identities
Returns up to 20 owned, non-deleted colonies on owned, non-deleted apiaries, ordered by colony number then ID. The default includes living colonies (active and inactive); terminal states require an explicit status, and `all` includes every status for historical lists. Ownership, the non-deleted filter and the 20-result limit apply in every mode. An empty query returns the first matches. Numbers match exactly; names match case-insensitively and search punctuation is literal. No cursor or full-list traversal. Rate limit: 120 requests per minute per authenticated person.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
q | string | No | Trimmed search text, maximum 200 characters; default emptye.g. 12 |
apiaryId | string | No | Optional apiary ID (1–128 letters, digits, hyphens or underscores) |
status | string | No | One status: active, inactive, dead, lost, sold, merged, or all for every status; invalid values return 400 |
limit | integer | No | Integer from 1 to 20; default 20; invalid limits return 400e.g. 20 |
Response Body
e.g. [{"id":"clx2abc","number":12,"name":"Linde","apiary":{"id":"clx1abc","name":"Garden"},"status":"active"}]
| Field | Type | Description |
|---|---|---|
[].id | string | Colony ID(required) |
[].number | integer | Colony number(required) |
[].name | string | Colony name(required, nullable) |
[].apiary | object | Current apiary(required) |
[].apiary.id | string | Apiary ID(required) |
[].apiary.name | string | Apiary name(required) |
[].status | string | Colony status(required, active | inactive | dead | lost | sold | merged) |
Success
200 application/json, wrapped as { data }
Errors
17 possible errors
Example
curl -X GET "https://hivekraft.com/api/hives/lookup?q=12&limit=20" \
-H "Authorization: Bearer YOUR_API_KEY"