# Assessments

An assessment is the one object each product returns when it decides on something, with the same naming across Authorize, Mandate, Attest and Identify.

An assessment is the object a product returns when it decides on something: a cart, an agent's action, a capture or a request to your site. Each product has its own, and all four are named and reached the same way: an `assess` route that makes one, and an `assessments` collection that reads them back.

## When to use it

- Branch your code on an assessment's `outcome` right after the call.
- Store the assessment's `id` next to your order, payment or claim, so you can read the decision back later.
- Learn one shape and use it on every product you build on.

## How it works

| Product | What it decides on | Make one | Read it back | Object | ID |
| --- | --- | --- | --- | --- | --- |
| Authorize | An agent's cart | `POST /v1/authorize/checkout_assessments` | `GET /v1/authorize/checkout_assessments/{id}` | `checkout_assessment` | `cas_…` |
| Mandate | An agent's action | `POST /v1/mandate/assessments` | `GET /v1/mandate/assessments/{id}` | `mandate_assessment` | `mas_…` |
| Attest | A capture request's photos | Made at the first upload, updated at each one | `GET /v1/attest/capture_requests/{id}/assessment` | `capture_assessment` | `caa_…` |
| Identify | A request to your site | `POST /v1/identify/assessments` | `GET /v1/identify/assessments/{id}` | `traffic_assessment` | `tas_…` |

Each product keeps its own outcome values, listed on [Outcome words](https://provenanceauth.com/docs/reference/outcomes.md):

| Object | Field | Values |
| --- | --- | --- |
| `checkout_assessment` | `outcome` | `allow`, `challenge`, `reject` |
| `mandate_assessment` | `valid`, with `reason` when it's false | `true`, `false` |
| `mandate_assessment`, read back | `result` | `valid`, `pending`, `denied` |
| `capture_assessment` | `outcome`, the worst photo's so far | `approved`, `in_review`, `rejected` |
| `traffic_assessment` | `decision.action`, what your traffic policy did | `allow`, `challenge`, `block`, `log_only`, `rate_limit`, `require_intent` |

A mandate assessment is a row in your [decision ledger](https://provenanceauth.com/docs/mandate/concepts/decision-ledger.md): its `id` is the row's, so its receipt is at `GET /v1/mandate/assessments/{id}/receipt` and the chain check at `GET /v1/mandate/assessments/verify_chain`. Rows written before November 2026 keep their `dec_` IDs.

A capture assessment's `id` is the capture request's ID under its own prefix: `capr_01M6…` has the assessment `caa_01M6…`. Before the first photo is uploaded, the read answers 404 `capture_assessment_not_ready`. A capture has no agent request, so its `signature` and `authority` are null.

The traffic assessment list filters on the outcome, the class, the signature, the bot likelihood and when it was assessed, and each read reports the visit's bot likelihood.

A checkout assessment can reuse a traffic assessment your server already has: send its `tas_` ID as `traffic_assessment_id` instead of the agent's `request`, within 5 minutes.

## When a person is asked

A checkout assessment is your one object for the cart, from the agent's first try to the person's answer. While the person is asked, its `challenge` says how:

| Field | What it holds |
| --- | --- |
| `channel` | `text`, `email` or `app_notification`, or `agent_relay` when the agent relays the link |
| `sent_to` | The masked contact the first message went to, or null for the relay |
| `status` | `pending`, `in_review` while your review holds the yes, or `expired` |
| `expires_at` | When the link stops working, or when the review times out |

Once the person decides, the same assessment is updated in place:

| Field | After the decision |
| --- | --- |
| `outcome`, `reason` | The new outcome, such as `allow` with `person_approved` |
| `approval_context` | How they decided; its `subject` names the cart approval |
| `policy` | The after-approval rule, when one decided |
| `updated_at` | When it changed |

Each change sends `authorize.checkout_assessment.updated` with `previous_outcome`. Decide an order your review holds on the assessment ([review orders](https://provenanceauth.com/docs/authorize/guides/review-orders.md)).

## The rule that decided

Every assessment names the rule that decided it in one block, `policy`, the same on all four products and on every policy simulation:

```json
{
  "policy": {
    "id": "pol_3F9A1C7E52B04D8E6A1F27C9B4",
    "version": 4,
    "rule": {
      "id": "rul_01JD2Q8V5KX4T7M2R9B3C6D8EF",
      "name": "Payments over $1,000 need a person",
      "phase": "assess",
      "action": "challenge",
      "conditions": [{ "fact": "transaction_amount", "op": "gt", "value": 1000, "actual": 1850 }]
    }
  }
}
```

- `id` (string): The product's policy, `pol_` and 26 characters, the same on every version.
- `version` (integer | null): The version that decided. Null on the built-in default rules, 0 when you simulate a draft.
- `rule.id` (string): Set by Provenance: `rul_` and a ULID, kept across versions, or `rul_default_…` for a default row (the same in every account). See [rule ids](https://provenanceauth.com/docs/concepts/policies.md#rule-ids).
- `rule.name` (string | null): The rule's name in the builder (its `label`).
- `rule.phase` (string): `assess`, or `after_approval` for a store's checkout rule that runs once the person decided.
- `rule.action` (string): What the rule did: `approve`, `challenge`, `reject` or `review` (see [Outcome words](https://provenanceauth.com/docs/reference/outcomes.md)). A traffic rule that blocks reads `reject`; one that asks for a person's approval, `challenge`.
- `rule.conditions` (array): Each condition of the rule with `actual`, the value the engine compared. When a value was missing, `actual` is null and `unavailable` says why.

Only the deciding rule is listed: rules that were checked and didn't match are not. `policy` is null when no rule decided, and the assessment's `reason` then says what did, such as a token that covered the cart or a yes the person had already given.

Comparisons such as whether the approver's location matches the billing address, or how far a photo was taken from the loss address, are rule facts. They appear in a result only as an `actual` here, never as their own field. The raw values (the network's country and region, the device's time zone) stay on the reads.

A mandate assessment read back from the ledger also keeps the record's own `matched_rule_id` and `policy_version`, as the record was written, because `record_hash` covers them. `policy` names the same rule by its current ID and name.

## How the agent signed

`signature` says how the agent's request was signed, the same block on the checkout, mandate and traffic assessments. A capture has no agent request, so its `signature` is null.

```json
{
  "signature": {
    "method": "http_signature",
    "valid": true,
    "key_id": "kM2rT7bQ0x",
    "directory": "provenance_registry",
    "agent_id": "agt_01JD4P9W2C",
    "covers": ["@method", "@path", "content-digest"]
  }
}
```

- `method` (string): `web_bot_auth`: an HTTP message signature with a `Signature-Agent` header, checked against the keys its directory publishes. `http_signature`: one with no `Signature-Agent`, checked against a key the agent registered with Provenance. `none`: no signature was checked.
- `valid` (boolean | null): True when the signature verified, false when one was sent and didn't, null when nothing was signed.
- `key_id` (string | null): The signature's `keyid`, the key's JWK thumbprint.
- `directory` (string | null): Where the key was found: the `Signature-Agent` directory, or `provenance_registry`.
- `agent_id` (string | null): The registered agent the key belongs to, when the signature verified against a Provenance key.
- `covers` (array): The parts of the request the signature covers, by name.

Where the signature comes from differs by product:

| Assessment | The request it checks | A signature that doesn't verify |
| --- | --- | --- |
| `traffic_assessment` | The request you pass to `POST /v1/identify/assessments` (the middleware reads Web Bot Auth only) | Reported as `valid: false`; your traffic policy decides what it gets |
| `checkout_assessment` | The agent's `request`, through the hosted check, or the verdict you name with `traffic_assessment_id` | Reported as `valid: false`, as Identify saw it |
| `mandate_assessment` | The agent's request as your tool received it, sent as `request` | `valid: false` with `agent_signature_invalid`, or `agent_signature_unverified` when its directory can't be checked, before the token is read |

An `http_signature` must cover the method and the path. When it covers `content-digest`, send the body as `request.body` and the digest must match it. A key no agent registered with Provenance isn't Provenance's to judge: the request reads as unsigned.

## What covered it

`authority` says what covered the action: the token a person's approval minted, the grant they gave, or a mandate from another issuer you trust.

```json
{
  "authority": {
    "kind": "provenance_intent_token",
    "verified": true,
    "verified_against": "provenance_jwks",
    "alg": "ES256",
    "key_id": "kH3pQe",
    "issuer": "https://api.provenanceauth.com",
    "mandate_id": "grt_01JD3R5A9X",
    "mandate_chain": ["grt_01JD3R5A9X"],
    "approval_context_id": null,
    "cart_match": "not_applicable"
  }
}
```

- `kind` (string): `provenance_intent_token`: a token a person's approval minted. `provenance_mandate`: a grant presented alone. `third_party_mandate`: an AP2 or ACP mandate from an issuer you trust, whose cart matches. `none`: nothing covered it, and the assessment's `reason` says why.
- `verified` (boolean): True when the token verified against Provenance's published keys (ES256).
- `key_id` (string | null): The `kid` of the key that signed the token.
- `issuer` (string | null): The token's issuer.
- `mandate_id` (string | null): The grant the token was issued under, or the grant presented alone.
- `mandate_chain` (array): From the person's grant down to the one the agent holds, root first. Present with `mandate_id`. A traffic assessment leaves it out, because the middleware can't see the chain.
- `approval_context_id` (string | null): On an intent token, the approval context of the person's yes that minted it, when one is known.
- `cart_match` (string): `matched` when the token's binding (or an AP2 Payment Mandate's total, currency and payee) equals the cart, `merchant_facts` when an AP2 Checkout Mandate matched your own Checkout, `not_applicable` for an agent action or a request, where the payload or request hash binds instead.
- `protocol` (string): On `third_party_mandate`: `ap2` or `acp`.
- `verified_by` (string): On `third_party_mandate`: `issuer_jwks` (the keys of an issuer you list) or `merchant_verifier` (your own AP2 verifier, through Identify).
- `evidence_hash` (string | null): On `third_party_mandate`: the SHA-256 of the mandate as presented. Null when Provenance never saw it (a verdict your middleware reported).

No Provenance key signs a third party's mandate, so its block has no algorithm or key id, and its issuer is the name you listed it under.

| Assessment | Its `authority` |
| --- | --- |
| `checkout_assessment` | The token or grant that covered the cart, or a third party's mandate (see [third-party mandates](https://provenanceauth.com/docs/authorize/guides/assess-checkouts.md#third-party-mandates)). A yes the person had already given covers it too, and reads `none` here because the agent presented nothing, unless an AP2 mandate gave it |
| `mandate_assessment` | The intent token once its signature, revocation and bindings held, whatever your rules then decided |
| `traffic_assessment` | The person's token the request carried, or null when it carried none |
| `capture_assessment` | Null |

Neither block is ever in a token, and both are on every plan.

Each `assess` call is metered as its route always was: a checkout assessment as a verified order, a mandate assessment as a decision, a traffic assessment as a hosted check. A capture assessment is part of the capture.

## Which platform sent it

A traffic assessment names the agent platform behind the request in `request.agent.platform`, and a checkout assessment carries the same object in `signature.platform` when Identify ran for the checkout. Each is labelled by how it was named:

```json
{
  "request": {
    "method": "GET",
    "path": "/products/linen-a5",
    "agent": { "platform": { "name": "openai", "label": "OpenAI", "source": "declared" } }
  }
}
```

| `source` | What it means | How far to trust it |
| --- | --- | --- |
| `signed` | The request's Web Bot Auth signature verified against the keys its `Signature-Agent` directory publishes, and that directory is on a domain the platform controls | The platform holds the keys, so the request is the platform's |
| `declared` | The user agent names a crawler on the known-crawler list, with nothing signed | What the request says. A claim the operator's published IP ranges contradict names no platform |

`platform` is null when neither names one. Identify never guesses it. A name is the platform's own in lowercase, such as `openai` or `common_crawl`; [Policy fields](https://provenanceauth.com/docs/mandate/reference/policy-fields.md) lists them all.

Rules read the platform on every plan:

| Policy | Facts |
| --- | --- |
| Checkout and agent policies | `agent.platform`, `agent.platform_source` |
| Your traffic policy | `agent.platform`, `agent.platform_source` |

On a mandate assessment, the platform comes from the agent's `request` and is a rule fact only.

## How likely it's a bot

The traffic and checkout assessments carry `bot`: a score and coarse named signals.

```json
{
  "bot": { "likelihood": 12, "band": "low", "reason": null, "signals": ["typed", "pointer_seen"] }
}
```

- `likelihood` (integer | null): 0 to 100: the higher of Identify's bot score and the visit's field-timing score. Null when nothing scored the visitor.
- `band` (string): `medium` (30 to 69) or `high` (70 and over). `low` only when the score is under 30 and field timing saw a person type or use a pointer. Otherwise `unclassified`: nothing shows a bot or a person.
- `reason` (string | null): Why `band` is `unclassified`: `not_checked` (nothing to score), `no_field_timing` (the score is under 30 and no field timing ran) or `no_person_signal` (field timing saw no typing and no pointer). Null otherwise.
- `signals` (array): The named signals that are true, from a fixed list: `headless` (a headless browser or an automation driver), `hosting_ip` (a cloud or hosting provider's network), `typed` (a field was typed, not every value pasted or autofilled) and `pointer_seen` (a pointer moved, clicked or touched before submit).

A request alone is never `low`, because only field timing on the storefront visit can show a person. Send the visit's `tas_` ID as `visit_id` on a checkout assessment to add it.

`bot` carries names and a score only. The raw timings (the gap between key events, how long the form took) are rule facts your checkout rules can read (`agent.typing_interval_ms`, `agent.checkout_fill_seconds`), and no response, stored assessment or webhook carries them. When one decides, its condition in `policy.rule.conditions` shows the value you compared with and `actual: null` with `unavailable: "withheld"`.

Checkout rules read the block on every plan:

| Part of the block | Rule fact |
| --- | --- |
| `band` | `agent.bot_likelihood` |
| `likelihood` | `agent.bot_likelihood_score` |
| Each name in `signals` | A boolean fact of the same name, such as `agent.headless` |

A rule that could reject on behaviour alone is refused (`behaviour_only_reject`); add a condition that must hold too.

## How a person decided

An assessment a person took part in carries `approval_context`: the method, the passkey, the device and the network of their decision, the same object on every product (see [Approval context](https://provenanceauth.com/docs/concepts/approval-context.md)). It's null when no person took part. A capture carries one per captured item, in `capture.items[].approval_context`.

## Related

- [Approval context](https://provenanceauth.com/docs/concepts/approval-context.md)
- [Outcome words](https://provenanceauth.com/docs/reference/outcomes.md)
- [Traffic assessment](https://provenanceauth.com/docs/identify/concepts/traffic-assessment.md)
- [Decision ledger](https://provenanceauth.com/docs/mandate/concepts/decision-ledger.md)
- [Checkout assessments](https://provenanceauth.com/docs/authorize/guides/assess-checkouts.md)
