Does a change to the approved thing invalidate the approval under a materiality policy?
Compares what a human or system approved with what is about to be executed (a quote, order, plan, diff summary: any JSON) under a caller-supplied materiality policy: per-path rules exact / ignore / numeric tolerance (absolute or percent) / no-increase / no-decrease, with the longest matching path winning and a default for unlisted paths. Also covers quote revisions (approved revision number must equal the current one) and expiry (approvedAt + validForSeconds against a caller asOf). pass = approval still covers the action; fail = a material change, a superseded revision or an expired approval (witnesses name the path, approved and current values); unknown = the policy or time evidence needed is missing. Does not decide what is material for you.
What you get
Stops an agent from executing a changed price, quantity or recipient under an approval given for the old one.
Call it
Send the JSON body below to https://agents.writerslogic.com/api/v1/approval-invalidation. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.
curl -i -X POST https://agents.writerslogic.com/api/v1/approval-invalidation \
-H 'content-type: application/json' \
-d '{"approved":{"total":1000,"currency":"USD","items":[{"sku":"A","qty":2}],"note":"v1"},"current":{"total":1004,"currency":"USD","items":[{"sku":"A","qty":2}],"note":"v2"},"policy":{"default":"material","fields":[{"path":"/total","rule":"numeric-tolerance","pct":1},{"path":"/note","rule":"ignore"}]}}'
Input
| Field | Type | Required | Description |
|---|---|---|---|
approved | any | yes | The approved snapshot (JSON). |
current | any | yes | The version about to be executed (JSON). |
policy | object | no | |
approvedRevision | integer; 0..1000000000 | no | |
currentRevision | integer; 0..1000000000 | no | |
requireSameRevision | boolean | no | Default true when either revision is given (a missing partner gives unknown): an approval for another revision does not cover this one. Send false to ignore the revisions. |
approvedAt | string; length 0..40 | no | RFC 3339 instant. |
validForSeconds | integer; 0..315360000 | no | |
asOf | string; length 0..40 | no | RFC 3339 instant for the expiry check; no clock is read. |
Example request body
{
"approved": {
"total": 1000,
"currency": "USD",
"items": [
{
"sku": "A",
"qty": 2
}
],
"note": "v1"
},
"current": {
"total": 1004,
"currency": "USD",
"items": [
{
"sku": "A",
"qty": 2
}
],
"note": "v2"
},
"policy": {
"default": "material",
"fields": [
{
"path": "/total",
"rule": "numeric-tolerance",
"pct": 1
},
{
"path": "/note",
"rule": "ignore"
}
]
}
}
Result
The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.
| Field | Type | Required | Description |
|---|---|---|---|
status | string; one of "pass", "fail", "unknown", "unsupported" | no | pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass. |
invalidated | boolean | no | |
materialChanges | array<object> | no | At most 100 listed. |
materialCount | integer | no | |
immaterialCount | integer | no | |
expired | boolean | no | Present when expiry was evaluated. |
witnesses | array<object> | no | |
versions | object | no | Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile). |
limits | array<string> | no | |
deterministic | boolean | no | Always true: pure code, no model. |
Pay and connect
Available through: x402 (USDC on Base), MCP. MCP clients reach it through the execution-safety-kit package.
Machine-readable
- This agent as JSON (schemas, example, OpenAPI operation)
- Free signed sample response
- OpenAPI 3.1 · Catalog · Index of every agent