Skip to main content

Mortality (v2)

The legacy mortality endpoints provide high-level benchmarks and category catalogues used by earlier AquaCloud dashboards. All routes require authentication. Endpoints that support the exclude_self flag only return a result when the token represents a farmer group.

Category catalogue endpoints

GET /v2/mortality/categories/codelist

Returns the full mortality category catalogue with optional pagination.

Query parameters

NameTypeDefaultNotes
offsetinteger0Starting index within the catalogue.
limitinteger500Number of rows to return.

Response fields (data[])

FieldTypeDescription
level_1_code, level_1_namestringTop-level category code/name.
level_2_code, level_2_namestringSecond-level grouping.
level_3_codestringThird-level code.
category_name, category_name_shortstringNorwegian labels.
category_name_eng, category_name_short_engstringEnglish labels.
for_daily_registrationbooleanIndicates whether the category supports daily reporting.
reporting_obligationanyRaw value indicating legal reporting requirements.
placementobjectAvailability flags per placement (sea, land).
causeobjectAvailability flags for death causes (death, killed, downgrade).
value_chainobjectFlags for value-chain stages (roe, postsmolt, freshwater, etc.).
speciesobjectSpecies booleans (salmon, cleanerfish, rainbow_trout).
last_modifiedstringLast updated timestamp (ISO).

metadata contains the response timestamp (time) and the most recent last_modified across the returned slice.

GET /v2/mortality/categories/changelog

Provides recorded changes to mortality categories.

data[] entries include:

FieldDescription
dateChange timestamp.
from_code / from_nameCategory that was changed.
to_code / to_nameReplacement category (when applicable).
descriptionHuman-readable change note.
changed_byOrigin of the change (e.g. authority or internal source).

GET /v2/mortality/categories/level-1

GET /v2/mortality/categories/level-2

Return simplified lists of level 1 or level 2 codes with their names. Use these for quick drop-down population when you do not need the full codelist metadata.

Benchmark endpoints

GET /v2/mortality/mortality-rate-by-region

Produces monthly mortality benchmarks for each region.

Query parameters

NameTypeDefaultNotes
exclude_selfbooleanfalseWhen true, removes the authenticated farmer’s sites before calculating benchmarks. Requires a farmer token.

Response structure

data[] entries contain:

FieldTypeDescription
year, monthintegersReporting period.
regionstringRegion identifier.
number_of_sitesintegerSites included after filters.
mortality_rateobjectRates (1_m, 3_m, 6_m, 12_m, year).
vi_mortality_rateobjectMortality rates weighted by biomass (same keys as above).
mortality_code_rateobjectRates for top-level mortality codes (AF).
highest_10_percent_avg_rate / lowest_10_percent_avg_rateobjectBenchmark extremes (nullable).
highest_10_percent_avg_vi_rate / lowest_10_percent_avg_vi_rateobjectBiomass-weighted extremes (nullable).

metadata.time captures the response timestamp and metadata.request.exclude_self echoes the supplied filter.

GET /v2/mortality/mortality-rate-by-country

Matches the regional endpoint but aggregates nationwide. The response fields are identical except that the region column is omitted.

GET /v2/mortality/categories/top-by-region

Lists the dominant mortality categories per region and month. Supports the same exclude_self parameter as the rate endpoints.

data[] fields:

FieldDescription
year, monthReporting period.
regionRegion label.
mortality_codeCategory code.
category_rateShare of loss attributed to the category (0–1).

GET /v2/mortality/categories/top-by-country

Identical to the regional version but aggregated at the country level (no region field).

Both “top” endpoints return metadata.time and echo the exclude_self flag in metadata.request.

Example requests

# Region benchmark excluding own farmer
curl -X GET "https://api.aquacloud.ai/v2/mortality/mortality-rate-by-region?exclude_self=true" \
-H "Authorization: Bearer $TOKEN" \
-H "x-client-secret: $CLIENT_SECRET"

# Fetch the mortality codelist catalogue
curl -X GET "https://api.aquacloud.ai/v2/mortality/categories/codelist?limit=200" \
-H "Authorization: Bearer $TOKEN" \
-H "x-client-secret: $CLIENT_SECRET"