Skip to main content
GET
/
scanner
/
api
/
v1
/
freshness-thresholds
Resolve freshness chip thresholds for a scanned GTIN
curl --request GET \
  --url https://www.closient.com/scanner/api/v1/freshness-thresholds
{
  "warningDays": 1,
  "criticalDays": 1,
  "categoryLabel": "<string>",
  "source": "<string>"
}

Query Parameters

gtin
string
required

The scanned GTIN (8/12/13/14 digits, hyphens/spaces tolerated).

Required string length: 1 - 20

Response

200 - application/json

OK

Resolved freshness-chip thresholds for a scanned GTIN (C-2987).

Returned by GET /freshness-thresholds and threaded into the scanner overlay's summarizeDateAis so the color-coded chip tints against the right category window (fresh produce expires far sooner than canned goods). Mirrors :class:apps.products.services.freshness.Thresholds; the day fields use the camelCase shape the client-side DEFAULT_FRESHNESS_THRESHOLDS already expects.

warningDays
integer
required

Days-remaining at or above which the chip is tinted 'fresh'. Below this (but at or above criticalDays) the chip is 'warning'.

Required range: x >= 0
criticalDays
integer
required

Days-remaining below which the chip is tinted 'expired'. Always less than or equal to warningDays.

Required range: x >= 0
categoryLabel
string
required

Human-readable category label for the matched GPC brick (e.g. 'Fresh / refrigerated'). Surfaced as the chip's secondary text. Empty-string is never returned — the fallback layers always carry a label.

source
string
required

Which precedence layer produced these values: org-override | org-fallback | global-default | global-fallback | built-in. Useful for transparency and debugging which rule applied.