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_KEY

API 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 explicit export: scope even for full-access keys), PLAN_REQUIRED, EMAIL_NOT_VERIFIED, ACCOUNT_PENDING_DELETION, and for sessions TWO_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.

HeaderDescription
X-RateLimit-LimitMaximum requests per window for this request (default 300, lower for AI endpoints)
X-RateLimit-RemainingRemaining requests in current window
X-RateLimit-ResetUnix 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

CodeError CodeDescription
200-Success
201-Created
204-No Content (successful DELETE)
400VALIDATION_ERRORInvalid request body or query parameters
400BAD_REQUESTUnsafe path parameter
401UNAUTHORIZED, INVALID_API_KEY, API_KEY_REVOKED, API_KEY_EXPIREDMissing, invalid, revoked or expired credentials
403FORBIDDEN, INSUFFICIENT_SCOPE, PLAN_REQUIRED, TWO_FACTOR_REQUIRED, …Authenticated but not allowed: scope, plan, second factor, account state or quota (see each endpoint's Errors)
404NOT_FOUNDResource not found
409CONFLICTConflicting operation (e.g. duplicate)
429RATE_LIMITEDToo many requests, retry after backoff
500INTERNAL_ERRORUnexpected 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.

GET/api/hives/collectionScope: read:hives

Read 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

NameTypeRequiredDescription
apiaryIdsstringNoUp to 50 comma-separated apiary IDs (each 1-128 URL-safe characters)
statusstringNoliving (active + inactive), active, resting (inactive), ended (dead/sold/lost/merged), all; collection default living, summary default all
qstringNoTrimmed colony name (case insensitive substring) or exact colony number; max 200 characters
queenstringNoFour-digit birth year, older (before the latest three Berlin calendar years), none (no non-deleted queen and hasUntrackedQueen is false)
varroaLevelstringNourgent | attention | ok; current, non-stale assessment only
varroaMinnumberNoCurrent non-stale mites/day (other units do not match); strictly greater than the value; 0-10000
varroaMaxnumberNoCurrent non-stale mites/day (other units do not match); strictly less than the value; 0-10000
strengthMinnumberNoStrength of the last confirmed inspection; strictly greater than the value; 0-10000
strengthMaxnumberNoStrength of the last confirmed inspection; strictly less than the value; 0-10000
seenstringNo7 | 14 | 28: last confirmed inspection older than this many days; never: no confirmed inspection
attentionstringNocritical | attention (critical or attention), from the W3 signal status
sortstringNonumber (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.
limitintegerNoPage size 1-100, default 50
cursorstringNoSigned keyset (sort value and ID), bound to owner and filters; max 2048 characters; limit may change

Response Body

Colony collection page

FieldTypeDescription
itemsarrayReturned colony rows(required)
items[].idstringHive ID(required)
items[].numberintegerColony number(required)
items[].namestringDisplay name(required, nullable)
items[].hiveTypestringHive type(required, dadant | zander | zadant | dn | langstroth | warree | top_bar | layens | national_uk | bienenkiste | einraumbeute | trogbeute | flow_hive | miniplus | other)
items[].statusstringColony status(required, active | inactive | dead | lost | sold | merged)
items[].quarantineActivebooleanThe colony is under quarantine(required)
items[].apiaryIdstringApiary ID(required)
items[].apiaryNamestringApiary name(required)
items[].queenInfoobjectThe attached queen(required, nullable)
items[].queenInfo.idstringQueen ID(required)
items[].queenInfo.birthYearintegerYear of birth(required, nullable)
items[].queenInfo.markingColorstringMarking colour(required, nullable)
items[].lastInspectionDatestringDate 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[].lastColonyStrengthintegerColony strength (1-10) from the latest confirmed record that carries one; can be older than lastInspectionDate(required, nullable)
items[].lastColonyStrengthDatestringDate of the record behind lastColonyStrength (ISO 8601 date-time)(required, nullable)
items[].lastVarroaCountnumberLatest confirmed varroa value in the recorded lastVarroaUnit(required, nullable)
items[].lastVarroaMethodstringMethod of the latest varroa value(required, nullable)
items[].lastVarroaUnitstringRecorded unit of the latest readable varroa measurement(required, nullable, mites_per_day | mites_per_10g_bees | percent_infestation)
items[].lastVarroaDatestringDate of the latest varroa value (ISO 8601 date-time)(required, nullable)
items[].lastVarroaCountDaysintegerCounting days of the latest varroa value (natural drop); null for legacy rows(required, nullable)
items[].lastVarroaUnreadablenumberRaw 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[].varroaTreatmentsarrayNon-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[].treatmentTypestringTreatment 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[].startDatestringStart (ISO 8601 date-time)(required)
items[].varroaTreatments[].endDatestringEnd; null when not entered (ISO 8601 date-time)(required, nullable)
items[].varroaTreatments[].statusstringTreatment status(required, completed | active)
items[].queenCellTypestringQueen cell type of the latest inspection(required, nullable, none | swarm | supersedure | emergency)
items[].queenStatusstringStatus of the attached queen(required, nullable, active | replaced | dead | missing | swarmed | lost)
items[].queenStatusObservedAtstringWhen the attached queen's status was observed; null when no queen or observation is recorded (ISO 8601 date-time)(required, nullable)
items[].treatmentOverduebooleanA varroa treatment is due(required)
items[].hasUntrackedQueenbooleanThe colony has a queen that is not kept as a queen record(required)
items[].lastTreatmentDatestringEnd of the latest completed varroa treatment (ISO 8601 date-time)(required, nullable)
items[].inspectionCadenceobjectDays after which an inspection counts as overdue, per season(required)
items[].inspectionCadence.springintegerDays in spring(required)
items[].inspectionCadence.summerintegerDays in summer(required)
items[].inspectionCadence.autumnintegerDays in autumn(required)
items[].inspectionCadence.winterintegerDays in winter(required)
items[].colonyTypestringColony class(required, production | nucleus | queen_rearing)
items[].attentionobjectCompatibility triage of the colony; use signalDisplay for status presentation(required)
items[].attention.levelstringDeprecated: use signalDisplay. green = ok or inactive, yellow = attention, red = urgent, neutral = no automatic rating(required, green | yellow | red | neutral)
items[].attention.reasonsarrayAt most one reason; empty when everything is fine(required)
items[].attention.reasons[].keystringMessage key, resolved by the client against its message bundle(required)
items[].attention.reasons[].paramsobjectValues for the placeholders of the message (strings or numbers)
items[].signalDisplayobjectServer projection of the colony's signal and observation state(required)
items[].signalDisplay.signalobjectThe selected signal; null for a checked or inactive colony(required, nullable)
items[].signalDisplay.signal.levelstringSignal level(required, critical | today | week | info)
items[].signalDisplay.signal.causestringSignal 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.identitystringProducer discriminator within the cause and subjects
items[].signalDisplay.signal.subjectsarrayAffected colonies or apiaries(required)
items[].signalDisplay.signal.subjects[].kindstringSubject kind(required, hive | apiary)
items[].signalDisplay.signal.subjects[].idstringSubject ID(required)
items[].signalDisplay.signal.basisobjectOriginal observation; null when no observation is recorded(required, nullable)
items[].signalDisplay.signal.basis.sourcestringSource of the observation(required)
items[].signalDisplay.signal.basis.observedAtstringWhen the observation was made (ISO 8601 date-time)(required)
items[].signalDisplay.signal.seasonWindowobjectInclusive season window on the Berlin calendar
items[].signalDisplay.signal.seasonWindow.fromstringFirst calendar day (YYYY-MM-DD)(required)
items[].signalDisplay.signal.seasonWindow.tostringLast calendar day (YYYY-MM-DD)(required)
items[].signalDisplay.signal.duestringDue calendar day in Berlin (YYYY-MM-DD)
items[].signalDisplay.signal.actionobjectValidated signal destination
items[].signalDisplay.signal.action.routeIdstringSignal route ID(required)
items[].signalDisplay.signal.action.paramsobjectRoute parameters keyed by name, with string values
items[].signalDisplay.needsReviewbooleanThe observation needs review; a past check does not prove a current all-clear(required)
items[].signalDisplay.statestringObservation state(required, signal | checked | inactive)
items[].signalDisplay.basisobjectOriginal observation; null when no observation is recorded(required, nullable)
items[].signalDisplay.basis.sourcestringSource of the observation(required)
items[].signalDisplay.basis.observedAtstringWhen the observation was made (ISO 8601 date-time)(required)
items[].createdAtstringCreated (ISO 8601 date-time)(required)
items[].updatedAtstringLast updated (ISO 8601 date-time)(required)
items[].varroaLevelstringCurrent assessment; null when stale or ended(required, nullable, urgent | attention | ok | neutral)
items[].signalStatusstringW3 signal status; null without an open signal(required, nullable, critical | attention | notRecorded | planned)
items[].varroaHistoryarrayAll readable confirmed measurements from now minus seven days through now, ascending by date and ID, only for the returned page(required)
items[].varroaHistory[].idstringInspection ID(required)
items[].varroaHistory[].datestringMeasurement date (ISO 8601 date-time)(required)
items[].varroaHistory[].valuenumberCanonical value; natural drop divided by counting days(required)
items[].varroaHistory[].unitstringRecorded unit; series must remain separate by unit and method(required, mites_per_day | mites_per_10g_bees | percent_infestation)
items[].varroaHistory[].methodstringCanonical diagnostic method(required)
items[].varroaHistory[].countDaysintegerCounting days(required, nullable)
totalintegerExact matching count before cursor(required)
hasMorebooleanAnother page exists(required)
nextCursorstringSigned continuation or null(required, nullable)
completebooleanTrue on final page (!hasMore)(required)
truncatedbooleanAlways 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"
GET/api/hives/summaryScope: read:hives

Read 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

NameTypeRequiredDescription
apiaryIdsstringNoUp to 50 comma-separated apiary IDs (each 1-128 URL-safe characters)
statusstringNoliving (active + inactive), active, resting (inactive), ended (dead/sold/lost/merged), all; collection default living, summary default all
qstringNoTrimmed colony name (case insensitive substring) or exact colony number; max 200 characters

Response Body

Colony summary

FieldTypeDescription
livingintegerLiving colonies(required)
attentionintegerLiving colonies with W3 critical or attention status(required)
openSignalsintegerLiving colonies with any open signal, including info; dashboard attentionHiveCount basis(required)
varroaUrgentintegerLiving colonies with a current non-stale urgent varroa assessment(required)
byStatusobjectCounts by stored status; absent statuses have no key(required)
byApiaryarrayStands with living colonies, ordered by ID(required)
byApiary[].apiaryIdstringStand ID(required)
byApiary[].apiaryNamestringStand name(required)
byApiary[].livingintegerLiving colonies(required)
byApiary[].attentionintegerCritical/attention colonies(required)
byQueenYeararrayBirth year descending, null last(required)
byQueenYear[].yearintegerBirth year, null without a recorded birth year(required, nullable)
byQueenYear[].countintegerLiving colonies(required)
completebooleanAlways true(required)
truncatedbooleanAlways 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"
GET/api/apiaries/summaryScope: read:apiaries

Read 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

FieldTypeDescription
apiariesarrayEvery live owned stand(required)
apiaries[].apiaryIdstringStand ID(required)
apiaries[].namestringStand name(required)
apiaries[].livingintegerLiving colonies(required)
apiaries[].attentionintegerCritical/attention colonies(required)
apiaries[].hasCoordinatesbooleanBoth latitude and longitude are set, including zero(required)
countintegerNumber of stands(required)
withCoordinatesintegerStands with both coordinates(required)
completebooleanAlways true(required)
truncatedbooleanAlways 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.

GET/api/apiariesScope: read:apiaries

List 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"}]

FieldTypeDescription
[].idstringApiary ID(required)
[].namestringApiary name(required)
[].addressstringStreet address(required, nullable)
[].imageUrlstringPhoto path(required, nullable)
[].latitudenumberGPS latitude(required, nullable)
[].longitudenumberGPS longitude(required, nullable)
[].elevationnumberHeight above sea level in metres. Looked up at Open-Meteo (open-meteo.com), which receives the latitude and longitude(required, nullable)
[].registrationNumberstringOfficial registration number(required, nullable)
[].notesstringFree-text notes(required, nullable)
[].typestringSite type(required, nullable, home | raps | akazie | linde | edelkastanie | tanne | other)
[].bloomPlantsarrayForage sources (empty when none)(required)
[].bloomPlants[]stringForage source(raps | akazie | linde | obstbluete | edelkastanie | tanne | loewenzahn | klee | phacelia | wildwiese | heide | sonnenblume | sommerlinde)
[].hiveLayoutobjectSite 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)
[].layoutBackgroundstringBackground of the site plan(required, nullable, photo | photo-only | plain)
[].occupiedFromstringMigratory site: first day of occupation; null = permanent site (ISO 8601 date-time)(required, nullable)
[].occupiedUntilstringMigratory site: last day of occupation (ISO 8601 date-time)(required, nullable)
[].hiveCountintegerActive (not deleted) hives of the apiary(required)
[].createdAtstringCreated (ISO 8601 date-time)(required)
[].updatedAtstringLast 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"
POST/api/apiariesScope: write:apiaries

Create an apiary

Creates a new apiary for the authenticated user.

Request Headers

NameTypeRequiredDescription
Idempotency-KeystringNoOptional 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.

FieldTypeDescription
namestringApiary name, 1-100 characters(required)e.g. Waldbienenstand
initialHivesobjectOptional 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.enabledbooleanWhether to create the requested colonies(required)
initialHives.namesarrayAt most 200 names; at least one is required when enabled is true. One colony per entry, numbered consecutively.(required)
initialHives.names[]stringOptional colony name, trimmed, max 100 characters; an empty string leaves the name unset
initialHives.hiveTypestringHive 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.firstNumberintegerNumber 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
addressstringStreet address, max 500 characters(nullable)e.g. Waldweg 12, 80331 München
imageUrlstringPhoto path from the apiary photo upload (`/api/photos/apiary-<id>.<ext>`), max 500 characters; an empty string or null removes it(nullable)
layoutBackgroundstringBackground of the site plan; null = automatic (photo if present, else plain)(nullable, photo | photo-only | plain)
latitudenumberGPS latitude (-90..90)(nullable)e.g. 48.137
longitudenumberGPS longitude (-180..180)(nullable)e.g. 11.576
registrationNumberstringOfficial registration number, max 100 characters(nullable)e.g. BY-123-456
notesstringFree-text notes (max 5000 chars)(nullable)
typestringSite type(nullable, home | raps | akazie | linde | edelkastanie | tanne | other)
bloomPlantsarrayForage sources, each from the list and at most 13 entries(default [])
bloomPlants[]stringForage source(raps | akazie | linde | obstbluete | edelkastanie | tanne | loewenzahn | klee | phacelia | wildwiese | heide | sonnenblume | sommerlinde)
occupiedFromstringMigratory site: first calendar day of occupation (YYYY-MM-DD); null = permanent site(nullable)e.g. 2027-04-12
occupiedUntilstringMigratory 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"}

FieldTypeDescription
idstringApiary ID(required)
userIdstringOwner ID(required)
namestringApiary name(required)
addressstringStreet address(required, nullable)
imageUrlstringPhoto path(required, nullable)
latitudenumberGPS latitude(required, nullable)
longitudenumberGPS longitude(required, nullable)
elevationnumberHeight above sea level in metres. Looked up at Open-Meteo (open-meteo.com), which receives the latitude and longitude(required, nullable)
registrationNumberstringOfficial registration number(required, nullable)
notesstringFree-text notes(required, nullable)
typestringSite type(required, nullable, home | raps | akazie | linde | edelkastanie | tanne | other)
bloomPlantsarrayForage sources (empty when none)(required)
bloomPlants[]stringForage source(raps | akazie | linde | obstbluete | edelkastanie | tanne | loewenzahn | klee | phacelia | wildwiese | heide | sonnenblume | sommerlinde)
hiveLayoutobjectSite 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)
layoutBackgroundstringBackground of the site plan(required, nullable, photo | photo-only | plain)
occupiedFromstringMigratory site: first day of occupation; null = permanent site (ISO 8601 date-time)(required, nullable)
occupiedUntilstringMigratory site: last day of occupation (ISO 8601 date-time)(required, nullable)
createdByMemberIdstringTeam member who created the record; null = owner(required, nullable)
deletedAtstringSoft-delete marker; always null here (ISO 8601 date-time)(required, nullable)
createdAtstringCreated (ISO 8601 date-time)(required)
updatedAtstringLast 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"]}'
GET/api/apiaries/[id]Scope: read:apiaries

Get a single apiary

Returns full details for one apiary including hive count.

Path Parameters

NameTypeRequiredDescription
idstringYesApiary 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"}

FieldTypeDescription
idstringApiary ID(required)
namestringApiary name(required)
addressstringStreet address(required, nullable)
imageUrlstringPhoto path(required, nullable)
latitudenumberGPS latitude(required, nullable)
longitudenumberGPS longitude(required, nullable)
elevationnumberHeight above sea level in metres. Looked up at Open-Meteo (open-meteo.com), which receives the latitude and longitude(required, nullable)
registrationNumberstringOfficial registration number(required, nullable)
notesstringFree-text notes(required, nullable)
typestringSite type(required, nullable, home | raps | akazie | linde | edelkastanie | tanne | other)
bloomPlantsarrayForage sources (empty when none)(required)
bloomPlants[]stringForage source(raps | akazie | linde | obstbluete | edelkastanie | tanne | loewenzahn | klee | phacelia | wildwiese | heide | sonnenblume | sommerlinde)
hiveLayoutobjectSite 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)
layoutBackgroundstringBackground of the site plan(required, nullable, photo | photo-only | plain)
occupiedFromstringMigratory site: first day of occupation; null = permanent site (ISO 8601 date-time)(required, nullable)
occupiedUntilstringMigratory site: last day of occupation (ISO 8601 date-time)(required, nullable)
hiveCountintegerActive (not deleted) hives of the apiary(required)
createdAtstringCreated (ISO 8601 date-time)(required)
updatedAtstringLast 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"
PUT/api/apiaries/[id]Scope: write:apiaries

Update an apiary

Partially updates an existing apiary. Only include the fields you want to change.

Path Parameters

NameTypeRequiredDescription
idstringYesApiary 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.

FieldTypeDescription
namestringApiary name, 1-100 characterse.g. Waldbienenstand
addressstringStreet address, max 500 characters(nullable)e.g. Waldweg 12, 80331 München
imageUrlstringPhoto path from the apiary photo upload (`/api/photos/apiary-<id>.<ext>`), max 500 characters; an empty string or null removes it(nullable)
layoutBackgroundstringBackground of the site plan; null = automatic (photo if present, else plain)(nullable, photo | photo-only | plain)
latitudenumberGPS latitude (-90..90)(nullable)e.g. 48.137
longitudenumberGPS longitude (-180..180)(nullable)e.g. 11.576
registrationNumberstringOfficial registration number, max 100 characters(nullable)e.g. BY-123-456
notesstringFree-text notes (max 5000 chars)(nullable)
typestringSite type(nullable, home | raps | akazie | linde | edelkastanie | tanne | other)
bloomPlantsarrayForage sources, each from the list and at most 13 entries
bloomPlants[]stringForage source(raps | akazie | linde | obstbluete | edelkastanie | tanne | loewenzahn | klee | phacelia | wildwiese | heide | sonnenblume | sommerlinde)
occupiedFromstringMigratory site: first calendar day of occupation (YYYY-MM-DD); null = permanent site(nullable)e.g. 2027-04-12
occupiedUntilstringMigratory site: last calendar day of occupation (YYYY-MM-DD)(nullable)e.g. 2027-05-24
expectedUpdatedAtstringOptional 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"}

FieldTypeDescription
idstringApiary ID(required)
userIdstringOwner ID(required)
namestringApiary name(required)
addressstringStreet address(required, nullable)
imageUrlstringPhoto path(required, nullable)
latitudenumberGPS latitude(required, nullable)
longitudenumberGPS longitude(required, nullable)
elevationnumberHeight above sea level in metres. Looked up at Open-Meteo (open-meteo.com), which receives the latitude and longitude(required, nullable)
registrationNumberstringOfficial registration number(required, nullable)
notesstringFree-text notes(required, nullable)
typestringSite type(required, nullable, home | raps | akazie | linde | edelkastanie | tanne | other)
bloomPlantsarrayForage sources (empty when none)(required)
bloomPlants[]stringForage source(raps | akazie | linde | obstbluete | edelkastanie | tanne | loewenzahn | klee | phacelia | wildwiese | heide | sonnenblume | sommerlinde)
hiveLayoutobjectSite 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)
layoutBackgroundstringBackground of the site plan(required, nullable, photo | photo-only | plain)
occupiedFromstringMigratory site: first day of occupation; null = permanent site (ISO 8601 date-time)(required, nullable)
occupiedUntilstringMigratory site: last day of occupation (ISO 8601 date-time)(required, nullable)
createdByMemberIdstringTeam member who created the record; null = owner(required, nullable)
deletedAtstringSoft-delete marker; always null here (ISO 8601 date-time)(required, nullable)
createdAtstringCreated (ISO 8601 date-time)(required)
updatedAtstringLast 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"}'
DELETE/api/apiaries/[id]Scope: write:apiaries

Delete an apiary

Soft-deletes an apiary. It will no longer appear in listings. All hives must be removed or transferred first.

Path Parameters

NameTypeRequiredDescription
idstringYesApiary 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"
GET/api/apiaries/[id]/statisticsScope: read:apiaries

Get 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

NameTypeRequiredDescription
idstringYesApiary 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}

FieldTypeDescription
apiaryIdstringApiary ID(required)
apiaryNamestringApiary name(required)
hiveCountintegerColonies of the apiary (all statuses, not deleted)(required)
activeHiveCountintegerColonies with status `active`(required)
totalHoneyKgnumberSum of all harvest net weights of the apiary in kg, rounded to two decimals(required)
avgHoneyPerHivenumberHoney per harvested colony in kg; 0 when it cannot be determined(required)
inspectionCountintegerConfirmed inspections(required)
lastInspectionDatestringDate of the latest confirmed inspection; null without one (ISO 8601 date-time)(required, nullable)
treatmentCountintegerCurrent treatments (corrections replace their original)(required)
avgColonyStrengthnumberMean 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"
GET/api/apiaries/[id]/forecastScope: read:apiaries

Get 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

NameTypeRequiredDescription
idstringYesApiary 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"]}

FieldTypeDescription
apiaryIdstringApiary ID(required)
estimatedKgnumberExpected 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)
confidencestringData 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)
basedOnYearsintegerNumber of years with harvests the estimate is based on(required)
trendstringDirection 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)
factorsarrayTranslation keys that explain the forecast (data basis, trend, weather), not prose(required)
factors[]stringTranslation 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.

GET/api/hivesScope: read:hives

List 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

NameTypeRequiredDescription
apiaryIdstringNoFilter by apiary
statusstringNoFilter by status (active, inactive, dead, lost, sold, merged); an unknown value matches nothing
searchstringNoFree-text search over the colony name and notes, and the colony number (exact match)
cursorstringNoPagination 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).
limitnumberNoItems 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}

FieldTypeDescription
itemsarrayThe hives on this page(required)
items[].idstringHive ID(required)
items[].numberintegerColony number(required)
items[].namestringDisplay name(required, nullable)
items[].hiveTypestringHive type(required, dadant | zander | zadant | dn | langstroth | warree | top_bar | layens | national_uk | bienenkiste | einraumbeute | trogbeute | flow_hive | miniplus | other)
items[].statusstringColony status(required, active | inactive | dead | lost | sold | merged)
items[].quarantineActivebooleanThe colony is under quarantine(required)
items[].apiaryIdstringApiary ID(required)
items[].apiaryNamestringApiary name(required)
items[].queenInfoobjectThe attached queen(required, nullable)
items[].queenInfo.idstringQueen ID(required)
items[].queenInfo.birthYearintegerYear of birth(required, nullable)
items[].queenInfo.markingColorstringMarking colour(required, nullable)
items[].lastInspectionDatestringDate 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[].lastColonyStrengthintegerColony strength (1-10) from the latest confirmed record that carries one; can be older than lastInspectionDate(required, nullable)
items[].lastColonyStrengthDatestringDate of the record behind lastColonyStrength (ISO 8601 date-time)(required, nullable)
items[].lastVarroaCountnumberLatest confirmed varroa value in the recorded lastVarroaUnit(required, nullable)
items[].lastVarroaMethodstringMethod of the latest varroa value(required, nullable)
items[].lastVarroaUnitstringRecorded unit of the latest readable varroa measurement(required, nullable, mites_per_day | mites_per_10g_bees | percent_infestation)
items[].lastVarroaDatestringDate of the latest varroa value (ISO 8601 date-time)(required, nullable)
items[].lastVarroaCountDaysintegerCounting days of the latest varroa value (natural drop); null for legacy rows(required, nullable)
items[].lastVarroaUnreadablenumberRaw 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[].varroaTreatmentsarrayNon-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[].treatmentTypestringTreatment 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[].startDatestringStart (ISO 8601 date-time)(required)
items[].varroaTreatments[].endDatestringEnd; null when not entered (ISO 8601 date-time)(required, nullable)
items[].varroaTreatments[].statusstringTreatment status(required, completed | active)
items[].queenCellTypestringQueen cell type of the latest inspection(required, nullable, none | swarm | supersedure | emergency)
items[].queenStatusstringStatus of the attached queen(required, nullable, active | replaced | dead | missing | swarmed | lost)
items[].queenStatusObservedAtstringWhen the attached queen's status was observed; null when no queen or observation is recorded (ISO 8601 date-time)(required, nullable)
items[].treatmentOverduebooleanA varroa treatment is due(required)
items[].hasUntrackedQueenbooleanThe colony has a queen that is not kept as a queen record(required)
items[].lastTreatmentDatestringEnd of the latest completed varroa treatment (ISO 8601 date-time)(required, nullable)
items[].inspectionCadenceobjectDays after which an inspection counts as overdue, per season(required)
items[].inspectionCadence.springintegerDays in spring(required)
items[].inspectionCadence.summerintegerDays in summer(required)
items[].inspectionCadence.autumnintegerDays in autumn(required)
items[].inspectionCadence.winterintegerDays in winter(required)
items[].colonyTypestringColony class(required, production | nucleus | queen_rearing)
items[].attentionobjectCompatibility triage of the colony; use signalDisplay for status presentation(required)
items[].attention.levelstringDeprecated: use signalDisplay. green = ok or inactive, yellow = attention, red = urgent, neutral = no automatic rating(required, green | yellow | red | neutral)
items[].attention.reasonsarrayAt most one reason; empty when everything is fine(required)
items[].attention.reasons[].keystringMessage key, resolved by the client against its message bundle(required)
items[].attention.reasons[].paramsobjectValues for the placeholders of the message (strings or numbers)
items[].signalDisplayobjectServer projection of the colony's signal and observation state(required)
items[].signalDisplay.signalobjectThe selected signal; null for a checked or inactive colony(required, nullable)
items[].signalDisplay.signal.levelstringSignal level(required, critical | today | week | info)
items[].signalDisplay.signal.causestringSignal 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.identitystringProducer discriminator within the cause and subjects
items[].signalDisplay.signal.subjectsarrayAffected colonies or apiaries(required)
items[].signalDisplay.signal.subjects[].kindstringSubject kind(required, hive | apiary)
items[].signalDisplay.signal.subjects[].idstringSubject ID(required)
items[].signalDisplay.signal.basisobjectOriginal observation; null when no observation is recorded(required, nullable)
items[].signalDisplay.signal.basis.sourcestringSource of the observation(required)
items[].signalDisplay.signal.basis.observedAtstringWhen the observation was made (ISO 8601 date-time)(required)
items[].signalDisplay.signal.seasonWindowobjectInclusive season window on the Berlin calendar
items[].signalDisplay.signal.seasonWindow.fromstringFirst calendar day (YYYY-MM-DD)(required)
items[].signalDisplay.signal.seasonWindow.tostringLast calendar day (YYYY-MM-DD)(required)
items[].signalDisplay.signal.duestringDue calendar day in Berlin (YYYY-MM-DD)
items[].signalDisplay.signal.actionobjectValidated signal destination
items[].signalDisplay.signal.action.routeIdstringSignal route ID(required)
items[].signalDisplay.signal.action.paramsobjectRoute parameters keyed by name, with string values
items[].signalDisplay.needsReviewbooleanThe observation needs review; a past check does not prove a current all-clear(required)
items[].signalDisplay.statestringObservation state(required, signal | checked | inactive)
items[].signalDisplay.basisobjectOriginal observation; null when no observation is recorded(required, nullable)
items[].signalDisplay.basis.sourcestringSource of the observation(required)
items[].signalDisplay.basis.observedAtstringWhen the observation was made (ISO 8601 date-time)(required)
items[].createdAtstringCreated (ISO 8601 date-time)(required)
items[].updatedAtstringLast updated (ISO 8601 date-time)(required)
nextCursorstringCursor for the next page, or null when there are no more results(required, nullable)
hasMorebooleanTrue when a further page is available(required)
[].idstringHive ID(required)
[].numberintegerColony number(required)
[].namestringDisplay name(required, nullable)
[].hiveTypestringHive type(required, dadant | zander | zadant | dn | langstroth | warree | top_bar | layens | national_uk | bienenkiste | einraumbeute | trogbeute | flow_hive | miniplus | other)
[].statusstringColony status(required, active | inactive | dead | lost | sold | merged)
[].quarantineActivebooleanThe colony is under quarantine(required)
[].apiaryIdstringApiary ID(required)
[].apiaryNamestringApiary name(required)
[].queenInfoobjectThe attached queen(required, nullable)
[].queenInfo.idstringQueen ID(required)
[].queenInfo.birthYearintegerYear of birth(required, nullable)
[].queenInfo.markingColorstringMarking colour(required, nullable)
[].lastInspectionDatestringDate of the latest confirmed inspection of the colony; a record with only a varroa measurement is no inspection (ISO 8601 date-time)(required, nullable)
[].lastColonyStrengthintegerColony strength (1-10) from the latest confirmed record that carries one; can be older than lastInspectionDate(required, nullable)
[].lastColonyStrengthDatestringDate of the record behind lastColonyStrength (ISO 8601 date-time)(required, nullable)
[].lastVarroaCountnumberLatest confirmed varroa value in the recorded lastVarroaUnit(required, nullable)
[].lastVarroaMethodstringMethod of the latest varroa value(required, nullable)
[].lastVarroaUnitstringRecorded unit of the latest readable varroa measurement(required, nullable, mites_per_day | mites_per_10g_bees | percent_infestation)
[].lastVarroaDatestringDate of the latest varroa value (ISO 8601 date-time)(required, nullable)
[].lastVarroaCountDaysintegerCounting days of the latest varroa value (natural drop); null for legacy rows(required, nullable)
[].lastVarroaUnreadablenumberRaw 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)
[].varroaTreatmentsarrayNon-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[].treatmentTypestringTreatment 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[].startDatestringStart (ISO 8601 date-time)(required)
[].varroaTreatments[].endDatestringEnd; null when not entered (ISO 8601 date-time)(required, nullable)
[].varroaTreatments[].statusstringTreatment status(required, completed | active)
[].queenCellTypestringQueen cell type of the latest inspection(required, nullable, none | swarm | supersedure | emergency)
[].queenStatusstringStatus of the attached queen(required, nullable, active | replaced | dead | missing | swarmed | lost)
[].queenStatusObservedAtstringWhen the attached queen's status was observed; null when no queen or observation is recorded (ISO 8601 date-time)(required, nullable)
[].treatmentOverduebooleanA varroa treatment is due(required)
[].hasUntrackedQueenbooleanThe colony has a queen that is not kept as a queen record(required)
[].lastTreatmentDatestringEnd of the latest completed varroa treatment (ISO 8601 date-time)(required, nullable)
[].inspectionCadenceobjectDays after which an inspection counts as overdue, per season(required)
[].inspectionCadence.springintegerDays in spring(required)
[].inspectionCadence.summerintegerDays in summer(required)
[].inspectionCadence.autumnintegerDays in autumn(required)
[].inspectionCadence.winterintegerDays in winter(required)
[].colonyTypestringColony class(required, production | nucleus | queen_rearing)
[].attentionobjectCompatibility triage of the colony; use signalDisplay for status presentation(required)
[].attention.levelstringDeprecated: use signalDisplay. green = ok or inactive, yellow = attention, red = urgent, neutral = no automatic rating(required, green | yellow | red | neutral)
[].attention.reasonsarrayAt most one reason; empty when everything is fine(required)
[].attention.reasons[].keystringMessage key, resolved by the client against its message bundle(required)
[].attention.reasons[].paramsobjectValues for the placeholders of the message (strings or numbers)
[].signalDisplayobjectServer projection of the colony's signal and observation state(required)
[].signalDisplay.signalobjectThe selected signal; null for a checked or inactive colony(required, nullable)
[].signalDisplay.signal.levelstringSignal level(required, critical | today | week | info)
[].signalDisplay.signal.causestringSignal 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.identitystringProducer discriminator within the cause and subjects
[].signalDisplay.signal.subjectsarrayAffected colonies or apiaries(required)
[].signalDisplay.signal.subjects[].kindstringSubject kind(required, hive | apiary)
[].signalDisplay.signal.subjects[].idstringSubject ID(required)
[].signalDisplay.signal.basisobjectOriginal observation; null when no observation is recorded(required, nullable)
[].signalDisplay.signal.basis.sourcestringSource of the observation(required)
[].signalDisplay.signal.basis.observedAtstringWhen the observation was made (ISO 8601 date-time)(required)
[].signalDisplay.signal.seasonWindowobjectInclusive season window on the Berlin calendar
[].signalDisplay.signal.seasonWindow.fromstringFirst calendar day (YYYY-MM-DD)(required)
[].signalDisplay.signal.seasonWindow.tostringLast calendar day (YYYY-MM-DD)(required)
[].signalDisplay.signal.duestringDue calendar day in Berlin (YYYY-MM-DD)
[].signalDisplay.signal.actionobjectValidated signal destination
[].signalDisplay.signal.action.routeIdstringSignal route ID(required)
[].signalDisplay.signal.action.paramsobjectRoute parameters keyed by name, with string values
[].signalDisplay.needsReviewbooleanThe observation needs review; a past check does not prove a current all-clear(required)
[].signalDisplay.statestringObservation state(required, signal | checked | inactive)
[].signalDisplay.basisobjectOriginal observation; null when no observation is recorded(required, nullable)
[].signalDisplay.basis.sourcestringSource of the observation(required)
[].signalDisplay.basis.observedAtstringWhen the observation was made (ISO 8601 date-time)(required)
[].createdAtstringCreated (ISO 8601 date-time)(required)
[].updatedAtstringLast 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"
POST/api/hivesScope: write:hives

Create a hive

Creates a new hive (colony) in the specified apiary.

Request Body

apiaryId, number and hiveType are required.

FieldTypeDescription
apiaryIdstringApiary to place the hive in(required)e.g. clx1abc
numberintegerHive number, positive integer up to 2147483647, unique per account(required)e.g. 7
namestringOptional display name, max 100 characters(nullable)e.g. Bienchen
hiveTypestringdadant | 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
originstringpurchase | swarm | split | gift | catch | other(nullable, purchase | swarm | split | gift | catch | other)
notesstringFree-text notes (max 5000 chars)(nullable)
colonyTypestringColony class that sets the varroa thresholds (production colony, nucleus, queen rearing)(default production, production | nucleus | queen_rearing)
hasUntrackedQueenbooleanThe 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"}

FieldTypeDescription
idstringHive ID(required)
userIdstringOwner ID(required, nullable)
apiaryIdstringApiary ID(required)
numberintegerHive number(required)
namestringDisplay name(required, nullable)
hiveTypestringHive type(required, dadant | zander | zadant | dn | langstroth | warree | top_bar | layens | national_uk | bienenkiste | einraumbeute | trogbeute | flow_hive | miniplus | other)
originstringOrigin of the colony(required, nullable, purchase | swarm | split | gift | catch | other)
statusstringColony status(required, active | inactive | dead | lost | sold | merged)
deathCausestringCause of death(required, nullable, varroa | starvation | queen_loss | pesticide | disease | unknown | other)
deathDatestringDate of death (ISO 8601 date-time)(required, nullable)
deathNotesstringNotes about the death(required, nullable)
sourceHiveIdstringHive ID of the colony this one was split from(required, nullable)
notesstringFree-text notes(required, nullable)
deletedAtstringSoft-delete marker; always null here (ISO 8601 date-time)(required, nullable)
quarantineActivebooleanThe colony is under quarantine(required)
quarantineReasonstringQuarantine reason(required, nullable)
quarantineStartedAtstringQuarantine start (ISO 8601 date-time)(required, nullable)
quarantineExpectedEndstringExpected quarantine end (ISO 8601 date-time)(required, nullable)
colonyTypestringColony class(required, production | nucleus | queen_rearing)
colonyTypeConfirmedAtstringWhen the colony class was confirmed; null if never (ISO 8601 date-time)(required, nullable)
hasUntrackedQueenbooleanThe colony has a queen that is not kept as a queen record(required)
createdByMemberIdstringTeam member who created the record; null = owner(required, nullable)
createdAtstringCreated (ISO 8601 date-time)(required)
updatedAtstringLast 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"}'
GET/api/hives/[id]Scope: read:hives

Get a single hive

Returns full details for one hive including queen and apiary info.

Path Parameters

NameTypeRequiredDescription
idstringYesHive 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"}

FieldTypeDescription
idstringHive ID(required)
numberintegerColony number(required)
namestringDisplay name(required, nullable)
hiveTypestringHive type(required, dadant | zander | zadant | dn | langstroth | warree | top_bar | layens | national_uk | bienenkiste | einraumbeute | trogbeute | flow_hive | miniplus | other)
originstringOrigin of the colony(required, nullable, purchase | swarm | split | gift | catch | other)
statusstringColony status(required, active | inactive | dead | lost | sold | merged)
deathCausestringCause of death(required, nullable, varroa | starvation | queen_loss | pesticide | disease | unknown | other)
deathDatestringDate of death (ISO 8601 date-time)(required, nullable)
deathNotesstringNotes about the death(required, nullable)
sourceHiveIdstringHive ID of the colony this one was split from(required, nullable)
notesstringFree-text notes(required, nullable)
apiaryIdstringApiary ID(required)
apiaryNamestringApiary name(required)
apiaryImageUrlstringPhoto path of the owned, live apiary(required, nullable)
apiaryHiveLayoutobjectSite 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)
apiaryPlanHivesarrayColonies of the apiary; empty when its plan is unavailable(required)
apiaryPlanHives[].idstringHive ID(required)
apiaryPlanHives[].numberintegerColony number(required)
apiaryPlanHives[].namestringDisplay name(required, nullable)
signalDisplayobjectServer projection of the colony's signal and observation state(required)
signalDisplay.signalobjectThe selected signal; null for a checked or inactive colony(required, nullable)
signalDisplay.signal.levelstringSignal level(required, critical | today | week | info)
signalDisplay.signal.causestringSignal 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.identitystringProducer discriminator within the cause and subjects
signalDisplay.signal.subjectsarrayAffected colonies or apiaries(required)
signalDisplay.signal.subjects[].kindstringSubject kind(required, hive | apiary)
signalDisplay.signal.subjects[].idstringSubject ID(required)
signalDisplay.signal.basisobjectOriginal observation; null when no observation is recorded(required, nullable)
signalDisplay.signal.basis.sourcestringSource of the observation(required)
signalDisplay.signal.basis.observedAtstringWhen the observation was made (ISO 8601 date-time)(required)
signalDisplay.signal.seasonWindowobjectInclusive season window on the Berlin calendar
signalDisplay.signal.seasonWindow.fromstringFirst calendar day (YYYY-MM-DD)(required)
signalDisplay.signal.seasonWindow.tostringLast calendar day (YYYY-MM-DD)(required)
signalDisplay.signal.duestringDue calendar day in Berlin (YYYY-MM-DD)
signalDisplay.signal.actionobjectValidated signal destination
signalDisplay.signal.action.routeIdstringSignal route ID(required)
signalDisplay.signal.action.paramsobjectRoute parameters keyed by name, with string values
signalDisplay.needsReviewbooleanThe observation needs review; a past check does not prove a current all-clear(required)
signalDisplay.statestringObservation state(required, signal | checked | inactive)
signalDisplay.basisobjectOriginal observation; null when no observation is recorded(required, nullable)
signalDisplay.basis.sourcestringSource of the observation(required)
signalDisplay.basis.observedAtstringWhen the observation was made (ISO 8601 date-time)(required)
latestVarroaobjectLatest confirmed, readable measurement with its recorded unit(required, nullable)
latestVarroa.valuenumberResolved measurement value; natural drop is normalized per day(required)
latestVarroa.methodstringDiagnostic method(required, liebefeld_natural_drop | dlib_powdersugar | dlib_alcohol_wash | brood_check | flotation)
latestVarroa.unitstringRecorded measurement unit(required, mites_per_day | mites_per_10g_bees | percent_infestation)
latestVarroa.datestringMeasurement date (ISO 8601 date-time)(required)
latestVarroa.countDaysintegerCounting days; null when not applicable(required, nullable)
varroaTreatmentsarrayNon-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[].treatmentTypestringTreatment 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[].startDatestringStart (ISO 8601 date-time)(required)
varroaTreatments[].endDatestringEnd; null when not entered (ISO 8601 date-time)(required, nullable)
varroaTreatments[].statusstringTreatment status(required, completed | active)
queenobjectThe attached queen (not deleted)(required, nullable)
queen.idstringQueen ID(required)
queen.racestringRace(required, nullable)
queen.birthYearintegerYear of birth(required, nullable)
queen.markingColorstringMarking colour(required, nullable)
queen.matingStatusstringMating status(required, nullable)
queen.statusstringQueen status(required, active | replaced | dead | missing | swarmed | lost)
queen.statusObservedAtstringWhen the queen's status was observed; null for legacy records without an observation (ISO 8601 date-time)(required, nullable)
hasUntrackedQueenbooleanThe colony has a queen that is not kept as a queen record(required)
lastInspectionobjectThe 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.idstringInspection ID(required)
lastInspection.datestringInspection date (ISO 8601 date-time)(required)
lastInspection.typestringInspection type(required, standard | quick)
lastInspection.colonyStrengthintegerColony strength (1-10) of this inspection(required, nullable)
lastInspection.broodFramesintegerFrames with brood of this inspection(required, nullable)
lastInspection.openBroodFramesintegerFrames with open brood(required, nullable)
lastInspection.cappedBroodFramesintegerFrames with capped brood(required, nullable)
lastInspection.broodPatternstringBrood pattern(required, nullable)
lastInspection.pollenStoresstringPollen stores(required, nullable)
lastInspection.honeyStoresstringRecorded food stores(required, nullable, low | medium | high)
lastInspection.temperamentstringRecorded temperament(required, nullable, calm | nervous | aggressive)
lastInspection.queenSeenbooleanWhether the queen was seen(required, nullable)
lastInspection.queenCellTypestringQueen cell type(required, nullable)
lastInspection.afbClearedbooleanAmerican foulbrood suspicion ruled out by a vet(required, nullable)
latestColonyStrengthobjectColony strength (1-10) from the latest confirmed record that carries one(required, nullable)
latestColonyStrength.valueintegerRecorded value(required)
latestColonyStrength.datestringDate of the record; never re-dated (ISO 8601 date-time)(required)
latestColonyStrength.inspectionIdstringInspection ID of the record(required)
latestBroodFramesobjectFrames with brood from the latest confirmed record that carries them(required, nullable)
latestBroodFrames.valueintegerRecorded value(required)
latestBroodFrames.datestringDate of the record; never re-dated (ISO 8601 date-time)(required)
latestBroodFrames.inspectionIdstringInspection ID of the record(required)
attentionobjectCompatibility triage of the colony; use signalDisplay for status presentation(required)
attention.levelstringDeprecated: use signalDisplay. green = ok or inactive, yellow = attention, red = urgent, neutral = no automatic rating(required, green | yellow | red | neutral)
attention.reasonsarrayAt most one reason; empty when everything is fine(required)
attention.reasons[].keystringMessage key, resolved by the client against its message bundle(required)
attention.reasons[].paramsobjectValues for the placeholders of the message (strings or numbers)
quarantineActivebooleanThe colony is under quarantine(required)
quarantineReasonstringQuarantine reason(required, nullable)
quarantineStartedAtstringQuarantine start (ISO 8601 date-time)(required, nullable)
quarantineExpectedEndstringExpected quarantine end (ISO 8601 date-time)(required, nullable)
colonyTypestringColony class(required, production | nucleus | queen_rearing)
colonyTypeConfirmedAtstringWhen the colony class was confirmed; null if never (ISO 8601 date-time)(required, nullable)
createdAtstringCreated (ISO 8601 date-time)(required)
updatedAtstringLast 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"
PUT/api/hives/[id]Scope: write:hives

Update a hive

Partially updates hive details.

Path Parameters

NameTypeRequiredDescription
idstringYesHive 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.

FieldTypeDescription
apiaryIdstringApiary to move the hive to (records a move)e.g. clx1abc
numberintegerHive number, positive integer up to 2147483647, unique per accounte.g. 7
namestringOptional display name, max 100 characters(nullable)e.g. Bienchen
hiveTypestringdadant | 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
originstringpurchase | swarm | split | gift | catch | other(nullable, purchase | swarm | split | gift | catch | other)
notesstringFree-text notes (max 5000 chars)(nullable)
colonyTypestringColony class that sets the varroa thresholds (production colony, nucleus, queen rearing)(production | nucleus | queen_rearing)
hasUntrackedQueenbooleanThe 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"}

FieldTypeDescription
idstringHive ID(required)
userIdstringOwner ID(required, nullable)
apiaryIdstringApiary ID(required)
numberintegerHive number(required)
namestringDisplay name(required, nullable)
hiveTypestringHive type(required, dadant | zander | zadant | dn | langstroth | warree | top_bar | layens | national_uk | bienenkiste | einraumbeute | trogbeute | flow_hive | miniplus | other)
originstringOrigin of the colony(required, nullable, purchase | swarm | split | gift | catch | other)
statusstringColony status(required, active | inactive | dead | lost | sold | merged)
deathCausestringCause of death(required, nullable, varroa | starvation | queen_loss | pesticide | disease | unknown | other)
deathDatestringDate of death (ISO 8601 date-time)(required, nullable)
deathNotesstringNotes about the death(required, nullable)
sourceHiveIdstringHive ID of the colony this one was split from(required, nullable)
notesstringFree-text notes(required, nullable)
deletedAtstringSoft-delete marker; always null here (ISO 8601 date-time)(required, nullable)
quarantineActivebooleanThe colony is under quarantine(required)
quarantineReasonstringQuarantine reason(required, nullable)
quarantineStartedAtstringQuarantine start (ISO 8601 date-time)(required, nullable)
quarantineExpectedEndstringExpected quarantine end (ISO 8601 date-time)(required, nullable)
colonyTypestringColony class(required, production | nucleus | queen_rearing)
colonyTypeConfirmedAtstringWhen the colony class was confirmed; null if never (ISO 8601 date-time)(required, nullable)
hasUntrackedQueenbooleanThe colony has a queen that is not kept as a queen record(required)
createdByMemberIdstringTeam member who created the record; null = owner(required, nullable)
createdAtstringCreated (ISO 8601 date-time)(required)
updatedAtstringLast 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"}'
DELETE/api/hives/[id]Scope: write:hives

Delete a hive

Soft-deletes a hive. It will no longer appear in listings.

Path Parameters

NameTypeRequiredDescription
idstringYesHive 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"
GET/api/hives/[id]/healthScope: read:hives

Get 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

NameTypeRequiredDescription
idstringYesHive 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"]}

FieldTypeDescription
scoreintegerWeighted total, 0-100(required)
levelstringClass of the score(required, critical | warning | good | excellent)
factorsarrayThe weighted factors: varroa (treatment recency), varroaCount, queen, feeding, inspection, colonyStrength, swarmRisk, weather(required)
factors[].namestringFactor name: varroa (treatment recency), varroaCount, queen, feeding, inspection, colonyStrength, swarmRisk or weather(required)
factors[].scorenumberPoints of this factor, 0-100(required)
factors[].weightnumberWeight of the factor, 0-1(required)
factors[].detailsobject | stringWhat the factor found, as a translation key with optional parameters(required)
factors[].details.keystringMessage key, resolved by the client against its message bundle(required)
factors[].details.paramsobjectValues for the placeholders of the message (strings or numbers)
factors[].observedAtstringOriginal strength observation date; present only for colonyStrength with a recorded value (ISO 8601 date-time)
recommendationsarrayKeys of the recommendations derived from the factors that score below 60(required)
recommendations[]stringRecommendation 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"
POST/api/hives/[id]/splitScope: write:hives

Split a hive (Ableger)

Creates a new colony from an existing hive by splitting it.

Path Parameters

NameTypeRequiredDescription
idstringYesSource hive ID

Request Body

The new colony joins the apiary of the source colony; its origin is set to `split`.

FieldTypeDescription
numberintegerHive number for the new colony, positive integer, unique per account(required)e.g. 8
namestringOptional display name for the new colony, max 100 characters(nullable)
hiveTypestringdadant | 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
notesstringNotes 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"}

FieldTypeDescription
idstringHive ID(required)
userIdstringOwner ID(required, nullable)
apiaryIdstringApiary ID(required)
numberintegerHive number(required)
namestringDisplay name(required, nullable)
hiveTypestringHive type(required, dadant | zander | zadant | dn | langstroth | warree | top_bar | layens | national_uk | bienenkiste | einraumbeute | trogbeute | flow_hive | miniplus | other)
originstringOrigin of the colony(required, nullable, purchase | swarm | split | gift | catch | other)
statusstringColony status(required, active | inactive | dead | lost | sold | merged)
deathCausestringCause of death(required, nullable, varroa | starvation | queen_loss | pesticide | disease | unknown | other)
deathDatestringDate of death (ISO 8601 date-time)(required, nullable)
deathNotesstringNotes about the death(required, nullable)
sourceHiveIdstringHive ID of the colony this one was split from(required, nullable)
notesstringFree-text notes(required, nullable)
deletedAtstringSoft-delete marker; always null here (ISO 8601 date-time)(required, nullable)
quarantineActivebooleanThe colony is under quarantine(required)
quarantineReasonstringQuarantine reason(required, nullable)
quarantineStartedAtstringQuarantine start (ISO 8601 date-time)(required, nullable)
quarantineExpectedEndstringExpected quarantine end (ISO 8601 date-time)(required, nullable)
colonyTypestringColony class(required, production | nucleus | queen_rearing)
colonyTypeConfirmedAtstringWhen the colony class was confirmed; null if never (ISO 8601 date-time)(required, nullable)
hasUntrackedQueenbooleanThe colony has a queen that is not kept as a queen record(required)
createdByMemberIdstringTeam member who created the record; null = owner(required, nullable)
createdAtstringCreated (ISO 8601 date-time)(required)
updatedAtstringLast 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"}'
POST/api/hives/[id]/transferScope: write:hives

Transfer hive to another apiary

Moves a hive from its current apiary to a different one. Records the movement.

Path Parameters

NameTypeRequiredDescription
idstringYesHive to transfer ID

Request Headers

NameTypeRequiredDescription
Idempotency-KeystringNoOptional 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

FieldTypeDescription
toApiaryIdstringTarget apiary ID(required)e.g. clx1xyz
notesstringNotes 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"}

FieldTypeDescription
idstringHive ID(required)
userIdstringOwner ID(required, nullable)
apiaryIdstringApiary ID(required)
numberintegerHive number(required)
namestringDisplay name(required, nullable)
hiveTypestringHive type(required, dadant | zander | zadant | dn | langstroth | warree | top_bar | layens | national_uk | bienenkiste | einraumbeute | trogbeute | flow_hive | miniplus | other)
originstringOrigin of the colony(required, nullable, purchase | swarm | split | gift | catch | other)
statusstringColony status(required, active | inactive | dead | lost | sold | merged)
deathCausestringCause of death(required, nullable, varroa | starvation | queen_loss | pesticide | disease | unknown | other)
deathDatestringDate of death (ISO 8601 date-time)(required, nullable)
deathNotesstringNotes about the death(required, nullable)
sourceHiveIdstringHive ID of the colony this one was split from(required, nullable)
notesstringFree-text notes(required, nullable)
deletedAtstringSoft-delete marker; always null here (ISO 8601 date-time)(required, nullable)
quarantineActivebooleanThe colony is under quarantine(required)
quarantineReasonstringQuarantine reason(required, nullable)
quarantineStartedAtstringQuarantine start (ISO 8601 date-time)(required, nullable)
quarantineExpectedEndstringExpected quarantine end (ISO 8601 date-time)(required, nullable)
colonyTypestringColony class(required, production | nucleus | queen_rearing)
colonyTypeConfirmedAtstringWhen the colony class was confirmed; null if never (ISO 8601 date-time)(required, nullable)
hasUntrackedQueenbooleanThe colony has a queen that is not kept as a queen record(required)
createdByMemberIdstringTeam member who created the record; null = owner(required, nullable)
createdAtstringCreated (ISO 8601 date-time)(required)
updatedAtstringLast 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"}'
POST/api/hives/[id]/mark-deadScope: write:hives

Mark a hive as dead

Marks a colony as dead with optional cause, date, and notes. Sets the hive status to 'dead'.

Path Parameters

NameTypeRequiredDescription
idstringYesHive 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.

FieldTypeDescription
deathCausestringCause of death(nullable, varroa | starvation | queen_loss | pesticide | disease | unknown | other)
deathDatestringDate of death (ISO date, not in the future)(nullable)e.g. 2025-12-15
deathNotesstringNotes 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":[]}}

FieldTypeDescription
idstringHive ID(required)
userIdstringOwner ID(required, nullable)
apiaryIdstringApiary ID(required)
numberintegerHive number(required)
namestringDisplay name(required, nullable)
hiveTypestringHive type(required, dadant | zander | zadant | dn | langstroth | warree | top_bar | layens | national_uk | bienenkiste | einraumbeute | trogbeute | flow_hive | miniplus | other)
originstringOrigin of the colony(required, nullable, purchase | swarm | split | gift | catch | other)
statusstringColony status(required, active | inactive | dead | lost | sold | merged)
deathCausestringCause of death(required, nullable, varroa | starvation | queen_loss | pesticide | disease | unknown | other)
deathDatestringDate of death (ISO 8601 date-time)(required, nullable)
deathNotesstringNotes about the death(required, nullable)
sourceHiveIdstringHive ID of the colony this one was split from(required, nullable)
notesstringFree-text notes(required, nullable)
deletedAtstringSoft-delete marker; always null here (ISO 8601 date-time)(required, nullable)
quarantineActivebooleanThe colony is under quarantine(required)
quarantineReasonstringQuarantine reason(required, nullable)
quarantineStartedAtstringQuarantine start (ISO 8601 date-time)(required, nullable)
quarantineExpectedEndstringExpected quarantine end (ISO 8601 date-time)(required, nullable)
colonyTypestringColony class(required, production | nucleus | queen_rearing)
colonyTypeConfirmedAtstringWhen the colony class was confirmed; null if never (ISO 8601 date-time)(required, nullable)
hasUntrackedQueenbooleanThe colony has a queen that is not kept as a queen record(required)
createdByMemberIdstringTeam member who created the record; null = owner(required, nullable)
createdAtstringCreated (ISO 8601 date-time)(required)
updatedAtstringLast updated (ISO 8601 date-time)(required)
treatmentClosureobjectOpen treatments of the colony that were closed(required)
treatmentClosure.cancelledIdsarrayPlanned treatments that were cancelled(required)
treatmentClosure.cancelledIds[]stringTreatment ID
treatmentClosure.completedIdsarrayActive treatments that were completed and locked(required)
treatmentClosure.completedIds[]stringTreatment ID
treatmentClosure.incompleteActiveIdsarrayActive treatments that could not be completed (required details missing) and stay active(required)
treatmentClosure.incompleteActiveIds[]stringTreatment 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"}'
GET/api/hives/health-overviewScope: read:hives

Get 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}]

FieldTypeDescription
[].hiveIdstringHive ID(required)
[].hiveNamestringColony name; null when it has none(required, nullable)
[].hiveNumberintegerColony number(required)
[].apiaryNamestringApiary name(required)
[].scoreintegerHealth score, 0-100(required)
[].levelstringClass of the health score(required, critical | warning | good | excellent)
[].topFactorobject | stringExplanation of the lowest-scoring factor as a translation key with optional parameters(required)
[].topFactor.keystringMessage key, resolved by the client against its message bundle(required)
[].topFactor.paramsobjectValues for the placeholders of the message (strings or numbers)
[].swarmRiskLevelstringClass of the swarm risk(required, low | medium | high | critical)
[].swarmRiskScoreintegerSwarm 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"
GET/api/intelligence/swarm-riskScope: any read:* scope

Get 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"}]}]

FieldTypeDescription
[].hiveIdstringHive ID(required)
[].hiveNamestringColony name; a colony without a name appears as `#<number>`(required)
[].hiveNumberintegerColony number(required)
[].apiaryNamestringApiary name(required)
[].scoreintegerSwarm risk score, 0-100 (0 = no risk)(required)
[].levelstringClass of the score (the vocabulary of the health levels)(required, critical | warning | good | excellent)
[].trendstringDirection of the colony strength(required, rising | stable | declining | unknown)
[].factorsarrayThe weighted factors(required)
[].factors[].namestringFactor name: queenCells, colonyStrength, honeyStores, temperament, season, strengthTrend, iotWeight, weightSlope or queenAge(required)
[].factors[].scoreintegerPoints of this factor(required)
[].factors[].weightnumberWeight of the factor(required)
[].factors[].descriptionobjectWhat the factor found, as a translation key with optional parameters(required)
[].factors[].description.keystringMessage key, resolved by the client against its message bundle(required)
[].factors[].description.paramsobjectValues for the placeholders of the message (strings or numbers)
[].recommendationsarrayRecommended actions(required)
[].recommendations[].prioritystringUrgency(required, high | medium | low)
[].recommendations[].categorystringCategory, for example `swarm`(required)
[].recommendations[].titleobjectTitle as a translation key(required)
[].recommendations[].title.keystringMessage key, resolved by the client against its message bundle(required)
[].recommendations[].title.paramsobjectValues for the placeholders of the message (strings or numbers)
[].recommendations[].descriptionobjectText as a translation key(required)
[].recommendations[].description.keystringMessage key, resolved by the client against its message bundle(required)
[].recommendations[].description.paramsobjectValues for the placeholders of the message (strings or numbers)
[].recommendations[].actionUrlstringDeep link into the app
[].recommendations[].dueDatestringDue date (ISO string)
[].comparedToCommunitynumberDifference to the community average; currently always null(required, nullable)
[].riskFactorsarrayReasons that raised the score(required)
[].riskFactors[].keystringMessage key, resolved by the client against its message bundle(required)
[].riskFactors[].paramsobjectValues 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.

GET/api/queensScope: read:queens

List all queens

Returns all queens. Supports filtering by hive and status.

Query Parameters

NameTypeRequiredDescription
hiveIdstringNoFilter by assigned hive
statusstringNoFilter by status (active | replaced | dead | missing | swarmed | lost)
searchstringNoFree-text search over name, race, breeder, notes, hive name and birth year
cursorstringNoPagination 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).
limitnumberNoItems 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}

FieldTypeDescription
itemsarrayThe queens on this page(required)
items[].idstringQueen ID(required)
items[].namestringFree-text name(required, nullable)
items[].racestringRace(required, nullable, carnica | buckfast | ligustica | mellifera | caucasica | cerana | iberica | russian | saskatraz | other)
items[].birthYearintegerYear of birth(required, nullable)
items[].birthDatestringExact hatching date (ISO 8601 date-time)(required, nullable)
items[].markedAtstringDate the queen was marked (ISO 8601 date-time)(required, nullable)
items[].deathDatestringDate of death (ISO 8601 date-time)(required, nullable)
items[].replacedAtstringLatest replacement calendar day (UTC midnight); null when not recorded (ISO 8601 date-time)(required, nullable)
items[].replacedReasonstringLatest replacement reason; not duplicated into the free-text notes(required, nullable, alter | sanftmut | wabensitz | schwarm | leistung | drohnen | sonst)
items[].markingColorstringMarking colour(required, nullable)
items[].originstringOrigin(required, nullable, purchase | own_breeding | swarm | gift | other)
items[].breederstringBreeder(required, nullable)
items[].breedingLinestringBreeding line(required, nullable)
items[].parentagestringParentage(required, nullable)
items[].matingStatusstringMating status(required, nullable, mated | naturally_mated | instrumentally_inseminated | unmated | drone_layer)
items[].statusstringQueen status(required, active | replaced | dead | missing | swarmed | lost)
items[].statusObservedAtstringWhen the queen's status was observed; null for legacy records without an observation (ISO 8601 date-time)(required, nullable)
items[].ratingintegerOverall rating derived from the trait ratings(required, nullable)
items[].hiveIdstringHive the queen is attached to (not deleted)(required, nullable)
items[].hiveNamestringName of that hive(required, nullable)
items[].hiveNumberintegerNumber of that hive(required, nullable)
items[].notesstringFree-text notes(required, nullable)
items[].gentlenessintegerGentleness, rating 1-5(required, nullable)
items[].calmOnCombintegerCalmness on the comb, rating 1-5(required, nullable)
items[].swarmTendencyintegerSwarm tendency, rating 1-5(required, nullable)
items[].honeyProductionintegerHoney production, rating 1-5(required, nullable)
items[].queenBroodPatternintegerBrood pattern, rating 1-5(required, nullable)
items[].winterHardinessintegerWinter hardiness, rating 1-5(required, nullable)
items[].springBuildUpintegerSpring build-up, rating 1-5(required, nullable)
items[].hygienicBehaviorintegerHygienic behaviour, rating 1-5(required, nullable)
items[].combConstructionintegerComb construction, rating 1-5(required, nullable)
items[].motherQueenIdstringID of the mother queen(required, nullable)
items[].motherQueenLabelstringDisplay label of the mother queen (name, race, birth year)(required, nullable)
items[].motherQueenobjectThe mother queen (not deleted)(required, nullable)
items[].motherQueen.idstringQueen ID(required)
items[].motherQueen.namestringFree-text name(required, nullable)
items[].motherQueen.racestringRace(required, nullable)
items[].motherQueen.birthYearintegerYear of birth(required, nullable)
items[].daughterCountintegerDaughters of this queen (not deleted)(required)
items[].createdAtstringCreated (ISO 8601 date-time)(required)
items[].updatedAtstringLast updated (ISO 8601 date-time)(required)
nextCursorstringCursor for the next page, or null when there are no more results(required, nullable)
hasMorebooleanTrue when a further page is available(required)
[].idstringQueen ID(required)
[].namestringFree-text name(required, nullable)
[].racestringRace(required, nullable, carnica | buckfast | ligustica | mellifera | caucasica | cerana | iberica | russian | saskatraz | other)
[].birthYearintegerYear of birth(required, nullable)
[].birthDatestringExact hatching date (ISO 8601 date-time)(required, nullable)
[].markedAtstringDate the queen was marked (ISO 8601 date-time)(required, nullable)
[].deathDatestringDate of death (ISO 8601 date-time)(required, nullable)
[].replacedAtstringLatest replacement calendar day (UTC midnight); null when not recorded (ISO 8601 date-time)(required, nullable)
[].replacedReasonstringLatest replacement reason; not duplicated into the free-text notes(required, nullable, alter | sanftmut | wabensitz | schwarm | leistung | drohnen | sonst)
[].markingColorstringMarking colour(required, nullable)
[].originstringOrigin(required, nullable, purchase | own_breeding | swarm | gift | other)
[].breederstringBreeder(required, nullable)
[].breedingLinestringBreeding line(required, nullable)
[].parentagestringParentage(required, nullable)
[].matingStatusstringMating status(required, nullable, mated | naturally_mated | instrumentally_inseminated | unmated | drone_layer)
[].statusstringQueen status(required, active | replaced | dead | missing | swarmed | lost)
[].statusObservedAtstringWhen the queen's status was observed; null for legacy records without an observation (ISO 8601 date-time)(required, nullable)
[].ratingintegerOverall rating derived from the trait ratings(required, nullable)
[].hiveIdstringHive the queen is attached to (not deleted)(required, nullable)
[].hiveNamestringName of that hive(required, nullable)
[].hiveNumberintegerNumber of that hive(required, nullable)
[].notesstringFree-text notes(required, nullable)
[].gentlenessintegerGentleness, rating 1-5(required, nullable)
[].calmOnCombintegerCalmness on the comb, rating 1-5(required, nullable)
[].swarmTendencyintegerSwarm tendency, rating 1-5(required, nullable)
[].honeyProductionintegerHoney production, rating 1-5(required, nullable)
[].queenBroodPatternintegerBrood pattern, rating 1-5(required, nullable)
[].winterHardinessintegerWinter hardiness, rating 1-5(required, nullable)
[].springBuildUpintegerSpring build-up, rating 1-5(required, nullable)
[].hygienicBehaviorintegerHygienic behaviour, rating 1-5(required, nullable)
[].combConstructionintegerComb construction, rating 1-5(required, nullable)
[].motherQueenIdstringID of the mother queen(required, nullable)
[].motherQueenLabelstringDisplay label of the mother queen (name, race, birth year)(required, nullable)
[].motherQueenobjectThe mother queen (not deleted)(required, nullable)
[].motherQueen.idstringQueen ID(required)
[].motherQueen.namestringFree-text name(required, nullable)
[].motherQueen.racestringRace(required, nullable)
[].motherQueen.birthYearintegerYear of birth(required, nullable)
[].daughterCountintegerDaughters of this queen (not deleted)(required)
[].createdAtstringCreated (ISO 8601 date-time)(required)
[].updatedAtstringLast 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"
POST/api/queensScope: write:queens

Create 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`.

FieldTypeDescription
hiveIdstringAssign to this hive (optional); ignored for an inactive status(nullable)
expectedUpdatedAtstringThe `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`
racestringRace(nullable, carnica | buckfast | ligustica | mellifera | caucasica | cerana | iberica | russian | saskatraz | other)e.g. carnica
birthYearintegerYear of birth, 2000 up to the current year(nullable)e.g. 2025
birthDatestringExact hatching date (ISO), between 2000 and today; takes precedence over `birthYear`(nullable)
markedAtstringDate the queen was marked (ISO, not in the future, not before the birth)(nullable)
deathDatestringDate of death (ISO, not in the future, not before the birth)(nullable)
markingColorstringMarking 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
originstringpurchase | own_breeding | swarm | gift | other(nullable, purchase | own_breeding | swarm | gift | other)
namestringFree-text name, max 200 characters(nullable)
breederstringBreeder name, max 200 characters(nullable)e.g. Belegstelle Hochalm
breedingLinestringBreeding line, max 200 characters(nullable)
parentagestringParentage, max 200 characters(nullable)
matingStatusstringMating status(nullable, mated | naturally_mated | instrumentally_inseminated | unmated | drone_layer)
statusstringactive | replaced | dead | missing | swarmed | lost(default active, active | replaced | dead | missing | swarmed | lost)
statusObservedAtstringWhen 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
ratingintegerAccepted for compatibility but ignored: the stored rating is derived from the trait ratings(nullable)
notesstringFree-text notes (max 5000 chars)(nullable)
gentlenessintegerGentleness, rating 1-5(nullable)
calmOnCombintegerCalmness on the comb, rating 1-5(nullable)
swarmTendencyintegerSwarm tendency, rating 1-5(nullable)
honeyProductionintegerHoney production, rating 1-5(nullable)
queenBroodPatternintegerBrood pattern, rating 1-5(nullable)
winterHardinessintegerWinter hardiness, rating 1-5(nullable)
springBuildUpintegerSpring build-up, rating 1-5(nullable)
hygienicBehaviorintegerHygienic behaviour, rating 1-5(nullable)
combConstructionintegerComb construction, rating 1-5(nullable)
motherQueenIdstringID of the mother queen for lineage tracking(nullable)
replacesQueenIdstringQueen of the same hive to replace atomically (requires `hiveId` and an active successor). Only used on create(nullable)
replacedAtstringReplacement calendar day (ISO YYYY-MM-DD, not in the future or before the predecessor's birth); defaults to today in Europe/Berlin. Requires `replacesQueenId`
replacedReasonstringOptional reason stored on the predecessor; the display reads this field beside her notes. Requires `replacesQueenId`(nullable, alter | sanftmut | wabensitz | schwarm | leistung | drohnen | sonst)
replacementDispositionstringPredecessor: replaced and detached (default when replacing), moved and active in another hive, or dead with deathDate set to replacedAt. Requires `replacesQueenId`(replaced | moved | dead)
replacementHiveIdstringOwned, 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"}

FieldTypeDescription
idstringQueen ID(required)
namestringFree-text name(required, nullable)
racestringRace(required, nullable, carnica | buckfast | ligustica | mellifera | caucasica | cerana | iberica | russian | saskatraz | other)
birthYearintegerYear of birth(required, nullable)
birthDatestringExact hatching date (ISO 8601 date-time)(required, nullable)
markedAtstringDate the queen was marked (ISO 8601 date-time)(required, nullable)
deathDatestringDate of death (ISO 8601 date-time)(required, nullable)
replacedAtstringLatest replacement calendar day (UTC midnight); null when not recorded (ISO 8601 date-time)(required, nullable)
replacedReasonstringLatest replacement reason; not duplicated into the free-text notes(required, nullable, alter | sanftmut | wabensitz | schwarm | leistung | drohnen | sonst)
markingColorstringMarking colour(required, nullable)
originstringOrigin(required, nullable, purchase | own_breeding | swarm | gift | other)
breederstringBreeder(required, nullable)
breedingLinestringBreeding line(required, nullable)
parentagestringParentage(required, nullable)
matingStatusstringMating status(required, nullable, mated | naturally_mated | instrumentally_inseminated | unmated | drone_layer)
statusstringQueen status(required, active | replaced | dead | missing | swarmed | lost)
statusObservedAtstringWhen the queen's status was observed; null for legacy records without an observation (ISO 8601 date-time)(required, nullable)
ratingintegerOverall rating derived from the trait ratings(required, nullable)
hiveIdstringHive the queen is attached to (not deleted)(required, nullable)
hiveNamestringName of that hive(required, nullable)
hiveNumberintegerNumber of that hive(required, nullable)
notesstringFree-text notes(required, nullable)
gentlenessintegerGentleness, rating 1-5(required, nullable)
calmOnCombintegerCalmness on the comb, rating 1-5(required, nullable)
swarmTendencyintegerSwarm tendency, rating 1-5(required, nullable)
honeyProductionintegerHoney production, rating 1-5(required, nullable)
queenBroodPatternintegerBrood pattern, rating 1-5(required, nullable)
winterHardinessintegerWinter hardiness, rating 1-5(required, nullable)
springBuildUpintegerSpring build-up, rating 1-5(required, nullable)
hygienicBehaviorintegerHygienic behaviour, rating 1-5(required, nullable)
combConstructionintegerComb construction, rating 1-5(required, nullable)
motherQueenIdstringID of the mother queen(required, nullable)
motherQueenLabelstringDisplay label of the mother queen (name, race, birth year)(required, nullable)
motherQueenobjectThe mother queen (not deleted)(required, nullable)
motherQueen.idstringQueen ID(required)
motherQueen.namestringFree-text name(required, nullable)
motherQueen.racestringRace(required, nullable)
motherQueen.birthYearintegerYear of birth(required, nullable)
daughterCountintegerDaughters of this queen (not deleted)(required)
createdAtstringCreated (ISO 8601 date-time)(required)
updatedAtstringLast 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"}'
GET/api/queens/[id]Scope: read:queens

Get a single queen

Returns full details including trait ratings and lineage.

Path Parameters

NameTypeRequiredDescription
idstringYesQueen 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}

FieldTypeDescription
idstringQueen ID(required)
namestringFree-text name(required, nullable)
racestringRace(required, nullable, carnica | buckfast | ligustica | mellifera | caucasica | cerana | iberica | russian | saskatraz | other)
birthYearintegerYear of birth(required, nullable)
birthDatestringExact hatching date (ISO 8601 date-time)(required, nullable)
markedAtstringDate the queen was marked (ISO 8601 date-time)(required, nullable)
deathDatestringDate of death (ISO 8601 date-time)(required, nullable)
replacedAtstringLatest replacement calendar day (UTC midnight); null when not recorded (ISO 8601 date-time)(required, nullable)
replacedReasonstringLatest replacement reason; not duplicated into the free-text notes(required, nullable, alter | sanftmut | wabensitz | schwarm | leistung | drohnen | sonst)
markingColorstringMarking colour(required, nullable)
originstringOrigin(required, nullable, purchase | own_breeding | swarm | gift | other)
breederstringBreeder(required, nullable)
breedingLinestringBreeding line(required, nullable)
parentagestringParentage(required, nullable)
matingStatusstringMating status(required, nullable, mated | naturally_mated | instrumentally_inseminated | unmated | drone_layer)
statusstringQueen status(required, active | replaced | dead | missing | swarmed | lost)
statusObservedAtstringWhen the queen's status was observed; null for legacy records without an observation (ISO 8601 date-time)(required, nullable)
ratingintegerOverall rating derived from the trait ratings(required, nullable)
hiveIdstringHive the queen is attached to (not deleted)(required, nullable)
hiveNamestringName of that hive(required, nullable)
hiveNumberintegerNumber of that hive(required, nullable)
notesstringFree-text notes(required, nullable)
gentlenessintegerGentleness, rating 1-5(required, nullable)
calmOnCombintegerCalmness on the comb, rating 1-5(required, nullable)
swarmTendencyintegerSwarm tendency, rating 1-5(required, nullable)
honeyProductionintegerHoney production, rating 1-5(required, nullable)
queenBroodPatternintegerBrood pattern, rating 1-5(required, nullable)
winterHardinessintegerWinter hardiness, rating 1-5(required, nullable)
springBuildUpintegerSpring build-up, rating 1-5(required, nullable)
hygienicBehaviorintegerHygienic behaviour, rating 1-5(required, nullable)
combConstructionintegerComb construction, rating 1-5(required, nullable)
motherQueenIdstringID of the mother queen(required, nullable)
motherQueenLabelstringDisplay label of the mother queen (name, race, birth year)(required, nullable)
motherQueenobjectThe mother queen (not deleted)(required, nullable)
motherQueen.idstringQueen ID(required)
motherQueen.namestringFree-text name(required, nullable)
motherQueen.racestringRace(required, nullable)
motherQueen.birthYearintegerYear of birth(required, nullable)
daughterCountintegerDaughters of this queen (not deleted)(required)
createdAtstringCreated (ISO 8601 date-time)(required)
updatedAtstringLast updated (ISO 8601 date-time)(required)
assignedAtstringWhen the queen was assigned to her current hive, read from the audit trail; null when unknown (ISO 8601 date-time)(required, nullable)
lastSightingAtstringDate 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)
rearingTaskOpenbooleanA 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"
PUT/api/queens/[id]Scope: write:queens

Update a queen

Partially updates queen details including trait ratings.

Path Parameters

NameTypeRequiredDescription
idstringYesQueen 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.

FieldTypeDescription
hiveIdstringAssign to this hive (optional); ignored for an inactive status(nullable)
expectedUpdatedAtstringThe `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`
racestringRace(nullable, carnica | buckfast | ligustica | mellifera | caucasica | cerana | iberica | russian | saskatraz | other)e.g. carnica
birthYearintegerYear of birth, 2000 up to the current year(nullable)e.g. 2025
birthDatestringExact hatching date (ISO), between 2000 and today; takes precedence over `birthYear`(nullable)
markedAtstringDate the queen was marked (ISO, not in the future, not before the birth)(nullable)
deathDatestringDate of death (ISO, not in the future, not before the birth)(nullable)
markingColorstringMarking 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
originstringpurchase | own_breeding | swarm | gift | other(nullable, purchase | own_breeding | swarm | gift | other)
namestringFree-text name, max 200 characters(nullable)
breederstringBreeder name, max 200 characters(nullable)e.g. Belegstelle Hochalm
breedingLinestringBreeding line, max 200 characters(nullable)
parentagestringParentage, max 200 characters(nullable)
matingStatusstringMating status(nullable, mated | naturally_mated | instrumentally_inseminated | unmated | drone_layer)
statusstringactive | replaced | dead | missing | swarmed | lost(active | replaced | dead | missing | swarmed | lost)
statusObservedAtstringWhen 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
ratingintegerAccepted for compatibility but ignored: the stored rating is derived from the trait ratings(nullable)
notesstringFree-text notes (max 5000 chars)(nullable)
gentlenessintegerGentleness, rating 1-5(nullable)
calmOnCombintegerCalmness on the comb, rating 1-5(nullable)
swarmTendencyintegerSwarm tendency, rating 1-5(nullable)
honeyProductionintegerHoney production, rating 1-5(nullable)
queenBroodPatternintegerBrood pattern, rating 1-5(nullable)
winterHardinessintegerWinter hardiness, rating 1-5(nullable)
springBuildUpintegerSpring build-up, rating 1-5(nullable)
hygienicBehaviorintegerHygienic behaviour, rating 1-5(nullable)
combConstructionintegerComb construction, rating 1-5(nullable)
motherQueenIdstringID 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"}

FieldTypeDescription
idstringQueen ID(required)
namestringFree-text name(required, nullable)
racestringRace(required, nullable, carnica | buckfast | ligustica | mellifera | caucasica | cerana | iberica | russian | saskatraz | other)
birthYearintegerYear of birth(required, nullable)
birthDatestringExact hatching date (ISO 8601 date-time)(required, nullable)
markedAtstringDate the queen was marked (ISO 8601 date-time)(required, nullable)
deathDatestringDate of death (ISO 8601 date-time)(required, nullable)
replacedAtstringLatest replacement calendar day (UTC midnight); null when not recorded (ISO 8601 date-time)(required, nullable)
replacedReasonstringLatest replacement reason; not duplicated into the free-text notes(required, nullable, alter | sanftmut | wabensitz | schwarm | leistung | drohnen | sonst)
markingColorstringMarking colour(required, nullable)
originstringOrigin(required, nullable, purchase | own_breeding | swarm | gift | other)
breederstringBreeder(required, nullable)
breedingLinestringBreeding line(required, nullable)
parentagestringParentage(required, nullable)
matingStatusstringMating status(required, nullable, mated | naturally_mated | instrumentally_inseminated | unmated | drone_layer)
statusstringQueen status(required, active | replaced | dead | missing | swarmed | lost)
statusObservedAtstringWhen the queen's status was observed; null for legacy records without an observation (ISO 8601 date-time)(required, nullable)
ratingintegerOverall rating derived from the trait ratings(required, nullable)
hiveIdstringHive the queen is attached to (not deleted)(required, nullable)
hiveNamestringName of that hive(required, nullable)
hiveNumberintegerNumber of that hive(required, nullable)
notesstringFree-text notes(required, nullable)
gentlenessintegerGentleness, rating 1-5(required, nullable)
calmOnCombintegerCalmness on the comb, rating 1-5(required, nullable)
swarmTendencyintegerSwarm tendency, rating 1-5(required, nullable)
honeyProductionintegerHoney production, rating 1-5(required, nullable)
queenBroodPatternintegerBrood pattern, rating 1-5(required, nullable)
winterHardinessintegerWinter hardiness, rating 1-5(required, nullable)
springBuildUpintegerSpring build-up, rating 1-5(required, nullable)
hygienicBehaviorintegerHygienic behaviour, rating 1-5(required, nullable)
combConstructionintegerComb construction, rating 1-5(required, nullable)
motherQueenIdstringID of the mother queen(required, nullable)
motherQueenLabelstringDisplay label of the mother queen (name, race, birth year)(required, nullable)
motherQueenobjectThe mother queen (not deleted)(required, nullable)
motherQueen.idstringQueen ID(required)
motherQueen.namestringFree-text name(required, nullable)
motherQueen.racestringRace(required, nullable)
motherQueen.birthYearintegerYear of birth(required, nullable)
daughterCountintegerDaughters of this queen (not deleted)(required)
createdAtstringCreated (ISO 8601 date-time)(required)
updatedAtstringLast 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"}'
DELETE/api/queens/[id]Scope: write:queens

Delete a queen

Soft-deletes a queen record.

Path Parameters

NameTypeRequiredDescription
idstringYesQueen 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"
POST/api/queens/[id]/assignScope: write:queens

Assign 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

NameTypeRequiredDescription
idstringYesQueen ID

Request Body

`hiveId` must be present; null unassigns. An existing queen on the target hive is not replaced automatically.

FieldTypeDescription
hiveIdstringHive ID to assign to, or null to unassign(required, nullable)e.g. clx2abc
expectedHiveIdstringPreviously read colony ID, or null if unassigned(nullable)
expectedUpdatedAtstringPreviously 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"}

FieldTypeDescription
idstringQueen ID(required)
namestringFree-text name(required, nullable)
racestringRace(required, nullable, carnica | buckfast | ligustica | mellifera | caucasica | cerana | iberica | russian | saskatraz | other)
birthYearintegerYear of birth(required, nullable)
birthDatestringExact hatching date (ISO 8601 date-time)(required, nullable)
markedAtstringDate the queen was marked (ISO 8601 date-time)(required, nullable)
deathDatestringDate of death (ISO 8601 date-time)(required, nullable)
replacedAtstringLatest replacement calendar day (UTC midnight); null when not recorded (ISO 8601 date-time)(required, nullable)
replacedReasonstringLatest replacement reason; not duplicated into the free-text notes(required, nullable, alter | sanftmut | wabensitz | schwarm | leistung | drohnen | sonst)
markingColorstringMarking colour(required, nullable)
originstringOrigin(required, nullable, purchase | own_breeding | swarm | gift | other)
breederstringBreeder(required, nullable)
breedingLinestringBreeding line(required, nullable)
parentagestringParentage(required, nullable)
matingStatusstringMating status(required, nullable, mated | naturally_mated | instrumentally_inseminated | unmated | drone_layer)
statusstringQueen status(required, active | replaced | dead | missing | swarmed | lost)
statusObservedAtstringWhen the queen's status was observed; null for legacy records without an observation (ISO 8601 date-time)(required, nullable)
ratingintegerOverall rating derived from the trait ratings(required, nullable)
hiveIdstringHive the queen is attached to (not deleted)(required, nullable)
hiveNamestringName of that hive(required, nullable)
hiveNumberintegerNumber of that hive(required, nullable)
notesstringFree-text notes(required, nullable)
gentlenessintegerGentleness, rating 1-5(required, nullable)
calmOnCombintegerCalmness on the comb, rating 1-5(required, nullable)
swarmTendencyintegerSwarm tendency, rating 1-5(required, nullable)
honeyProductionintegerHoney production, rating 1-5(required, nullable)
queenBroodPatternintegerBrood pattern, rating 1-5(required, nullable)
winterHardinessintegerWinter hardiness, rating 1-5(required, nullable)
springBuildUpintegerSpring build-up, rating 1-5(required, nullable)
hygienicBehaviorintegerHygienic behaviour, rating 1-5(required, nullable)
combConstructionintegerComb construction, rating 1-5(required, nullable)
motherQueenIdstringID of the mother queen(required, nullable)
motherQueenLabelstringDisplay label of the mother queen (name, race, birth year)(required, nullable)
motherQueenobjectThe mother queen (not deleted)(required, nullable)
motherQueen.idstringQueen ID(required)
motherQueen.namestringFree-text name(required, nullable)
motherQueen.racestringRace(required, nullable)
motherQueen.birthYearintegerYear of birth(required, nullable)
daughterCountintegerDaughters of this queen (not deleted)(required)
createdAtstringCreated (ISO 8601 date-time)(required)
updatedAtstringLast 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.

GET/api/inspectionsScope: read:inspections

List 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

NameTypeRequiredDescription
hiveIdstringNoFilter by hive
apiaryIdstringNoFilter by apiary
typestringNostandard | quick
statusstringNoconfirmed | pending_compliance | archived; another value returns 400
withVarroabooleanNoOnly inspections with a varroa measurement
withFindingsbooleanNoOnly inspections with queen cells or a pest finding
dateFromstringNoDate lower bound, YYYY-MM-DD as a Europe/Berlin calendar day (inclusive)e.g. 2025-01-01
dateTostringNoDate upper bound, YYYY-MM-DD as a Europe/Berlin calendar day (the whole day is included)e.g. 2025-12-31
searchstringNoFree-text search over notes and hive name, max 100 characters
cursorstringNoPagination 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).
limitnumberNoItems 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}

FieldTypeDescription
itemsarrayThe inspections on this page(required)
items[].idstringInspection ID(required)
items[].hiveIdstringHive ID(required)
items[].hiveNumberintegerColony number(required)
items[].hiveNamestringColony name(required, nullable)
items[].datestringInspection date (ISO 8601 date-time)(required)
items[].typestringInspection type(required, standard | quick)
items[].statusstringLifecycle status(required, confirmed | pending_compliance | archived)
items[].sourcestringWhere the entry came from(required, manual | voice | import | api | photo_ai)
items[].confirmedAtstringWhen the entry was confirmed (ISO 8601 date-time)(required, nullable)
items[].confirmedBystringWho confirmed the entry(required, nullable)
items[].colonyStrengthintegerStrength rating 1-10(required, nullable)
items[].queenSeenbooleanWas the queen spotted?(required, nullable)
items[].eggsSeenbooleanWere eggs visible?(required, nullable)
items[].temperamentstringTemperament(required, nullable, calm | nervous | aggressive)
items[].queenCellsstringLegacy free text about queen cells(required, nullable)
items[].diagnosticMethodstringVarroa diagnostic method(required, nullable, liebefeld_natural_drop | dlib_powdersugar | dlib_alcohol_wash | brood_check | flotation)
items[].measurementValuenumberVarroa measurement(required, nullable)
items[].measurementUnitstringUnit of the measurement(required, nullable, mites_per_day | mites_per_10g_bees | percent_infestation)
items[].measurementDaysintegerCounting days of a natural-drop measurement(required, nullable)
items[].measurementSourcestringWhere the count comes from; `null` = not recorded(required, nullable, manual | photo | photo_assisted)
items[].measurementDaysAssumedboolean`true` = the counting days are the prefilled 7, not entered; `null` = not recorded or not a natural drop(required, nullable)
items[].measurementPhotoIdstringRecord 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[].varroaMeasurementobjectThe resolved varroa measurement (new fields preferred, legacy count as fallback; natural drop normalised to mites per day)(required, nullable)
items[].varroaMeasurement.valuenumberMeasured value(required)
items[].varroaMeasurement.unitstringUnit(required, mites_per_day | mites_per_10g_bees | percent_infestation)
items[].varroaMeasurement.methodstringMethod(required, liebefeld_natural_drop | dlib_powdersugar | dlib_alcohol_wash | brood_check | flotation)
items[].honeyStoresstringHoney stores(required, nullable, low | medium | high)
items[].broodPatternstringBrood pattern(required, nullable, good | spotty | poor | none)
items[].actionsstringActions taken(required, nullable)
items[].notesstringFree-text notes(required, nullable)
items[].afbClearedbooleanAmerican foulbrood suspicion ruled out by a vet(required)
items[].pestsarrayObserved pests(required)
items[].pests[]stringPest type(varroa | wax_moth | hive_beetle | aethina_tumida | tropilaelaps_mercedesae | nosema | foulbrood | chalkbrood | other)
items[].moodstringMood of the colony(required, nullable, calm | alert | defensive | aggressive)
items[].flightActivitystringFlight activity(required, nullable, none | low | normal | high)
items[].queenCellCountintegerNumber of queen cells(required, nullable)
items[].queenCellTypestringQueen cell type(required, nullable, none | swarm | supersedure | emergency)
items[].queenCellStagestringQueen cell stage(required, nullable, cup | egg | larva | capped | emerged)
items[].queenCellActionstringAction taken on the queen cells(required, nullable, left | removed | marked)
items[].broodFramesintegerFrames with brood(required, nullable)
items[].openBroodFramesintegerFrames with open brood(required, nullable)
items[].cappedBroodFramesintegerFrames with capped brood(required, nullable)
items[].broodCompactnessstringBrood compactness(required, nullable, compact | semi_compact | scattered)
items[].pollenStoresstringPollen stores(required, nullable, none | low | medium | high)
items[].queenMarkedbooleanIs the queen marked?(required, nullable)
items[].layingPatternstringLaying pattern(required, nullable, excellent | good | fair | poor)
items[].weatherTempnumberTemperature in °C(required, nullable)
items[].weatherConditionstringWeather(required, nullable, sunny | cloudy | overcast | rainy | windy)
items[].inspectionDurationintegerDuration in minutes(required, nullable)
items[].templateIdstringID of the inspection template(required, nullable)
items[].customFieldValuesstringValues of custom template fields as a JSON string(required, nullable)
items[].autoTagsarrayTags derived from the notes (get, create and update only; empty in lists)(required)
items[].autoTags[]stringTag
items[].replaceBlockedBystringWhy 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[].createdAtstringCreated (ISO 8601 date-time)(required)
items[].updatedAtstringLast updated (ISO 8601 date-time)(required)
nextCursorstringCursor for the next page, or null when there are no more results(required, nullable)
hasMorebooleanTrue when a further page is available(required)
totalnumberAll matching inspections for the active filters, across all pages(required)
completebooleanTrue on the last page(required)
truncatedbooleanFalse: ordinary pagination does not discard further pages(required)
[].idstringInspection ID(required)
[].hiveIdstringHive ID(required)
[].hiveNumberintegerColony number(required)
[].hiveNamestringColony name(required, nullable)
[].datestringInspection date (ISO 8601 date-time)(required)
[].typestringInspection type(required, standard | quick)
[].statusstringLifecycle status(required, confirmed | pending_compliance | archived)
[].sourcestringWhere the entry came from(required, manual | voice | import | api | photo_ai)
[].confirmedAtstringWhen the entry was confirmed (ISO 8601 date-time)(required, nullable)
[].confirmedBystringWho confirmed the entry(required, nullable)
[].colonyStrengthintegerStrength rating 1-10(required, nullable)
[].queenSeenbooleanWas the queen spotted?(required, nullable)
[].eggsSeenbooleanWere eggs visible?(required, nullable)
[].temperamentstringTemperament(required, nullable, calm | nervous | aggressive)
[].queenCellsstringLegacy free text about queen cells(required, nullable)
[].diagnosticMethodstringVarroa diagnostic method(required, nullable, liebefeld_natural_drop | dlib_powdersugar | dlib_alcohol_wash | brood_check | flotation)
[].measurementValuenumberVarroa measurement(required, nullable)
[].measurementUnitstringUnit of the measurement(required, nullable, mites_per_day | mites_per_10g_bees | percent_infestation)
[].measurementDaysintegerCounting days of a natural-drop measurement(required, nullable)
[].measurementSourcestringWhere the count comes from; `null` = not recorded(required, nullable, manual | photo | photo_assisted)
[].measurementDaysAssumedboolean`true` = the counting days are the prefilled 7, not entered; `null` = not recorded or not a natural drop(required, nullable)
[].measurementPhotoIdstringRecord 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)
[].varroaMeasurementobjectThe resolved varroa measurement (new fields preferred, legacy count as fallback; natural drop normalised to mites per day)(required, nullable)
[].varroaMeasurement.valuenumberMeasured value(required)
[].varroaMeasurement.unitstringUnit(required, mites_per_day | mites_per_10g_bees | percent_infestation)
[].varroaMeasurement.methodstringMethod(required, liebefeld_natural_drop | dlib_powdersugar | dlib_alcohol_wash | brood_check | flotation)
[].honeyStoresstringHoney stores(required, nullable, low | medium | high)
[].broodPatternstringBrood pattern(required, nullable, good | spotty | poor | none)
[].actionsstringActions taken(required, nullable)
[].notesstringFree-text notes(required, nullable)
[].afbClearedbooleanAmerican foulbrood suspicion ruled out by a vet(required)
[].pestsarrayObserved pests(required)
[].pests[]stringPest type(varroa | wax_moth | hive_beetle | aethina_tumida | tropilaelaps_mercedesae | nosema | foulbrood | chalkbrood | other)
[].moodstringMood of the colony(required, nullable, calm | alert | defensive | aggressive)
[].flightActivitystringFlight activity(required, nullable, none | low | normal | high)
[].queenCellCountintegerNumber of queen cells(required, nullable)
[].queenCellTypestringQueen cell type(required, nullable, none | swarm | supersedure | emergency)
[].queenCellStagestringQueen cell stage(required, nullable, cup | egg | larva | capped | emerged)
[].queenCellActionstringAction taken on the queen cells(required, nullable, left | removed | marked)
[].broodFramesintegerFrames with brood(required, nullable)
[].openBroodFramesintegerFrames with open brood(required, nullable)
[].cappedBroodFramesintegerFrames with capped brood(required, nullable)
[].broodCompactnessstringBrood compactness(required, nullable, compact | semi_compact | scattered)
[].pollenStoresstringPollen stores(required, nullable, none | low | medium | high)
[].queenMarkedbooleanIs the queen marked?(required, nullable)
[].layingPatternstringLaying pattern(required, nullable, excellent | good | fair | poor)
[].weatherTempnumberTemperature in °C(required, nullable)
[].weatherConditionstringWeather(required, nullable, sunny | cloudy | overcast | rainy | windy)
[].inspectionDurationintegerDuration in minutes(required, nullable)
[].templateIdstringID of the inspection template(required, nullable)
[].customFieldValuesstringValues of custom template fields as a JSON string(required, nullable)
[].autoTagsarrayTags derived from the notes (get, create and update only; empty in lists)(required)
[].autoTags[]stringTag
[].replaceBlockedBystringWhy 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)
[].createdAtstringCreated (ISO 8601 date-time)(required)
[].updatedAtstringLast 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"
POST/api/inspectionsScope: write:inspections

Create an inspection

Records a new hive inspection with details about colony health, brood, varroa, and weather.

Request Headers

NameTypeRequiredDescription
Idempotency-KeystringNoOptional 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.

FieldTypeDescription
hiveIdstringHive to inspect(required)e.g. clx2abc
datestringInspection date (ISO date or date-time)(required)e.g. 2025-06-15
typestringInspection type(required, standard | quick)e.g. standard
colonyStrengthintegerStrength rating 1-10(nullable)e.g. 8
queenSeenbooleanWas the queen spotted?(nullable)e.g. true
eggsSeenbooleanWere eggs visible?(nullable)
temperamentstringTemperament(nullable, calm | nervous | aggressive)
honeyStoresstringHoney stores(nullable, low | medium | high)
broodPatternstringBrood pattern(nullable, good | spotty | poor | none)
moodstringMood of the colony(nullable, calm | alert | defensive | aggressive)
notesstringFree-text notes (max 5000 chars)(nullable)
queenCellsstringLegacy free text about queen cells, max 500 characters(nullable)
varroaCountintegerVarroa 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
varroaMethodstringMethod 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)
actionsstringActions taken, max 2000 characters(nullable)
diagnosticMethodstringVarroa diagnostic method; must match `measurementUnit`(nullable, liebefeld_natural_drop | dlib_powdersugar | dlib_alcohol_wash | brood_check | flotation)
measurementValuenumberVarroa 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)
measurementUnitstringUnit of the measurement; must match `diagnosticMethod`(nullable, mites_per_day | mites_per_10g_bees | percent_infestation)
measurementDaysintegerCounting 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)
measurementSourcestringWhere 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)
measurementDaysAssumedbooleanNatural 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)
statusstringLifecycle status; unconfirmed entries need a separate confirmation(default confirmed, confirmed | pending_compliance | archived)
sourcestringWhere the entry came from(default manual, manual | voice | import | api | photo_ai)
afbClearedbooleanAmerican foulbrood suspicion ruled out by a vet
pestsarrayObserved pests, at most 20; duplicates are dropped
pests[]stringPest 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)
flightActivitystringFlight activity(nullable, none | low | normal | high)
queenCellCountintegerNumber of queen cells, 0-50(nullable)
queenCellTypestringQueen cell type(nullable, none | swarm | supersedure | emergency)
queenCellStagestringQueen cell stage(nullable, cup | egg | larva | capped | emerged)
queenCellActionstringAction taken on the queen cells(nullable, left | removed | marked)
broodFramesintegerFrames with brood, 0-30(nullable)
openBroodFramesintegerFrames with open brood, 0-30(nullable)
cappedBroodFramesintegerFrames with capped brood, 0-30(nullable)
broodCompactnessstringBrood compactness(nullable, compact | semi_compact | scattered)
pollenStoresstringPollen stores(nullable, none | low | medium | high)
queenMarkedbooleanIs the queen marked?(nullable)
layingPatternstringLaying pattern(nullable, excellent | good | fair | poor)
weatherTempnumberTemperature in °C, -30 to 60(nullable)
weatherConditionstringWeather(nullable, sunny | cloudy | overcast | rainy | windy)
inspectionDurationintegerDuration in minutes, 0-600(nullable)
templateIdstringID of the inspection template, max 50 characters(nullable)
customFieldValuesstringValues 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"}

FieldTypeDescription
idstringInspection ID(required)
hiveIdstringHive ID(required)
hiveNumberintegerColony number(required)
hiveNamestringColony name(required, nullable)
datestringInspection date (ISO 8601 date-time)(required)
typestringInspection type(required, standard | quick)
statusstringLifecycle status(required, confirmed | pending_compliance | archived)
sourcestringWhere the entry came from(required, manual | voice | import | api | photo_ai)
confirmedAtstringWhen the entry was confirmed (ISO 8601 date-time)(required, nullable)
confirmedBystringWho confirmed the entry(required, nullable)
colonyStrengthintegerStrength rating 1-10(required, nullable)
queenSeenbooleanWas the queen spotted?(required, nullable)
eggsSeenbooleanWere eggs visible?(required, nullable)
temperamentstringTemperament(required, nullable, calm | nervous | aggressive)
queenCellsstringLegacy free text about queen cells(required, nullable)
diagnosticMethodstringVarroa diagnostic method(required, nullable, liebefeld_natural_drop | dlib_powdersugar | dlib_alcohol_wash | brood_check | flotation)
measurementValuenumberVarroa measurement(required, nullable)
measurementUnitstringUnit of the measurement(required, nullable, mites_per_day | mites_per_10g_bees | percent_infestation)
measurementDaysintegerCounting days of a natural-drop measurement(required, nullable)
measurementSourcestringWhere the count comes from; `null` = not recorded(required, nullable, manual | photo | photo_assisted)
measurementDaysAssumedboolean`true` = the counting days are the prefilled 7, not entered; `null` = not recorded or not a natural drop(required, nullable)
measurementPhotoIdstringRecord 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)
varroaMeasurementobjectThe resolved varroa measurement (new fields preferred, legacy count as fallback; natural drop normalised to mites per day)(required, nullable)
varroaMeasurement.valuenumberMeasured value(required)
varroaMeasurement.unitstringUnit(required, mites_per_day | mites_per_10g_bees | percent_infestation)
varroaMeasurement.methodstringMethod(required, liebefeld_natural_drop | dlib_powdersugar | dlib_alcohol_wash | brood_check | flotation)
honeyStoresstringHoney stores(required, nullable, low | medium | high)
broodPatternstringBrood pattern(required, nullable, good | spotty | poor | none)
actionsstringActions taken(required, nullable)
notesstringFree-text notes(required, nullable)
afbClearedbooleanAmerican foulbrood suspicion ruled out by a vet(required)
pestsarrayObserved pests(required)
pests[]stringPest type(varroa | wax_moth | hive_beetle | aethina_tumida | tropilaelaps_mercedesae | nosema | foulbrood | chalkbrood | other)
moodstringMood of the colony(required, nullable, calm | alert | defensive | aggressive)
flightActivitystringFlight activity(required, nullable, none | low | normal | high)
queenCellCountintegerNumber of queen cells(required, nullable)
queenCellTypestringQueen cell type(required, nullable, none | swarm | supersedure | emergency)
queenCellStagestringQueen cell stage(required, nullable, cup | egg | larva | capped | emerged)
queenCellActionstringAction taken on the queen cells(required, nullable, left | removed | marked)
broodFramesintegerFrames with brood(required, nullable)
openBroodFramesintegerFrames with open brood(required, nullable)
cappedBroodFramesintegerFrames with capped brood(required, nullable)
broodCompactnessstringBrood compactness(required, nullable, compact | semi_compact | scattered)
pollenStoresstringPollen stores(required, nullable, none | low | medium | high)
queenMarkedbooleanIs the queen marked?(required, nullable)
layingPatternstringLaying pattern(required, nullable, excellent | good | fair | poor)
weatherTempnumberTemperature in °C(required, nullable)
weatherConditionstringWeather(required, nullable, sunny | cloudy | overcast | rainy | windy)
inspectionDurationintegerDuration in minutes(required, nullable)
templateIdstringID of the inspection template(required, nullable)
customFieldValuesstringValues of custom template fields as a JSON string(required, nullable)
autoTagsarrayTags derived from the notes (get, create and update only; empty in lists)(required)
autoTags[]stringTag
replaceBlockedBystringWhy 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)
createdAtstringCreated (ISO 8601 date-time)(required)
updatedAtstringLast updated (ISO 8601 date-time)(required)
afbEscalationFailedbooleanPresent 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"}'
GET/api/inspections/[id]Scope: read:inspections

Get a single inspection

Returns full inspection details including pest observations.

Path Parameters

NameTypeRequiredDescription
idstringYesInspection 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"}

FieldTypeDescription
idstringInspection ID(required)
hiveIdstringHive ID(required)
hiveNumberintegerColony number(required)
hiveNamestringColony name(required, nullable)
datestringInspection date (ISO 8601 date-time)(required)
typestringInspection type(required, standard | quick)
statusstringLifecycle status(required, confirmed | pending_compliance | archived)
sourcestringWhere the entry came from(required, manual | voice | import | api | photo_ai)
confirmedAtstringWhen the entry was confirmed (ISO 8601 date-time)(required, nullable)
confirmedBystringWho confirmed the entry(required, nullable)
colonyStrengthintegerStrength rating 1-10(required, nullable)
queenSeenbooleanWas the queen spotted?(required, nullable)
eggsSeenbooleanWere eggs visible?(required, nullable)
temperamentstringTemperament(required, nullable, calm | nervous | aggressive)
queenCellsstringLegacy free text about queen cells(required, nullable)
diagnosticMethodstringVarroa diagnostic method(required, nullable, liebefeld_natural_drop | dlib_powdersugar | dlib_alcohol_wash | brood_check | flotation)
measurementValuenumberVarroa measurement(required, nullable)
measurementUnitstringUnit of the measurement(required, nullable, mites_per_day | mites_per_10g_bees | percent_infestation)
measurementDaysintegerCounting days of a natural-drop measurement(required, nullable)
measurementSourcestringWhere the count comes from; `null` = not recorded(required, nullable, manual | photo | photo_assisted)
measurementDaysAssumedboolean`true` = the counting days are the prefilled 7, not entered; `null` = not recorded or not a natural drop(required, nullable)
measurementPhotoIdstringRecord 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)
varroaMeasurementobjectThe resolved varroa measurement (new fields preferred, legacy count as fallback; natural drop normalised to mites per day)(required, nullable)
varroaMeasurement.valuenumberMeasured value(required)
varroaMeasurement.unitstringUnit(required, mites_per_day | mites_per_10g_bees | percent_infestation)
varroaMeasurement.methodstringMethod(required, liebefeld_natural_drop | dlib_powdersugar | dlib_alcohol_wash | brood_check | flotation)
honeyStoresstringHoney stores(required, nullable, low | medium | high)
broodPatternstringBrood pattern(required, nullable, good | spotty | poor | none)
actionsstringActions taken(required, nullable)
notesstringFree-text notes(required, nullable)
afbClearedbooleanAmerican foulbrood suspicion ruled out by a vet(required)
pestsarrayObserved pests(required)
pests[]stringPest type(varroa | wax_moth | hive_beetle | aethina_tumida | tropilaelaps_mercedesae | nosema | foulbrood | chalkbrood | other)
moodstringMood of the colony(required, nullable, calm | alert | defensive | aggressive)
flightActivitystringFlight activity(required, nullable, none | low | normal | high)
queenCellCountintegerNumber of queen cells(required, nullable)
queenCellTypestringQueen cell type(required, nullable, none | swarm | supersedure | emergency)
queenCellStagestringQueen cell stage(required, nullable, cup | egg | larva | capped | emerged)
queenCellActionstringAction taken on the queen cells(required, nullable, left | removed | marked)
broodFramesintegerFrames with brood(required, nullable)
openBroodFramesintegerFrames with open brood(required, nullable)
cappedBroodFramesintegerFrames with capped brood(required, nullable)
broodCompactnessstringBrood compactness(required, nullable, compact | semi_compact | scattered)
pollenStoresstringPollen stores(required, nullable, none | low | medium | high)
queenMarkedbooleanIs the queen marked?(required, nullable)
layingPatternstringLaying pattern(required, nullable, excellent | good | fair | poor)
weatherTempnumberTemperature in °C(required, nullable)
weatherConditionstringWeather(required, nullable, sunny | cloudy | overcast | rainy | windy)
inspectionDurationintegerDuration in minutes(required, nullable)
templateIdstringID of the inspection template(required, nullable)
customFieldValuesstringValues of custom template fields as a JSON string(required, nullable)
autoTagsarrayTags derived from the notes (get, create and update only; empty in lists)(required)
autoTags[]stringTag
replaceBlockedBystringWhy 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)
createdAtstringCreated (ISO 8601 date-time)(required)
updatedAtstringLast 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"
PUT/api/inspections/[id]Scope: write:inspections

Update an inspection

Partially updates inspection data.

Path Parameters

NameTypeRequiredDescription
idstringYesInspection 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.

FieldTypeDescription
hiveIdstringHive to inspecte.g. clx2abc
datestringInspection date (ISO date or date-time)e.g. 2025-06-15
typestringInspection type(standard | quick)e.g. standard
colonyStrengthintegerStrength rating 1-10(nullable)e.g. 8
queenSeenbooleanWas the queen spotted?(nullable)e.g. true
eggsSeenbooleanWere eggs visible?(nullable)
temperamentstringTemperament(nullable, calm | nervous | aggressive)
honeyStoresstringHoney stores(nullable, low | medium | high)
broodPatternstringBrood pattern(nullable, good | spotty | poor | none)
moodstringMood of the colony(nullable, calm | alert | defensive | aggressive)
notesstringFree-text notes (max 5000 chars)(nullable)
queenCellsstringLegacy free text about queen cells, max 500 characters(nullable)
varroaCountintegerVarroa 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
varroaMethodstringMethod 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)
actionsstringActions taken, max 2000 characters(nullable)
diagnosticMethodstringVarroa diagnostic method; must match `measurementUnit`(nullable, liebefeld_natural_drop | dlib_powdersugar | dlib_alcohol_wash | brood_check | flotation)
measurementValuenumberVarroa 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)
measurementUnitstringUnit of the measurement; must match `diagnosticMethod`(nullable, mites_per_day | mites_per_10g_bees | percent_infestation)
measurementDaysintegerCounting 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)
measurementSourcestringWhere 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)
measurementDaysAssumedbooleanNatural 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)
afbClearedbooleanAmerican foulbrood suspicion ruled out by a vet
pestsarrayObserved pests, at most 20; duplicates are dropped
pests[]stringPest 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)
flightActivitystringFlight activity(nullable, none | low | normal | high)
queenCellCountintegerNumber of queen cells, 0-50(nullable)
queenCellTypestringQueen cell type(nullable, none | swarm | supersedure | emergency)
queenCellStagestringQueen cell stage(nullable, cup | egg | larva | capped | emerged)
queenCellActionstringAction taken on the queen cells(nullable, left | removed | marked)
broodFramesintegerFrames with brood, 0-30(nullable)
openBroodFramesintegerFrames with open brood, 0-30(nullable)
cappedBroodFramesintegerFrames with capped brood, 0-30(nullable)
broodCompactnessstringBrood compactness(nullable, compact | semi_compact | scattered)
pollenStoresstringPollen stores(nullable, none | low | medium | high)
queenMarkedbooleanIs the queen marked?(nullable)
layingPatternstringLaying pattern(nullable, excellent | good | fair | poor)
weatherTempnumberTemperature in °C, -30 to 60(nullable)
weatherConditionstringWeather(nullable, sunny | cloudy | overcast | rainy | windy)
inspectionDurationintegerDuration in minutes, 0-600(nullable)
templateIdstringID of the inspection template, max 50 characters(nullable)
customFieldValuesstringValues of custom template fields as a JSON string, max 10000 characters(nullable)
baseobjectVersion 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.updatedAtstringServer `updatedAt` the edit started from (ISO 8601 date-time)(required)
base.fieldsobjectBase 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"}

FieldTypeDescription
idstringInspection ID(required)
hiveIdstringHive ID(required)
hiveNumberintegerColony number(required)
hiveNamestringColony name(required, nullable)
datestringInspection date (ISO 8601 date-time)(required)
typestringInspection type(required, standard | quick)
statusstringLifecycle status(required, confirmed | pending_compliance | archived)
sourcestringWhere the entry came from(required, manual | voice | import | api | photo_ai)
confirmedAtstringWhen the entry was confirmed (ISO 8601 date-time)(required, nullable)
confirmedBystringWho confirmed the entry(required, nullable)
colonyStrengthintegerStrength rating 1-10(required, nullable)
queenSeenbooleanWas the queen spotted?(required, nullable)
eggsSeenbooleanWere eggs visible?(required, nullable)
temperamentstringTemperament(required, nullable, calm | nervous | aggressive)
queenCellsstringLegacy free text about queen cells(required, nullable)
diagnosticMethodstringVarroa diagnostic method(required, nullable, liebefeld_natural_drop | dlib_powdersugar | dlib_alcohol_wash | brood_check | flotation)
measurementValuenumberVarroa measurement(required, nullable)
measurementUnitstringUnit of the measurement(required, nullable, mites_per_day | mites_per_10g_bees | percent_infestation)
measurementDaysintegerCounting days of a natural-drop measurement(required, nullable)
measurementSourcestringWhere the count comes from; `null` = not recorded(required, nullable, manual | photo | photo_assisted)
measurementDaysAssumedboolean`true` = the counting days are the prefilled 7, not entered; `null` = not recorded or not a natural drop(required, nullable)
measurementPhotoIdstringRecord 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)
varroaMeasurementobjectThe resolved varroa measurement (new fields preferred, legacy count as fallback; natural drop normalised to mites per day)(required, nullable)
varroaMeasurement.valuenumberMeasured value(required)
varroaMeasurement.unitstringUnit(required, mites_per_day | mites_per_10g_bees | percent_infestation)
varroaMeasurement.methodstringMethod(required, liebefeld_natural_drop | dlib_powdersugar | dlib_alcohol_wash | brood_check | flotation)
honeyStoresstringHoney stores(required, nullable, low | medium | high)
broodPatternstringBrood pattern(required, nullable, good | spotty | poor | none)
actionsstringActions taken(required, nullable)
notesstringFree-text notes(required, nullable)
afbClearedbooleanAmerican foulbrood suspicion ruled out by a vet(required)
pestsarrayObserved pests(required)
pests[]stringPest type(varroa | wax_moth | hive_beetle | aethina_tumida | tropilaelaps_mercedesae | nosema | foulbrood | chalkbrood | other)
moodstringMood of the colony(required, nullable, calm | alert | defensive | aggressive)
flightActivitystringFlight activity(required, nullable, none | low | normal | high)
queenCellCountintegerNumber of queen cells(required, nullable)
queenCellTypestringQueen cell type(required, nullable, none | swarm | supersedure | emergency)
queenCellStagestringQueen cell stage(required, nullable, cup | egg | larva | capped | emerged)
queenCellActionstringAction taken on the queen cells(required, nullable, left | removed | marked)
broodFramesintegerFrames with brood(required, nullable)
openBroodFramesintegerFrames with open brood(required, nullable)
cappedBroodFramesintegerFrames with capped brood(required, nullable)
broodCompactnessstringBrood compactness(required, nullable, compact | semi_compact | scattered)
pollenStoresstringPollen stores(required, nullable, none | low | medium | high)
queenMarkedbooleanIs the queen marked?(required, nullable)
layingPatternstringLaying pattern(required, nullable, excellent | good | fair | poor)
weatherTempnumberTemperature in °C(required, nullable)
weatherConditionstringWeather(required, nullable, sunny | cloudy | overcast | rainy | windy)
inspectionDurationintegerDuration in minutes(required, nullable)
templateIdstringID of the inspection template(required, nullable)
customFieldValuesstringValues of custom template fields as a JSON string(required, nullable)
autoTagsarrayTags derived from the notes (get, create and update only; empty in lists)(required)
autoTags[]stringTag
replaceBlockedBystringWhy 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)
createdAtstringCreated (ISO 8601 date-time)(required)
updatedAtstringLast updated (ISO 8601 date-time)(required)
afbEscalationFailedbooleanPresent 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}'
DELETE/api/inspections/[id]Scope: write:inspections

Delete an inspection

Permanently removes an inspection record.

Path Parameters

NameTypeRequiredDescription
idstringYesInspection 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"
GET/api/inspections/[id]/photosScope: read:inspections

Get inspection photos

Returns all photos attached to an inspection.

Path Parameters

NameTypeRequiredDescription
idstringYesInspection 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"}]

FieldTypeDescription
[].idstringPhoto ID(required)
[].inspectionIdstringInspection ID(required)
[].urlstringPhoto path under `/api/photos/`(required)
[].captionstringCaption(required, nullable)
[].photoTypestringPhoto type(required, nullable)
[].sortOrderintegerPosition among the photos of the inspection(required)
[].uploadStatusstring`completed` once the file is stored(required, nullable)
[].createdAtstringCreated (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"
POST/api/inspections/[id]/photosScope: write:inspections

Upload an inspection photo

Uploads a photo to an inspection. Uses multipart/form-data with fields: photo (file), photoType (string), caption (string).

Path Parameters

NameTypeRequiredDescription
idstringYesInspection 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.

FieldTypeDescription
photofileImage file: JPEG, PNG or WebP, at most 5 MB(required)
photoTypestringPhoto type; an unknown value is stored as `general`(general | frame | queen | brood | disease | varroa | colony_strength | honey | equipment | other)
captionstringPhoto caption, cut to 500 characters
localestringLanguage of the background photo analysis (the Referer path is the fallback, then `de`)(de | en)
measurementEvidencestringMark the board photo as evidence of the count; only with `photoType=varroa` and `measurementEvidenceValue`. Other values are ignored(1)
measurementEvidenceValueintegerRaw 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"}

FieldTypeDescription
idstringPhoto ID(required)
inspectionIdstringInspection ID(required)
urlstringPhoto path under `/api/photos/`(required)
captionstringCaption(required, nullable)
photoTypestringPhoto type(required, nullable)
sortOrderintegerPosition among the photos of the inspection(required)
uploadStatusstring`completed` once the file is stored(required, nullable)
createdAtstringCreated (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"
DELETE/api/inspections/[id]/photosScope: write:inspections

Delete an inspection photo

Deletes a specific photo from an inspection. Pass the photoId as a query parameter.

Path Parameters

NameTypeRequiredDescription
idstringYesInspection ID

Query Parameters

NameTypeRequiredDescription
photoIdstringYesPhoto 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.

GET/api/treatmentsScope: read:treatments

List treatments

Returns treatments with optional filters for hive, type, status, and date range.

Query Parameters

NameTypeRequiredDescription
hiveIdstringNoFilter by hive
apiaryIdstringNoFilter by apiary
treatmentTypestringNovarroa_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
statusstringNoplanned | active | completed | pending_compliance
dateFromstringNoStart date lower bound (ISO, Europe/Berlin calendar day, inclusive)e.g. 2025-01-01
dateTostringNoStart date upper bound (ISO, Europe/Berlin calendar day, the whole day is included)e.g. 2025-12-31
limitnumberNoPage 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.
cursorstringNoPagination 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}

FieldTypeDescription
itemsarrayThe treatments on this page(required)
items[].idstringTreatment ID(required)
items[].userIdstringOwner ID(required)
items[].hiveIdstringHive ID(required)
items[].treatmentGroupIdstringGroup of a multi-colony treatment(required, nullable)
items[].treatmentTypestringTreatment 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[].methodstringApplication method(required, nullable, evaporator | drip | spray | sublimation | strips | other)
items[].startDatestringStart (ISO 8601 date-time)(required)
items[].endDatestringEnd (ISO 8601 date-time)(required, nullable)
items[].dosenumberDosage amount(required, nullable)
items[].unitstringDosage unit(required, nullable, ml | g | strips)
items[].statusstringStatus(required, planned | active | completed | pending_compliance)
items[].notesstringFree-text notes(required, nullable)
items[].varroaCountBeforeintegerVarroa count before the treatment(required, nullable)
items[].varroaCountAfterintegerVarroa count after the treatment(required, nullable)
items[].effectivenessstringObserved effectiveness(required, nullable, high | medium | low | none)
items[].waitPeriodEndstringEnd of the withdrawal period (ISO 8601 date-time)(required, nullable)
items[].batchNumberstringBatch number of the medication(required, nullable)
items[].supplierstringSupplier(required, nullable)
items[].supplierInvoicestringInvoice or delivery note number(required, nullable)
items[].withdrawalPeriodDaysintegerDeprecated withdrawal days(required, nullable)
items[].withdrawalPeriodDaysHoneyintegerWithdrawal period for honey in days(required, nullable)
items[].withdrawalPeriodDaysWaxintegerWithdrawal period for wax in days(required, nullable)
items[].treatingPersonstringPerson who treated(required, nullable)
items[].veterinarianstringVeterinarian(required, nullable)
items[].prescriptionNumberstringPrescription number(required, nullable)
items[].deletedAtstringSoft-delete marker; always null here (ISO 8601 date-time)(required, nullable)
items[].lockedAtstringWhen the record became immutable; null while it can still be edited (ISO 8601 date-time)(required, nullable)
items[].correctionOfstringID of the treatment this record corrects(required, nullable)
items[].correctedBystringID of the correction that replaces this record(required, nullable)
items[].typeInferredbooleanThe treatment type was inferred by the system(required)
items[].createdByMemberIdstringTeam member who created the record; null = owner(required, nullable)
items[].voidedAtstringWhen 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[].voidedByIdstringWho voided the record(required, nullable)
items[].voidReasonstringReason for voiding(required, nullable, duplicate | never_applied | other)
items[].voidNotestringNote on the voiding(required, nullable)
items[].voidDuplicateOfIdstringID of the treatment this record duplicates(required, nullable)
items[].createdAtstringCreated (ISO 8601 date-time)(required)
items[].updatedAtstringLast updated (ISO 8601 date-time)(required)
items[].hiveobjectThe colony of the record (reference)(required)
items[].hive.idstringHive ID(required)
items[].hive.numberintegerColony number(required)
items[].hive.namestringColony name(required, nullable)
items[].hive.apiaryobjectIts apiary(required)
items[].hive.apiary.idstringApiary ID(required)
items[].hive.apiary.namestringApiary name(required)
nextCursorstringCursor for the next page, or null when there are no more results(required, nullable)
hasMorebooleanTrue when a further page is available(required)
totalnumberAll matching treatments for the active filters, across all pages(required)
completebooleanTrue on the last page(required)
truncatedbooleanFalse: ordinary pagination does not discard further pages(required)
[].idstringTreatment ID(required)
[].userIdstringOwner ID(required)
[].hiveIdstringHive ID(required)
[].treatmentGroupIdstringGroup of a multi-colony treatment(required, nullable)
[].treatmentTypestringTreatment 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)
[].methodstringApplication method(required, nullable, evaporator | drip | spray | sublimation | strips | other)
[].startDatestringStart (ISO 8601 date-time)(required)
[].endDatestringEnd (ISO 8601 date-time)(required, nullable)
[].dosenumberDosage amount(required, nullable)
[].unitstringDosage unit(required, nullable, ml | g | strips)
[].statusstringStatus(required, planned | active | completed | pending_compliance)
[].notesstringFree-text notes(required, nullable)
[].varroaCountBeforeintegerVarroa count before the treatment(required, nullable)
[].varroaCountAfterintegerVarroa count after the treatment(required, nullable)
[].effectivenessstringObserved effectiveness(required, nullable, high | medium | low | none)
[].waitPeriodEndstringEnd of the withdrawal period (ISO 8601 date-time)(required, nullable)
[].batchNumberstringBatch number of the medication(required, nullable)
[].supplierstringSupplier(required, nullable)
[].supplierInvoicestringInvoice or delivery note number(required, nullable)
[].withdrawalPeriodDaysintegerDeprecated withdrawal days(required, nullable)
[].withdrawalPeriodDaysHoneyintegerWithdrawal period for honey in days(required, nullable)
[].withdrawalPeriodDaysWaxintegerWithdrawal period for wax in days(required, nullable)
[].treatingPersonstringPerson who treated(required, nullable)
[].veterinarianstringVeterinarian(required, nullable)
[].prescriptionNumberstringPrescription number(required, nullable)
[].deletedAtstringSoft-delete marker; always null here (ISO 8601 date-time)(required, nullable)
[].lockedAtstringWhen the record became immutable; null while it can still be edited (ISO 8601 date-time)(required, nullable)
[].correctionOfstringID of the treatment this record corrects(required, nullable)
[].correctedBystringID of the correction that replaces this record(required, nullable)
[].typeInferredbooleanThe treatment type was inferred by the system(required)
[].createdByMemberIdstringTeam member who created the record; null = owner(required, nullable)
[].voidedAtstringWhen 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)
[].voidedByIdstringWho voided the record(required, nullable)
[].voidReasonstringReason for voiding(required, nullable, duplicate | never_applied | other)
[].voidNotestringNote on the voiding(required, nullable)
[].voidDuplicateOfIdstringID of the treatment this record duplicates(required, nullable)
[].createdAtstringCreated (ISO 8601 date-time)(required)
[].updatedAtstringLast updated (ISO 8601 date-time)(required)
[].hiveobjectThe colony of the record (reference)(required)
[].hive.idstringHive ID(required)
[].hive.numberintegerColony number(required)
[].hive.namestringColony name(required, nullable)
[].hive.apiaryobjectIts apiary(required)
[].hive.apiary.idstringApiary ID(required)
[].hive.apiary.namestringApiary 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"
POST/api/treatmentsScope: write:treatments

Create 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.

FieldTypeDescription
hiveIdstringHive ID(required)e.g. clx2abc
treatmentTypestringvarroa_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
methodstringevaporator | drip | spray | sublimation | strips | other(nullable, evaporator | drip | spray | sublimation | strips | other)
startDatestringStart date (ISO date or date-time)(required)e.g. 2025-12-01
endDatestringEnd date (ISO, not before `startDate`); required when the honey withdrawal period is above 0 days, and for a medicinal type entering `completed`
dosenumberDosage amount, positive, at most 10000; with `unit` required for medicinal treatment typese.g. 5
unitstringml | g | strips(nullable, ml | g | strips)
statusstringplanned | active | completed(default completed, planned | active | completed)e.g. completed
notesstringFree-text notes (max 5000 chars); on a locked record only extendable via `notesAddendum`
varroaCountBeforeintegerVarroa count before the treatment, 0-100000
varroaCountAfterintegerVarroa count after the treatment, 0-100000
effectivenessstringObserved effectiveness(nullable, high | medium | low | none)
waitPeriodEndstringEnd 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
batchNumberstringBatch number of the medication, max 100 characters (recommended)
supplierstringSupplier name, max 500 characters; medicinal treatment types need `supplier` or `supplierInvoice`
supplierInvoicestringInvoice or delivery note number, max 100 characters
withdrawalPeriodDaysintegerDeprecated: use `withdrawalPeriodDaysHoney`. 0-365 days; on create it mirrors an explicitly sent honey value, otherwise stays empty
withdrawalPeriodDaysHoneyintegerWithdrawal 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)
withdrawalPeriodDaysWaxintegerWithdrawal period for wax in days, 0-3650. Omitted on create: stays empty (null); null: explicitly unknown(nullable)
typeInferredbooleanMarks a treatment type that the system inferred instead of the user choosing it; leave unset
treatingPersonstringName of the person who treated, 1-200 characters(required)e.g. Max Muster
veterinarianstringVeterinarian, max 500 characters; required with `prescriptionNumber` for prescription-only types
prescriptionNumberstringPrescription 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"}}}

FieldTypeDescription
idstringTreatment ID(required)
userIdstringOwner ID(required)
hiveIdstringHive ID(required)
treatmentGroupIdstringGroup of a multi-colony treatment(required, nullable)
treatmentTypestringTreatment 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)
methodstringApplication method(required, nullable, evaporator | drip | spray | sublimation | strips | other)
startDatestringStart (ISO 8601 date-time)(required)
endDatestringEnd (ISO 8601 date-time)(required, nullable)
dosenumberDosage amount(required, nullable)
unitstringDosage unit(required, nullable, ml | g | strips)
statusstringStatus(required, planned | active | completed | pending_compliance)
notesstringFree-text notes(required, nullable)
varroaCountBeforeintegerVarroa count before the treatment(required, nullable)
varroaCountAfterintegerVarroa count after the treatment(required, nullable)
effectivenessstringObserved effectiveness(required, nullable, high | medium | low | none)
waitPeriodEndstringEnd of the withdrawal period (ISO 8601 date-time)(required, nullable)
batchNumberstringBatch number of the medication(required, nullable)
supplierstringSupplier(required, nullable)
supplierInvoicestringInvoice or delivery note number(required, nullable)
withdrawalPeriodDaysintegerDeprecated withdrawal days(required, nullable)
withdrawalPeriodDaysHoneyintegerWithdrawal period for honey in days(required, nullable)
withdrawalPeriodDaysWaxintegerWithdrawal period for wax in days(required, nullable)
treatingPersonstringPerson who treated(required, nullable)
veterinarianstringVeterinarian(required, nullable)
prescriptionNumberstringPrescription number(required, nullable)
deletedAtstringSoft-delete marker; always null here (ISO 8601 date-time)(required, nullable)
lockedAtstringWhen the record became immutable; null while it can still be edited (ISO 8601 date-time)(required, nullable)
correctionOfstringID of the treatment this record corrects(required, nullable)
correctedBystringID of the correction that replaces this record(required, nullable)
typeInferredbooleanThe treatment type was inferred by the system(required)
createdByMemberIdstringTeam member who created the record; null = owner(required, nullable)
voidedAtstringWhen 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)
voidedByIdstringWho voided the record(required, nullable)
voidReasonstringReason for voiding(required, nullable, duplicate | never_applied | other)
voidNotestringNote on the voiding(required, nullable)
voidDuplicateOfIdstringID of the treatment this record duplicates(required, nullable)
createdAtstringCreated (ISO 8601 date-time)(required)
updatedAtstringLast updated (ISO 8601 date-time)(required)
hiveobjectThe colony of the record (reference)(required)
hive.idstringHive ID(required)
hive.numberintegerColony number(required)
hive.namestringColony name(required, nullable)
hive.apiaryobjectIts apiary(required)
hive.apiary.idstringApiary ID(required)
hive.apiary.namestringApiary 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"}'
GET/api/treatments/[id]Scope: read:treatments

Get a single treatment

Returns full treatment details including compliance fields.

Path Parameters

NameTypeRequiredDescription
idstringYesTreatment 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"}

FieldTypeDescription
idstringTreatment ID(required)
userIdstringOwner ID(required)
hiveIdstringHive ID(required)
treatmentGroupIdstringGroup of a multi-colony treatment(required, nullable)
treatmentTypestringTreatment 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)
methodstringApplication method(required, nullable, evaporator | drip | spray | sublimation | strips | other)
startDatestringStart (ISO 8601 date-time)(required)
endDatestringEnd (ISO 8601 date-time)(required, nullable)
dosenumberDosage amount(required, nullable)
unitstringDosage unit(required, nullable, ml | g | strips)
statusstringStatus(required, planned | active | completed | pending_compliance)
notesstringFree-text notes(required, nullable)
varroaCountBeforeintegerVarroa count before the treatment(required, nullable)
varroaCountAfterintegerVarroa count after the treatment(required, nullable)
effectivenessstringObserved effectiveness(required, nullable, high | medium | low | none)
waitPeriodEndstringEnd of the withdrawal period (ISO 8601 date-time)(required, nullable)
batchNumberstringBatch number of the medication(required, nullable)
supplierstringSupplier(required, nullable)
supplierInvoicestringInvoice or delivery note number(required, nullable)
withdrawalPeriodDaysintegerDeprecated withdrawal days(required, nullable)
withdrawalPeriodDaysHoneyintegerWithdrawal period for honey in days(required, nullable)
withdrawalPeriodDaysWaxintegerWithdrawal period for wax in days(required, nullable)
treatingPersonstringPerson who treated(required, nullable)
veterinarianstringVeterinarian(required, nullable)
prescriptionNumberstringPrescription number(required, nullable)
deletedAtstringSoft-delete marker; always null here (ISO 8601 date-time)(required, nullable)
lockedAtstringWhen the record became immutable; null while it can still be edited (ISO 8601 date-time)(required, nullable)
correctionOfstringID of the treatment this record corrects(required, nullable)
correctedBystringID of the correction that replaces this record(required, nullable)
typeInferredbooleanThe treatment type was inferred by the system(required)
createdByMemberIdstringTeam member who created the record; null = owner(required, nullable)
voidedAtstringWhen 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)
voidedByIdstringWho voided the record(required, nullable)
voidReasonstringReason for voiding(required, nullable, duplicate | never_applied | other)
voidNotestringNote on the voiding(required, nullable)
voidDuplicateOfIdstringID of the treatment this record duplicates(required, nullable)
createdAtstringCreated (ISO 8601 date-time)(required)
updatedAtstringLast updated (ISO 8601 date-time)(required)
hiveobjectThe colony of the record (reference)(required)
hive.idstringHive ID(required)
hive.numberintegerColony number(required)
hive.namestringColony name(required, nullable)
hive.apiaryobjectIts apiary(required)
hive.apiary.idstringApiary ID(required)
hive.apiary.namestringApiary name(required)
deleteBlockedReasonstring`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"
PUT/api/treatments/[id]Scope: write:treatments

Update 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

NameTypeRequiredDescription
idstringYesTreatment 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.

FieldTypeDescription
hiveIdstringHive IDe.g. clx2abc
treatmentTypestringvarroa_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
methodstringevaporator | drip | spray | sublimation | strips | other — null clears the field(nullable, evaporator | drip | spray | sublimation | strips | other)
startDatestringStart date (ISO date or date-time)e.g. 2025-12-01
endDatestringEnd date (ISO, not before `startDate`); required when the honey withdrawal period is above 0 days, and for a medicinal type entering `completed`
dosenumberDosage amount, positive, at most 10000; with `unit` required for medicinal treatment typese.g. 5
unitstringml | g | strips — null clears the field, except on a medicinal treatment type (400, dose and unit stay required)(nullable, ml | g | strips)
statusstringplanned | active | completed | pending_compliance(planned | active | completed | pending_compliance)
notesstringFree-text notes (max 5000 chars); on a locked record only extendable via `notesAddendum`
varroaCountBeforeintegerVarroa count before the treatment, 0-100000
varroaCountAfterintegerVarroa count after the treatment, 0-100000
effectivenessstringObserved effectiveness — null clears the field(nullable, high | medium | low | none)
waitPeriodEndstringEnd 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
batchNumberstringBatch number of the medication, max 100 characters (recommended)
supplierstringSupplier name, max 500 characters; medicinal treatment types need `supplier` or `supplierInvoice`
supplierInvoicestringInvoice or delivery note number, max 100 characters
withdrawalPeriodDaysintegerDeprecated: use `withdrawalPeriodDaysHoney`. 0-365 days; on create it mirrors an explicitly sent honey value, otherwise stays empty
withdrawalPeriodDaysHoneyintegerWithdrawal 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)
withdrawalPeriodDaysWaxintegerWithdrawal period for wax in days, 0-3650. Omitted on create: stays empty (null); null: explicitly unknown(nullable)
typeInferredbooleanMarks a treatment type that the system inferred instead of the user choosing it; leave unset
treatingPersonstringName of the person who treated, 1-200 characterse.g. Max Muster
veterinarianstringVeterinarian, max 500 characters; required with `prescriptionNumber` for prescription-only types
prescriptionNumberstringPrescription number, max 100 characters; required with `veterinarian` for prescription-only types
notesAddendumstringUpdate 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"}}}

FieldTypeDescription
idstringTreatment ID(required)
userIdstringOwner ID(required)
hiveIdstringHive ID(required)
treatmentGroupIdstringGroup of a multi-colony treatment(required, nullable)
treatmentTypestringTreatment 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)
methodstringApplication method(required, nullable, evaporator | drip | spray | sublimation | strips | other)
startDatestringStart (ISO 8601 date-time)(required)
endDatestringEnd (ISO 8601 date-time)(required, nullable)
dosenumberDosage amount(required, nullable)
unitstringDosage unit(required, nullable, ml | g | strips)
statusstringStatus(required, planned | active | completed | pending_compliance)
notesstringFree-text notes(required, nullable)
varroaCountBeforeintegerVarroa count before the treatment(required, nullable)
varroaCountAfterintegerVarroa count after the treatment(required, nullable)
effectivenessstringObserved effectiveness(required, nullable, high | medium | low | none)
waitPeriodEndstringEnd of the withdrawal period (ISO 8601 date-time)(required, nullable)
batchNumberstringBatch number of the medication(required, nullable)
supplierstringSupplier(required, nullable)
supplierInvoicestringInvoice or delivery note number(required, nullable)
withdrawalPeriodDaysintegerDeprecated withdrawal days(required, nullable)
withdrawalPeriodDaysHoneyintegerWithdrawal period for honey in days(required, nullable)
withdrawalPeriodDaysWaxintegerWithdrawal period for wax in days(required, nullable)
treatingPersonstringPerson who treated(required, nullable)
veterinarianstringVeterinarian(required, nullable)
prescriptionNumberstringPrescription number(required, nullable)
deletedAtstringSoft-delete marker; always null here (ISO 8601 date-time)(required, nullable)
lockedAtstringWhen the record became immutable; null while it can still be edited (ISO 8601 date-time)(required, nullable)
correctionOfstringID of the treatment this record corrects(required, nullable)
correctedBystringID of the correction that replaces this record(required, nullable)
typeInferredbooleanThe treatment type was inferred by the system(required)
createdByMemberIdstringTeam member who created the record; null = owner(required, nullable)
voidedAtstringWhen 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)
voidedByIdstringWho voided the record(required, nullable)
voidReasonstringReason for voiding(required, nullable, duplicate | never_applied | other)
voidNotestringNote on the voiding(required, nullable)
voidDuplicateOfIdstringID of the treatment this record duplicates(required, nullable)
createdAtstringCreated (ISO 8601 date-time)(required)
updatedAtstringLast updated (ISO 8601 date-time)(required)
hiveobjectThe colony of the record (reference)(required)
hive.idstringHive ID(required)
hive.numberintegerColony number(required)
hive.namestringColony name(required, nullable)
hive.apiaryobjectIts apiary(required)
hive.apiary.idstringApiary ID(required)
hive.apiary.namestringApiary 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"}'
DELETE/api/treatments/[id]Scope: write:treatments

Delete a treatment

Permanently removes a treatment record.

Path Parameters

NameTypeRequiredDescription
idstringYesTreatment 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.

GET/api/feedingsScope: read:feedings

List feedings

Returns all feeding records for the user.

Query Parameters

NameTypeRequiredDescription
hiveIdstringNoFilter by hive
apiaryIdstringNoFilter by apiary
feedTypestringNoFilter by feed type (sugar_syrup, fondant, honey, pollen_substitute, api_invert, other)
searchstringNoFree-text search over hive name, hive number (exact), feed type and notes
dateFromstringNoFeeding date lower bound (ISO, inclusive)e.g. 2025-01-01
dateTostringNoFeeding date upper bound (ISO, the whole day is included)e.g. 2025-12-31
limitnumberNoPage 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.
cursorstringNoPagination 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}

FieldTypeDescription
itemsarrayThe feedings on this page(required)
items[].idstringFeeding ID(required)
items[].userIdstringOwner ID(required)
items[].hiveIdstringHive ID(required)
items[].feedingGroupIdstringGroup of a multi-colony feeding(required, nullable)
items[].feedTypestringFeed type(required, sugar_syrup | fondant | honey | pollen_substitute | api_invert | other)
items[].amountnumberAmount in `feedUnit` (kg when `feedUnit` is null)(required)
items[].datestringFeeding date (ISO 8601 date-time)(required)
items[].notesstringFree-text notes(required, nullable)
items[].feedUnitstringUnit of `amount`; null counts as kg(required, nullable, kg | liter | ml)
items[].concentrationstringSugar ratio(required, nullable)
items[].createdByMemberIdstringTeam member who created the record; null = owner(required, nullable)
items[].reviewStatestringReview state for team records; null = no review required(required, nullable)
items[].reviewedByMemberIdstringTeam member who reviewed the record(required, nullable)
items[].reviewedAtstringWhen the record was reviewed (ISO 8601 date-time)(required, nullable)
items[].reviewNotestringReview note(required, nullable)
items[].createdAtstringCreated (ISO 8601 date-time)(required)
items[].updatedAtstringLast updated (ISO 8601 date-time)(required)
items[].deletedAtstringSoft-delete marker; always null here (ISO 8601 date-time)(required, nullable)
items[].hiveobjectThe colony of the record (reference)(required)
items[].hive.idstringHive ID(required)
items[].hive.numberintegerColony number(required)
items[].hive.namestringColony name(required, nullable)
items[].hive.apiaryobjectIts apiary(required)
items[].hive.apiary.idstringApiary ID(required)
items[].hive.apiary.namestringApiary name(required)
nextCursorstringCursor for the next page, or null when there are no more results(required, nullable)
hasMorebooleanTrue when a further page is available(required)
[].idstringFeeding ID(required)
[].userIdstringOwner ID(required)
[].hiveIdstringHive ID(required)
[].feedingGroupIdstringGroup of a multi-colony feeding(required, nullable)
[].feedTypestringFeed type(required, sugar_syrup | fondant | honey | pollen_substitute | api_invert | other)
[].amountnumberAmount in `feedUnit` (kg when `feedUnit` is null)(required)
[].datestringFeeding date (ISO 8601 date-time)(required)
[].notesstringFree-text notes(required, nullable)
[].feedUnitstringUnit of `amount`; null counts as kg(required, nullable, kg | liter | ml)
[].concentrationstringSugar ratio(required, nullable)
[].createdByMemberIdstringTeam member who created the record; null = owner(required, nullable)
[].reviewStatestringReview state for team records; null = no review required(required, nullable)
[].reviewedByMemberIdstringTeam member who reviewed the record(required, nullable)
[].reviewedAtstringWhen the record was reviewed (ISO 8601 date-time)(required, nullable)
[].reviewNotestringReview note(required, nullable)
[].createdAtstringCreated (ISO 8601 date-time)(required)
[].updatedAtstringLast updated (ISO 8601 date-time)(required)
[].deletedAtstringSoft-delete marker; always null here (ISO 8601 date-time)(required, nullable)
[].hiveobjectThe colony of the record (reference)(required)
[].hive.idstringHive ID(required)
[].hive.numberintegerColony number(required)
[].hive.namestringColony name(required, nullable)
[].hive.apiaryobjectIts apiary(required)
[].hive.apiary.idstringApiary ID(required)
[].hive.apiary.namestringApiary 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"
POST/api/feedingsScope: write:feedings

Create a feeding

Records a new feeding event for a colony.

Request Body

hiveId, feedType, amount and date are required.

FieldTypeDescription
hiveIdstringHive ID(required)e.g. clx2abc
feedTypestringFeed type(required, sugar_syrup | fondant | honey | pollen_substitute | api_invert | other)e.g. sugar_syrup
amountnumberAmount in `feedUnit` (kg when omitted), positive, at most 100000(required)e.g. 2.5
feedUnitstringUnit of `amount`; an omitted unit counts as kg(kg | liter | ml)
concentrationstringSugar ratio such as 1:1, 3:2, 2:1, 1:0, max 10 characters (free text)
datestringFeeding date (ISO date or date-time)(required)e.g. 2025-09-01
notesstringFree-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"}}}

FieldTypeDescription
idstringFeeding ID(required)
userIdstringOwner ID(required)
hiveIdstringHive ID(required)
feedingGroupIdstringGroup of a multi-colony feeding(required, nullable)
feedTypestringFeed type(required, sugar_syrup | fondant | honey | pollen_substitute | api_invert | other)
amountnumberAmount in `feedUnit` (kg when `feedUnit` is null)(required)
datestringFeeding date (ISO 8601 date-time)(required)
notesstringFree-text notes(required, nullable)
feedUnitstringUnit of `amount`; null counts as kg(required, nullable, kg | liter | ml)
concentrationstringSugar ratio(required, nullable)
createdByMemberIdstringTeam member who created the record; null = owner(required, nullable)
reviewStatestringReview state for team records; null = no review required(required, nullable)
reviewedByMemberIdstringTeam member who reviewed the record(required, nullable)
reviewedAtstringWhen the record was reviewed (ISO 8601 date-time)(required, nullable)
reviewNotestringReview note(required, nullable)
createdAtstringCreated (ISO 8601 date-time)(required)
updatedAtstringLast updated (ISO 8601 date-time)(required)
deletedAtstringSoft-delete marker; always null here (ISO 8601 date-time)(required, nullable)
hiveobjectThe colony of the record (reference)(required)
hive.idstringHive ID(required)
hive.numberintegerColony number(required)
hive.namestringColony name(required, nullable)
hive.apiaryobjectIts apiary(required)
hive.apiary.idstringApiary ID(required)
hive.apiary.namestringApiary 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"}'
GET/api/feedings/[id]Scope: read:feedings

Get a single feeding

Returns full details of a feeding record.

Path Parameters

NameTypeRequiredDescription
idstringYesFeeding 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"}}}

FieldTypeDescription
idstringFeeding ID(required)
userIdstringOwner ID(required)
hiveIdstringHive ID(required)
feedingGroupIdstringGroup of a multi-colony feeding(required, nullable)
feedTypestringFeed type(required, sugar_syrup | fondant | honey | pollen_substitute | api_invert | other)
amountnumberAmount in `feedUnit` (kg when `feedUnit` is null)(required)
datestringFeeding date (ISO 8601 date-time)(required)
notesstringFree-text notes(required, nullable)
feedUnitstringUnit of `amount`; null counts as kg(required, nullable, kg | liter | ml)
concentrationstringSugar ratio(required, nullable)
createdByMemberIdstringTeam member who created the record; null = owner(required, nullable)
reviewStatestringReview state for team records; null = no review required(required, nullable)
reviewedByMemberIdstringTeam member who reviewed the record(required, nullable)
reviewedAtstringWhen the record was reviewed (ISO 8601 date-time)(required, nullable)
reviewNotestringReview note(required, nullable)
createdAtstringCreated (ISO 8601 date-time)(required)
updatedAtstringLast updated (ISO 8601 date-time)(required)
deletedAtstringSoft-delete marker; always null here (ISO 8601 date-time)(required, nullable)
hiveobjectThe colony of the record (reference)(required)
hive.idstringHive ID(required)
hive.numberintegerColony number(required)
hive.namestringColony name(required, nullable)
hive.apiaryobjectIts apiary(required)
hive.apiary.idstringApiary ID(required)
hive.apiary.namestringApiary 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"
PUT/api/feedings/[id]Scope: write:feedings

Update a feeding

Partially updates an existing feeding record. All fields are optional.

Path Parameters

NameTypeRequiredDescription
idstringYesFeeding ID

Request Body

Any subset of feeding fields; `expectedUpdatedAt` adds an optimistic lock. An omitted field stays untouched; `null` clears feedUnit, concentration and notes.

FieldTypeDescription
hiveIdstringHive IDe.g. clx2abc
feedTypestringFeed type(sugar_syrup | fondant | honey | pollen_substitute | api_invert | other)e.g. sugar_syrup
amountnumberAmount in `feedUnit` (the stored unit when omitted), positive, at most 100000e.g. 2.5
feedUnitstringUnit of `amount`; an omitted field keeps the stored unit (a stored empty unit counts as kg); null clears the field(nullable, kg | liter | ml)
concentrationstringSugar ratio such as 1:1, 3:2, 2:1, 1:0, max 10 characters (free text)(nullable)
datestringFeeding date (ISO date or date-time)e.g. 2025-09-01
notesstringFree-text notes (max 5000 chars)(nullable)
expectedUpdatedAtstringOptimistic 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"}}}

FieldTypeDescription
idstringFeeding ID(required)
userIdstringOwner ID(required)
hiveIdstringHive ID(required)
feedingGroupIdstringGroup of a multi-colony feeding(required, nullable)
feedTypestringFeed type(required, sugar_syrup | fondant | honey | pollen_substitute | api_invert | other)
amountnumberAmount in `feedUnit` (kg when `feedUnit` is null)(required)
datestringFeeding date (ISO 8601 date-time)(required)
notesstringFree-text notes(required, nullable)
feedUnitstringUnit of `amount`; null counts as kg(required, nullable, kg | liter | ml)
concentrationstringSugar ratio(required, nullable)
createdByMemberIdstringTeam member who created the record; null = owner(required, nullable)
reviewStatestringReview state for team records; null = no review required(required, nullable)
reviewedByMemberIdstringTeam member who reviewed the record(required, nullable)
reviewedAtstringWhen the record was reviewed (ISO 8601 date-time)(required, nullable)
reviewNotestringReview note(required, nullable)
createdAtstringCreated (ISO 8601 date-time)(required)
updatedAtstringLast updated (ISO 8601 date-time)(required)
deletedAtstringSoft-delete marker; always null here (ISO 8601 date-time)(required, nullable)
hiveobjectThe colony of the record (reference)(required)
hive.idstringHive ID(required)
hive.numberintegerColony number(required)
hive.namestringColony name(required, nullable)
hive.apiaryobjectIts apiary(required)
hive.apiary.idstringApiary ID(required)
hive.apiary.namestringApiary 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"}'
DELETE/api/feedings/[id]Scope: write:feedings

Delete a feeding

Permanently removes a feeding record.

Path Parameters

NameTypeRequiredDescription
idstringYesFeeding 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.

GET/api/harvestsScope: read:harvests

List harvests

Returns all harvests for the authenticated user.

Query Parameters

NameTypeRequiredDescription
apiaryIdstringNoFilter by apiary
honeyTypestringNospring | summer | blossom | forest | linden | rapeseed | acacia | heather | sunflower | phacelia | buckwheat | chestnut | clover | mixed | other
yearintegerNoHarvest year (UTC), 2000 up to five years aheade.g. 2025
hiveIdstringNoOnly harvests this colony took part in
searchstringNoFree-text search over notes, apiary name, colony name, and colony number (exact); "12 Berta" matches number and name of one colony
honeyTypesstringNoComma-separated honey types that are added to the matches of `search`; unknown values are ignored
cursorstringNoPagination 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).
limitnumberNoItems 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}

FieldTypeDescription
itemsarrayThe harvests on this page(required)
items[].idstringHarvest ID(required)
items[].userIdstringOwner ID(required)
items[].apiaryIdstringApiary ID(required, nullable)
items[].harvestDatestringHarvest date (ISO 8601 date-time)(required)
items[].honeyTypestringHoney type(required, nullable, spring | summer | blossom | forest | linden | rapeseed | acacia | heather | sunflower | phacelia | buckwheat | chestnut | clover | mixed | other)
items[].netWeightnumberNet weight in kg(required)
items[].waterContentnumberWater content in percent(required, nullable)
items[].batchNumberstringBatch number `<year>-<serial>`, assigned by the server(required)
items[].notesstringFree-text notes(required, nullable)
items[].harvestMethodstringExtraction method(required, nullable, extractor | flow_frame | press | cut_comb | drip | other)
items[].frameCountintegerNumber of frames harvested(required, nullable)
items[].directToJarbooleanHoney was filled straight from the comb into jars(required, nullable)
items[].aromaScoreintegerAroma score 1-10(required, nullable)
items[].tasteScoreintegerTaste score 1-10(required, nullable)
items[].consistencyScoreintegerConsistency score 1-10(required, nullable)
items[].createdByMemberIdstringTeam member who created the record; null = owner(required, nullable)
items[].reviewStatestringReview state for team records; null = no review required(required, nullable)
items[].reviewedByMemberIdstringTeam member who reviewed the record(required, nullable)
items[].reviewedAtstringWhen the record was reviewed (ISO 8601 date-time)(required, nullable)
items[].reviewNotestringReview note(required, nullable)
items[].deletedAtstringSoft-delete marker; always null here (ISO 8601 date-time)(required, nullable)
items[].createdAtstringCreated (ISO 8601 date-time)(required)
items[].updatedAtstringLast updated (ISO 8601 date-time)(required)
items[].apiaryobjectIts apiary(required, nullable)
items[].apiary.idstringApiary ID(required)
items[].apiary.namestringApiary name(required)
items[].apiary.deletedAtstringSet when the apiary was deleted (ISO 8601 date-time)(required, nullable)
items[].harvestHivesarrayParticipating colonies that still exist(required)
items[].harvestHives[].hiveobjectThe colony(required)
items[].harvestHives[].hive.idstringHive ID(required)
items[].harvestHives[].hive.numberintegerColony number(required)
items[].harvestHives[].hive.namestringColony name(required, nullable)
items[]._countobjectCounts(required)
items[]._count.harvestHivesintegerAll participating colonies including deleted ones(required)
items[].bottlingHarvestsarrayBottling batches fed by this harvest(required)
items[].bottlingHarvests[].weightnumberAllocated weight in g(required)
items[].bottlingHarvests[].bottlingBatchobjectThe batch(required)
items[].bottlingHarvests[].bottlingBatch.idstringBottling batch ID(required)
items[].participantHiveIdsarrayIDs of all participating colonies, including deleted ones (get and list only)(required)
items[].participantHiveIds[]stringHive ID
nextCursorstringCursor for the next page, or null when there are no more results(required, nullable)
hasMorebooleanTrue when a further page is available(required)
[].idstringHarvest ID(required)
[].userIdstringOwner ID(required)
[].apiaryIdstringApiary ID(required, nullable)
[].harvestDatestringHarvest date (ISO 8601 date-time)(required)
[].honeyTypestringHoney type(required, nullable, spring | summer | blossom | forest | linden | rapeseed | acacia | heather | sunflower | phacelia | buckwheat | chestnut | clover | mixed | other)
[].netWeightnumberNet weight in kg(required)
[].waterContentnumberWater content in percent(required, nullable)
[].batchNumberstringBatch number `<year>-<serial>`, assigned by the server(required)
[].notesstringFree-text notes(required, nullable)
[].harvestMethodstringExtraction method(required, nullable, extractor | flow_frame | press | cut_comb | drip | other)
[].frameCountintegerNumber of frames harvested(required, nullable)
[].directToJarbooleanHoney was filled straight from the comb into jars(required, nullable)
[].aromaScoreintegerAroma score 1-10(required, nullable)
[].tasteScoreintegerTaste score 1-10(required, nullable)
[].consistencyScoreintegerConsistency score 1-10(required, nullable)
[].createdByMemberIdstringTeam member who created the record; null = owner(required, nullable)
[].reviewStatestringReview state for team records; null = no review required(required, nullable)
[].reviewedByMemberIdstringTeam member who reviewed the record(required, nullable)
[].reviewedAtstringWhen the record was reviewed (ISO 8601 date-time)(required, nullable)
[].reviewNotestringReview note(required, nullable)
[].deletedAtstringSoft-delete marker; always null here (ISO 8601 date-time)(required, nullable)
[].createdAtstringCreated (ISO 8601 date-time)(required)
[].updatedAtstringLast updated (ISO 8601 date-time)(required)
[].apiaryobjectIts apiary(required, nullable)
[].apiary.idstringApiary ID(required)
[].apiary.namestringApiary name(required)
[].apiary.deletedAtstringSet when the apiary was deleted (ISO 8601 date-time)(required, nullable)
[].harvestHivesarrayParticipating colonies that still exist(required)
[].harvestHives[].hiveobjectThe colony(required)
[].harvestHives[].hive.idstringHive ID(required)
[].harvestHives[].hive.numberintegerColony number(required)
[].harvestHives[].hive.namestringColony name(required, nullable)
[]._countobjectCounts(required)
[]._count.harvestHivesintegerAll participating colonies including deleted ones(required)
[].bottlingHarvestsarrayBottling batches fed by this harvest(required)
[].bottlingHarvests[].weightnumberAllocated weight in g(required)
[].bottlingHarvests[].bottlingBatchobjectThe batch(required)
[].bottlingHarvests[].bottlingBatch.idstringBottling batch ID(required)
[].participantHiveIdsarrayIDs of all participating colonies, including deleted ones (get and list only)(required)
[].participantHiveIds[]stringHive 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"
POST/api/harvestsScope: write:harvests

Create 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

NameTypeRequiredDescription
Idempotency-KeystringNoOptional 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.

FieldTypeDescription
apiaryIdstringAssociated apiary
harvestDatestringHarvest date (ISO, not more than 24 hours in the future)(required)e.g. 2025-07-10
honeyTypestringspring | 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
harvestMethodstringExtraction method(extractor | flow_frame | press | cut_comb | drip | other)
netWeightnumberNet weight in kg, positive, at most 100000(required)e.g. 22.5
waterContentnumberWater content % (0-30)e.g. 17.2
frameCountintegerNumber of frames harvested, 1-50
directToJarbooleanHoney was filled straight from the comb into jars
hiveIdsarrayArray of hive IDs that contributed, at most 200 (required unless confirmNoHiveLink is true)
hiveIds[]stringHive ID
notesstringFree-text notes (max 5000 chars)
confirmHoneySourcebooleanConfirm that the honey was stored before a sugar feeding of the last 60 days; logged for the auditor
confirmNoHiveLinkbooleanExplicitly confirm a harvest without hive assignment — logged for the auditore.g. false
aromaScoreintegerAroma score 1-10(nullable)
tasteScoreintegerTaste score 1-10(nullable)
consistencyScoreintegerConsistency 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":[]}

FieldTypeDescription
idstringHarvest ID(required)
userIdstringOwner ID(required)
apiaryIdstringApiary ID(required, nullable)
harvestDatestringHarvest date (ISO 8601 date-time)(required)
honeyTypestringHoney type(required, nullable, spring | summer | blossom | forest | linden | rapeseed | acacia | heather | sunflower | phacelia | buckwheat | chestnut | clover | mixed | other)
netWeightnumberNet weight in kg(required)
waterContentnumberWater content in percent(required, nullable)
batchNumberstringBatch number `<year>-<serial>`, assigned by the server(required)
notesstringFree-text notes(required, nullable)
harvestMethodstringExtraction method(required, nullable, extractor | flow_frame | press | cut_comb | drip | other)
frameCountintegerNumber of frames harvested(required, nullable)
directToJarbooleanHoney was filled straight from the comb into jars(required, nullable)
aromaScoreintegerAroma score 1-10(required, nullable)
tasteScoreintegerTaste score 1-10(required, nullable)
consistencyScoreintegerConsistency score 1-10(required, nullable)
createdByMemberIdstringTeam member who created the record; null = owner(required, nullable)
reviewStatestringReview state for team records; null = no review required(required, nullable)
reviewedByMemberIdstringTeam member who reviewed the record(required, nullable)
reviewedAtstringWhen the record was reviewed (ISO 8601 date-time)(required, nullable)
reviewNotestringReview note(required, nullable)
deletedAtstringSoft-delete marker; always null here (ISO 8601 date-time)(required, nullable)
createdAtstringCreated (ISO 8601 date-time)(required)
updatedAtstringLast updated (ISO 8601 date-time)(required)
apiaryobjectIts apiary(required, nullable)
apiary.idstringApiary ID(required)
apiary.namestringApiary name(required)
apiary.deletedAtstringSet when the apiary was deleted (ISO 8601 date-time)(required, nullable)
harvestHivesarrayParticipating colonies that still exist(required)
harvestHives[].hiveobjectThe colony(required)
harvestHives[].hive.idstringHive ID(required)
harvestHives[].hive.numberintegerColony number(required)
harvestHives[].hive.namestringColony name(required, nullable)
_countobjectCounts(required)
_count.harvestHivesintegerAll participating colonies including deleted ones(required)
bottlingHarvestsarrayBottling batches fed by this harvest(required)
bottlingHarvests[].weightnumberAllocated weight in g(required)
bottlingHarvests[].bottlingBatchobjectThe batch(required)
bottlingHarvests[].bottlingBatch.idstringBottling 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"]}'
GET/api/harvests/[id]Scope: read:harvests

Get a single harvest

Returns full details for one harvest record.

Path Parameters

NameTypeRequiredDescription
idstringYesHarvest 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"]}

FieldTypeDescription
idstringHarvest ID(required)
userIdstringOwner ID(required)
apiaryIdstringApiary ID(required, nullable)
harvestDatestringHarvest date (ISO 8601 date-time)(required)
honeyTypestringHoney type(required, nullable, spring | summer | blossom | forest | linden | rapeseed | acacia | heather | sunflower | phacelia | buckwheat | chestnut | clover | mixed | other)
netWeightnumberNet weight in kg(required)
waterContentnumberWater content in percent(required, nullable)
batchNumberstringBatch number `<year>-<serial>`, assigned by the server(required)
notesstringFree-text notes(required, nullable)
harvestMethodstringExtraction method(required, nullable, extractor | flow_frame | press | cut_comb | drip | other)
frameCountintegerNumber of frames harvested(required, nullable)
directToJarbooleanHoney was filled straight from the comb into jars(required, nullable)
aromaScoreintegerAroma score 1-10(required, nullable)
tasteScoreintegerTaste score 1-10(required, nullable)
consistencyScoreintegerConsistency score 1-10(required, nullable)
createdByMemberIdstringTeam member who created the record; null = owner(required, nullable)
reviewStatestringReview state for team records; null = no review required(required, nullable)
reviewedByMemberIdstringTeam member who reviewed the record(required, nullable)
reviewedAtstringWhen the record was reviewed (ISO 8601 date-time)(required, nullable)
reviewNotestringReview note(required, nullable)
deletedAtstringSoft-delete marker; always null here (ISO 8601 date-time)(required, nullable)
createdAtstringCreated (ISO 8601 date-time)(required)
updatedAtstringLast updated (ISO 8601 date-time)(required)
apiaryobjectIts apiary(required, nullable)
apiary.idstringApiary ID(required)
apiary.namestringApiary name(required)
apiary.deletedAtstringSet when the apiary was deleted (ISO 8601 date-time)(required, nullable)
harvestHivesarrayParticipating colonies that still exist(required)
harvestHives[].hiveobjectThe colony(required)
harvestHives[].hive.idstringHive ID(required)
harvestHives[].hive.numberintegerColony number(required)
harvestHives[].hive.namestringColony name(required, nullable)
_countobjectCounts(required)
_count.harvestHivesintegerAll participating colonies including deleted ones(required)
bottlingHarvestsarrayBottling batches fed by this harvest(required)
bottlingHarvests[].weightnumberAllocated weight in g(required)
bottlingHarvests[].bottlingBatchobjectThe batch(required)
bottlingHarvests[].bottlingBatch.idstringBottling batch ID(required)
participantHiveIdsarrayIDs of all participating colonies, including deleted ones (get and list only)(required)
participantHiveIds[]stringHive 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"
PUT/api/harvests/[id]Scope: write:harvests

Update a harvest

Partially updates an existing harvest record. All fields are optional.

Path Parameters

NameTypeRequiredDescription
idstringYesHarvest ID

Request Body

Any subset of harvest fields. An omitted field stays untouched; `null` clears the nullable fields.

FieldTypeDescription
apiaryIdstringAssociated apiary(nullable)
harvestDatestringHarvest date (ISO, not more than 24 hours in the future)e.g. 2025-07-10
honeyTypestringspring | 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
harvestMethodstringExtraction method(nullable, extractor | flow_frame | press | cut_comb | drip | other)
netWeightnumberNet weight in kg, positive, at most 100000e.g. 22.5
waterContentnumberWater content % (0-30)(nullable)e.g. 17.2
frameCountintegerNumber of frames harvested, 1-50(nullable)
directToJarbooleanHoney was filled straight from the comb into jars(nullable)
hiveIdsarrayArray of hive IDs contributing to the harvest, at most 200; replaces the links of living colonies. Sending `[]` while colonies are linked needs `confirmNoHiveLink`
hiveIds[]stringHive ID
notesstringFree-text notes (max 5000 chars)(nullable)
confirmHoneySourcebooleanConfirm that the honey was stored before a sugar feeding of the last 60 days; logged for the auditor
confirmNoHiveLinkbooleanExplicitly confirm removing all colony links — logged for the auditore.g. false
aromaScoreintegerAroma score 1-10(nullable)
tasteScoreintegerTaste score 1-10(nullable)
consistencyScoreintegerConsistency 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":[]}

FieldTypeDescription
idstringHarvest ID(required)
userIdstringOwner ID(required)
apiaryIdstringApiary ID(required, nullable)
harvestDatestringHarvest date (ISO 8601 date-time)(required)
honeyTypestringHoney type(required, nullable, spring | summer | blossom | forest | linden | rapeseed | acacia | heather | sunflower | phacelia | buckwheat | chestnut | clover | mixed | other)
netWeightnumberNet weight in kg(required)
waterContentnumberWater content in percent(required, nullable)
batchNumberstringBatch number `<year>-<serial>`, assigned by the server(required)
notesstringFree-text notes(required, nullable)
harvestMethodstringExtraction method(required, nullable, extractor | flow_frame | press | cut_comb | drip | other)
frameCountintegerNumber of frames harvested(required, nullable)
directToJarbooleanHoney was filled straight from the comb into jars(required, nullable)
aromaScoreintegerAroma score 1-10(required, nullable)
tasteScoreintegerTaste score 1-10(required, nullable)
consistencyScoreintegerConsistency score 1-10(required, nullable)
createdByMemberIdstringTeam member who created the record; null = owner(required, nullable)
reviewStatestringReview state for team records; null = no review required(required, nullable)
reviewedByMemberIdstringTeam member who reviewed the record(required, nullable)
reviewedAtstringWhen the record was reviewed (ISO 8601 date-time)(required, nullable)
reviewNotestringReview note(required, nullable)
deletedAtstringSoft-delete marker; always null here (ISO 8601 date-time)(required, nullable)
createdAtstringCreated (ISO 8601 date-time)(required)
updatedAtstringLast updated (ISO 8601 date-time)(required)
apiaryobjectIts apiary(required, nullable)
apiary.idstringApiary ID(required)
apiary.namestringApiary name(required)
apiary.deletedAtstringSet when the apiary was deleted (ISO 8601 date-time)(required, nullable)
harvestHivesarrayParticipating colonies that still exist(required)
harvestHives[].hiveobjectThe colony(required)
harvestHives[].hive.idstringHive ID(required)
harvestHives[].hive.numberintegerColony number(required)
harvestHives[].hive.namestringColony name(required, nullable)
_countobjectCounts(required)
_count.harvestHivesintegerAll participating colonies including deleted ones(required)
bottlingHarvestsarrayBottling batches fed by this harvest(required)
bottlingHarvests[].weightnumberAllocated weight in g(required)
bottlingHarvests[].bottlingBatchobjectThe batch(required)
bottlingHarvests[].bottlingBatch.idstringBottling 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}'
DELETE/api/harvests/[id]Scope: write:harvests

Delete a harvest

Soft-deletes an unallocated harvest record; an allocated harvest returns 409 with `details.reason`, `details.batchNumber` and `details.bottlingBatchId`.

Path Parameters

NameTypeRequiredDescription
idstringYesHarvest 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.

GET/api/bottlingScope: read:harvests

List bottling batches

Returns all bottling batches for the user.

Query Parameters

NameTypeRequiredDescription
honeyTypestringNospring | summer | blossom | forest | linden | rapeseed | acacia | heather | sunflower | phacelia | buckwheat | chestnut | clover | mixed | other
yearintegerNoBottling year (Europe/Berlin), 2000–2100 inclusivee.g. 2025
cursorstringNoPagination 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).
limitnumberNoItems 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}

FieldTypeDescription
itemsarrayThe bottling batches on this page(required)
items[].idstringBottling batch ID(required)
items[].userIdstringOwner ID(required)
items[].batchNumberstringBatch number `AB-<year>-<serial>`, assigned by the server(required)
items[].bottlingDatestringBottling date (ISO 8601 date-time)(required)
items[].honeyTypestringHoney type(required, nullable, spring | summer | blossom | forest | linden | rapeseed | acacia | heather | sunflower | phacelia | buckwheat | chestnut | clover | mixed | other)
items[].totalWeightnumberTotal weight in g(required)
items[].jarSizeintegerJar size in g(required)
items[].jarCountintegerNumber of jars(required)
items[].jarsSoldintegerJars sold(required)
items[].pricePerJarCentsintegerPrice per jar in cents(required, nullable)
items[].originstringOrigin label text(required, nullable)
items[].descriptionstringPublic description(required, nullable)
items[].bestBeforestringBest-before date (ISO 8601 date-time)(required, nullable)
items[].notesstringFree-text notes(required, nullable)
items[].statusstring`ready` for new batches; older batches may still be `ripening`(required)
items[].readyAtstringWhen 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[].waterContentnumberWater content in percent(required, nullable)
items[].isPublicbooleanLegacy flag as stored; it does not publish a honey page(required)
items[].publicAsBakingHoneybooleanPublished as baking honey, not as table honey(required)
items[].hmfnumberHydroxymethylfurfural in mg/kg(required, nullable)
items[].electricalConductivitynumberElectrical conductivity in mS/cm(required, nullable)
items[].dlgScorestringDLG award(required, nullable, gold | silber | bronze)
items[].purchaseSupplierstringSupplier of purchased honey(required, nullable)
items[].purchaseInvoiceRefstringInvoice reference of the purchase(required, nullable)
items[].purchasedWeightnumberPurchased weight in g(required, nullable)
items[].secondJarSizeintegerSecond jar size in g(required, nullable)
items[].secondJarCountintegerNumber of jars of the second size(required, nullable)
items[].createdByMemberIdstringTeam member who created the record; null = owner(required, nullable)
items[].createdAtstringCreated (ISO 8601 date-time)(required)
items[].updatedAtstringLast updated (ISO 8601 date-time)(required)
items[].harvestsarrayAllocated harvests(required)
items[].harvests[].harvestIdstringHarvest ID(required)
items[].harvests[].weightnumberAllocated weight in g(required)
items[].harvests[].harvestobjectThe harvest(required)
items[].harvests[].harvest.idstringHarvest ID(required)
items[].harvests[].harvest.batchNumberstringHarvest batch number(required)
items[].harvests[].harvest.harvestDatestringHarvest date (ISO 8601 date-time)(required)
items[].harvests[].harvest.honeyTypestringHoney type(required, nullable)
items[].harvests[].harvest.netWeightnumberNet weight in kg(required)
items[].harvests[].harvest.aromaScoreintegerAroma score 1-10(required, nullable)
items[].harvests[].harvest.tasteScoreintegerTaste score 1-10(required, nullable)
items[].harvests[].harvest.consistencyScoreintegerConsistency score 1-10(required, nullable)
nextCursorstringCursor for the next page, or null when there are no more results(required, nullable)
hasMorebooleanTrue when a further page is available(required)
[].idstringBottling batch ID(required)
[].userIdstringOwner ID(required)
[].batchNumberstringBatch number `AB-<year>-<serial>`, assigned by the server(required)
[].bottlingDatestringBottling date (ISO 8601 date-time)(required)
[].honeyTypestringHoney type(required, nullable, spring | summer | blossom | forest | linden | rapeseed | acacia | heather | sunflower | phacelia | buckwheat | chestnut | clover | mixed | other)
[].totalWeightnumberTotal weight in g(required)
[].jarSizeintegerJar size in g(required)
[].jarCountintegerNumber of jars(required)
[].jarsSoldintegerJars sold(required)
[].pricePerJarCentsintegerPrice per jar in cents(required, nullable)
[].originstringOrigin label text(required, nullable)
[].descriptionstringPublic description(required, nullable)
[].bestBeforestringBest-before date (ISO 8601 date-time)(required, nullable)
[].notesstringFree-text notes(required, nullable)
[].statusstring`ready` for new batches; older batches may still be `ripening`(required)
[].readyAtstringWhen 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)
[].waterContentnumberWater content in percent(required, nullable)
[].isPublicbooleanLegacy flag as stored; it does not publish a honey page(required)
[].publicAsBakingHoneybooleanPublished as baking honey, not as table honey(required)
[].hmfnumberHydroxymethylfurfural in mg/kg(required, nullable)
[].electricalConductivitynumberElectrical conductivity in mS/cm(required, nullable)
[].dlgScorestringDLG award(required, nullable, gold | silber | bronze)
[].purchaseSupplierstringSupplier of purchased honey(required, nullable)
[].purchaseInvoiceRefstringInvoice reference of the purchase(required, nullable)
[].purchasedWeightnumberPurchased weight in g(required, nullable)
[].secondJarSizeintegerSecond jar size in g(required, nullable)
[].secondJarCountintegerNumber of jars of the second size(required, nullable)
[].createdByMemberIdstringTeam member who created the record; null = owner(required, nullable)
[].createdAtstringCreated (ISO 8601 date-time)(required)
[].updatedAtstringLast updated (ISO 8601 date-time)(required)
[].harvestsarrayAllocated harvests(required)
[].harvests[].harvestIdstringHarvest ID(required)
[].harvests[].weightnumberAllocated weight in g(required)
[].harvests[].harvestobjectThe harvest(required)
[].harvests[].harvest.idstringHarvest ID(required)
[].harvests[].harvest.batchNumberstringHarvest batch number(required)
[].harvests[].harvest.harvestDatestringHarvest date (ISO 8601 date-time)(required)
[].harvests[].harvest.honeyTypestringHoney type(required, nullable)
[].harvests[].harvest.netWeightnumberNet weight in kg(required)
[].harvests[].harvest.aromaScoreintegerAroma score 1-10(required, nullable)
[].harvests[].harvest.tasteScoreintegerTaste score 1-10(required, nullable)
[].harvests[].harvest.consistencyScoreintegerConsistency 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"
POST/api/bottlingScope: write:harvests

Create 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.

FieldTypeDescription
bottlingDatestringBottling date (ISO, not more than 24 hours in the future)(required)e.g. 2025-07-15
honeyTypestringspring | 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
totalWeightnumberTotal weight in g, positive, at most 100000(required)e.g. 20000
jarSizeintegerJar size in g, one of 50, 125, 250, 500, 1000(required, 50 | 125 | 250 | 500 | 1000)e.g. 500
jarCountintegerNumber of jars, positive, at most 100000(required)e.g. 40
pricePerJarCentsintegerPrice per jar in cents, 0-1000000(nullable)
originstringOrigin label text, max 200 characterse.g. Waldbienenstand, München
descriptionstringPublic description, max 2000 characters
bestBeforestringBest-before date (ISO); not before the bottling day
notesstringFree-text notes (max 5000 chars)
waterContentnumberWater content in percent, 13-30(nullable)
isPublicbooleanLegacy 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)
hmfnumberHydroxymethylfurfural in mg/kg, 0-1000(nullable)
electricalConductivitynumberElectrical conductivity in mS/cm, 0-10(nullable)
dlgScorestringDLG award(nullable, gold | silber | bronze)
harvestsarrayArray of {harvestId, weight in g} for traceability, at most 100; no harvest twice
harvests[].harvestIdstringHarvest ID(required)
harvests[].weightnumberAllocated 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}}]}

FieldTypeDescription
idstringBottling batch ID(required)
userIdstringOwner ID(required)
batchNumberstringBatch number `AB-<year>-<serial>`, assigned by the server(required)
bottlingDatestringBottling date (ISO 8601 date-time)(required)
honeyTypestringHoney type(required, nullable, spring | summer | blossom | forest | linden | rapeseed | acacia | heather | sunflower | phacelia | buckwheat | chestnut | clover | mixed | other)
totalWeightnumberTotal weight in g(required)
jarSizeintegerJar size in g(required)
jarCountintegerNumber of jars(required)
jarsSoldintegerJars sold(required)
pricePerJarCentsintegerPrice per jar in cents(required, nullable)
originstringOrigin label text(required, nullable)
descriptionstringPublic description(required, nullable)
bestBeforestringBest-before date (ISO 8601 date-time)(required, nullable)
notesstringFree-text notes(required, nullable)
statusstring`ready` for new batches; older batches may still be `ripening`(required)
readyAtstringWhen 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)
waterContentnumberWater content in percent(required, nullable)
isPublicbooleanLegacy flag as stored; it does not publish a honey page(required)
publicAsBakingHoneybooleanPublished as baking honey, not as table honey(required)
hmfnumberHydroxymethylfurfural in mg/kg(required, nullable)
electricalConductivitynumberElectrical conductivity in mS/cm(required, nullable)
dlgScorestringDLG award(required, nullable, gold | silber | bronze)
purchaseSupplierstringSupplier of purchased honey(required, nullable)
purchaseInvoiceRefstringInvoice reference of the purchase(required, nullable)
purchasedWeightnumberPurchased weight in g(required, nullable)
secondJarSizeintegerSecond jar size in g(required, nullable)
secondJarCountintegerNumber of jars of the second size(required, nullable)
createdByMemberIdstringTeam member who created the record; null = owner(required, nullable)
createdAtstringCreated (ISO 8601 date-time)(required)
updatedAtstringLast updated (ISO 8601 date-time)(required)
harvestsarrayAllocated harvests(required)
harvests[].harvestIdstringHarvest ID(required)
harvests[].weightnumberAllocated weight in g(required)
harvests[].harvestobjectThe harvest(required)
harvests[].harvest.idstringHarvest ID(required)
harvests[].harvest.batchNumberstringHarvest batch number(required)
harvests[].harvest.harvestDatestringHarvest date (ISO 8601 date-time)(required)
harvests[].harvest.honeyTypestringHoney type(required, nullable)
harvests[].harvest.netWeightnumberNet weight in kg(required)
harvests[].harvest.aromaScoreintegerAroma score 1-10(required, nullable)
harvests[].harvest.tasteScoreintegerTaste score 1-10(required, nullable)
harvests[].harvest.consistencyScoreintegerConsistency 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}]}'
GET/api/bottling/[id]Scope: read:harvests

Get a bottling batch

Returns full bottling details including linked harvests.

Path Parameters

NameTypeRequiredDescription
idstringYesBottling 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}}]}

FieldTypeDescription
idstringBottling batch ID(required)
userIdstringOwner ID(required)
batchNumberstringBatch number `AB-<year>-<serial>`, assigned by the server(required)
bottlingDatestringBottling date (ISO 8601 date-time)(required)
honeyTypestringHoney type(required, nullable, spring | summer | blossom | forest | linden | rapeseed | acacia | heather | sunflower | phacelia | buckwheat | chestnut | clover | mixed | other)
totalWeightnumberTotal weight in g(required)
jarSizeintegerJar size in g(required)
jarCountintegerNumber of jars(required)
jarsSoldintegerJars sold(required)
pricePerJarCentsintegerPrice per jar in cents(required, nullable)
originstringOrigin label text(required, nullable)
descriptionstringPublic description(required, nullable)
bestBeforestringBest-before date (ISO 8601 date-time)(required, nullable)
notesstringFree-text notes(required, nullable)
statusstring`ready` for new batches; older batches may still be `ripening`(required)
readyAtstringWhen 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)
waterContentnumberWater content in percent(required, nullable)
isPublicbooleanLegacy flag as stored; it does not publish a honey page(required)
publicAsBakingHoneybooleanPublished as baking honey, not as table honey(required)
hmfnumberHydroxymethylfurfural in mg/kg(required, nullable)
electricalConductivitynumberElectrical conductivity in mS/cm(required, nullable)
dlgScorestringDLG award(required, nullable, gold | silber | bronze)
purchaseSupplierstringSupplier of purchased honey(required, nullable)
purchaseInvoiceRefstringInvoice reference of the purchase(required, nullable)
purchasedWeightnumberPurchased weight in g(required, nullable)
secondJarSizeintegerSecond jar size in g(required, nullable)
secondJarCountintegerNumber of jars of the second size(required, nullable)
createdByMemberIdstringTeam member who created the record; null = owner(required, nullable)
createdAtstringCreated (ISO 8601 date-time)(required)
updatedAtstringLast updated (ISO 8601 date-time)(required)
harvestsarrayAllocated harvests(required)
harvests[].harvestIdstringHarvest ID(required)
harvests[].weightnumberAllocated weight in g(required)
harvests[].harvestobjectThe harvest(required)
harvests[].harvest.idstringHarvest ID(required)
harvests[].harvest.batchNumberstringHarvest batch number(required)
harvests[].harvest.harvestDatestringHarvest date (ISO 8601 date-time)(required)
harvests[].harvest.honeyTypestringHoney type(required, nullable)
harvests[].harvest.netWeightnumberNet weight in kg(required)
harvests[].harvest.aromaScoreintegerAroma score 1-10(required, nullable)
harvests[].harvest.tasteScoreintegerTaste score 1-10(required, nullable)
harvests[].harvest.consistencyScoreintegerConsistency 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"
PUT/api/bottling/[id]Scope: write:harvests

Update a bottling batch

Partially updates an existing bottling batch. All fields are optional.

Path Parameters

NameTypeRequiredDescription
idstringYesBottling 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`.

FieldTypeDescription
bottlingDatestringBottling date (ISO, not more than 24 hours in the future)e.g. 2025-07-15
honeyTypestringspring | 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
totalWeightnumberTotal weight in g, positive, at most 100000e.g. 20000
jarSizeintegerJar size in g, one of 50, 125, 250, 500, 1000(50 | 125 | 250 | 500 | 1000)e.g. 500
jarCountintegerNumber of jars, positive, at most 100000e.g. 40
jarsSoldintegerJars sold, 0-100000; not above `jarCount`
pricePerJarCentsintegerPrice per jar in cents, 0-1000000(nullable)
originstringOrigin label text, max 200 characters(nullable)e.g. Waldbienenstand, München
descriptionstringPublic description, max 2000 characters(nullable)
bestBeforestringBest-before date (ISO); not before the bottling day(nullable)
notesstringFree-text notes (max 5000 chars)(nullable)
waterContentnumberWater content in percent, 13-30(nullable)
isPublicbooleanNot accepted on update: any value is rejected with 400 (`isPublicOnlyViaPublishAction`); publish through the publish action
hmfnumberHydroxymethylfurfural in mg/kg, 0-1000(nullable)
electricalConductivitynumberElectrical conductivity in mS/cm, 0-10(nullable)
dlgScorestringDLG award(nullable, gold | silber | bronze)
harvestsarrayAllocations of harvests to this batch (harvestId, weight in g), at most 100; replaces the existing allocations
harvests[].harvestIdstringHarvest ID(required)
harvests[].weightnumberAllocated 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}}]}

FieldTypeDescription
idstringBottling batch ID(required)
userIdstringOwner ID(required)
batchNumberstringBatch number `AB-<year>-<serial>`, assigned by the server(required)
bottlingDatestringBottling date (ISO 8601 date-time)(required)
honeyTypestringHoney type(required, nullable, spring | summer | blossom | forest | linden | rapeseed | acacia | heather | sunflower | phacelia | buckwheat | chestnut | clover | mixed | other)
totalWeightnumberTotal weight in g(required)
jarSizeintegerJar size in g(required)
jarCountintegerNumber of jars(required)
jarsSoldintegerJars sold(required)
pricePerJarCentsintegerPrice per jar in cents(required, nullable)
originstringOrigin label text(required, nullable)
descriptionstringPublic description(required, nullable)
bestBeforestringBest-before date (ISO 8601 date-time)(required, nullable)
notesstringFree-text notes(required, nullable)
statusstring`ready` for new batches; older batches may still be `ripening`(required)
readyAtstringWhen 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)
waterContentnumberWater content in percent(required, nullable)
isPublicbooleanLegacy flag as stored; it does not publish a honey page(required)
publicAsBakingHoneybooleanPublished as baking honey, not as table honey(required)
hmfnumberHydroxymethylfurfural in mg/kg(required, nullable)
electricalConductivitynumberElectrical conductivity in mS/cm(required, nullable)
dlgScorestringDLG award(required, nullable, gold | silber | bronze)
purchaseSupplierstringSupplier of purchased honey(required, nullable)
purchaseInvoiceRefstringInvoice reference of the purchase(required, nullable)
purchasedWeightnumberPurchased weight in g(required, nullable)
secondJarSizeintegerSecond jar size in g(required, nullable)
secondJarCountintegerNumber of jars of the second size(required, nullable)
createdByMemberIdstringTeam member who created the record; null = owner(required, nullable)
createdAtstringCreated (ISO 8601 date-time)(required)
updatedAtstringLast updated (ISO 8601 date-time)(required)
harvestsarrayAllocated harvests(required)
harvests[].harvestIdstringHarvest ID(required)
harvests[].weightnumberAllocated weight in g(required)
harvests[].harvestobjectThe harvest(required)
harvests[].harvest.idstringHarvest ID(required)
harvests[].harvest.batchNumberstringHarvest batch number(required)
harvests[].harvest.harvestDatestringHarvest date (ISO 8601 date-time)(required)
harvests[].harvest.honeyTypestringHoney type(required, nullable)
harvests[].harvest.netWeightnumberNet weight in kg(required)
harvests[].harvest.aromaScoreintegerAroma score 1-10(required, nullable)
harvests[].harvest.tasteScoreintegerTaste score 1-10(required, nullable)
harvests[].harvest.consistencyScoreintegerConsistency 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}]}'
DELETE/api/bottling/[id]Scope: write:harvests

Delete a bottling batch

Permanently removes a bottling batch.

Path Parameters

NameTypeRequiredDescription
idstringYesBottling 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.

GET/api/inventory/itemsScope: any read:* scope

List 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

NameTypeRequiredDescription
cursorstringNoPagination 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).
limitintegerNoPage size, 1–100 (default 20)
viewstringNoGrouping: category (default) or location
searchstringNoItem name search
categorystringNoExact category
locationIdstringNoStorage location ID
lowStockbooleanNoOnly items at or below minimum stock

Response Body

e.g. [{"id":"clx9...","name":"Dadant-Rähmchen","category":"frames","quantity":120,"minStock":50}]

FieldTypeDescription
itemsarrayItems on this page(required)
items[]objectInventory item
nextCursorstringOpaque cursor for the next page (pass it unchanged as `cursor`), or null(required, nullable)
hasMorebooleanAnother page exists(required)
totalintegerAll matching active owned items(required)
shownintegerMatching items up to the last returned item in server order(required)
completebooleanNo further page(required)
truncatedbooleanFalse: 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"
GET/api/inventory/summaryScope: any read:* scope

Inventory 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}]}

FieldTypeDescription
itemsintegerTotal active items(required)
lowStockintegerItems with quantity at or below a non-null minimum stock(required)
locationCountintegerTotal owned storage locations(required)
categoriesobjectItem counts keyed by category(required)
locationsarrayAll owned locations with active item counts(required)
locations[].idstringStorage location ID(required)
locations[].namestringStorage location name(required)
locations[].itemsintegerActive 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"
POST/api/inventory/itemsScope: full-access key

Create an inventory item

Adds a new item to the inventory.

Request Body

FieldTypeDescription
locationIdstringStorage location ID(required)e.g. clxa...
namestringItem name, 1-200 characters(required)e.g. Dadant-Rähmchen
categorystringItem category(required, frames | boxes | jars | lids | labels | treatments | feed | tools | other)e.g. frames
quantityintegerCurrent stock count, 0-1000000000(default 0)e.g. 120
unitstringUnit, max 50 characters (the app offers piece, kg, liter, pack)(nullable)e.g. piece
minStockintegerMinimum stock alert threshold, 0-1000000000(nullable)e.g. 50
purchaseUrlstringWhere to reorder: an http(s) URL, max 2000 characters; an empty string or null means none(nullable)
unitPriceintegerPrice per unit in cents, 0-100000000(nullable)e.g. 45
notesstringFree-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}'
GET/api/inventory/items/[id]Scope: any read:* scope

Get an inventory item

Returns full item details.

Path Parameters

NameTypeRequiredDescription
idstringYesItem 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"
PUT/api/inventory/items/[id]Scope: full-access key

Update an inventory item

Partially updates item details.

Path Parameters

NameTypeRequiredDescription
idstringYesItem 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.

FieldTypeDescription
locationIdstringStorage location IDe.g. clxa...
namestringItem name, 1-200 characterse.g. Dadant-Rähmchen
categorystringItem category(frames | boxes | jars | lids | labels | treatments | feed | tools | other)e.g. frames
unitstringUnit, max 50 characters (the app offers piece, kg, liter, pack)(nullable)e.g. piece
minStockintegerMinimum stock alert threshold, 0-1000000000(nullable)e.g. 50
purchaseUrlstringWhere to reorder: an http(s) URL, max 2000 characters; an empty string or null means none(nullable)
unitPriceintegerPrice per unit in cents, 0-100000000(nullable)e.g. 45
notesstringFree-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}'
DELETE/api/inventory/items/[id]Scope: full-access key

Delete an inventory item

Removes an inventory item. For 10 minutes it can be brought back with `POST /api/inventory/items/[id]/restore`.

Path Parameters

NameTypeRequiredDescription
idstringYesItem 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"
POST/api/inventory/items/[id]/restoreScope: full-access key

Restore a deleted inventory item

Undoes a delete within 10 minutes.

Path Parameters

NameTypeRequiredDescription
idstringYesItem 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.

GET/api/inventory/locationsScope: any read:* scope

List 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"
POST/api/inventory/locationsScope: full-access key

Create a storage location

Adds a new storage location.

Request Body

FieldTypeDescription
namestringLocation name, 1-100 characters(required)e.g. Werkstatt
typestringLocation type(required, warehouse | workshop | apiary | vehicle | other)e.g. workshop
notesstringFree-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"}'
GET/api/inventory/locations/[id]Scope: any read:* scope

Get a storage location

Returns location details including item count.

Path Parameters

NameTypeRequiredDescription
idstringYesLocation 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"
PUT/api/inventory/locations/[id]Scope: full-access key

Update a storage location

Partially updates a storage location. All fields are optional.

Path Parameters

NameTypeRequiredDescription
idstringYesLocation ID

Request Body

Any subset of location fields

FieldTypeDescription
namestringLocation name, 1-100 characterse.g. Werkstatt
typestringLocation type(warehouse | workshop | apiary | vehicle | other)e.g. workshop
notesstringFree-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"}'
DELETE/api/inventory/locations/[id]Scope: full-access key

Delete a storage location

Removes a storage location. Must be empty first.

Path Parameters

NameTypeRequiredDescription
idstringYesLocation 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.

GET/api/financeScope: read:finance

Get financial overview

Returns income, expenses, and balance for the specified year.

Query Parameters

NameTypeRequiredDescription
yearintegerNoFilter 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"
POST/api/financeScope: write:finance

Create a finance entry

Records a new income or expense entry.

Request Body

FieldTypeDescription
typestringIncome or expense(required, income | expense)e.g. income
categorystringCategory; 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
amountnumberPositive amount, 0.01-999999.99(required)e.g. 350
descriptionstringDescription, 1-500 characters after trimming(required)e.g. Rapshonig Verkauf 15 Gläser
datestringBooking 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"}'
DELETE/api/financeScope: write:finance

Delete a finance entry

Deletes a finance entry by ID passed as a query parameter.

Query Parameters

NameTypeRequiredDescription
entryIdstringYesFinance 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.

GET/api/tasksScope: read:tasks

List tasks

Returns tasks with optional filtering by status, type, and priority.

Query Parameters

NameTypeRequiredDescription
statusstringNopending | in_progress | completed | skipped
typestringNoinspection | treatment | feeding | harvest | custom | seasonal | order
prioritystringNolow | 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"
GET/api/tasks/collectionScope: read:tasks

Read 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

NameTypeRequiredDescription
typestringNoinspection | treatment | feeding | harvest | custom | seasonal | order
prioritystringNolow | medium | high | urgent
apiaryIdstringNoOwned live stand, linked directly or through the colony
hiveIdstringNoOwned live colony
duestringNooverdue | today | thisWeek | later | undated; Berlin civil days; thisWeek means tomorrow through day +7
qstringNoLiteral case-insensitive title search, trimmed, at most 200 characters
assigneestringNonone: only tasks without a recorded team assignee
statusstringNoopen (default: pending or in_progress) | done (completed) | skipped | all
limitintegerNoPage size, default 50, range 1-100
cursorstringNoOpaque 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

FieldTypeDescription
itemsarrayTasks in semantic order(required)
items[]objectPublic task fields and owned live hive/apiary references; dates are ISO strings; dedupKey is never exposed
nextCursorstringContinuation, or null on the final page(required, nullable)
hasMorebooleanAnother page exists(required)
totalintegerExact matching count before the cursor(required)
completebooleanTrue on the final page (!hasMore)(required)
truncatedbooleanAlways 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"
GET/api/tasks/summaryScope: read:tasks

Read 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

NameTypeRequiredDescription
typestringNoinspection | treatment | feeding | harvest | custom | seasonal | order
prioritystringNolow | medium | high | urgent
apiaryIdstringNoOwned live stand, linked directly or through the colony
hiveIdstringNoOwned live colony
duestringNooverdue | today | thisWeek | later | undated; Berlin civil days; thisWeek means tomorrow through day +7
qstringNoLiteral case-insensitive title search, trimmed, at most 200 characters
assigneestringNonone: only tasks without a recorded team assignee

Response Body

Whole-stock task summary

FieldTypeDescription
totalintegerMatching tasks across all statuses(required)
openintegerPending and in-progress tasks(required)
overdueintegerOpen tasks due before the Berlin day(required)
dueTodayintegerOpen tasks due today or overdue, preserving the existing KPI meaning(required)
dueThisWeekintegerOpen tasks due tomorrow through Berlin day +7(required)
dueLaterintegerOpen tasks due after Berlin day +7(required)
undatedintegerOpen tasks without a due date(required)
completed30dintegerCompleted today through day -30, completedAt falling back to dueDate(required)
unassignedintegerOpen tasks without a recorded team assignee(required)
byApiaryarrayEvery stand with open tasks, including the no-stand group(required)
byApiary[].apiaryIdstringStand ID, null for no stand(required, nullable)
byApiary[].namestringStand name(required, nullable)
byApiary[].openintegerOpen count(required)
byApiary[].nextTaskobjectMost urgent task in collection order(required)
byApiary[].nextTask.idstringTask ID(required)
byApiary[].nextTask.titlestringStored task title(required)
byApiary[].nextTask.dueDatestringDue date (ISO 8601 date-time)(required, nullable)
completebooleanAlways true(required)
truncatedbooleanAlways 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"
POST/api/tasksScope: write:tasks

Create a task

Creates a new beekeeping task, optionally linked to a hive or apiary.

Request Body

FieldTypeDescription
titlestringTask title, 1-200 characters(required)e.g. Varroabehandlung Volk 3
descriptionstringDetailed description, max 2000 characters(nullable)
hiveIdstringLink to a hive(nullable)
apiaryIdstringLink to an apiary(nullable)
typestringTask type(default custom, inspection | treatment | feeding | harvest | custom | seasonal | order)e.g. treatment
prioritystringPriority(default medium, low | medium | high | urgent)e.g. high
statusstringStatus(default pending, pending | in_progress | completed | skipped)
dueDatestringDue 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
urlstringRelated 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"}'
PUT/api/tasks/[id]Scope: write:tasks

Update a task

Partially updates a task. Use this to mark tasks as completed.

Path Parameters

NameTypeRequiredDescription
idstringYesTask 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.

FieldTypeDescription
titlestringTask title, 1-200 characterse.g. Varroabehandlung Volk 3
descriptionstringDetailed description, max 2000 characters(nullable)
hiveIdstringLink to a hive(nullable)
apiaryIdstringLink to an apiary(nullable)
typestringTask type(inspection | treatment | feeding | harvest | custom | seasonal | order)e.g. treatment
prioritystringPriority(low | medium | high | urgent)e.g. high
statusstringStatus(pending | in_progress | completed | skipped)
dueDatestringDue 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
urlstringRelated link: an http(s) URL, max 2000 characters; an empty string or null means none(nullable)
expectedUpdatedAtstringOptimistic 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"}'
GET/api/tasks/[id]Scope: read:tasks

Get a single task

Returns full details for one task.

Path Parameters

NameTypeRequiredDescription
idstringYesTask 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"
DELETE/api/tasks/[id]Scope: write:tasks

Delete a task

Permanently removes a task.

Path Parameters

NameTypeRequiredDescription
idstringYesTask 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"
POST/api/tasks/seasonalScope: write:tasks

Generate 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.

GET/api/iot/devicesScope: read:iot

List IoT devices

Returns all IoT devices with optional filtering.

Query Parameters

NameTypeRequiredDescription
statusstringNoactive | offline | maintenance
deviceTypestringNoscale | temp_sensor | bee_counter | gps_tracker
hiveIdstringNoFilter by assigned hive
dataSourcestringNodirect | 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"
GET/api/iot/exportScope: read:iot

Export 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

NameTypeRequiredDescription
deviceIdstringNoOwned device ID; omit for daily values of all devices
localestringNoen 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"
POST/api/iot/devicesScope: write:iot

Create 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.

FieldTypeDescription
namestringDevice name, 1-100 characters(required)e.g. Waage Volk 1
deviceTypestringDevice type(required, scale | temp_sensor | bee_counter | gps_tracker)e.g. scale
dataSourcestringWhere the readings come from: pushed by the device (`direct`), synced from ThingSpeak or imported from CSV(required, direct | thingspeak | csv)e.g. direct
manufacturerstringManufacturer name, max 100 characterse.g. HiveTool
hiveIdstringAssign to a hive
readingIntervalMinutesintegerExpected reading interval in minutes, 1-1440(default 15)e.g. 15
thingspeakChannelIdstringThingSpeak channel ID, 1-10 digits; required for `thingspeak`
thingspeakReadKeystringThingSpeak read API key, 1-50 characters; required for `thingspeak`
thingspeakFieldMapobjectWhich sensor value each ThingSpeak field carries, at least one field; required for `thingspeak`
thingspeakFieldMap.field1stringSensor value of field1(weight | temperature | tempInner | humidity | batteryVoltage)
thingspeakFieldMap.field2stringSensor value of field2(weight | temperature | tempInner | humidity | batteryVoltage)
thingspeakFieldMap.field3stringSensor value of field3(weight | temperature | tempInner | humidity | batteryVoltage)
thingspeakFieldMap.field4stringSensor value of field4(weight | temperature | tempInner | humidity | batteryVoltage)
thingspeakFieldMap.field5stringSensor value of field5(weight | temperature | tempInner | humidity | batteryVoltage)
thingspeakFieldMap.field6stringSensor value of field6(weight | temperature | tempInner | humidity | batteryVoltage)
thingspeakFieldMap.field7stringSensor value of field7(weight | temperature | tempInner | humidity | batteryVoltage)
thingspeakFieldMap.field8stringSensor value of field8(weight | temperature | tempInner | humidity | batteryVoltage)
syncIntervalMinutesintegerSync 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"}'
GET/api/iot/devices/[id]Scope: read:iot

Get an IoT device

Returns device details including latest reading.

Path Parameters

NameTypeRequiredDescription
idstringYesDevice 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"
PUT/api/iot/devices/[id]Scope: write:iot

Update 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

NameTypeRequiredDescription
idstringYesDevice ID

Request Body

Any subset of the update fields

FieldTypeDescription
expectedUpdatedAtstringOptimistic lock: the previously read updatedAt as an ISO datetime with timezone. A different stored version returns 409 DEVICE_CHANGED; reload before retrying
syncIntervalMinutesintegerSync interval in minutes, 15-1440; only for an existing ThingSpeak device
thingspeakFieldMapobjectWhich 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.field1stringSensor value of field1(weight | temperature | tempInner | humidity | batteryVoltage)
thingspeakFieldMap.field2stringSensor value of field2(weight | temperature | tempInner | humidity | batteryVoltage)
thingspeakFieldMap.field3stringSensor value of field3(weight | temperature | tempInner | humidity | batteryVoltage)
thingspeakFieldMap.field4stringSensor value of field4(weight | temperature | tempInner | humidity | batteryVoltage)
thingspeakFieldMap.field5stringSensor value of field5(weight | temperature | tempInner | humidity | batteryVoltage)
thingspeakFieldMap.field6stringSensor value of field6(weight | temperature | tempInner | humidity | batteryVoltage)
thingspeakFieldMap.field7stringSensor value of field7(weight | temperature | tempInner | humidity | batteryVoltage)
thingspeakFieldMap.field8stringSensor value of field8(weight | temperature | tempInner | humidity | batteryVoltage)
namestringDevice name, 1-100 characters
deviceTypestringDevice type(scale | temp_sensor | bee_counter | gps_tracker)
manufacturerstringManufacturer name, max 100 characters
hiveIdstringHive to assign; null unassigns the device(nullable)e.g. clx2xyz
readingIntervalMinutesintegerExpected reading interval in minutes, 1-1440
statusstringDevice 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"}'
DELETE/api/iot/devices/[id]Scope: write:iot

Delete an IoT device

Removes an IoT device and all its readings.

Path Parameters

NameTypeRequiredDescription
idstringYesDevice 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"
GET/api/iot/devices/[id]/readingsScope: read:iot

Get 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

NameTypeRequiredDescription
idstringYesDevice ID

Query Parameters

NameTypeRequiredDescription
fromstringNoStart date (ISO)e.g. 2025-06-01
tostringNoEnd date (ISO)e.g. 2025-06-30
limitintegerNoMax readings to return (default 500, max 2000)
cursorstringNoKeyset cursor: pass the nextCursor of the previous page. Switches the response to { items, nextCursor, hasMore }
offsetintegerNoDeprecated — use cursor instead (ignored when cursor is set)
aggregatestringNoSet 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"
POST/api/iot/devices/[id]/syncScope: write:iot

Sync ThingSpeak device

Manually triggers a data sync for a ThingSpeak-connected device.

Path Parameters

NameTypeRequiredDescription
idstringYesDevice 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"
POST/api/iot/devices/[id]/assignScope: write:iot

Assign device to a hive

Assigns an IoT device to a hive or unassigns it (pass null).

Path Parameters

NameTypeRequiredDescription
idstringYesDevice ID

Request Body

FieldTypeDescription
hiveIdstringHive 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"}'
POST/api/iot/devices/[id]/importScope: write:iot

Import 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

NameTypeRequiredDescription
idstringYesDevice ID

Request Body

Content-Type: multipart/form-data

FieldTypeDescription
filefileCSV file, max 5 MB(required)
configobjectImport settings, sent as a JSON string in the form field `config`(required)
config.mappingobjectColumn per value; besides `timestamp` at least one sensor column is required(required)
config.mapping.timestampinteger0-based column index of the timestamp(required)
config.mapping.weightinteger0-based column index of the weight
config.mapping.temperatureinteger0-based column index of the outer temperature
config.mapping.tempInnerinteger0-based column index of the inner temperature
config.mapping.humidityinteger0-based column index of the humidity
config.mapping.batteryVoltageinteger0-based column index of the battery voltage
config.timestampFormatstringFormat of the timestamp column(default iso, iso | unix | european | american)
config.timezoneOffsetintegerFixed fallback offset in minutes, -720..720, with Date#getTimezoneOffset semantics (UTC minus local; e.g. -60 for UTC+1)(default 0)
config.timezonestringIANA 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"}'
GET/api/iot/alertsScope: read:iot

List IoT alerts

Returns IoT device alerts (e.g. weight drop, temperature anomaly). Optionally filter to unread only.

Query Parameters

NameTypeRequiredDescription
unreadbooleanNoFilter 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"
PATCH/api/iot/alertsScope: write:iot

Update an IoT alert

Marks an alert as read or resolves it.

Request Body

FieldTypeDescription
alertIdstringAlert ID; required for `read` and `resolve`e.g. clxaabc
actionstring`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
deviceIdstringDevice 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"}'
POST/api/iot/syncScope: write:iot

Sync 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.

POST/api/iot/pushScope: write:iot

Push 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.

FieldTypeDescription
deviceIdstringDevice ID(required)e.g. clxcabc
timestampstringReading time (ISO 8601), at most 1 hour in the future; omitted = server timee.g. 2025-06-15T12:00:00Z
weightnumberWeight in kg, 0-500e.g. 42.3
temperaturenumberOuter temperature in °C, -50 to 80e.g. 24.5
tempInnernumberInner hive temperature in °C, -20 to 60e.g. 35.1
humiditynumberHumidity in %, 0-100e.g. 62
batteryVoltagenumberBattery 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}'
POST/api/iot/push/batchScope: write:iot

Push 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}]}

FieldTypeDescription
readingsarray1-100 readings; a reading without any sensor value is skipped, not rejected(required)
readings[].deviceIdstringDevice ID(required)e.g. clxcabc
readings[].timestampstringReading time (ISO 8601), at most 1 hour in the future; omitted = server timee.g. 2025-06-15T12:00:00Z
readings[].weightnumberWeight in kg, 0-500e.g. 42.3
readings[].temperaturenumberOuter temperature in °C, -50 to 80e.g. 24.5
readings[].tempInnernumberInner hive temperature in °C, -20 to 60e.g. 35.1
readings[].humiditynumberHumidity in %, 0-100e.g. 62
readings[].batteryVoltagenumberBattery 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.

GET/api/compliance/checksScope: read:treatments

Get compliance status

Returns the latest compliance check result or full check history.

Query Parameters

NameTypeRequiredDescription
historybooleanNoSet 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"
GET/api/compliance/exportScope: export:csv

Export compliance data

Exports compliance entries as JSON or CSV. CSV export requires Pro plan.

Query Parameters

NameTypeRequiredDescription
formatstringNojson | csv; without it the response is JSON
hiveIdstringNoFilter by hive
apiaryIdstringNoFilter by apiary
startDatestringNoDate range start (ISO date or date-time)
endDatestringNoDate range end (ISO date or date-time, not before startDate); a plain date includes the whole day
localestringNoLanguage 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"
GET/api/compliance/pdfScope: export:csv

Export 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

NameTypeRequiredDescription
yearintegerNoYear to export, 2000-2100 (default: current year)e.g. 2025
localestringNode | en (default: de)
apiaryIdstringNoOnly 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
GET/api/complianceScope: read:treatments

List 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

NameTypeRequiredDescription
hiveIdstringNoFilter by hive
apiaryIdstringNoFilter by apiary
startDatestringNoDate range start
endDatestringNoDate range end
excludeBiologicalbooleanNoSet to "true" to hide biotechnical methods
cursorstringNonextCursor of the previous page
limitintegerNoPage 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"
GET/api/compliance/retention-endScope: read:treatments

Retention 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

NameTypeRequiredDescription
hiveIdstringNoFilter by hive
apiaryIdstringNoFilter by apiary
startDatestringNoDate range start
endDatestringNoDate 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"
GET/api/compliance/previewScope: read:treatments

Preview 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

NameTypeRequiredDescription
yearintegerNoYear, 2000-2100; required for layout requestse.g. 2026
apiaryIdstringNoHistorical apiary assignment, as in the PDF export
localestringNode | en (default: de)
fontstringNonormal | 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"
GET/api/compliance/scopeScope: read:treatments

Scope 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

NameTypeRequiredDescription
yearintegerYesYear, 2000-2100e.g. 2025
apiaryIdstringNoOnly the colonies of this apiary (the vet report ignores it)
localestringNode | 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"
POST/api/compliance/checksScope: write:treatments

Run 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"
GET/api/compliance/vet-reportScope: read:treatments

Export veterinary report PDF

Generates a bilingual veterinary report PDF with all treatment data for the specified year.

Query Parameters

NameTypeRequiredDescription
yearintegerNoYear to export, 2000-2100 (default: current year)e.g. 2025
localestringNode | 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
POST/api/treatments/accept-pendingScope: write:treatments

Accept 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

FieldTypeDescription
reviewedbooleanMust 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
afterstringCursor 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"}

FieldTypeDescription
acceptedintegerAccepted on this page: now `completed` and locked(required)
needsDetailsintegerLeft pending on this page: mandatory details missing or placeholder values(required)
skippedintegerLeft 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)
cursorstringPass 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.

GET/api/phenology/gtsScope: read:weather

Get 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"
GET/api/phenology/bloom-reportsScope: read:weather

Get regional bloom reports

Returns bloom reports from the community near the given coordinates.

Query Parameters

NameTypeRequiredDescription
latnumberYesLatitudee.g. 48.137
lngnumberYesLongitudee.g. 11.576
radiusnumberNoSearch 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"
POST/api/phenology/bloom-reportsScope: write:weather

Submit a bloom report

Reports a plant bloom observation at your location. Notes are AI-moderated.

Request Body

FieldTypeDescription
plantTypestringPlant in bloom(required, hazel | willow | forsythia | dandelion | cherry | apple | rapeseed | acacia | chestnut | clover | linden | sunflower | heather | ivy | other)e.g. rapeseed
customPlantNamestringPlant name, max 100 characters; required when `plantType` is `other`
statusstringBloom stage(default blooming, budding | blooming | fading)e.g. blooming
latitudenumberObservation latitude (-90..90)(required)e.g. 48.137
longitudenumberObservation longitude (-180..180)(required)e.g. 11.576
apiaryIdstringApiary the observation belongs to
photoUrlstringURL of a photo of the plant
notestringObservation 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}'
GET/api/phenology/treatment-windowsScope: read:weather

Get 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"
GET/api/phenology/harvest-timingScope: read:weather

Get 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

FieldTypeDescription
[].hiveIdstringColony ID(required)
[].hiveNamestringColony name or number(required)
[].statusstringHarvest status; blocked colonies cannot be ready or approaching(required, not_ready | approaching | optimal | urgent | too_late | blocked)
[].blockReasonstringPresent when blocked; quarantine includes an unknown quarantine state and takes precedence over withdrawal(quarantine | withdrawal)
[].blockedUntilstringPresent 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)
[].reasonobject | stringStatus explanation as a translation key with optional parameters(required)
[].reason.keystringMessage key, resolved by the client against its message bundle(required)
[].reason.paramsobjectValues for the placeholders of the message (strings or numbers)
[].estimatedYieldKgnumberEstimated honey yield in kg; null when blocked or unavailable(required, nullable)
[].trachtSourcestringTranslation key for the nectar source; null when blocked or unavailable(required, nullable)
[].sortenhonigWarningobject | stringVarietal honey warning; null when blocked or not applicable(required, nullable)
[].sortenhonigWarning.keystringMessage key, resolved by the client against its message bundle(required)
[].sortenhonigWarning.paramsobjectValues for the placeholders of the message (strings or numbers)
[].weatherWindowarrayWeather forecast; empty when blocked or unavailable(required)
[].weatherWindow[].datestringCalendar date (YYYY-MM-DD)(required)
[].weatherWindow[].suitablebooleanDry 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"
GET/api/phenology/todayScope: read:weather

Get 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"
GET/api/phenology/bloom/[apiaryId]Scope: read:weather

Get bloom data for an apiary

Returns current bloom data (flowering plants, nectar flow) for a specific apiary location.

Path Parameters

NameTypeRequiredDescription
apiaryIdstringYesApiary 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"
GET/api/phenology/anomaliesScope: read:weather

Detect 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"
POST/api/apiaries/check-locationScope: write:apiaries

Evaluate 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

FieldTypeDescription
latitudenumberWGS84 latitude from -90 through 90(required)
longitudenumberWGS84 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}'
GET/api/apiaries/[id]/forage-areaScope: read:apiaries

Local 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

NameTypeRequiredDescription
idstringYesApiary IDe.g. clx1...

Query Parameters

NameTypeRequiredDescription
latitudenumberNoExpected stand latitude, together with longitude
longitudenumberNoExpected stand longitude, together with latitude

Response Body

e.g. {"state":"no_data","reason":"not_configured","datasets":[],"rings":[],"grid":null}

FieldTypeDescription
statestringCoverage state(required, ok | partial | unknown | no_data | no_location)
reasonstringMissing-data reason(required, nullable, not_configured | unavailable_dataset | missing_tiles | outside_coverage | unclassified_cells)
datasetsarrayManifest source, year, provisional status, licence, attribution and version(required)
datasets[]objectDataset manifest entry
ringsarrayCumulative circles: radiusM, areaHa, groups and classes with areaHa/share, unknownShare; shares are fractions. Empty without data/location.(required)
rings[]objectCircle evaluation
gridobjectSchematic 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).

GET/api/weather/[apiaryId]Scope: read:weather

Get weather forecast

Returns the weather forecast for a specific apiary based on its GPS coordinates.

Path Parameters

NameTypeRequiredDescription
apiaryIdstringYesApiary 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"
GET/api/weather/alertsScope: read:weather

Get weather alerts

Returns active weather alerts (frost, heat, heavy rain, strong wind) for all apiaries.

Query Parameters

NameTypeRequiredDescription
localestringNode | 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"
GET/api/weather/official-warningsScope: read:weather

Read 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

NameTypeRequiredDescription
apiaryIdsstringNoOptional comma-separated apiary IDs, 1 to 500 entries
latitudenumberNoExpected stand latitude, together with longitude; only with exactly one apiaryIds entry
longitudenumberNoExpected 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"}}}

FieldTypeDescription
apiariesarrayResults per owned live apiary(required)
apiaries[].apiaryIdstringApiary ID(required)
apiaries[].statusstringWarning availability(required, ok | none | unknown | unavailable)
apiaries[].reasonstringOptional machine-readable reason
apiaries[].lastSuccessAtstringOptional last successful source fetch, ISO timestamp
apiaries[].warningsarrayUnchanged source text by language, raw and normalized level, source, event, region IDs and validity(required)
apiaries[].warnings[]objectOfficialWarning
apiaries[].officialEventsarrayOfficial event kinds per Berlin day, today and the next two days(required)
apiaries[].officialEvents[]objectday and event
truncatedbooleanMore than 500 apiaries matched(required)
sourcesobjectAvailability 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.

GET/api/varroaScope: read:treatments

Get 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"
GET/api/varroa/effectivenessScope: read:treatments

Get 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.

GET/api/dashboard/todayScope: any read:* scope

Get 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

NameTypeRequiredDescription
limitintegerNoGroup page size, 1–50; default 20
cursorstringNoContinuation 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"
GET/api/dashboard/projectionsScope: any read:* scope

Get 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

NameTypeRequiredDescription
idsstringYesComma-separated list of supported IDs; duplicates are merged
hivestringNoColony 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"
GET/api/dashboard/insightsScope: any read:* scope

Get 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

NameTypeRequiredDescription
daysintegerNoInspection and measurement lookback, 7–366 days; default 30
yearintegerNoHarvest 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.

GET/api/hives/lookupScope: read:hives

Search 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

NameTypeRequiredDescription
qstringNoTrimmed search text, maximum 200 characters; default emptye.g. 12
apiaryIdstringNoOptional apiary ID (1–128 letters, digits, hyphens or underscores)
statusstringNoOne status: active, inactive, dead, lost, sold, merged, or all for every status; invalid values return 400
limitintegerNoInteger 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"}]

FieldTypeDescription
[].idstringColony ID(required)
[].numberintegerColony number(required)
[].namestringColony name(required, nullable)
[].apiaryobjectCurrent apiary(required)
[].apiary.idstringApiary ID(required)
[].apiary.namestringApiary name(required)
[].statusstringColony 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"