Agriculture & Environment
Food Spoilage Prediction API
A pallet's remaining shelf life depends on the temperature history it has actually experienced, not the date printed on it when it was packed.
- Fresh produce distributors
- Cold chain logistics providers
- Grocery retailers
- Food manufacturers
- Quality assurance teams
What your customers would see
example interfaceMockupIllustrative mockup of the interface we would build. Figures shown are examples, not results from a live deployment.
The problem this solves
Perishable supply chains run on printed dates that assume a temperature profile the product rarely experiences. A pallet of berries labelled with seven days of shelf life might have four left after an hour on a hot loading dock, or nine if it moved through a well-run chain. The label does not know, so the decision about which pallet to ship to the furthest customer is made on packing date alone.
The consequences land in two places. Waste, when product that was already compromised is sent to a distant store and arrives unsaleable. And risk, when a temperature excursion that mattered is invisible because the logger data was downloaded, filed and never analysed. Most cold chains now have the sensors. Very few turn the readings into a decision at the point where a decision is being made.
The underlying science is reasonably settled. Microbial growth and quality degradation follow temperature-dependent kinetics that have been characterised for many products, and cumulative thermal exposure predicts remaining life better than elapsed time does. What makes it a real engineering problem is the data: loggers with gaps and drift, pallets that get split and re-consolidated, and the need to answer in the seconds a dispatcher has before assigning a load.
Who buys this
Fresh produce distributors, Cold chain logistics providers, Grocery retailers, Food manufacturers, Quality assurance teams
What the API returns
What comes back
- Remaining shelf life estimates per pallet, case or lot
- Cumulative thermal exposure against the product's own kinetics
- Temperature excursion detection with severity and quality effect
- Spoilage probability over a chosen horizon
- First-expired-first-out dispatch ranking across available stock
- Humidity and ethylene exposure effects where sensors provide them
- Lot genealogy so split and re-consolidated pallets keep their history
- Quality flags where logger coverage is incomplete or suspect
Endpoints
| Method | Path | Returns |
|---|---|---|
| POST | /v1/lots/shelf-life | Remaining shelf life for lots given their temperature history |
| POST | /v1/telemetry/ingest | Push logger or sensor readings for a lot or shipment |
| GET | /v1/lots/{id}/excursions | Detected temperature excursions and estimated effect |
| POST | /v1/dispatch/rank | Rank available stock for dispatch by remaining life and destination |
| GET | /v1/products/{id}/kinetics | Degradation model and parameters used for a product |
| WS | /v1/stream | Push excursion alerts and shelf-life threshold breaches |
Request and response
illustrativeRequest
{
"lots": [
{ "lot_id": "lot_41882", "product_id": "strawberry_punnet_400g",
"packed_at": "2026-10-19T04:20:00Z" }
],
"destinations": [
{ "destination_id": "dc_glasgow", "transit_hours": 9, "expected_temp_c": 3.0 }
],
"include": ["excursions", "spoilage_probability", "dispatch_rank"]
}Response
{
"lot_id": "lot_41882",
"product_id": "strawberry_punnet_400g",
"nominal_shelf_life_days": 7.0,
"evaluated_at": "2026-10-22T08:00:00Z",
"thermal_history": {
"readings": 1042,
"coverage_pct": 96.1,
"mean_temp_c": 4.8,
"max_temp_c": 14.2,
"hours_above_8c": 3.6
},
"remaining_shelf_life_days": { "p50": 2.1, "p10": 1.2, "p90": 3.0 },
"consumed_by_excursion_days": 1.8,
"excursions": [
{ "from": "2026-10-20T11:10:00Z", "to": "2026-10-20T14:45:00Z",
"peak_temp_c": 14.2, "severity": "high",
"estimated_life_cost_days": 1.6,
"likely_stage": "cross_dock_transfer" }
],
"spoilage_probability": { "at_dispatch_plus_48h": 0.37 },
"dispatch_recommendation": {
"destination_id": "dc_glasgow", "suitable": false,
"reason": "Arrival shelf life below retail minimum of 2 days",
"alternative": "Allocate to nearest regional DC or markdown channel"
},
"quality_flags": ["3.9% logger gap between 2026-10-20T15:00 and 16:30"]
}Where the data comes from
| Your temperature logger data | Readings from pallet loggers, reefer telemetry, warehouse sensors and vehicle systems. The central input, and typically scattered across several systems that do not talk to each other |
| Product specifications | Nominal shelf life, storage requirements and quality thresholds from your own specifications |
| Published degradation kinetics | Peer-reviewed temperature-dependence parameters for microbial growth and quality loss in specific commodities, implemented with citation |
| Your quality inspection records | Graded outcomes at receipt and at store. The only way to calibrate the model to your actual products and tolerances |
| Lot and pallet movement records | From your WMS and TMS, so a lot's history survives splitting, re-consolidation and cross-docking |
| Ambient conditions | Weather at transfer points and during transit, useful for explaining excursions and for predicting exposure risk on planned routes |
The intelligence layer
The difference between a demo and a service is mostly in this section. These are the parts that keep the answer trustworthy once real traffic is hitting it.
- Published temperature-dependence models as the backbone, with parameters taken from the literature and cited, rather than an opaque model that a quality manager cannot interrogate
- Cumulative exposure integrated over the actual temperature history rather than scored against a threshold count, since two hours at fourteen degrees is not equivalent to twelve hours at nine
- Calibration against your own quality inspection outcomes, because published parameters were derived on specific cultivars and packaging and will not transfer exactly
- Logger gap and drift handling with explicit coverage reporting — a lot with forty percent logger coverage gets a wider interval and a quality flag, not a confident number
- Lot genealogy tracked through splits and merges, so a re-consolidated pallet inherits the worst-case history of its components rather than the average
- Excursion stage attribution by matching the timing of a temperature event to movement records, which is what turns a reading into an operational fix
- Validation against observed spoilage and markdown outcomes, reported per product, with products lacking inspection data marked as uncalibrated
- Monitoring for sensor failure patterns, since a logger reading a constant four degrees is more likely broken than a perfectly controlled chain
What it changes for the business
Waste reduction
Dispatch ranked by actual remaining life sends compromised stock to near destinations rather than far ones.
Claim evidence
Documented excursions with estimated quality effect support or refute a supplier or carrier claim.
Chain diagnosis
Stage attribution identifies which transfer point repeatedly breaks the chain.
Markdown timing
Earlier visibility of short-life stock moves markdown decisions forward, when they still recover value.
How it fits into your product
How it embeds
- Telemetry ingestion from logger platforms, reefer telematics and warehouse sensor systems
- Dispatch ranking endpoint designed for the seconds available at allocation, not for batch reporting
- Integration into WMS and TMS allocation logic rather than a separate screen nobody opens
- Webhooks on excursions and shelf-life threshold breaches into quality workflows
- Deployment inside your environment where supply chain data cannot leave
- White-label delivery for cold chain and logistics software vendors
Included in every build
- Authentication, scoped API keys and per-customer rate limiting
- Input validation with predictable, documented error responses
- Versioned endpoints so your integration never breaks without notice
- Request and response logging for audit and dispute resolution
- Latency, error-rate and usage monitoring with alerting
- OpenAPI specification, sandbox environment and client examples
- Backups, failover design and a documented recovery procedure
- An agreed support arrangement once the service is live
How we would build it
about 12 weeksDiscovery and data review
Weeks 1–2
We agree the exact question the API answers, review the sources you already hold, check what has to be licensed, and write down the response contract your developers will code against.
Architecture and prototype
Weeks 3–4
You get a written architecture plus a working endpoint on real data — narrow, but genuinely callable — so integration can be tested against something concrete rather than a document.
Production build
Weeks 5–10
Pipelines, models, storage, authentication, rate limiting, logging, tests and documentation. Security and observability are part of this phase, not a later one.
Integration and handover
Weeks 11–12
We support your engineers through their integration, run load tests at your expected volume, and agree how the service is monitored and supported once it is live.
Commercial models
There is no fixed price list, because the cost is driven by data complexity, integration count, model requirements, request volume and the support level you need. Scope is agreed in writing before development starts.
Fixed-scope prototype
A defined slice of the service, built and priced as one piece of work. The usual first step when the business case needs proving internally.
Fixed-price build
An agreed scope against a written architecture, delivered for an agreed price. Best when the requirements are already clear.
Build then retainer
We build the service, then operate and improve it under a monthly agreement covering monitoring, updates and model maintenance.
White-label product
The service runs under your brand, your domain and your pricing, with MLPivot invisible to your customers.
Questions buyers ask
Can you tell us whether a specific pallet is spoiled?
No. We estimate remaining shelf life and spoilage probability from thermal history and published kinetics. Whether a given pallet is actually saleable depends on its initial quality at packing, cultivar, packaging performance and handling damage — much of which is not in the data. The output ranks and prioritises; physical inspection remains the decision for borderline stock, and we would not position it otherwise.
Is this a food safety system?
It is not, and we would be careful about that boundary. The model estimates quality degradation and shelf life. Food safety determinations involve pathogen risk, regulatory thresholds and your own HACCP framework, and they are your quality function's responsibility under their procedures. We can surface excursions that your HACCP plan defines as significant, which is a different thing from deciding whether product is safe.
How much does logger coverage matter?
A great deal, and it is the most common practical limitation. Lots with gaps, late-starting loggers or readings only at receipt give materially weaker estimates, and the API reports coverage percentage and flags gaps rather than returning an equally confident number. If most of your lots have partial coverage, the first improvement is usually to the sensing rather than to the model.
Do the published kinetics apply to our products?
Approximately, and that is why calibration matters. Literature parameters were derived on particular cultivars, packaging and initial microbial loads, and your product will differ. With a few months of inspection outcomes the model can be calibrated to your own tolerances. Without them we would run published parameters as published and label the output as uncalibrated rather than implying a precision we have not earned.
Can this work across suppliers who will not share data?
Partially. Where a supplier's upstream chain is invisible, the lot's history starts at your receipt and everything before that is unknown. We model from the first reading and state the unobserved period explicitly. It is a real blind spot, and for high-value perishables it is usually worth making logger data a supply condition rather than trying to model around it.
Related blueprints
Agricultural Commodity Intelligence API
Price trends, production estimates and supply-demand indicators for grain, oilseed and soft commodity markets, embedded in trading and procurement software.
Environmental Compliance Monitoring API
Emissions aggregation, permit tracking and threshold alerts that give compliance teams one view of their obligations and their headroom.
Crop Yield Forecasting API
Expected yield by crop, location and season, with honest uncertainty, for agritech platforms, insurers, lenders and grain buyers.
Want this built for your platform?
Tell us what your product does today and what you want another system to be able to ask it. We will come back with an approach, a scope and a price.