Skip to content

Get a canon staleness policy

Canon module

GET/canon/staleness-policies/{age_months_gte}canonStalenessPolicies.get

A staleness step: how a price band degrades with age. Returns one canon staleness policy with its `ETag`. A canon staleness policy the caller may not see returns 404.

  • Requires the capability canon.taxonomy.read.
  • OAuth scopes: canon.
  • Error statuses: 400, 401, 404, 429. Errors are RFC 9457 problem details.

Path and query parameters

canonStalenessPolicies.get: Path and query parameters
FieldTypeRequiredDescription
age_months_gteintegerYesAge in months at which the action applies.Constraints: range 0 to any
fieldsFieldsNoSparse fieldset: a comma-separated list of top-level fields to return. `id` is always returned.Constraints: pattern ^[a-z_][a-z0-9_]*(,[a-z_][a-z0-9_]*)*$

Response 200: CanonStalenessPolicy

canonStalenessPolicies.get: CanonStalenessPolicy
FieldTypeRequiredDescription
age_months_gteintegerYesAge in months at which the action applies.Constraints: range 0 to any
actionstringYesAction taken at that age.Constraints: pattern ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$
detailstring | nullYesDetail of the action.Constraints: length 1 to 20000
{
  "age_months_gte": 12,
  "action": "degrade",
  "detail": "Degrade one step."
}

Code samples

curl -X GET "$XOS_BASE_URL/canon/staleness-policies/12" \
  -H "Authorization: Bearer $XOS_API_KEY"
const { data, etag } = await xos.canonStalenessPolicies.get("12");
response = xos.canon_staleness_policies.get("12")
xos canon-staleness-policies get 12