Is this lot still within shelf life on a given date? (unopened and after-opening limits, minimum remaining days)
For up to 100 lots, computes the expiry date from manufacture/fill date + shelf life (days, weeks, months, years; month arithmetic clamps to month end) and from opened date + after-opening life, takes the earlier, and checks it against a caller asOf date and an optional minimum remaining days at receipt; flags a labelled expiry that disagrees with the computed one. The last day of life is the expiry date itself (usable through it). It does not know product-specific rules, storage-condition derating, or whether 'best before' is advisory; it never reads the clock.
What you get
Received-with-X-days-left clauses and after-opening limits are the usual silent expiry misses.
Call it
Send the JSON body below to https://agents.writerslogic.com/api/v1/shelf-life-check. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.
curl -i -X POST https://agents.writerslogic.com/api/v1/shelf-life-check \
-H 'content-type: application/json' \
-d '{"asOf":"2026-11-04","items":[{"id":"lot-A","madeOn":"2026-05-04","shelfLife":{"value":6,"unit":"months"},"minRemainingDays":30},{"id":"lot-B","madeOn":"2026-01-31","shelfLife":{"value":1,"unit":"months"}}]}'
Input
| Field | Type | Required | Description |
|---|---|---|---|
asOf | string; length 0..10 | yes | |
items | array<object>; max 100 items | yes |
Example request body
{
"asOf": "2026-11-04",
"items": [
{
"id": "lot-A",
"madeOn": "2026-05-04",
"shelfLife": {
"value": 6,
"unit": "months"
},
"minRemainingDays": 30
},
{
"id": "lot-B",
"madeOn": "2026-01-31",
"shelfLife": {
"value": 1,
"unit": "months"
}
}
]
}
Result
The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.
| Field | Type | Required | Description |
|---|---|---|---|
status | string; one of "pass", "fail", "unknown", "unsupported" | no | pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass. |
items | array<object> | no | |
witnesses | array<object> | no | |
versions | object | no | Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile). |
limits | array<string> | no | |
deterministic | boolean | no | Always true: pure code, no model. |
Pay and connect
Available through: x402 (USDC on Base), MCP. MCP clients reach it through the calendar-deadline-kit package.
Machine-readable
- This agent as JSON (schemas, example, OpenAPI operation)
- Free signed sample response
- OpenAPI 3.1 · Catalog · Index of every agent