curl --request GET \
--url https://www.closient.com/scanner/api/v1/freshness-thresholdsimport requests
url = "https://www.closient.com/scanner/api/v1/freshness-thresholds"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://www.closient.com/scanner/api/v1/freshness-thresholds', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.closient.com/scanner/api/v1/freshness-thresholds",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.closient.com/scanner/api/v1/freshness-thresholds"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://www.closient.com/scanner/api/v1/freshness-thresholds")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.closient.com/scanner/api/v1/freshness-thresholds")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"categoryLabel": "Fresh / refrigerated",
"criticalDays": 3,
"source": "global-default",
"warningDays": 7
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}Resolve freshness chip thresholds for a scanned GTIN
Return the color-coded freshness-chip thresholds for a scanned GTIN, resolved from the GPC-brick → category-threshold config (C-2861) and any per-brand organization overrides.
Called by the public /scan/ overlay after a Digital Link / DataMatrix decode: the chip first renders with the client-side default thresholds, then re-tints with the values returned here.
Anonymous-allowed — no API key required. Always returns 200 with a usable threshold set: an unknown or malformed GTIN falls back to the global-default thresholds so the chip never breaks.
curl --request GET \
--url https://www.closient.com/scanner/api/v1/freshness-thresholdsimport requests
url = "https://www.closient.com/scanner/api/v1/freshness-thresholds"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://www.closient.com/scanner/api/v1/freshness-thresholds', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.closient.com/scanner/api/v1/freshness-thresholds",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.closient.com/scanner/api/v1/freshness-thresholds"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://www.closient.com/scanner/api/v1/freshness-thresholds")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.closient.com/scanner/api/v1/freshness-thresholds")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"categoryLabel": "Fresh / refrigerated",
"criticalDays": 3,
"source": "global-default",
"warningDays": 7
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}Query Parameters
The scanned GTIN (8/12/13/14 digits, hyphens/spaces tolerated).
1 - 20^[^\x00]{1,20}$Response
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.
Days-remaining at or above which the chip is tinted 'fresh'. Below this (but at or above criticalDays) the chip is 'warning'.
x >= 0Days-remaining below which the chip is tinted 'expired'. Always less than or equal to warningDays.
x >= 0Human-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.
Which precedence layer produced these values: org-override | org-fallback | global-default | global-fallback | built-in. Useful for transparency and debugging which rule applied.