Skip to main content

Mortality

The mortality endpoints expose loss, mortality, and culling analytics for benchmarking farms in AquaCloud. All routes are read-only GET endpoints under the /v3/mortality prefix and share the v3 authentication model: supply an Authorization: Bearer <token> header and, for non-premium farmer tiers, add the issued x-client-secret header. Empty result sets return 204 No Content.

Common query parameters

NameTypeDefaultDetails
from_datedateVaries by route (4–12 weeks lookback)Flexible parsing: accepts ISO (2024-03-31), 31/03/2024, named months (mai 2024), week notations (week 12 2024), quarters (Q1 2024), and relative values (today, yesterday). Partial inputs resolve to the start of the period.
to_datedateTodaySame parsing rules as from_date; partial values resolve to the end of the period.
areaslist of stringsAll areasComma-separated AquaCloud area names (Norwegian or English) or IDs. Use % to explicitly select all areas.
generationslist of stringsAll generationsComma-separated generation codes (e.g. H2023) or localized names (e.g. Høst 2023).
weight_range_startinteger1 (most endpoints)Minimum individual fish weight in grams. /mortality/size/month accepts 0.
weight_range_endinteger15000Maximum individual fish weight in grams.
exclude_selfbooleanfalseExcludes the authenticated farmer when true.
offsetinteger ≥ 00Number of rows to skip for pagination.
limitinteger (1–1000)1000Maximum rows returned. Services request limit + 1 rows to populate pagination.has_more.

Endpoint-specific parameters

  • loss_type: Accepts loss (default, includes mortality + culling) or mortality to focus on unplanned deaths. Used by /mortality/categories/rank/week.
  • number_of_categories: Max categories ranked per week (default 10).
  • period: Rolling window length in weeks for trend calculations (1–52).
  • period_grouping: One of month, quarterly, tertial, year for /mortality/categories/rate.
  • group_by: area, generation, or area_and_generation for size aggregations.
  • weight_bucket: Bucket width in grams (100–5000) for /mortality/size/categories.

Response envelope

Every endpoint returns:

  • data: List of resource records described below.
  • pagination: Includes offset, limit, and has_more where pagination applies. /mortality/size/categories always reports has_more: false.
  • metadata: Contains the API version, optional request_id, and the farmer group key when exclude_self=true.

Endpoints

GET /v3/mortality/areas/week

Returns weekly loss, mortality, and culling rates by AquaCloud area.

FieldTypeDescription
loss_rate_weekstring (ISO week date)Monday of the ISO week.
aquacloud_area_namestringHuman-readable area name.
production_area_idsarray of integersProduction area identifiers bundled into the area.
site_countintegerBenchmark site count contributing to the row.
mortality_rate/culling_rate/loss_ratenumberBenchmark rates for the selected filters.
farmer_site_countintegerAuthenticated farmer’s site count in the row.
farmer_mortality_rate/farmer_culling_rate/farmer_loss_ratenumberFarmer-specific rates for comparison.

Default window: from_date is 12 weeks prior to today.

GET /v3/mortality/categories/rank/week

Tracks the top loss categories week-by-week, including optional rolling windows.

FieldTypeDescription
rankintegerRank of the category within the week.
loss_weekstringWeek (ISO date).
loss_category_code / loss_category_namestringCategory identifiers.
loss_rate, mortality_ratenumberBenchmark rates for the category.
loss_rate_change, mortality_rate_changenumberWeek-over-week change.
trending_loss_last_n_weeks, trending_mortality_last_n_weeksnumberRolling trend using the supplied period.

Defaults: from_date 4 weeks back, number_of_categories 10, loss_type=loss.

GET /v3/mortality/region/rolling-12-month

Internal (not listed in the OpenAPI schema) rolling 12-month benchmark by production region.

Key fields include region name (production_region_name), placement (site_placement), monthly loss date (loss_rate_month), weighted and average loss/mortality/culling rates with 3/6/12-month cumulative variants, and site_count. Use when you need the extended FDIR-style region view.

GET /v3/mortality/categories/distribution

Shows the share of total losses by category over time.

FieldTypeDescription
loss_monthstringMonth label.
loss_category_codestringCategory identifier.
loss_count / loss_biomass_kgnumberBenchmark counts and biomass.
loss_rate_count / loss_rate_biomassnumberShare of losses attributed to the category.
farmer_loss_*numberFarmer-equivalent metrics (count, biomass_kg, rate variants).
loss_rate_*_of_inventorynumberCategory proportion relative to total inventory.
total_loss_rate, farmer_total_loss_ratenumberOverall loss rate for the time bucket.
category_name, category_short_name, category_code_level_1/2stringCategory descriptors.

GET /v3/mortality/categories/rate

Aggregates loss categories over configurable periods (month, quarterly, tertial, year).

FieldTypeDescription
periodstringAggregation window label.
loss_category_codestringCategory identifier.
loss_count, mortality_count, culling_countintegerBenchmark event counts.
*_avg_weight_gramnumberAverage weight for loss/mortality/culling events.
farmer_*numberFarmer-specific counts and averages.
loss_rate, mortality_rate, culling_ratenumberBenchmark rates per category.
farmer_loss_rate, farmer_mortality_rate, farmer_culling_ratenumberFarmer comparison rates.
category_name, category_short_name, category_level_1_namestringHuman-friendly labels.

GET /v3/mortality/categories/rank

Ranks loss categories across the selected period range.

FieldTypeDescription
loss_category_codestringCategory identifier.
period_start, period_endstringCovered period boundaries.
*_count, *_biomass_kg, *_avg_weight_gramnumberBenchmark totals for mortality, culling, and loss.
*_rate_of_total_in_periodnumberCategory share of total events/biomass.
farmer_*numberSame metrics calculated for the authenticated farmer.
loss_category_namestringCategory label.

GET /v3/mortality/generations/rate

Benchmark loss, mortality, and culling rates by generation across areas.

FieldTypeDescription
loss_rate_monthstringMonth end of the measurement.
generationstringGeneration code.
generation_month_numberintegerMonths since transfer to sea (benchmark).
farmer_generation_month_numberintegerSame metric for the farmer (if available).
aquacloud_area_name / production_area_idsstring / arrayGeographic context.
loss_rate, mortality_rate, culling_ratenumberBenchmark rates.
cumulative_*numberRolling cumulative rates (benchmark and farmer).
farmer_*numberFarmer-specific rates.

GET /v3/mortality/size

Provides loss share by size buckets.

FieldTypeDescription
weight_group_gramintegerBucket midpoint.
group_bystringDimension used: area, generation, or area_and_generation.
production_area_idsarrayIncluded production areas (when grouped by area).
rate_of_total_lossnumberBenchmark share of total loss in the bucket.
farmer_rate_of_lossnumberFarmer share for the same bucket.

GET /v3/mortality/size/month

Tracks average loss weights by month while retaining the chosen grouping.

FieldTypeDescription
monthstringISO month label.
group_bystringGrouping in effect.
loss_avg_weight_gramintegerBenchmark average loss weight.
farmer_loss_avg_weight_gramintegerFarmer average.

weight_range_start can be 0 for this route.

GET /v3/mortality/areas/month

Monthly loss, mortality, and culling metrics per area with cumulative benchmarks, farmer comparisons, and FDIR references.

Headline fields: area (aquacloud_area_name, production_area_ids), month, site_count, benchmark rates (mortality_rate, culling_rate, loss_rate) and their 3/6/12-month cumulative counterparts, farmer equivalents (farmer_*) including cumulative site averages, plus FDIR baselines (fdir_*). Use this dataset for dashboards that need month-level benchmarking with farmer, area, and national reference values in a single payload.

GET /v3/mortality/size/categories

Breaks down loss categories per weight bucket.

FieldTypeDescription
category_code_level_1stringTop-level category code.
category_namestringCategory label.
weight_groupintegerBucket midpoint in grams.
rate, mortality_rate, culling_ratenumberBenchmark shares for all loss types.
farmer_rate, farmer_mortality_rate, farmer_culling_ratenumberFarmer benchmarks.

Pagination metadata is static (has_more: false) because the dataset is returned as a single page.

Example request

GET /v3/mortality/categories/rate?areas=Nord&from_date=2024-01-01&to_date=2024-03-31&period_grouping=quarterly&exclude_self=true HTTP/1.1
Host: api.aquacloud.io
Authorization: Bearer <token>
x-client-secret: <client-secret>

Successful responses will include the aggregated category rows in data, pagination information (if more rows remain), and a metadata.request_id for support tracing.