Skip to main content

Treatment

Treatment endpoints under /v3/treatment surface lice mitigation and health-intervention activity. They provide multiple aggregation levels (area, category, site, generation, and weight buckets) to help correlate treatment pressure with losses or environmental conditions. All routes are read-only GET endpoints. Authenticate with Authorization: Bearer <token> and add x-client-secret for non-premium farmer tiers.

Unlike other resource families, treatment filters expect ISO YYYY-MM-DD values for start_date/end_date. Supplying other formats will return a 400 error.

Common filters

NameApplies toDescription
start_date / end_dateAll routesInclusive date range; use ISO YYYY-MM-DD. When omitted the service returns the full available window.
areasAll routesComma-separated production area IDs. Use % (default) to include all.
species_codeSummary, detail, siteFilter on species code (e.g. S for salmon).
treatment_categoryDetail, site, generation, sizeCategory filter (Bath, Medicinal, Mechanical, Combination, etc.).
treatment_targetDetail, site, generation, sizeTarget filter (Lice, Bacteria, Parasites, Health, etc.).
min_treatmentsSummaryMinimum total treatments before a row is returned.
min_category_treatments, min_category_shareDetailThresholds for including category rows.
requires_handling, is_antibioticSiteBoolean flags for handling-heavy or antibiotic treatments.
owner_id, site_idSite, generation, sizeNarrow to specific owners or sites.
generationGeneration, sizeComma-separated generation codes.
group_by_areaGenerationWhen true, aggregates by production area instead of individual sites.
min_weight_gram, max_weight_gram, exclude_totalsSizeControl weight-bucket range and whether TOTAL rows are removed.

All list endpoints support offset/limit pagination (default 0/100) and return pagination.has_more when additional pages are available.

Endpoints

GET /v3/treatment/summary-by-area-and-week

Aggregated treatment volume per production area and ISO week with contextual signals.

FieldTypeDescription
production_area_id / production_area_namestringArea identifiers.
species_codestringSpecies filter applied.
week_start / year_weekdate / stringWeek metadata (week_start is the Monday).
total_treatmentsintegerTotal treatments in the week.
sites_treated / owners_involvedintegerActivity coverage.
days_with_treatmentsintegerNumber of active treatment days.
antibiotic_treatments, mechanical_treatments, bath_treatments, thermal_treatmentsintegerCategory-specific totals.
lice_treatments, parasite_treatments, bacteria_treatmentsintegerTarget-specific totals.
treatments_4_week_rollingnumberFour-week rolling average.
week_over_week_change, week_over_week_pct_change, month_over_month_change, year_over_year_changenumberChange metrics.
trend_status, treatment_intensitystringQualitative signals (e.g. increasing, high).
significant_increase, significant_decreasebooleanStatistical change flags.
has_antibiotic_use, multiple_treatment_typesbooleanAdditional context flags.

GET /v3/treatment/detail-by-category-and-week

Breaks the summary down by treatment category and target, retaining the same week granularity.

FieldTypeDescription
treatment_category / treatment_targetstringCategory and target combination.
category_treatment_countintegerTreatments for the category in the week.
category_sites_treated / category_owners_involvedintegerCoverage metrics for the category.
category_handling_treatments, category_antibiotic_treatmentsintegerHandling/antibiotic totals.
category_treatments_4_week_rolling, category_week_over_week_pct_changenumberRolling statistics.
area_total_treatments, area_total_handling_treatments, area_total_antibiotic_treatmentsnumberArea totals for context.
category_share_of_area_pctnumberShare of the area's treatments accounted for by the category.
category_trend_status, category_treatment_intensitystringQualitative indicators.
category_significant_increase, category_significant_decreasebooleanSignificant change flags.
is_only_category_this_week, is_majority_category_this_weekbooleanCategory dominance flags.

GET /v3/treatment/by-site

Returns raw treatment records per site and day for compliance and auditing.

FieldTypeDescription
owner_id, site_idstringFarmer/site identifiers.
placement_typestringSite placement (offshore/onshore).
treatment_date, treatment_week, treatment_monthdateDaily, weekly, and monthly anchors.
treatment_category, treatment_target, treatment_subtypestringDetailed treatment classification.
requires_handling, is_antibioticbooleanRisk indicators.
system_source, data_sourcestringData provenance.
treatment_site_scopestringScope of the treatment (full/partial).
number_of_units_treatedintegerUnits treated when reported.
treatment_countintegerCount of treatment events captured.

GET /v3/treatment/by-generation

Shows cohort-level treatment progression, optionally aggregated by production area when group_by_area=true.

FieldTypeDescription
owner_id, cohort_id, site_idstringIdentifiers for the cohort and site.
site_placementstringOffshore/onshore placement.
production_area_id, production_region_nameinteger / stringLocation context (may be null when aggregating).
generationstringGeneration code (e.g. H2019).
treatment_week, generation_start_weekdateWeek of treatment and cohort start.
treatment_category, treatment_target, category_target_combinationstringTreatment classification.
weeks_from_generation_startintegerWeek offset from generation start.
absolute_treatment_count, days_with_treatmentsintegerWeekly treatment totals.
absolute_antibiotic_treatment_countintegerAntibiotic count for the week.
cumulative_treatment_count, cumulative_antibiotic_countintegerRunning totals across the generation.

GET /v3/treatment/by-size

Aggregates treatment activity by weight bucket to highlight intensity at different fish sizes.

FieldTypeDescription
owner_id, site_idstringFarmer/site identifiers.
production_area_id, production_region_nameinteger / stringLocation context (nullable).
generationstringGeneration code.
treatment_weekdateWeek anchor.
weight_group_gramnumberWeight bucket midpoint in grams.
avg_weight_gramnumberReported average fish weight.
treatment_category, treatment_target, category_target_combinationstringTreatment classification.
treatment_count, days_with_treatments, antibiotic_treatment_countnumberActivity metrics rounded to four decimals.

Example requests

Paginated summary query:

GET /v3/treatment/summary-by-area-and-week?start_date=2023-11-01&end_date=2024-01-31&areas=4,5&limit=200 HTTP/1.1
Host: api.aquacloud.ai
Authorization: Bearer <token>
x-client-secret: <client-secret>

Site-level drill-down scoped to antibiotic events:

GET /v3/treatment/by-site?start_date=2024-01-01&end_date=2024-03-31&is_antibiotic=true&limit=100 HTTP/1.1
Host: api.aquacloud.ai
Authorization: Bearer <token>
x-client-secret: <client-secret>

Both routes return treatment records in data with pagination to help iterate through historical periods.