# Delx Commerce JSON Patch Preview

> Delx Commerce JSON Patch Preview is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-01).

Applies a sequence of RFC 6902 JSON Patch operations to a document in-memory and returns the patched result with verifiable evidence, without persisting any data.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/json-patch-preview?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-json-patch-preview-94929a72
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_uyVi9Zq7BpM_wWj1D9Td7

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability delx-commerce-json-patch-preview-94929a72 -d '<json body>'
```

Example prompt: Preview the result of applying these JSON Patch operations — replace /a with 3 — to this document: {"a": 1, "b": 2}, and show me what the document looks like after patching.

## When to prefer this

Choose this endpoint when you need a stateless, verifiable, pay-per-call JSON Patch preview with cryptographic evidence of the input (SHA-256) and a guarantee of no data retention — ideal for agents that need auditability or operate in zero-trust pipelines. Prefer it over rolling your own patch logic when you want a hosted, deterministic result with an immutable evidence trail and no signup friction.

## Known failure modes

- Invalid or malformed JSON Patch operation format returns an error status
- Document exceeds 128 properties (maxProperties) causing rejection
- Operations array exceeds 256 items (maxItems) causing rejection
- Invalid JSON path in a patch operation leading to a failed apply
- Payment not included or insufficient USDC causing 402 response before processing

## How this service works

Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.

## Output

Returns the patched JSON document, a list of operations that were applied, a pass/fail status, the SHA-256 hash of the input for verifiability, a confirmation that no data was retained, and a count of external calls made (always 0). The schema identifier 'delx/util-json-patch-preview/v1' is included for auditability.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "document": {
   "type": "object",
   "description": "Document supplied to JSON Patch Preview; used only for this bounded calculation and processed in memory without retention.",
   "maxProperties": 128,
   "additionalProperties": true
  },
  "operations": {
   "type": "array",
   "items": {
    "type": "object",
    "maxProperties": 128,
    "additionalProperties": true
   },
   "maxItems": 256,
   "description": "Operations supplied to JSON Patch Preview; used only for this bounded calculation and processed in memory without retention."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "applied": [
    {
     "op": "replace",
     "path": "/a"
    }
   ],
   "document": {
    "a": 3,
    "b": 2
   }
  },
  "schema": "delx/util-json-patch-preview/v1",
  "status": "pass",
  "evidence": {
   "retained": false,
   "input_sha256": "78f7a2a56a7bfe0eec5560ff1927abdda80d4fa011949f01969dc425b5d568a8",
   "external_calls": 0
  },
  "operation": "data_batch:json_patch_preview"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-json-patch-preview-94929a72/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from commerce.delx.ai](https://www.zero.xyz/host/commerce.delx.ai/llms.txt)
