> ## Documentation Index
> Fetch the complete documentation index at: https://docs.closient.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage Resolver Behavior

> Read and change a product's resolver behavior — enhanced resolution, expired-scan handling, the serial policy, the shelf-life offset, the 18+ age gate — and whether the product is enrolled in the resolver; the programmatic equivalent of the dashboard's product Resolver behavior page and Resolver Products list.

Programmatic equivalent of two dashboard pages: a product's **Resolver
behavior** page (`products/<gtin>/resolver-behavior/`) and the organization's
**Resolver products** list (`resolver/products/`), where each product's
resolver enrollment is switched on or off.

## When to use

* A brand owner wants expired scans of a product (a past use-by or best-before
  date in the scanned link) handled differently: a notice, or a redirect.
* A brand owner wants unknown serials of a product to show an
  unverified-unit page instead of falling back to the product page.
* A brand owner wants to declare the product's shelf life, put it behind an
  18+ age gate, or turn enhanced resolution on or off.
* A brand owner wants to enroll a product in the resolver, or take it out.

Where a scan **goes** is decided by resolution rules (`manage-resolution-rules`),
not here.

## Auth

`X-API-Key` header or OAuth token. Reading needs view access to the
organization. Writing needs an OWNER, MANAGER or EDITOR of the organization (or
an API key with the EDITOR role or above); anyone else gets `403`.

## Flow

```
GET   /resolver/api/v1/organizations/{organization_id}/products/{gtin}/resolver-behavior
PATCH /resolver/api/v1/organizations/{organization_id}/products/{gtin}/resolver-behavior
PUT   /resolver/api/v1/organizations/{organization_id}/products/{gtin}/resolver-enabled
```

`{gtin}` is the product's GTIN (8 to 14 digits; it is normalized to GTIN-14).
A product that does not belong to one of the organization's brands is `404`.

* **`GET`** — the product's enrollment (`resolver_enabled`,
  `resolver_enabled_at`) and every behavior control below.
* **`PATCH`** — send only the fields to change; a field left out keeps its
  value. The whole update applies or none of it does: one refused value is a
  `422` and nothing is stored.
* **`PUT resolver-enabled`** — body `{"enabled": true}` or `{"enabled": false}`.
  It sets the state rather than toggling it, so repeating a request changes
  nothing. Free on every plan.

### Behavior controls

| Field | Values | Meaning |
| - | - | - |
| `enhanced_resolution_enabled` | `true` / `false` | The paid enhanced tier for this GTIN. Turning it on counts against the plan's enhanced allowance (`403` with an `upgrade_url` beyond it, or on a lapsed account) and needs the product to be enrolled (`422` otherwise). |
| `expiry_behavior` | `NONE`, `NOTICE`, `REDIRECT` | What a scan carrying a past use-by (AI 17) or best-before (AI 15) date gets. `REDIRECT` needs `expiry_redirect_url`. Acted on only while enhanced resolution is on. |
| `expiry_redirect_url` | absolute `http(s)` URL | Where an expired scan goes under `REDIRECT`. |
| `serial_policy` | `PERMISSIVE`, `STRICT` | `PERMISSIVE` falls back to the deepest known page for an unknown serial; `STRICT` shows an unverified-unit page. Acted on only while enhanced resolution is on. |
| `shelf_life_offset_days` | 0–3650 | Days from manufacture to the printed date. |
| `shelf_life_offset_ai` | `15`, `17` | Which printed date the offset produces: best-before or use-by. Needs `shelf_life_offset_days` in the same request unless the product already has one. |
| `age_restricted` | `true` / `false` | Scans pass an 18+ age gate first. |

### Enrollment

`resolver_enabled` is the product's resolver enrollment: its billable unit.
While it is off, the product's lots and serials are not billable either
(their own flags are kept) and enhanced resolution cannot be turned on. It does
not stop scans from resolving: a product that is not enrolled still resolves.

## Verify

1. `GET` the product's resolver behavior and confirm every field you changed
   holds the value you sent, and that nothing you did not mean to change moved.
2. For an expiry or serial-policy change, resolve a scan that exercises it
   (MCP tool `resolve_gtin`, or `GET /01/<gtin>/10/<lot>?17=<past date>` or
   `GET /01/<gtin>/21/<serial>` without following redirects) and read the
   `Location` header of the redirect.

## Notes

* Resolution rules are `manage-resolution-rules`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.